IlBaldo/NLP4LP-bucket / data /10 /problem_info.json
IlBaldo's picture
download
raw
3.11 kB
{
"parametrized_description": "A grocery store aims to liquidate its stock of NumItems different items. It has an Available quantity for each item. The store can prepare NumPackages different package types, where each package requires a certain amount of each item as specified by Required. Each package yields a PackageProfit. Determine the number of each package to prepare in order to maximize the total profit without exceeding the available stock of any item.",
"keywords": [
"N.A."
],
"parameters": {
"NumItems": {
"description": "Number of different items to be liquidated",
"shape": []
},
"NumPackages": {
"description": "Number of different package types",
"shape": []
},
"Available": {
"description": "Available quantity of each item",
"shape": [
"NumItems"
]
},
"Required": {
"description": "Amount of each item required to prepare one unit of each package",
"shape": [
"NumItems",
"NumPackages"
]
},
"PackageProfit": {
"description": "Profit for each package",
"shape": [
"NumPackages"
]
}
},
"variables": {
"PackageCount": {
"description": "The number of each type of package to produce",
"type": "continuous",
"shape": [
"NumPackages"
]
}
},
"constraints": [
{
"description": "Each package requires the specified amounts of each item as defined by Required.",
"formulation": "\\sum_{p=1}^{NumPackages} Required_{i,p} \\cdot PackageCount_p \\leq Available_i \\quad \\forall i \\in \\{1, \\ldots, NumItems\\}",
"code": {
"gurobipy": "model.addConstrs((quicksum(Required[i][p] * PackageCount[p] for p in range(NumPackages)) <= Available[i] for i in range(NumItems)), name=\"ResourceConstraints\")"
}
},
{
"description": "The total usage of each item across all prepared packages cannot exceed its available quantity.",
"formulation": "\\sum_{j=1}^{NumPackages} Required_{i,j} \\cdot PackageCount_j \\leq Available_i \\quad \\forall i = 1, \\dots, NumItems",
"code": {
"gurobipy": "model.addConstrs((quicksum(Required[i, j] * PackageCount[j] for j in range(NumPackages)) <= Available[i] for i in range(NumItems)), name=\"TotalUsage\")"
}
}
],
"objective": {
"description": "Total profit is the sum of the PackageProfit of all prepared packages. The objective is to maximize the total profit without exceeding the available stock of any item.",
"formulation": "Max \\sum_{j=1}^{NumPackages} PackageProfit_j \\times PackageCount_j",
"code": {
"gurobipy": "model.setObjective(quicksum(PackageProfit[j] * PackageCount[j] for j in range(NumPackages)), GRB.MAXIMIZE)"
}
}
}

Xet Storage Details

Size:
3.11 kB
·
Xet hash:
9ddb079f255ee9d31b2784e893bb75bcd0c085e2a155e0f43ff18372a6954951

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