Buckets:
| { | |
| "parametrized_description": "A chemistry teacher conducts a set of NumExperiments different experiments. Each experiment i requires RedUsage[i] units of red liquid and BlueUsage[i] units of blue liquid, and produces GreenGasProduction[i] units of green gas and SmellyGasProduction[i] units of smelly gas. The total available red liquid is TotalRed units and the total available blue liquid is TotalBlue units. Additionally, the total smelly gas produced must not exceed MaxSmelly units. The objective is to determine the number of each experiment to perform in order to maximize the total GreenGasProduction.", | |
| "keywords": [ | |
| "N.A." | |
| ], | |
| "parameters": { | |
| "NumExperiments": { | |
| "description": "Number of different experiments", | |
| "shape": [] | |
| }, | |
| "RedUsage": { | |
| "description": "Amount of red liquid required for each experiment", | |
| "shape": [ | |
| "NumExperiments" | |
| ] | |
| }, | |
| "BlueUsage": { | |
| "description": "Amount of blue liquid required for each experiment", | |
| "shape": [ | |
| "NumExperiments" | |
| ] | |
| }, | |
| "GreenGasProduction": { | |
| "description": "Amount of green gas produced by each experiment", | |
| "shape": [ | |
| "NumExperiments" | |
| ] | |
| }, | |
| "SmellyGasProduction": { | |
| "description": "Amount of smelly gas produced by each experiment", | |
| "shape": [ | |
| "NumExperiments" | |
| ] | |
| }, | |
| "TotalRed": { | |
| "description": "Total units of red liquid available", | |
| "shape": [] | |
| }, | |
| "TotalBlue": { | |
| "description": "Total units of blue liquid available", | |
| "shape": [] | |
| }, | |
| "MaxSmelly": { | |
| "description": "Maximum units of smelly gas allowed", | |
| "shape": [] | |
| } | |
| }, | |
| "variables": { | |
| "ExperimentPerformed": { | |
| "description": "Binary variable indicating whether each experiment is performed", | |
| "type": "continuous", | |
| "shape": [ | |
| "NumExperiments" | |
| ] | |
| } | |
| }, | |
| "constraints": [ | |
| { | |
| "description": "The total red liquid used by all experiments does not exceed TotalRed units.", | |
| "formulation": "\\sum_{i=1}^{\\text{NumExperiments}} \\text{RedUsage}_i \\cdot \\text{ExperimentPerformed}_i \\leq \\text{TotalRed}", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(RedUsage[i] * ExperimentPerformed[i] for i in range(NumExperiments)) <= TotalRed)" | |
| } | |
| }, | |
| { | |
| "description": "The total blue liquid used by all experiments does not exceed TotalBlue units.", | |
| "formulation": "\\sum_{i=1}^{\\text{NumExperiments}} \\text{BlueUsage}_i \\cdot \\text{ExperimentPerformed}_i \\leq \\text{TotalBlue}", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(BlueUsage[i] * ExperimentPerformed[i] for i in range(NumExperiments)) <= TotalBlue)" | |
| } | |
| }, | |
| { | |
| "description": "The total smelly gas produced by all experiments does not exceed MaxSmelly units.", | |
| "formulation": "\\sum_{i=1}^{NumExperiments} \\text{SmellyGasProduction}_i \\cdot \\text{ExperimentPerformed}_i \\leq \\text{MaxSmelly}", | |
| "code": { | |
| "gurobipy": "model.addConstr(quicksum(SmellyGasProduction[i] * ExperimentPerformed[i] for i in range(NumExperiments)) <= MaxSmelly)" | |
| } | |
| } | |
| ], | |
| "objective": { | |
| "description": "Maximize the total GreenGasProduction by determining the number of each experiment to perform.", | |
| "formulation": "Max \\sum_{i=1}^{\\text{NumExperiments}} \\text{GreenGasProduction}_i \\cdot \\text{ExperimentPerformed}_i", | |
| "code": { | |
| "gurobipy": "model.setObjective(quicksum(GreenGasProduction[i] * ExperimentPerformed[i] for i in range(NumExperiments)), GRB.MAXIMIZE)" | |
| } | |
| } | |
| } |
Xet Storage Details
- Size:
- 4.05 kB
- Xet hash:
- 37ea09e78f02a0b690abf4b14a2daf3ab79ff78cc1a8accf72b319931604b573
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.