Dataset Viewer
Auto-converted to Parquet Duplicate
prob_id
stringlengths
8
18
⌀
description
stringlengths
443
3.51k
⌀
problem_type
stringlengths
2
61
⌀
problem_size
stringclasses
3 values
reference_model
stringlengths
855
2.34k
⌀
produced_model
stringlengths
587
13.8k
⌀
converged?
stringclasses
2 values
notes
stringclasses
3 values
generated_opt_code
stringlengths
1.59k
2.86k
⌀
gen_groud_truth
stringlengths
2
13
⌀
groud_truth
stringlengths
5
13
⌀
score_var
float64
4
10
⌀
score_obj
float64
2
10
⌀
score_con
float64
3
10
⌀
score_total
stringlengths
4
15
prob_023
HAPPY pharmaceutical produces the drug Panacea from four chemicals. Today they must produce 1,000 lb of the drug. The three active ingredients in Panacea are A, B, and C. By weight, at least 8% of Panacea must consist of A, at least 4% of B, and at least 2% of C. The cost per pound of each chemical and the amount of ea...
LP
toy
Set: 1. Chemical The set of chemicals, \( C = \{1, 2, 3, 4\} \) 2. Ingredient The set of ingredients, \( I = \{1, 2, 3\} \) Parameter: 1. ChemicalID ['1', '2', '3', '4'] 2. IngredientID ['A', 'B', 'C'] 3. ChemicalCost [8, 10, 11, 14] 4. IngredientContent # units/lb [ [0.03, 0.02, 0.01], [0.06, 0.04, 0.01], [0.10, 0.03...
│ FINAL ANSWER │ │ I'll now create a complete mathematical model for this optimization problem using standard mathematical notation. ...
no
null
""" Chemical blending cost-minimization LP, implemented with Gurobi (gurobipy). Minimize Z = 8x1 + 10x2 + 11x3 + 14x4 Subject to: x1 + x2 + x3 + x4 = 1000 0.03x1 + 0.06x2 + 0.10x3 + 0.12x4 >= 80 0.02x1 + 0.04x2 + 0.03x3 + 0.09x4 >= 40 0.01x1 + 0.01x2 + 0.04x3 + 0.04x4 >= 20 x2 >= 100 x1, x2, x3...
10637.5
10,637.50
10
10
10
10.00
prob_032
A manufacturing company operates three production facilities (1, 2, and 3) that produce two types of components (X and Y). Each facility generates waste during production, which can be treated to reduce environmental impact. Treating the waste incurs a cost and reduces the amount of pollutants emitted. It costs $12 to ...
LP
toy
Set: 1. facility The set of production facilities, \( F = \{1, 2, 3\} \) 2. pollutant The set of pollutants, \( P = \{1, 2\} \) # 1: pollutant X, 2: pollutant Y Parameter: 1. TreatmentCost [12, 8, 18] 2. PollutantReduction [ [0.15, 0.35], # facility 1 [0.25, 0.20], # facility 2 [0.30, 0.40] # facility 3 ] 3. Pollution...
│ │ **Decision Variables:** │ │ Let $ t_1 $, $ t_2 $, and $ t_3 $ represent the tons of waste treated from facilities 1, 2, and 3 respectively. ...
no
null
""" Waste-treatment cost-minimization LP, implemented with Gurobi (gurobipy). Minimize Z = 12t1 + 8t2 + 18t3 Subject to: 0.15t1 + 0.25t2 + 0.30t3 >= 25 (Pollutant X reduction) 0.35t1 + 0.20t2 + 0.40t3 >= 35 (Pollutant Y reduction) t1, t2, t3 >= 0 """ import gurobipy as gp from gurobipy import GRB # -...
1269.57
1,269.57
10
10
10
10.00
prob_033
A fruit processing company, NatureBounty, specializes in producing two product lines: packaged fresh apples and bottled apple juice. NatureBounty grades apples on a scale of 1 (poor) to 10 (excellent). The company currently has 90,000 lbs of grade 7 apples and 110,000 lbs of grade 4 apples in inventory. To maintain pro...
LP
toy
Set: 1. Product The set of products, \( P = \{1, 2\} \) # 1: packaged fresh apples, 2: bottled apple juice 2. Grade The set of apple grades the company has, \( G = \{7, 4\} \) Parameter: 1. Inventory [90000, 110000] 2. Revenue [0.35, 1.10] 3. VariableCost [0.12, 0.80] 4. AverageGrade [5, 6] 5. MaxProcessingCapacity 15...
│ Let x be the pounds of grade 7 apples used for juice production, and y be the pounds of grade 4 apples used for juice production. Let a be the pounds of grade 7 apples │ │ used for packaging, and b be the pounds of grade 4 apples used for packaging. ...
no
null
import gurobipy as gp from gurobipy import GRB # Create a new model model = gp.Model("Apple_Production_Optimization") # Define Variables # By default, gurobipy variables have a lower bound (lb) of 0.0, # which automatically satisfies the x, y, a, b >= 0 constraints. x = model.addVar(vtype=GRB.CONTINUOUS, name="x") #...
42,900.00
42,900.00
10
10
10
10.00
prob_030
LogiTrans operates two distribution centers to manage the shipment of three types of goods to various regional hubs. Each distribution center can be staffed by up to seven logistics coordinators at a time. Coordinators are paid $500 per week at distribution center 1 and $900 per week at distribution center 2. Activatin...
ILP
toy
Set: 1. Center The set of distribution centers, \( C = \{1, 2\} \) 2. GoodsType The set of goods types, \( G = \{1, 2, 3\} \) Parameter: 1. FixedCost [1000, 2000] 2. StaffCost [500, 900] 3. MaxStaffNum [7, 7] 4. ProcessRate [ [20, 25], [18, 22], [15, 20] ] 5. Demand [120, 150, 200] Decision vari...
│ │ # Let me define the math_model variable first and then continue building it │ │ ...
no
null
import gurobipy as gp from gurobipy import GRB def solve_logitrans_model(): # Create a new Gurobi model model = gp.Model("LogiTrans") # 1. Define Decision Variables # x1, x2: Integer variables with a lower bound of 0 and an upper bound of 7 x1 = model.addVar(vtype=GRB.INTEGER, lb=0, ub=7, name="x1...
11,000.00
11,000.00
10
10
10
10.00
prob_031
Global Freight Solutions (GFS), a logistics company, needs to transport goods across three regions using services from three shipping providers. Each provider offers different cost structures and service mixes for large, medium, and small shipments, as detailed in Table as follows: | Supplier | Cost Per Shipment ($) |...
ILP
toy
Set: 1. Supplier The set of suppliers, \( S = \{1, 2, 3\} \) 2. ShipmentType The set of shipment types, \( T = \{1, 2, 3\} \) # 1: large, 2: medium, 3: small Parameter: 1. CostPerShipment [5.2, 4.7, 3.5] 2. Percent [[45, 35, 20], [30, 45, 25], [15, 20, 65]] 3. Demand [500, 300, 300] 4. MaxShipment [700, 700, 700] Dec...
╭─ ★ Final Answer ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ ...
yes!
null
import gurobipy as gp from gurobipy import GRB # Initialize the model m = gp.Model("GFS_Freight_Optimization") # --------------------------------------------------------- # 1. Decision Variables # --------------------------------------------------------- # Variables are continuous (real numbers). # lb=0 handles the ...
6,551.11
6,553.70
10
10
10
10.00
prob_042
LogiFlow Solutions manages the distribution of two types of packages: Standard and Express. Each package must be transported entirely by air freight or entirely by ground shipping. A total of 150 cubic meters of air freight capacity and 210 cubic meters of ground shipping capacity are available. A Standard package requ...
ILP
toy
Set: 1. Package The set of packages, \( P = \{1, 2\} \) # 1: Standard, 2: Express 2. ShippingMethod The set of shipping methods, \( S = \{1, 2\} \) # 1: Air freight, 2: Ground shipping Parameter: 1. AirFreightCapacity 150 # in cubic meters 2. GroundShippingCapacity 210 # in cubic meters 3. AirFreightRequire...
# Decision variables: │ │ # Let S_a = number of Standard packages transported by air freight ...
no
null
import gurobipy as gp from gurobipy import GRB # Initialize the model m = gp.Model("Package_Routing_Optimization") # --------------------------------------------------------- # 1. Decision Variables (Integer & Non-negative) # --------------------------------------------------------- S_a = m.addVar(vtype=GRB....
730
730.00
10
10
10
10.00
prob_055
A logistics company needs to optimize the loading of 5 different types of cargo items (A, B, C, D, E) onto a single truck with a maximum weight capacity of 2000 kg. Each item has a base profit value and weight, but certain item combinations generate additional synergy profits when transported together (e.g., perishable...
NLP
toy
Set: 1. Items The set of cargo items, \( I = \{A, B, C, D, E\} \) Parameter: 1. Weight The weight of each item \( w_i \) where \( i \in I \): \( w = \{A:400, B:600, C:300, D:500, E:700\} \) 2. BaseProfit The base profit of each item \( c_i \) where \( i \in I \): \( c = \{A:120, B:180, C:90, D:150, E:210\} \...
│ │ **Mathematical Model:** │ │ │ │ Let's define the decision variables: ...
no
At first treated/classified the problem as MILP and then fixed itself to produce an NLP model
import gurobipy as gp from gurobipy import GRB # Initialize the model m = gp.Model("Cargo_Loading_Synergy") # --------------------------------------------------------- # 1. Data Definitions # --------------------------------------------------------- items = ['A', 'B', 'C', 'D', 'E'] weights = { 'A': ...
665
665.00
10
10
10
10.00
prob_081
A large manufacturing enterprise needs to ship a consignment of 1,000 tons of goods from its factory in City F to a distribution center in City D. There are three potential transportation routes available. Each route is composed of segments using different modes of transport (road or rail). The transportation cost for ...
NLP
toy
Set: 1. Route The set of available transportation routes, \( R = \{1, 2, 3\} \) Parameter: 1. TotalTonnage # The total amount of goods to be shipped 100 2. LinearCostPerTon # The base transportation cost per ton for each route, excluding congestion fees. This is calculated by summing the costs of all segments for a gi...
│ │ complete_formulation = """ │ │ Let me carefully formulate the complete mathematical model for this optimization problem. │ │ ...
no
null
import gurobipy as gp from gurobipy import GRB def solve_transportation_problem(): # Create a new model model = gp.Model("Transportation_Optimization") # Add Decision Variables # The non-negativity (lb=0.0) is the default in Gurobi. # The capacity constraints (x <= 1000) are set using the...
670,001.80
670,003.80
10
5
5.5
6.83
prob_090
A shared mobility company plans to deploy a fleet of 1,000 electric scooters across five key hotspot zones in a city. To ensure service stability and a positive user experience, the company aims to achieve a balanced deployment that aligns with the demand profile of each zone. The company's goal is to minimize the net...
NLP
toy
Set: 1. Zones The set of hotspot zones, \( I = \{\text{Commercial Center, University City, Tech Park, Tourist Area, Transit Hub}\} \). Parameters: 1. TotalScooters The total number of scooters to be deployed. 1000 2. Attractiveness A dictionary mapping each zone \(i \in I\) to its attractiveness value. \(\{\text{Comm...
│ # Decision variables │ │ # x_CC, x_UC, x_TP, x_TA, x_TH ≥ 0 and integers (since we can't deploy fractio...
no
null
null
null
null
10
10
5
8.33
prob_039
HealthSupply Co. manages a medical supply chain that must fulfill demand for two types of products, Vaccine X and Vaccine Y, over the next two quarters, with demands of 100 doses of Vaccine X and 200 doses of Vaccine Y in Quarter 1, and 300 doses of Vaccine X and 100 doses of Vaccine Y in Quarter 2. The company can pro...
MILP
small
Set: 1. Product The set of products, \( P = \{1, 2\} \) # 1: Vaccine X, 2: Vaccine Y 2. Quarter The set of quarters, \( Q = \{1, 2\} \) # 1: Quarter 1, 2: Quarter 2 Parameter: 1. Demand [[100, 200], [300, 100]] # Demand for each product in each quarter 2. MaxProductionPerQuarter [1500, 1500] 3. RawMaterialCost [300, 4...
│ │ Output: │ │ You responded with: ...
no
null
null
null
null
10
10
5.9
8.63
prob_073
A regional distribution center needs to optimize its daily delivery routes for 5 stores located at different distances. The center has 3 available delivery trucks with capacities of 8, 10, and 12 tons respectively. The daily demands of the stores are: Store1 (3 tons), Store2 (4 tons), Store3 (5 tons), Store4 (2 tons), ...
MILP
small
Set: 1. Trucks The set of available trucks, \( T = \{1, 2, 3\} \) 2. Stores The set of stores to be served, \( S = \{1, 2, 3, 4, 5\} \) Parameter: 1. TruckCapacities [8, 10, 12] # Capacity of each truck in tons 2. StoreDemands [3, 4, 5, 2, 6] # Demand of each store in tons 3. Distances [15, 20, 25, 30, 35] # Distance ...
│ │ Mathematical Model: │ │ ...
no
null
null
null
null
4
3
3
3.33
prob_024
A commodities trader oversees a secure vault facility with a maximum capacity of 500 kilograms, dedicated to storing refined platinum. At the beginning of Quarter 1, the trader holds 150 kilograms of platinum. Each quarter, the trader assesses the current inventory, sells any amount of platinum up to the available stoc...
LP
small
Set: 1. Quarter The set of quarters, \( Q = \{1, 2, ..., QuarterNum\} \) Parameter: 1. QuarterNum 6 2. VaultCapacity 500 3. InitialInventory 150 4. SellingPrice [30000, 35000, 40000, 36000, 38000, 42000] 5. PurchasePrice [32000, 36000, 38000, 33000, 39000, 40000] Decision variable: 1. SellingAmount ...
│ │ # Decision Variables: │ │ # Let s_t ∈ ℝ_+ be the amount of platinum sold in quarter t (kg), for t = 1,...
no
null
import gurobipy as gp from gurobipy import GRB # --- Parameters --- num_quarters = 6 initial_inventory = 150 # kg vault_capacity = 500 # kg # Selling prices ($/kg) for Q1 to Q6 p_s = [30000, 35000, 40000, 36000, 38000, 42000] # Purchase prices ($/kg) for Q1 to Q6 p_b = [32000, 36000, 38000, 33000, 3...
13,300,000.00
13,300,000.00
8.6
10
8
8.87
prob_026
GreenWeave specializes in transforming raw materials such as organic cotton, jute, and linen into eco-friendly textiles: organic cotton fabric, jute fabric, and linen fabric. Organic cotton fabric can be manufactured by processing either organic cotton or jute. Linen fabric can be produced from any of the raw materials...
LP
small
Set: 1. RawMaterials The set of raw materials, \( R = \{"cotton", "jute", "linen"\} \) 2. Products The set of products, \( P = \{"cotton_fabric", "jute_fabric", "linen_fabric"\} \) 3. ProducedFrom The set of products and their corresponding raw materials, \( PF = \{"cotton_fabric": ("cotton", "jute"), "linen_fabr...
│ │ Classification: Linear Programming (LP) │ │ ...
no
null
import gurobipy as gp from gurobipy import GRB # Initialize the model m = gp.Model("Fabric_Production") # --- Decision Variables --- # x1: tons of organic cotton used for organic cotton fabric x1 = m.addVar(vtype=GRB.CONTINUOUS, name="x1") # x2: tons of jute used for organic cotton fabric x2 = m.addVar(vtyp...
545,357.14
545,357.14
10
10
10
10.00
prob_076
A mining company operates three ore processing plants (P1, P2, P3) with monthly processing capacities of 8000, 10000, and 12000 tons respectively. The company sources ore from four different mines (M1, M2, M3, M4) with available quantities of 6000, 9000, 7000, and 5000 tons per month. Each ore type has different chara...
LP
small
Set: 1. Mines The set of mines, \( M = \{M1, M2, M3, M4\} \) 2. Plants The set of processing plants, \( P = \{P1, P2, P3\} \) Parameter: 1. MineSupply \( s_m \): Available ore at mine m (tons) [M1:6000, M2:9000, M3:7000, M4:5000] 2. PlantCapacity \( c_p \): Processing capacity of plant p (tons) [P1:8000, P...
# Decision Variables: │ │ # Let x_ij = tons of ore allocated from mine i to plant j ...
no
null
null
null
22,933.33
8
9
3
6.67
prob_002
An airport has two available gates (G1, G2) and needs to assign three flights (F1: 10:00-11:00, F2: 10:30-11:30, F3: 11:15-12:30, F4: 10:45-11:45) to these gates. Flights assigned to the same gate must have non-overlapping time intervals, and the goal is to minimize flight delays, where each 1-minute delay beyond the s...
ILP
small
Set: 1. Gates The set of gates available at the airport, \( G = \{1, 2\} \) 2. Flights The set of flights to be assigned to the gates, \( F = \{1, 2, 3, 4\} \) Parameter: 1. ArrangeStartTime [600, 630, 645, 675] 2. Duration [60, 60, 75, 60] 3. CostPerDelyTime 1 4. M: A large positive number 1500 Decision variable: 1....
│ **Problem Requirements:** │ │ 1. 2 gates (G1, G2) ...
no
null
null
null
null
7.5
10
6.7
8.06
prob_053
A retail chain wants to open warehouses in 3 potential locations to serve 5 customer zones. The distances (in km) between each potential warehouse location and customer zone are given in the table below. The goal is to select exactly 2 warehouse locations that minimize the total distance between each customer zone and ...
ILP
small
Set: 1. CustomerZones The set of customer zones, \( C = \{C1, C2, C3, C4, C5\} \) 2. WarehouseLocations The set of potential warehouse locations, \( W = \{W1, W2, W3\} \) Parameter: 1. DistanceMatrix The distance between warehouse location \( w \in W \) and customer zone \( c \in C \), denoted as \( d_{wc} \) ...
│ Mathematical Model: │ │ │ │ Decision Variables: ...
no
null
import gurobipy as gp from gurobipy import GRB # --- Data Definition --- # Customer zones (i = 1 to 5) and Warehouses (j = 1 to 3) customers = range(1, 6) warehouses = range(1, 4) # Distance matrix extracted from the objective function coefficients # distances[i, j] represents the cost/distance of assigning ...
48
48.00
10
10
10
10.00
prob_075
A distribution center needs to assign 4 delivery trucks to 4 customer locations for same-day shipments. Each truck has different transportation costs to each location due to varying distances and fuel consumption rates. The cost matrix (in USD) for assigning trucks to locations is as follows: | Truck\Location | Loc1 |...
ILP
small
Set: 1. Trucks The set of delivery trucks, \( T = \{1, 2, 3, 4\} \) 2. Locations The set of customer locations, \( L = \{1, 2, 3, 4\} \) Parameter: 1. CostMatrix The transportation cost (USD) when truck \( t \) is assigned to location \( l \), represented as \( c_{tl} \): - \( c_{11} = 120 \), \( c_{12} = 150...
│ This is a Linear Programming problem, specifically a Assignment Problem which is a special case of the Transportation Problem and can be modeled as a Balanced Assignment Problem. │ │ ...
yes!
incorrectly classified the problem at first then corrected itself at the end
import gurobipy as gp from gurobipy import GRB # --- Data Definition --- # Cost matrix c_ij representing transportation costs from Truck i to Location j costs = [ [120, 150, 180, 90], [110, 140, 170, 80], [130, 160, 190, 100], [140, 170, 200, 110] ] num_trucks = len(costs) num_locations...
560
560.00
10
10
10
10.00
prob_011
A city plans to establish a low-altitude drone delivery network covering a 100x100 area (with both horizontal and vertical coordinates ranging from [0, 100]). There are 8 demand points within this area, with coordinates at (10, 20), (25, 60), (40, 80), (65, 50), (80, 20), (15, 45), (70, 75), and (90, 90). The goal is t...
NLP
small
Set: 1. DemandNode The set of demand nodes, \( D = \{1, 2, \dots, DemandNodeNum\} \) 2. Hub The set of drone logistics hubs, \( H = \{1, 2, \dots, HubNum\} \) Parameter: 1. DemandNodeNum 8 2. DemandNodeCoordinates [[10, 20], [25, 60], [40, 80], [65, 50], [80, 20], [15, 45], [70, 75], [90, 90]] 3. HubNum 2 4. HubCoordi...
│ # Decision variables for hub locations │ │ x1, y1 = symbols('x1 y1') # Coordinates of first hub │ │ x2, y2 = symbols('x2 y2') # Coordinates of second hu...
no
null
null
null
null
9
2
9
6.67
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8