Buckets:
| { | |
| "parametrized_description": "A patient can consume NumSyrups different syrups for treatment. For each syrup, a serving delivers MedicineThroatPerServing units of medicine to the throat and MedicineLungsPerServing units of medicine to the lungs. Each serving contains SugarPerServing units of sugar. The patient must receive no more than MaxMedicineThroat units of medicine for the throat and at least MinMedicineLungs units of medicine for the lungs. The objective is to determine the number of servings of each syrup to minimize total sugar intake.", | |
| "keywords": [ | |
| "N.A." | |
| ], | |
| "parameters": { | |
| "NumSyrups": { | |
| "description": "Number of available syrups", | |
| "shape": [] | |
| }, | |
| "MedicineThroatPerServing": { | |
| "description": "Amount of medicine delivered to the throat per serving of each syrup", | |
| "shape": [ | |
| "NumSyrups" | |
| ] | |
| }, | |
| "MedicineLungsPerServing": { | |
| "description": "Amount of medicine delivered to the lungs per serving of each syrup", | |
| "shape": [ | |
| "NumSyrups" | |
| ] | |
| }, | |
| "SugarPerServing": { | |
| "description": "Amount of sugar per serving of each syrup", | |
| "shape": [ | |
| "NumSyrups" | |
| ] | |
| }, | |
| "MaxMedicineThroat": { | |
| "description": "Maximum total medicine allowed for the throat", | |
| "shape": [] | |
| }, | |
| "MinMedicineLungs": { | |
| "description": "Minimum total medicine required for the lungs", | |
| "shape": [] | |
| } | |
| }, | |
| "variables": { | |
| "Servings": { | |
| "description": "The number of servings for each syrup", | |
| "type": "continuous", | |
| "shape": [ | |
| "NumSyrups" | |
| ] | |
| } | |
| }, | |
| "constraints": [ | |
| { | |
| "description": "The total amount of medicine delivered to the throat by all syrups must not exceed MaxMedicineThroat units.", | |
| "formulation": "\\sum_{i=1}^{NumSyrups} MedicineThroatPerServing_i \\times Servings_i \\leq MaxMedicineThroat", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(MedicineThroatPerServing[i] * Servings[i] for i in range(NumSyrups)) <= MaxMedicineThroat)" | |
| } | |
| }, | |
| { | |
| "description": "The total amount of medicine delivered to the lungs by all syrups must be at least MinMedicineLungs units.", | |
| "formulation": "\\sum_{i=1}^{NumSyrups} Servings_i \\times MedicineLungsPerServing_i \\geq MinMedicineLungs", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(Servings[i] * MedicineLungsPerServing[i] for i in range(NumSyrups)) >= MinMedicineLungs)" | |
| } | |
| } | |
| ], | |
| "objective": { | |
| "description": "Minimize the total sugar intake, which is the sum of SugarPerServing units of sugar per serving multiplied by the number of servings of each syrup.", | |
| "formulation": "Min \\sum_{i=1}^{NumSyrups} SugarPerServing_{i} \\times Servings_{i}", | |
| "code": { | |
| "gurobipy": "model.setObjective(quicksum(SugarPerServing[i] * Servings[i] for i in range(NumSyrups)), GRB.MINIMIZE)" | |
| } | |
| } | |
| } |
Xet Storage Details
- Size:
- 3.25 kB
- Xet hash:
- 50121cbcd08cc8ae2eedf5bee8c3246cbcdb8f37ef96910b78afdbd97bd2c88b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.