IlBaldo/NLP4LP-bucket / data /117 /problem_info.json
IlBaldo's picture
download
raw
3.59 kB
{
"parametrized_description": "A woman consumes servings of NumNutTypes different types of nuts to satisfy at least CalorieRequirement calories and ProteinRequirement grams of protein per week. Each nut type has specific CaloriePerServing, ProteinPerServing, and FatPerServing per serving. She must consume at least ServingRatioMultiplier times as many servings of one nut type as another. The objective is to minimize her total fat intake.",
"keywords": [
"N.A."
],
"parameters": {
"NumNutTypes": {
"description": "Number of different nut types",
"shape": []
},
"CaloriePerServing": {
"description": "Calories in one serving of each nut type",
"shape": [
"NumNutTypes"
]
},
"ProteinPerServing": {
"description": "Protein in one serving of each nut type",
"shape": [
"NumNutTypes"
]
},
"FatPerServing": {
"description": "Fat in one serving of each nut type",
"shape": [
"NumNutTypes"
]
},
"ServingRatioMultiplier": {
"description": "Minimum ratio of servings of almonds to cashews",
"shape": []
},
"CalorieRequirement": {
"description": "Total calorie intake requirement",
"shape": []
},
"ProteinRequirement": {
"description": "Total protein intake requirement",
"shape": []
}
},
"variables": {
"NutServings": {
"description": "The number of servings for each nut type",
"type": "continuous",
"shape": [
"NumNutTypes"
]
}
},
"constraints": [
{
"description": "The total calorie intake from all nut servings must be at least CalorieRequirement.",
"formulation": "\\sum_{i=1}^{\\text{NumNutTypes}} \\text{CaloriePerServing}_i \\cdot \\text{NutServings}_i \\geq \\text{CalorieRequirement}",
"code": {
"gurobipy": "model.addConstr(quicksum(CaloriePerServing[i] * NutServings[i] for i in range(NumNutTypes)) >= CalorieRequirement)"
}
},
{
"description": "The total protein intake from all nut servings must be at least ProteinRequirement.",
"formulation": "\\sum_{i=1}^{NumNutTypes} ProteinPerServing_i \\cdot NutServings_i \\geq ProteinRequirement",
"code": {
"gurobipy": "model.addConstr(quicksum(ProteinPerServing[i] * NutServings[i] for i in range(NumNutTypes)) >= ProteinRequirement)"
}
},
{
"description": "She must consume at least ServingRatioMultiplier times as many servings of almonds as cashews.",
"formulation": "NutServings_{Almonds} \\geq ServingRatioMultiplier \\times NutServings_{Cashews}",
"code": {
"gurobipy": "model.addConstr(NutServings[0] >= ServingRatioMultiplier * NutServings[1])"
}
}
],
"objective": {
"description": "Total fat intake is the sum of the fat from all consumed nut servings. The objective is to minimize the total fat intake.",
"formulation": "Min \\sum_{i=1}^{\\text{NumNutTypes}} \\text{NutServings}_i \\cdot \\text{FatPerServing}_i",
"code": {
"gurobipy": "model.setObjective(quicksum(NutServings[i] * FatPerServing[i] for i in range(NumNutTypes)), GRB.MINIMIZE)"
}
}
}

Xet Storage Details

Size:
3.59 kB
·
Xet hash:
f08052e0d0d5f2f8282d257076a444790525b23e721e1108ffd3acc6cb9365ff

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.