Buckets:
| { | |
| "parametrized_description": "A patient can take doses of NumPainKillers different pain killers. Each dose of each pain killer delivers MedicinePerDose units of medicine to each of NumTargets targets. The total amount of sleep medicine delivered must not exceed MaxSleepMedicine units. The total amount of medicine delivered to the legs must be at least MinLegsMedicine units. The objective is to determine the number of doses of each pain killer to maximize the total amount of medicine delivered to the back.", | |
| "keywords": [ | |
| "N.A." | |
| ], | |
| "parameters": { | |
| "NumPainKillers": { | |
| "description": "Number of different pain killers available", | |
| "shape": [] | |
| }, | |
| "NumTargets": { | |
| "description": "Number of different medicine targets", | |
| "shape": [] | |
| }, | |
| "MedicinePerDose": { | |
| "description": "Amount of medicine delivered to each target per dose for each pain killer", | |
| "shape": [ | |
| "NumPainKillers", | |
| "NumTargets" | |
| ] | |
| }, | |
| "MaxSleepMedicine": { | |
| "description": "Maximum units of sleeping medicine that can be delivered", | |
| "shape": [] | |
| }, | |
| "MinLegsMedicine": { | |
| "description": "Minimum units of medicine required for legs", | |
| "shape": [] | |
| } | |
| }, | |
| "variables": { | |
| "NumDoses": { | |
| "description": "The number of doses for each painkiller", | |
| "type": "continuous", | |
| "shape": [ | |
| "NumPainKillers" | |
| ] | |
| } | |
| }, | |
| "constraints": [ | |
| { | |
| "description": "The total amount of sleep medicine delivered must not exceed MaxSleepMedicine units.", | |
| "formulation": "\\sum_{p=1}^{\\text{NumPainKillers}} \\text{MedicinePerDose}_{p, \\text{Sleep}} \\times \\text{NumDoses}_p \\leq \\text{MaxSleepMedicine}", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(MedicinePerDose[p, 'Sleep'] * NumDoses[p] for p in range(NumPainKillers)) <= MaxSleepMedicine)" | |
| } | |
| }, | |
| { | |
| "description": "The total amount of medicine delivered to the legs must be at least MinLegsMedicine units.", | |
| "formulation": "\\sum_{i=1}^{NumPainKillers} \\text{MedicinePerDose}_{i, \\text{Legs}} \\times \\text{NumDoses}_{i} \\geq \\text{MinLegsMedicine}", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(MedicinePerDose[i][0] * NumDoses[i] for i in range(NumPainKillers)) >= MinLegsMedicine)" | |
| } | |
| } | |
| ], | |
| "objective": { | |
| "description": "The objective is to maximize the total amount of medicine delivered to the back.", | |
| "formulation": "Max \\sum_{i=1}^{NumPainKillers} \\text{NumDoses}_i \\cdot \\text{MedicinePerDose}_{i, \\text{back}}", | |
| "code": { | |
| "gurobipy": "model.setObjective(quicksum(NumDoses[i] * MedicinePerDose[i, \"back\"] for i in range(NumPainKillers)), GRB.MAXIMIZE)" | |
| } | |
| } | |
| } |
Xet Storage Details
- Size:
- 3.04 kB
- Xet hash:
- 9b845495c0e767d3ebbf18cea5a0dd40b7401e3f3f0306636c73ec84d8cac2cc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.