Buckets:
| { | |
| "parametrized_description": "A show performs NumDemonstrations different demonstrations. Each demonstration i uses MintUsed[i] units of mint and ActiveIngredientUsed[i] units of active ingredient to produce FoamProduced[i] units of minty foam and BlackTarProduced[i] units of black tar. The show has TotalMintAvailable units of mint and TotalActiveIngredientAvailable units of active ingredient available. At most MaxBlackTarAllowed units of black tar can be produced. Determine the number of each demonstration to maximize the total minty foam produced.", | |
| "keywords": [ | |
| "N.A." | |
| ], | |
| "parameters": { | |
| "NumDemonstrations": { | |
| "description": "Number of demonstrations", | |
| "shape": [] | |
| }, | |
| "MintUsed": { | |
| "description": "Amount of mint used by each demonstration", | |
| "shape": [ | |
| "NumDemonstrations" | |
| ] | |
| }, | |
| "ActiveIngredientUsed": { | |
| "description": "Amount of active ingredient used by each demonstration", | |
| "shape": [ | |
| "NumDemonstrations" | |
| ] | |
| }, | |
| "FoamProduced": { | |
| "description": "Amount of minty foam produced by each demonstration", | |
| "shape": [ | |
| "NumDemonstrations" | |
| ] | |
| }, | |
| "BlackTarProduced": { | |
| "description": "Amount of black tar produced by each demonstration", | |
| "shape": [ | |
| "NumDemonstrations" | |
| ] | |
| }, | |
| "TotalMintAvailable": { | |
| "description": "Total units of mint available", | |
| "shape": [] | |
| }, | |
| "TotalActiveIngredientAvailable": { | |
| "description": "Total units of active ingredient available", | |
| "shape": [] | |
| }, | |
| "MaxBlackTarAllowed": { | |
| "description": "Maximum units of black tar allowed", | |
| "shape": [] | |
| } | |
| }, | |
| "variables": { | |
| "DemonstrationUsed": { | |
| "description": "Number of times each demonstration is used", | |
| "type": "continuous", | |
| "shape": [ | |
| "NumDemonstrations" | |
| ] | |
| } | |
| }, | |
| "constraints": [ | |
| { | |
| "description": "The total amount of mint used by all demonstrations cannot exceed the total mint available.", | |
| "formulation": "\\sum_{i=1}^{NumDemonstrations} MintUsed_i \\times DemonstrationUsed_i \\leq TotalMintAvailable", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(MintUsed[i] * DemonstrationUsed[i] for i in range(NumDemonstrations)) <= TotalMintAvailable)" | |
| } | |
| }, | |
| { | |
| "description": "The total amount of active ingredient used by all demonstrations cannot exceed the total active ingredient available.", | |
| "formulation": "\\sum_{i=1}^{NumDemonstrations} ActiveIngredientUsed_i \\cdot DemonstrationUsed_i \\leq TotalActiveIngredientAvailable", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(ActiveIngredientUsed[i] * DemonstrationUsed[i] for i in range(NumDemonstrations)) <= TotalActiveIngredientAvailable)" | |
| } | |
| }, | |
| { | |
| "description": "The total amount of black tar produced cannot exceed the maximum black tar allowed.", | |
| "formulation": "\\sum_{j=1}^{NumDemonstrations} BlackTarProduced_{j} \\times DemonstrationUsed_{j} \\leq MaxBlackTarAllowed", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(BlackTarProduced[j] * DemonstrationUsed[j] for j in range(NumDemonstrations)) <= MaxBlackTarAllowed)" | |
| } | |
| } | |
| ], | |
| "objective": { | |
| "description": "Maximize the total minty foam produced by all demonstrations.", | |
| "formulation": "Max \\sum_{d=1}^{NumDemonstrations} FoamProduced_d \\cdot DemonstrationUsed_d", | |
| "code": { | |
| "gurobipy": "model.setObjective(quicksum(FoamProduced[d] * DemonstrationUsed[d] for d in range(NumDemonstrations)), GRB.MAXIMIZE)" | |
| } | |
| } | |
| } |
Xet Storage Details
- Size:
- 4.04 kB
- Xet hash:
- 536adf64661fafe8355067a7bd49236e1edddf7482a65cea5fc74ceefa3a43b3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.