OptiTree: Hierarchical Thoughts Generation with Tree Search for LLM Optimization Modeling
Authors: Haoyang Liu
Jie Wang
Yuyang Cai
Xiongwei Han
Yufei Kuang
Jianye HAO
Venue: NeurIPS 2025 poster ()
Keywords: Optimization Modeling
Operations research
Large language models
Primary area: other

Abstract: Optimization modeling is one of the most crucial but technical parts of operations research (OR).
  To automate the modeling process, existing works have leveraged large language models (LLMs), prompting them to break down tasks into steps for generating variables, constraints, and objectives.
  However, due to the highly complex mathematical structures inherent in OR problems, standard fixed-step decomposition often fails to achieve high performance.
  To address this challenge, we introduce OptiTree, a novel tree search approach designed to enhance modeling capabilities for complex problems through adaptive problem decomposition into simpler subproblems.
  Specifically, we develop a modeling tree that organizes a wide range of OR problems based on their hierarchical problem taxonomy and complexity, with each node representing a problem category and containing relevant high-level modeling thoughts.
  Given a problem to model, we recurrently search the tree to identify a series of simpler subproblems and synthesize the global modeling thoughts by adaptively integrating the hierarchical thoughts.
  Experiments show that OptiTree significantly improves the modeling accuracy compared to the state-of-the-art, achieving over 10% improvements on the challenging benchmarks.

OptiTree: Hierarchical Thoughts Generation with Tree Search for LLM Optimization Modeling
Haoyang Liu'; Jie Wang't, Yuyang Cai', Xiongwei Han', Yufei Kuang', Jianye Hao
MMoE Key Laboratory of Brain-inspired Intelligent Perception and Cognition, University of Science and Technology of China, Noah's Ark Lab, Huawei Technologies, Tianjin University
Abstract
Optimization modeling one the most crucial but technical parts operations research (OR). To automate the modeling process, existing works have leveraged large language models (LLMs), prompting them to break down tasks into steps for generating variables, constraints, and objectives. However, due the highly complex mathematical structures inherent in OR problems, standard fixed-step decomposition often fails to achieve high performance. To address this challenge, we introduce OptiTree, a novel tree search approach designed to enhance modeling capabilities for complex problems through adaptive problem decomposition into simpler subproblems. Specifically, we develop a modeling tree that organizes a wide range of OR problems based on their hierarchical problem taxonomy and complexity, with each node representing problem category and containing relevant high-level modeling thoughts. Given a problem model, we recurrently search the tree to identify a series of simpler subproblems and synthesize the global modeling thoughts by adaptively integrating the hicrarchical thoughts. Experiments show that Opti significantly improves the modeling accuracy compared to the state-of-the the art, achieving over 10% improvements on the challenging benchmarks. The code is released at htttt::t:/// thub. http:///AALab-SST///pTTtTTEC
Introduction
Optimization models are fundamental in operations research (OR) with a wide range of critical applicationns in route planning (33), production planning 44, economies [23], and on. Typically, real-world OR problems are presented as natural language descriptions that must be manually converted into optimization models before developing solver codes (e.g., Gurobi [4 and Pyomo 16] to solve. However, the modeling process is highly technical and time-consuming, requiring extensive human expertise and domain knowledge (28). Modeling experts often engage in thorough discussions with clients to fully grasp the problem scenarios and context. This is followed by lengthy iterative process to refine and improve the models, enhancing their accuracy and efficiency.
To reduce the time and cost spent in optimization modeling, recent advances have leveraged large language models (LLMs) automate this process, leveraging the rich domain knowledge learnt by LLMs 39 [7]. Given an OR problem, the LLMs take a natural language description as input and generate both the optimization model and the corresponding solver code. Existing works on M..e- optimization modeling include the prompt- based modeling methods 39
and the fine-tuned L.LM modeling agents 17 (21) The prompt-based methods typically break down modeling tasks into sequential steps for generating variables, constraints, and objectives 2 However, this
I 2
"This work done when Haoyang Liu interned at Huawei. E-mail: dgyoung Corresponding author. Email: jiewangx @ @wwst.edu.cn...
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

Variable
Coustraint Construction Constraints h
Objective Construction
Construction
Existing Prompt-based Methods
Problem Description
Variable
Objective min f(x)
min; (x)
Each vehicle has to supply customers, and has limited eapacity, for each vehicle. Each customer has associated demand, must be satisfied within the customer- specific time window.
s.t. gx)
Problem Decomposition with Tree Search
2) Subproblem Modeling Enhancement Hiererchica Modeling Thoughts Subgrootems
3) Modeling Thoughts Construction
Global Modeling
fin,f(0)
Our OptiTree Pipeline
Thoughts
s.t. gxx)
Modeling Tree
Subprubilem CVRP
Subproblem
Problem Descrigtion
CV CVRPTW
Figure I: The Upper: Existing prompt-based based methods construct variables, constraints and objectives sequentially. The Lower: Our OptiTree leverages tree search for subproblem decomposition and uses the modeling thoughts of subproblems to enhance the modeling process.
rigid decomposition does not account for problem complexity, making it particularly challenging for more complex problems and potentially leading to suboptimal modeling accuracy. Our analysis of a challenging dataset reveals that a substantial portion errors arises from incorrect variable definitions. particularly in the hard modeling problems (please see Motivation in Section B).
Therefore, a natural question arises: how can we adaptively decompose problem into simpler subproblems? For each OR problem, we introduce the concept of modeling subproblem, which is defined as parts of the original problem with reduced modeling complexity (please see Section 4.] for formal definition). For example, the standard vehicle routing problem (VRP) subproblem for more complex variants such as the capacitated VRP (CVRP) and the VRP with time windows (VRPTW). From the perspective of OR, these subproblems share the same taxonomy as the original problems and exhibit similar modeling structures, but their lower complexity makes them easier model. When modeling a VRP with time windows, might begin by constructing a standard VRP model and then incrementally integrate the time window constraints. We have observed that these patterns of subproblem decomposition are prevalent across a wide range of complex problems. While most complex problems do not fit neatly into standard OR categories, they often encompass simpler standard OR subproblems (please see Motivation 2 in Section For further understanding, we provide several examples in Appendix C
serve
In light of this, propose novel approach called OptiTree, designed enhance modeling accuracy by adaptively decomposing complex problems into a series of simpler subproblems. The core of OptiTree is to distill prevalent decomposition patterns from various problems and apply the most suitable ones for unseen complex problems. Specifically, as illustrated in Figure D we develop modeling tree that organizes diverse range of OR problems according to their taxonomy and complexity. Each node in the modeling tree represents an OR problem, with problems of parent nodes corresponding to the subproblem of their children. We store relevant modeling thoughts in each tree node to enhance the modeling accuracy for each subproblem. Given problem to solve, we recurrently search for suitable subproblems to decompose, 2) retrieve high-level modeling thoughts for each subproblem, and 3) synthesize global modeling thoughts by adaptively integrating the hierarchical thoughts. To ensure the scalability and reliability of the modeling tree, we dynamically update and refine the subproblems and thoughts across wide range of OR problems. The notable feature of OptiTree is that transfers the search into the highly structured subproblem space, significantly reducing the search space while fully leveraging the modeling thoughts associated with the subproblems. Experiments demonstrate that our method achieves state-of-the performance, significantly improving modeling accuracy by over 10%.
2
Related Work
LLM-based Optimization Modeling
optimization modeling has emerged as promis-
ing approach to reduce the time and expertise required during the modeling process [2] Existing methods in this field can be categorized into prompt-based and fine-tuned methods. Prompt- based methods involve the careful design of modeling prompts for pre-trained L.LMs, such as GPT-4o and DeepSeek- -3. Notable works in this area include CoE [39 and OptiMUS [ which utilize

---

multi-agent cooperation workflows to iteratively construct models and solver codes. Additionally, 2 employs Monte Carlo tree search explore the space variables, constraints, and objectives step by step, identifying the best components for model construction. In contrast, another line of research focuses on fine-tuning LLMs with extensive operations research and modeling knowledge. Examples include ORLM [7]. Evo-Step [37.. L.MOPT [2I], OptMATH [25), and OptiBench [5). These methods typically generate large modeling datasets to train specialized modeling language models. In this paper, we focus on the prompt-based methods and aim fully exploit the reasoning capabilities of pre-trained LLMs. Unlike existing approaches that decompose tasks into fixed steps for generating variables, constraints, and objectives, propose an incremental modeling strategy that involves modeling simpler subproblems.
LLM Reasoning and Retrieval-Augmented Generation LLMs have shown promising perfor- mance across various reasoning tasks [43. However, they are prone to generating false, misleading, fabricated information a phenomenon known hallucination. Consequently, researchers have explored several methods to mitigate these hallucinations (18). Early approaches, such as Chain-of-- Thoughts (CoT) (36) and Tree-of-Thoughts (ToT)
[42] break down complex problems and solve
them step-by-step. The Buffer-of-Thoughts (BoT) 40 method stores a meta-buffer of modeling
thoughts, instantiating relevant templates construct reasoning processes. Recent advances in reasoning LLMs such as OpenAI-ol [30 and DeepSeek-RI g have gained significant popularity. Additionally, researchers have focused on leveraging external knowledge further reduce hallucina- tions 44 10 13 Retrieval-augmented generation (RAG) involves querying vector or text databases for relevant documents and integrating this retrieved information into the generation process, thereby producing more accurate responses [12 In our work, we search for relevant modeling thoughts for each subproblem and dynamically combine them to generate global modeling thoughts.
Motivated Observations
In this section, present key observations that motivate decomposition method. (1) The standard fixed-step decomposition approach often fails in complex problems, as accurately identifying variables remains significant challenge.
(2) Most complex OR problems contain subproblems of standard OR problems. (3) The performance of LLMs can benefit from the subproblem decomposition. The experiments in this part conducted in the modeling dataset IndustryOR [7]] which classifies problems into three difficulty levels: Easy, Medium, and Hard.
Failure Percentage in Variable Definition
Subproblem Identification
Improvement with Subproblem Decomposition
74.1
72.7
37.0
Percentage
Identification Percentage 69%
31,0%5
Accuracy
29.4
20
Cocnatl Souritiec Nea taerstii Incoreed Koerified
0
CoT
CoT using Decomposition
Easy
Medium
Hard
Figure 2: The observations. Left: We find most errors come from the incorrect variable definition in the Medium and Hard problems. Middle: We find the most complex problems have subproblems of standard OR problems, and LLMs are effective in identifying the subproblems. Right: We observe a
an improvement in modeling accuracy using subproblem decomposition.
Motivation The Drawbacks of Existing Methods We evaluate CoT 36) on this dataset, breaking the problems down into steps involving variables, constraints, and objective generation. We find that a significant portion of errors arise from incorrect variables, particularly Medium and Hard problems (over 70%, please see the left subfigure of Figure 2 This indicates that existing
decomposition methods are not well-suited for complex problems.
Motivation 2: Prevalent Subproblem Decomposition Patterns We first collect the optimization models in the textbook [1] as a ground-truth model for the standard problems. For a problem in IndustryOR to formulate, use LLM to identify whether the problem contains subproblems
3

---

in the 50 standard OR problems. If a subproblem is identified, we augment the LLM's prompt for optimization modeling by integrating the relevant ground- -round-truth model of the subproblem as hints. As shown in the middle subfigure of Figure 2 the LLM identifies subproblems for 69% of the problems. Upon manual verification, we find that over 63% of problems are associated with correct subproblems. These results underscore the prevalence of subproblem decomposition and demonstrate that LLMs are effective in identifying relevant subproblems with high identification accuracy.
Motivation 3: LLMs Perform Better with Vanilla Subproblem Decomposition We leverage the set of 50 standard OR problems as subproblem candidates to guide the modeling process. For each problem in IndustryOR, a suitable subproblem from the candidates. If a relevant subproblem is identified, we provide the ground-truth models for that subproblem before proceeding to model the original problem based on it. We evaluated the performance of L.LMs using this two-step approach and present the results in the Our findings indicate that modeling based on subproblem reduces task complexity and has the potential to enhance performance.
decompose the process into two steps. First, use LLM to select
right subfigure of Figure 2
4 OptiTree: Hierarchical Thought Generation with Tree Search
The overall framework of OptiTree is illustrated in Figure 3 The core is organize modeling
knowledge through a hierarchical tree structure that captures both prevalent decomposition patterns and thoughts for various problems (Section 4.2p We utilize tree search for efficient retrieval of subproblems along with their hierarchical modeling thoughts. adaptively integrating these thoughts to construct comprehensive global modeling thoughts (Section|4.3) 4.3). To ensure scalability and reliability, we construct the modeling tree using a real-world modeling dataset, dynamically managing both subproblems and modeling thoughts. This enhances the tree's 's capacity to distill more decomposition patterns and thoughts, allowing it to generalize effectively to unseen complex problems (Section 4.4)
4.1 Subproblem Definition and Identification
Given an OR problem P, we specialize the corresponding optimization model as follows,
min f(x) s.t. (z Bb) S 0, for i = ,,...., ,N
where / denotes the objective function, x is the decision variables, gi represents the the jth constraint
function, and 3e is the parameters in the 2th constraint. Suppose that we partition the variables into two groups x (01, 22). the objective and constraints has the decomposition f(x fi (क)) fz(#2) + @1 222,, and gi 3.) = ( (,,)) + Ji.2 ( Ba.2) + gr.3 ( (#1, æ2; Br,s). We define another OR problem P as a subproblem of P. if the optimization model takes the following form,
min fi (a1) 201
s.t. gi,, (,,)) S 0, for some én E (I,...,,N;
where Bi.. is the parameter, and the optimization model (2) can be viewed as part of the original optimization model (T). However, we need to identify a subproblem through the natural language descriptions, the ground-truth optimization models are unavailable in practice. Directly comparing two problem descriptions can lead to hallucination issues for LLMs, so we adopt a clear and comprehensible format. We first use LLM to distill and summarize the problem description into set of atomic high-level statements Cp = {c1, C2.... ..... thought c summarize feature requirement related optimization modeling. We then use the LLM to identify subproblem P of P. if statement thoughts of P are semantically contained within those of P (denoted by C. Es Cp). With slight abuse of notation, we write P Cs P to indicate that
Cap }. called statement thoughts, where each
P is subproblem of P. Due the limited space, please see Appendix J.1 and J.2 for examples of statement thoughts and detailed meta-prompts for subproblem identification.
Now we formulate the modeling process using subproblem decomposition as follows. We decompose the OR problem as series of subproblems pp(i),p(2 p(af)), where M is the subproblem number and ((1) Es p(2) .... Es p(M)) We then build the optimization model incrementally.

---

Structure of Modeling Tree
Modeling Thoughts G eneration
Update of the M Modeling Tree
Subproblem Decomposition
1) Problem Verification
CO
Valdatton Problem (CV RP)
Original Prublem
CD
Subprablem
VRP
Answer: 49
VIP
Modeling & Selviing
X
DVRP
CVRPTN
Schema
DVRP
CVRPPTW
Subproblem
Node Expansion
CV EE is sulgroMeem
Problem Type: VRPTM
2) Modeling T Thuughts Construction
of CVV RPTW.
Statement Thoughts:
Vandele Casacity, Time Windows, Single visst, Depot scart/End, Travel Time and Time, Continutty.
VRR
Modeling Thoughts
Thought Generation
DVRP
CVRP
Define Variables
Schema Distillation
Biinary Ry vehicie travel,
Global Medsling Thoughts
CVRPPW
Contitunus for webtcle load.
Define objective Function
Optimization Modeling
3) Verification
Define constraints
Fllm Conservatin
kindow
min, ((t
Answor:
Load Constratnts
Time Linkage
subject (X)
Modeling & Solwing
Gurob1 Constratints
3) Optimization Model G Generation
Figure 3: The overview of OptiTree. (1) OptiTree constructs modeling tree for subproblem decomposition and stores the modeling thoughts for subproblems in the tree nodes. (2) OptiTree leverages search to identify the subproblems and construct modeling thoughts by integrating the subproblems thoughts. (3) We update the modeling tree to ensure its scalability and reliability.
4.2 Modeling Tree for Problem Decomposition
We propose the concept modeling tree for problem decomposition. We also utilize the modeling thoughts, distilled from the real-world modeling process for each subproblem, effectively guide LLMs in accurately modeling these subproblems.
Modeling Thoughts for OR Problems Most complex OR problems involve conventional modeling techniques, such variable definition and constraint formulation, which can be implicit and pose significant challenges for reasoning. Thus, we distill these modeling techniques into high-level modeling thoughts, which serve concise, step-by-step guidelines for the modeling process. When faced with a similar optimization problem, we can utilize these informative thoughts to enhance accuracy. Specifically,
design comprehensible schema to efficiently retrieve and apply the modeling thoughts (Please see the left of Figure the schema). Each schema contains three critical elements: (1) the name of problem category, (2) statement thoughts Cp for problem identification, and (3) modeling thoughts T(P) to guide the modeling process. These modeling thoughts include concrete reasoning steps for variable definition, constraint formulation, objective formulation, and Gurobi code templates. Unlike static examples, these thoughts are flexible and can generalize to various complex problems with similar mathematical structures.
Modeling Tree of OR Problems While existing prompt-based and fine-tuned methods consider each OR problem individually, our method fully recognizes the relationships between different OR problems and organizes them into a taxonomy tree known the modeling tree. In this structure, each node represents an OR problem along with its corresponding schema of modeling thoughts. The root node represents an abstract class of combinatorial optimization problems. Each parent node is subproblem of its child nodes; that is, if the node P; is child of Pj. then P, Cs P.. Child nodes inherit fundamental constraints and variables from their parent nodes while adding specialized components. For example, the VRP branch might split into dynamic VRP (DVRP) and VRP with time windows. The top tier of the tree consists of simpler, foundational OR problems that are easier to model, while deeper levels feature increasingly complex variations. This structure organizes similar problems into the same branch and facilitates an efficient search for the subproblems. Please see the left of Figure for the structure of the modeling tree. We formally define this structure as follows.
Definition 4.1. The modeling tree called subproblem order-preserving if for any problem P; that is the ancestor of problem Py. it holds that P, Cs Pj.
5

---

4.3 Modeling Thoughts Searching and Construction
Tree Search for the Subproblems and Modeling Thoughts Given an OR problem P to model, we search the modeling tree for suitable subproblems for decomposition. We employ LLM to extract the statement thoughts Cp and compare Op with the statement thoughts at the tree node to identify relevant subproblems. Starting from the root node, search for the first subproblem in the first tree level, i.e., P!o) P2", ,... ,,,,, ,p()) We select the subproblem that best matches based on the highest similarity,
p()= argmax I(P!!) Cs P)-ii)mLM(Cappp Cp); (L=I, (T)
where is the indication function with I(a) if the condition is true and I(a) = -o otherwise. SiMLL represents the similarity score provided by the LLM, measuring the similarity between two problems. We select the child problem p(1) and continue the search process on the corresponding tree node. If none of the children qualify as subproblems of P (with similarity score 0), we terminate the search. If the search halts at the root node, we do not provide modeling thoughts. Please see Appendix J.2 for meta-prone prompts for the tree search.
Global Modeling Thought Construction We obtain series of identified subproblems p(MM) plh)) of increasing complexity. Notably, the modeling thoughts of the problem (DM) encompass those of the preceding subproblems. Thus, call P(M) the maximum subproblem. We retrieve the corresponding modeling thoughts of p(a)), i.e.. T(P(M)). Subsequently, we combine these modeling thoughts with the problem description of P to synthesize the global modeling thoughts T(P), thereby enhancing the modeling process (for meta- veta-prommts, please Appendix J.3).
4.4 Construction of the Modeling Tree
Tree Construction require human curation. To ensure the problem coverage and reliability, we construct the modeling tree from scratch using dataset that includes problem descriptions and their corresponding ground- truth optimization models. This allows us to distill decomposition patterns and modeling thoughts effectively. In practice, we choose parts of the In-trstt 3K dataset, which is the training dataset of ORLM [17] covering wide range of OR problems. We sequentially add tree nodes to enhance the capacity of the modeling tree. For each problem in the dataset, we evaluate whether should be integrated into the tree. First, we conduct tree search for subproblems and identify the maximum subproblem ((M), which has the greatest depth. We then construct global modeling thoughts using T(P(M) to guide the modeling process and solve the model for the final answer. If this final answer matches the ground-truth answer, no update the tree is necessary, indicating that the modeling tree can successfully handle this type of problem. Conversely, if the answers differ, it suggests the emergence of new decomposition patterns or modeling thoughts, necessitating an update to the tree using the failed problem P.
The tree construction and updating process is fully automated and does not
Node Expansion We aim to expand the tree node with the problem P by following carefully designed rules maintain the subproblem order-pressen dedee-rrese structure. Due the search process, P should be a child node of p(M), as P(M) is the maximum subproblem. We first distill the modeling schema (problem type, Cp, T(P)) for the failed problem. Next, we verify the subproblem relationships between P and the children of p(M), denoted as, P(M) P(M) P.AA)
If Es ((M), we insert P as a child of P(M) and as a parent of (MM)
* Otherwise, we insert P as child of (P()) and as a sibling of ((a))
Proposition 4.2. The modeling tree remains subproblem order- prder-preserving during the update process.
Please refer to Appendix F for the proof. After adding a new node, we conduct the decomposition and modeling process again to verify the correctness of the new nodes, continuing this until the problem P can be correctly modeled.

---

Table Comparison of modeling accuracy between our method and baselines across the benchmarks. We mark the best results in bold the underline the second-best results.
Model
Method
N1
MAMO EasyLP
CompleXLP ComplexOR
MAMO
IndustryOR
OptiBench
OptMATH
Fine-tuned Method
ORLM
85.7
82.3
37.4
63.2
38.0
51.1
2.6
Evo-Step
84.5
85.3
61,6
36.4
OpIMATH
95.9
89.9
54.1
31.0
66.1
34.7
LLMOPT
93.0
97.0
68.0
72.7
46.0
66.4
40.0
Prompt-based Methods
Reasoning LLMs
DeepSeekRRI
57.3
68.4
OpenAl-o1
87.1
87.6
54.3
73.6
40.0
71.5
34.9
Standard
70.3
84,3
41.2
57.8
27.0
42.3
17.5
CoT
71.6
84.8
42.3
57.8
29.0
42.0
20.5
GPT-4o
CoE
76.4
85.7
46.4
68.4
34,0
43.2
18.6
OptiMUUS
82.0
85.1
47.3
79.0
34.0
45.8
20.2
MCTS
56.8
Opti/Tre
96.2
95.6
81.0
84.2
48.0
71.9
45.8
Standard
70.5
84.3
39,8
52.6
29.0
52.4
16.2
CoT
74,0
82.9
40.7
52.6
35,0
53.1
21.1
DeepSeck-V3
Cok
79.2
85.9
43.1
63.2
33.0
55.2
24.1
OptIUS
80.6
87.1
45.2
79.0
36.0
58.8
32.5
MCTS
89.6
51.6
79.0
OptiTree
98.3
96.9
81,5
84,2
54.0
74.7
52.4
5 Experiments
5.1
Experiment Setups
Dataset
We consider seven modeling datasets to evaluate method and the baselines. (I)
AL 32 is from App competition in NeurIPS 2022, composing 289 elementary-level linear
programming problems. (2) MAMO EasyLP 20 contains 652 easy linear programming problems.
(3) MAMO ComplexLP 20 consists 211 more complex optimization problems. (4) ComplexOR
39 has 19 challenging problems derived from academic papers, textbooks, and real-world industry scenarios, (5) IndustryOR (17) contains 100 real-world problems from eight industries with different difficulty levels: Easy, Medium and Hard. Finally, (6) OptiBench [4]] contains 605 problems, and (7) OpIMATH (25) dataset has 166 challenging problems. The work OptMATH [25] proposed a data
generation process for optimization modeling; OptMATH can be referred to both the testing dataset and the model trained on the training set.
Baselines OptiTree is prompt-based model for LLM-based optimization modeling. We compare our method mainly with seven prompt-bases based baselines. The five prompt- methods are as follows. (1) Standard is the direct output of pre-trained LLMs. (2) Chain-of- -foi-fhf--hhhhss (CoT) breaks the problem into reasoning steps. (3) Chain-of-Fssee -fppert (CoE) 33 multi-agent workflow for modeling, with agents focusing on interpreting the problems, formulating the problems, writing and debugging the solver codes. (4) OptiMUS
is an improved multi-agent workflow with structured problem input. (5) MCTS [2] employs Monte Carlo tree search search for variables, constraints and objective sequentially in different search depths. We also compare our method with (6) DeepSeek- also report the results of fine-tuned OR as backbone). (9) Evo-Step 37 (using LLaMA-3-8B as backbone), (10) OptMATH (25) (using Qwen2.5-32B
RI B and (7) OpenAl-ol [30]. For completeness,
LLMs. The fine-tuned models, (8) ORLM [77 (using LLaMA-3-4
backbone) and (11) LLMOPT 21 (using Qwen 1-1B-.5-1BBBBB as backbone). Notice that the trained model of OptMATH
and Evo-Step have not been released, the results of these two baselines follows those in the original
papers 37 and 25
we use solving accuracy evaluate the performance, i.e., whether the optimal objective the generated optimization models equals to ground-truth values. To demonstrate the generalization of our method, we conduct experi- ments on GPT-4o (29 and DeepSeek- V3
Metric and Implementation Following existing works 39
9 We construct the modeling tree using 400 randomly selected problems in the OR- dataset [17], which is part of the training dataset for ORLM and contains 3,000 problems. We run across problems in the dataset to update the modeling tree, where the statistical information of the tree can be found in Appendix B

---

Coverage of the Modeling Tree
Accuracy of the Identified Subproblems
Oytiie Thrights
Opeiie
N140pt
1134
MAMO EayLLP
75.4%
24.2%
MAMO ComplexLP
ComplexOR
180.0%
IndiniyyR
$2.8%%
20
46
Propertion of Problemn with Indestitedd Subgroblem (%5
Subpooblems 3Scatified
Not Idaatiieed
N1.40pi
MAMO
MAMO CompleXLP
ComplexOR IndustryOR
EasyLP
Figure 4: Left: OptiTree can identify subproblems for wide range of problems, including the challenging datasets. Right: We manually check the accuracy of the subproblem decomposition.
5.2 Main Results
We evaluate OptiTree against the competitive baselines on five modeling datasets using the DeepSeck- V3 and GPT-4o models. The results, presented in Table T highlight three key findings. (1) High Accuracy. Our method significantly outperforms the baselines, achieving approximately a 10% improvement the challenging datasets MAMO ComplexLP, ComplexOR, and IndustryOR. (2) Strong Generalization. Using only 400 problems, the constructed OptiTree has shown strong generalization ability across both easy and challenging benchmarks. (3) Adaptation Different LLMs. Built on top of different LLMs, OptiTree consistently adapts well and exhibits impressive performance, Furthermore, it outperforms state-of-the-ar reasoning LLMs, including DeepSeek-RI and OpenAI-ol. OptiTree also outperforms the fine-tuned modeling LLMs. In Appendix A we also report the proportion codes generated by the methods that can be executed successfully.
5.3 Analysis on the Subproblem Decomposition
Can we find a subproblem the search process? We present the success rate of identifying subproblems, excluding the root node, in the left subfigure of Figure 4 The results demonstrate that OptiTree can successfully identify subproblems for an average of 88% of the problems. This observation suggests that, despite the diversity and complexity of OR problems, there are prevalent decomposition patterns and modeling techniques that generalize effectively across various problems. The modeling successfully captures these patterns.
Coverage:
Reliability: Does the obtained subproblem correctly match the original problem? We randomly sample twenty problems from each dataset (nineteen from ComplexOR) where LLMs can identify at least one subproblem. We manually verify whether the selected subproblems are suitable and relevant. We compare OptiTree with its variant, OptiTree w/o Statement Thoughts, which relies solely on problem descriptions for subproblem identification. The results in the right subfigure of Figure 4 demonstrate that OptiTree achieves a high accuracy in subproblem identification, while OptiTree w/o Statement Thoughts suffers from severe drop in accuracy.
Efficiency: What about the time cost of the searching process? We analyze the average time cost for each problem, comparing OptiTree with other prompt-based baselines Table [ We (1) use tree search to find an appropriate problem and (2) perform optimization modeling, combining the modeling thoughts from the problem. The two parts of time (Tree search and modeling) refer to these two steps. We also provide the average time to solve all the problems across the benchmarks. For the baselines, the time is just the average inference time, and for OptiTree, this is the average of the one-time cost of the tree construction and inference time. Specifically, the one-time cost across the benchmarks is under three hours. The exccution time for the solver code is under a second, which can be considered negligible. OptiTree exhibits the highest efficiency compared to baselines. While the search and modeling time increases for more complex problems (such as MAMO ComplexLP, ComplexOR, and Ind,stryOR), we find that the majority of the time is spent modeling, indicating that the search process itself efficient.
To understand why OptiTree is more efficient, we analyze on the following two factors. First, OptiTree explores much smaller search space. OptiTree searches predefined candidate subproblems, requiring only the identification of the most suitable subproblem within a finite set, instead of the
8

---

Table Comparison of the total time (seconds) of prompt-based methods.
Method
NL40pt
MAMO EasyLPP
MAMO ComplexLP
ComplexOR
IndustryOR
CoE OPtiMUS MCTS
37.2
42.6
76.7
80.0
81.8
26.4
53.2
68.3
57.8
103.2
110.8
111.4
190.1
124.6
TptiTree (Tree Search)
8.9
4.9
4.2
11.2
8.4
OptiTTee (Modcling)
5.0
4.4
19.8
11.5
TreiTree (Inference)
13.9
9.3
13.3
31.0
19.9
Table 3: Comparison of different search depths.
Model
Method
NL40pt
MAMO EasyLP MAMO ComplexLP
ComplexOR
IndustryOR
OptiTree (Depth=1)
93.8
93.3
75.4
GPT-4o
OptiTree (Depth=3)
96.2
95.6
80.1
79.0
44.0
OptiTree
96.2
95.6
81.0
84.2
48.0
OptiTree (Depth=1)
97.2
95.3
75.4
68.4
48.0
DeepSeek-V
Tree (Depth=3)
95.7
79.6
OptiTree
98.3
96.9
81.5
84.2
54.0
variable space constraint space that can grow exponentially large for more complex problems. Second, OptiTrre has fewer iterations in the workflow. While the multi-agent- basee baselines often manager to automatically decide the agent calls, OptiTree avoids the useless agent calls with more streamlined workflow.
5.4 Ablation Studies
Impact of the Tree Search We first investigate the impact of the tree search on modeling perfor- mance. The modeling tree organizes subproblems within its nodes. We compare this approach with method that does not utilize tree structure or tree search for problem decomposition, referred to as OptiTree w/o Tree Search. In this variant, LLMs directly select suitable subproblems from a pool at each step, rather than utilizing structured modeling tree. The subproblem pool is also collected from the same dataset as the modeling tree. As shown in the left subfigure of F OptiTree w/o Tree Search exhibits a decline in modeling accuracy. This degradation occurs because the modeling tree effectively reduces the search space and mitigates ballucinations for LLMs each step.
Impact of the Modeling Thoughts We conduct ablation experiments the impact of the modeling thoughts. We implement variant of OptiTrre, called OptiTree w/o Modeling Thoughts, which models the corresponding subproblems step by step without utilizing modeling thoughts. The results are presented in the right subfigure of Figure We observe a significant performance drop in this method, particularly on the challenging datasets. This highlights the crucial role of modeling thoughts in guiding the modeling of subproblems.
Impact of the Search Depth To better understand the tree search process, we also conduct experiments different depth limitations of the tree search process. The depth represents the number decomposed subproblems in the modeling process, with greater depth allowing for more decomposition subproblems. OptiTree operates without depth restrictions, while implement two variants-Opte (depth=1) and OptiTree (depth=3)-which limit the tree search depths to I or 3, respectively. The results in T demonstrate that a deeper search depth enables the identification of more suitable subproblems for decomposition, resulting in improved modeling performance. OptiTree (depth=3) still achieves promising results, underscoring the effectiveness of the tree search.
Impact of the Statement Thoughts The statement thoughts distilled from OR problems provide a clear and comprehensible format for subproblem identification. To investigate the effects, we implement variant that disables statement thoughts for subproblem identification, instead relying the problem descriptions, referred to as OptiTree w/o Statement Thoughts. As shown Table 4 we observe a significant performance decline without statement thoughts, accompanied by accuracy drop in subproblem matching in the right subfigure of Figure 4 This decline occurs because the statement thoughts summarize the modeling-related information to reduce hallucinations for L.Mss.
Conclusion
This paper introduces novel L.M--asee optimization modeling method called OptiTree, which decomposes complex problems into series of simpler subproblems enhance modeling accuracy.

---

Ablation Study of Tree Search
Ablation Study of Modeling Thoughts
Ope the (CFF)-40) wis Tree Scarch
Opeittes (CB75-40)
(GPT-)) Koosleg Tougle
Queth (GF7-4)
Opei Iree (Deppicck-VP VV3 wis Teas Search
Opeilins UtcepSion--VS
Opsphee (Drpl Making Theggh
Oyfibe (DappSodd-93)
90
90
516
70
70
30
NL
InmplexO&InnuuuyyOR IndustryOR
NL40pt
ComplexOR IndustryOR
EasyLP
ComplexLP
EasyLP
ComplexxP
Figure 5: Ablation studies on the tree search (left) and modeling thoughts (right). The results
demonstrate the critical roles of these two components.
Table 4: Ablation studies on the statement thoughts.
Model
Method
NL.4ptt
MAMO EasyLP
MAMO ComplexLPP ComplexOR
Industry
OptiTree wo Statament Thoughts OptiTree
91.0
91.5
69.2
72.7
42.0
GPT-4o
96.2
95.6
81.0
84.2
48.0
OptiTree w/o Statament Thoughts OptiTree
87.1
92.6
75.3
68.4
46.0
DeepSock-V3
98.3
96.9
81.5
84.2
54.0
OptiTree dynamically updates a modeling tree to store decomposition patterns and modeling thoughts for these subproblems. employing tree search identify suitable subproblems at each step. Experi- mental results demonstrate the superiority of OptiTree, consistently outperforming baseline methods across several challenging modeling datasets.
Acknowledgments
The authors would like to thank all the anonymous reviewers for their insightful comments and valuable suggestions. This work supported by the National Key R&D Program of China under contract 2022ZD01 19801, and the National Nature Science Foundations of China grants U23A20388, 62021001 and 624B1011.
References
[1] Ali Ahmaditeshnizi, Wenzhi Gao, and Madeleine Udell. OptiMUS: Scalable optimization modeling with (MI)LP solvers and large language models. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp. editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 577-596. PMLR, 21-27 Jul 2024.
[2] Nicolás Astorga, Tennison Liu, Yuanzhang Xiao, and Mihaela van der Schaar. Autoformulation of mathematical optimization models using llms. In International Conference on Machine Learning, ICML, Proceedings of Machine Learning Research, 2025.
[3] Mariam Barry, Gaetan Caillaut, Pierre Halftermeyer, Raheel Qader. Mehdi Mouayad, Fabrice Le Deit, Dimitri Cariolaro, and Joseph Gesnouin. GraphRAG: Leveraging graph-based effi- ciency to minimize hallucinations in L.LM-driven RAG for finance data. Genet Asefa Gesese, Harald Sack, Heiko Paulheim, Albert Merono-Penuelle and Lihu Chen, editors, Proceedings of the Workshop on Generative Al and Knowledge Graphs (GenAIK), pages 5465, Abu Dhabi, UAE, January 2025. International Committee on Computational Linguisties.
[4] Belil, S. Kemmoé-Toee Tchomtéé and Tchernev. Milp-based approach to mid-term production planning of batch manufacturing environment producing bulk products. WFAC-PupersOntc 51(11):1689-164 2018. 16th IFAC Symposium on Information Control Problems in Manufac-
turing INCOM 2018.
10

---

[5] Yoshua Bengio, Andrea Lodi, and Antoine Prouvost. Machine learning for combinatorial optimization: a methodological tour d' d'horizon. European Journal of Operational Research, 290(2):405-42)) 4211, 2021.
[6] Michael L. Bynum, Gabriel A. Hackebeil, William E. Hart, Carl D. Laird, Bethany L. Nicholson, John D. Süirola, Jean-Paul Watson, and David L. Woodruff. Pyomo-optimization modeling in python, volume 67. Springer Science & Business Media, third edition, 2021.
[7] Hao Chen, Gonzalo E. Fenssante-Flores, and Can Li. Diagnosing infeasible optimization problems using large language models, 2023.
[8] DeepSeek-AI, Deepseek-rl: Incentivizing reasoning capability in ilms via reinforcement learning, 2025.
[9] DeepSeek-AI, Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, Damai Dai, Daya Guo, Dejian Yang. Deli Chen, Dongjie Ji, Erhang Li, Fangyun Lin, Fucong Dai, Fuli Luo, Guangbo Hao, Guanting Chen, Guowei Li, H. Zhang, Han Bao, Hanwei Xu, Haocheng Wang, Haowei Zhang, Honghui Ding. Huajian Xin, Huazuo Gao, Hui Li, Hui Qu, J. L. Cai, Jian Liang. Jianzhong Guo, Jiaqi Ni, Jiashi Li, Jiawei Wang, Jin Chen, Jingchang Chen, Jingyang Yuan, Junjie Qiu, Junlong Li, Junxiao Song, Kai Dong, Kai Hu, Kaige Gao, Kang Guan, Kexin Huang, Kuai Yu, Lean Wang. Lecong Zhang, Lei Xu, Leyi Xia, Liang Zhao, Litong Wang, Liyue Zhang, Meng Li, Miaojun Wang, Mingchuan Zhang, Minghua Zhang, Minghui Tang. Mingming Li, Ning Tian, Pampan Huang, Peiyi Wang, Peng Zhang, Qiancheng Wang. Qihao Zhu, Qinyu Chen. Qiushi Du, R. J. Chen, R. L. Jin, Ruiqi Ge, Ruisong Zhang, Ruizhe Pan, Runji Wang. Runxin Xu, Ruoyu Zhang, Ruyi Chen, S. S. Li, Shanghao Lu, Shangyan Zhou, Shanhuang Chen, Shaoqing Wu, Shengfeng Ye, Shengfeng Ye, Shirong Ma. Shiyu Wang, Shuang Zhou, Shuiping Yu, Shunfeng Zhou, Shuting Pan, T. Wang, Tao Yun, Tian Pei, Tianyu Sun, W. L. Xiao, Wangding Zeng, Wanjia Zhao, Wei An, Wen Liu, Wenfeng Liang, Wenjun Gao. Wenqin Yu, Wentao Zhang, X. Q. Li, Xiangyue Jin, Xianzu Wang. Xiao Bi, Xiaodong Liu, Xiaohan Wang. Xiaojin Shen, Xiaokang Chen, Xiaokang Zhang, Xiaosha Chen, Xiaotao Nie, Xiaowen Sun, Xiaoxiang Wang, Xin Cheng, Xin Liu, Xin Xie, Xingchao Liu, Xingkai Yu, Xinnan Song, Xinxia Shan, Xinyi Zhou, Xinyu Yang. Xinyuan Li, Xuecheng Su, Xuheng Lin, Y. K. Li, Y. Q. Wang, Y. X. Wei, Y. X. Zhu, Yang Zhang, Yanhong Xu, Yanhong Xu, Yanping Huang, Yao Li, Yao Zhao, Yaofeng Sun, Yaohui Li, Yaohui Wang. Yi Yu, Yi Zheng, Yichao Zhang, Yifan Shi, Yiliang Xiong, Ying He, Ying Tang, Yishi Piao, Yisong Wang, Yixuan Tan, Yiyang Ma. Yiyuan Liu, Yongqiang Guo, Yu Wu, Yuan Ou, Yuchen Zhu Yuduan Wang, Yue Gong, Yuheng Zou, Yujia He, Yukun Zha, Yunfan Xiong, Yunxian Ma, Yuting Yan. Yuxiang Luo, Yuxiang You, Yuxuan Liu, Yuyang Zhou, Z. F. Wu. Z. Z. Ren, Zehui Ren. Zhangli Sha, Zhe Fu, Zhean Xu, Zhen Huang, Zhen Zhang, Zhenda Xie, Zhengyan Zhang. Zhewen Hao, Zhibin Gou, Zhicheng Ma, Zhigang Yan, Zhihong Shao, Zhipeng Xu, Zhiyu Wu, Zhongyu Zhang, Zhuoshu Li, Zihui Gu, Zijia Zhu, Zijun Liu, Zilin Li, Ziwei Xie, Ziyang Song, Ziyi Gao, and Zizheng Pan. Deepseek-v? technical report, 2025.
[10] Wenqi Fan, Yujuan Ding, Liangbo Ning, Shijie Wang, Hengyun Li, Dawei Yin, Tat-Seng Chua, and Qing Li. A survey on rag meeting 1lms: Towards ectrieval-augmenn large language models, 2024.
[11] Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, and Andrea Lodi. Exact combinatorial optimization with graph convolutional neural networks. Advances in neural information processing systems, 32, 2019.
[12) Zirui Guo, Lianghao Xia, Yanhua Yu, Tu Ao, and Chao Huang. Lightrag: Simple and fast retrieval-augmeented generation, 2025.
[13] Shailja Gupta, Rajesh Ranjan, and Surya Narayan Singh. A comprehensive survey of retrieval- augmented generation (rag): Evolution, current landscape and future directions, 2024.
[14] LLC Gurobi Optimization. Gurobi optimizer. URL http://www. gurobi. com, 2021.
[15] Qingyu Han, Linxin Yang, Qian Chen, Xiang Zhou, Dong Zhang, Akang Wang, Ruoyu Sun, and Xiaodong Luo. A gnn-guided predict-and framework for mixed-integer linear programming. In The Eleventh International Conference on Learning Representations, 2023.
11

---

[16] William E Hart, Jean-Paul Watson, and David L Woodruff. Pyomo: modeling and solving mathematical programs in python. Mathematical Programming Computation. 3(3):219-260,
2011.
[17] Chenyu Huang, Zhengyang Tang. Shixi Hu, Ruoqing Jiang, Xin Zheng, Dongdong Ge, Benyou Wang, and Zizhuo Wang. Orlm: A customizable framework training large models for automated optimization modeling. Operations Research, 2025.
[18] Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng. Haotian Wang, Qiang- long Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, and Ting Liu. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM Trans. Inf. Syst. 43(2), January 2025.
[19] Taoan Huang, Aaron M Ferber, Arman Zharmagambetov, Yuandong Tian, and Bistra Dilkina. Contrastive predict-and-seatt for mixed integer linear programs. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 19757-19771. PMLR, 21-27 Jul 2024.
[20] Xuhan Huang, Qingning Shen, Yan Hu, Anningzhe Gao, and Benyou Wang. Mamo: A mathematical modeling benchmark with solvers. CoRR, abs/2405.13144 2024.
[21] Caigao JING, Xiang Shu, Hong Qian, Xingyu Lu, JUN ZHOU, Aimin Zhou, and Yang Yu. LLMOPT: Learning to define and solve general optimization problems from scratch. In The Thirteenth International Conference on Learning Representations, 2025.
[22] Beibin Li, Konstantina Mellou, Bo Zhang, Jeevan Pathuri, and Ishai Menache, Large language models for supply chain optimization, 2023.
[23] Chunyang Liu, Houzhen Ma, Hengxu Zhang, Xiaohan Shi, and Fang Shi. A milp-based battery degradation model for economic scheduling of power system. IEEE Transactions on Sustainable Energy, 14(2):1000-1009, 2023.
[24] Haoyang Liu, Jie Wang, Zijie Geng, Xijun Li, Yuxuan Zong, Fangzhou Zhu, Jianye HAO, and Feng Wu. Apollo-MILP: An alternating mixed-integer linear programming. In The Thirteenth International Conference on Learning Representations, 2025.
neural solving framework for
[25] Hongliang Lu, Zhonglin Xie, Yaoyu Wu, Can Ren, Yuxuan Chen, and Zaiwen Wen. Optmath: scalable bidirectional data synthesis framework for optimization modeling. In International Conference on Machine Learning, ICML, Proceedings of Machine Learning Research, 2025.
[26] Wenyu Mao, Jiancan Wu, Guoqing Hu nd Zhengyi Yang, Wei Ji, and Xiang Wang. On efficieney-effeciiieees trade-off of diffusion-basee recommenders. The Thirty-ninth Annual Conference Neural Information Processing Systems, 2025.
[27] Wenyu Mao, Zhengyi Yang, Jiancan Wu, Haozhe Liu, Yancheng Yuan, Xiang Wang. and Xiangnan He. Addressing missing data issue for diffusion-based recommendation. In SIGIR, pages 2152-2161 ACM, 2025.
[28] Mark Meerschaert. Mathematical modeling. Academic press, 2013.
[29] OpenAl. Gpt-4o system card, 2024.
[30] OpenAl, Introducing Openai ol. https: com/o1/ 2024.
[31] Tianle Pu, Zijie Geng, Haoyang Liu, Shixuan Liu, Jie Wang, Li Zeng, Chao Chen, and Changjun Fan. RoME: Domain-robust mixture-of-expert for MILP solution prediction across domains. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.
[32] Rindranirina Ramamonjison, Timothy T. L. Yu, Raymond Li, Haley Li, Giuseppe Carenini, Bissan Ghaddar, Shiqi He, Mahdi Mostajabdaveh, Amin Banitalebi-Dehkordi, Zirui Zhou, and Yong Zhang. NL.4pt competition: Formulating optimization problems based on their natural language descriptions. In NewrIPS 2022 Competition Track, pages 189-203, Virtual, 2021.
12

---

[33] Russ J Vander Wiel and Nikolaos V Sahinidis. Heuristic bounds and test problem generation for the time-dependent traveling salesman problem. Transportation Science, 29(2):167-183, 1995.
[34] Jie Wang, Zhihai Wang, Xijun Li, Yufei Kuang, Zhihao Shi, Fangzhou Zhu, Mingxuan Yuan, Jia Zeng, Yongdong Zhang, and Feng Wu. Learning to cut via hierarchical sequence/set model for efficient mixed -ittger programming. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-17, 2024.
[35] Zhuohan Wang, Ziwei Zhu, Yizhou Han, Yufeng Lin, Zhihang Lin, Ruoyu Sun, and Tian Ding. Optibench: Benchmarking large language models in optimization modeling with equivalence- detection evaluation, 2024.
[36] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed Chi, Quoc V Le, and Denny Zhou. Chain-of of-thought prompting elicits reasoning in large language models. In Advances Neural Information Processing Systems 35, pages 24824 24824-24837, New Orleans, LA, 2022.
[37] Yang Wu, Yifan Zhang, Yurong Wu, Yuran Wang, Junkai Zhang, and Jian Cheng. Evo-step: Evolutionary generation and stepwise validation for optimizing LLMs OR, 2025.
[38] Xilin Xia, Jie Wang, Wanbo Zhang, Zhihai Wang, Mingxuan Yuan, Jianye Hao, and Feng Wu. High-performance arithmetic eircuit optimization via differentiable architecture search. In The l'hirty-iimt Annual Conference on Neural Information Processing Systems, 2025.
[39] Ziyang Xiao, Dongxiang Zhang, Yangjun Wu, Lilin Xu, Yuan Jessica Wang, Xiongwei Han, Xiaojin Fu, Tao Zhong, Jia Zeng, Mingli Song, and Gang Chen. Chain-of-expprrs:: When LLMs meet complex operations research problems. In The Twelfth International Conference on Learning Representations, 2024.
[40] Ling Yang, Zhaochen Yu, Tianjun Zhang, Shiyi Cao, Minkai Xu, Wentao Zhang, Joseph Gonzalez, and Bin CUL Buffer of thoughts: noought-augmenter reasoning with large language models. In The Thirty-eigtth Annual Conference on Neural Information Processing Systems, 2024.
[41] Zhicheng Yang, Yiwei Wang, Yinya Huang, Zhijiang Guo, Wei Shi, Xiongwei Han, Liang Feng, Linqi Song. Xiaodan Liang, and Jing Tang. Optibench meets resocratic: Measure and improve L.MMs for optimization modeling. In The Thirfeenth International Conference Learning Representations, 2025.
[42] Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, and Karthik Narasimhan. Tree of thoughts: Deliberate problem solving with large language models. In Thirty- Conference on Neural Information Processing Systems, 2023.
[43] Wang Zehao, Yang Lin, Wang Jie, Wang Kehan, Chen Hanzhu, Wang Bin, Hao Jianye, Lian Defu, Bin, and Chen Enhong. Logictree: Improving complex reasoning LLMs via instantiated multi-step synthetic logical data. In The Thitty Annual Conference on Neural Information Processing Systems, 2025.
[44] Penghao Zhao, Hailin Zhang, Qinhan Yu, Zhengren Wang, Yunteng Geng, Fangcheng Fu, Ling Yang, Wentao Zhang, Jie Jiang, and Bin Cui. Retrieval-augmenned generation for ai ai-generated content: A survey, 2024.
13

---

NeurIPS Paper Checklist
Claims
Do the main claims made in the abstract and introduction accurately reflect the paper's s contributions and scope?
Question:
Answer:[Yes Yes]
Justification: Please see Section | in the paper.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or
NA answer to this question will not perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results be expected to generalize other settings.
is fine include aspirational goals as motivation as long is clear that these goals are not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: Please see Appendix G the paper.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification. asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low images are taken in low lighting. Or speech-to-text system might be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach address problems of privacy and faimess.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proofs
Question:
For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [Yes]
14

---

Justification:
Please see Appendix F in the paper.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but they appear in the supplemental material, the authors are encouraged to provide short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that affects the main claims and/or conclusions of the paper (regardless whether the code and data are provided or not)?
Answer: [Yes]
Justification: Please Section 5.1 of the paper.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) the contribution is primarily a new algorithm, the paper should make clear how to reproduce that algorithm.
(b) the contribution is primarily a new model architecture, the paper should describe the architccture clearly and fully.
(c) If the contribution is new model (e.g., a large language model), then there should either way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reprodueibility. the case of closed-source models, may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers have some path to reproducing or verifying the results.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
15

---

Answer:
[No]
Justification:
We wil release the code if the paper is accepted.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://nips.cm
for more details.
While we encourage the release of code and data, we understand that this might not be possible, so "No" an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https
/ /pipps.ccppullc//uuuii wwwiiicgguie//eeeeeeeeeic CoodeSubeiiieeee ssi wsionnolli onnolicy)))) for more details.
The authors should provide instructions on data access and preparation, including how access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: Please see Section 5.1 in the paper.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
7. Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: Please see Section 5 in the paper.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, statistical significance tests, at least for the experiments that support main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call a library function, bootstrap, etc.)
The assumptions made should be given (e.g.. Normally distributed errors).
should be clear whether the error bar is the standard deviation the standard error of the mean.
16

---

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of enrors is not verified.
For asymmetric distributions, the authors should be careful to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative eтror rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of exccution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: Please see Section 3 in the paper.
Guidelines:
The answer NA means that the paper does include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, cloud provider, including relevant memory and storage.
The paper should provide the amount compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics http://////oiipss.cccooooo////pa http://rwwp.p..oooooooocccaaeaaa
Answer: [Yes]
Justification: The research conducted in the paper conforms, in every respect, with the NeurlPS Code of Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurlPS Code of Ethics.
If the authors answer No, they should explain the special cireumstances that require deviation from the Code of Ethics.
The authors should make to preserve anonymity (e.g.. if there is special consid- cration due to laws or regulations their jurisdiction..
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: Please see Appendix in the paper.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
17

---

The conference expects that many papers will be foundational research and not tied particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology being used intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
If there negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms monitor how system learns from feedback over time, improving the efficiency and accessibility of MI..
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification: The paper poses no such risks.
Guidelines:
The answer NA means that the paper poses such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Lieenses for existing assets
Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper. properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [Yes]
Justification: We have cited the datasets in Section 5.1
Guidelines:
The answer NA means that the paper does not existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (c.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (c.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswi thcode. com com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
18

---

If this information is not available online, the authors are encouraged to reach out to the asset's creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: The paper does not release new assets.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/mmoel as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsoureing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
We do not include experiments with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question:
Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such the institution conducting the review.
16. Declaration of LLM usage
19

---

Question: Does the paper describe the usage of LLMs if it is important, original, or non-standard component of the core methods this research? Note that if the LLM used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.
Answer: [Yes]
Justification:
We have include the prompt of LLMs in Appendix
J
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs any important, original, non-standard components.
Please refer to our LLM policy for what should or should not be described.
20

---

Table of Contents for Appendix
Additional Experiments
22
A.I
The Code Pass Rate for Fach Dataset
22
A.2
The Greatest Search Depth
22
More Evaluation Results
22
A.4
Built Opti on More Models
23
A.5
Constructing Modeling Tree with Different Datasets
23
Subproblem Identification Analysis
24
Common Subproblem Decomposition Patterns
27
Analysis CVPR and CVRPTW
................................
27
Analysis on SCMCHP and MCNFP
28
D Algorithm of OptiTree
29
More Related Works
30
Machine Learning for Accelerating Mathematical Optimization Solving
30
Proof of Proposition 4.2
30
Limitations and Failure Cases
30
H Case Analysis
31
Example: Inventory Problem
Broader Impacts
32
Prompts for LLMs
33
J.1
Schema in Opti
33
J.2 Prompts for Subproblem Identification
34
J.3 Modeling
34
J.4 Tree Update
35
K
Examples
40
K.1
NL.4pt
40
K.2
MAMO EasyLP
45
K.3
MAMO ComplexLP
51
IndustryOR
57
K.5
ComplexOR
63
21

---

A Additional Experiments
A.1 The Code Pass Rate for Each Dataset
We present the code pass rates of various methods across the benchmarks. Following the definition (39, the code pass rate refers to the proportion of solver code that can be executed without that our method achieves the highest code
encountering any errors. The results in pass rate across all datasets, demonstrating the high quality of the codes generated by our approach.
Table 5: Comparison of code pass rates between our method and baselines across the benchmarks.
MAMO
MAMO
Model
Method
NL.4Opt
ComplexOR
IndustryOR
EasyLP
ComplexLP
Standard
95.7
98.9
97.0
84.2
84.0
CoT
99.6
99.7
97.5
84.2
91.0
GPT-4o
CoE
98.6
99.6
99.8
89.4
96.0
OptiMUS
100.0
99.8
100.0
94.7
98.0
OptiTree
100.0
100.0
100.0
100.0
98.0
Standard
97.8
93.1
94.5
100.0
87.0
CoT
95.2
98.0
97.5
84.2
86.0
DeepSeek- V3
CoE
97.9
100.0
98.8
100.0
98.0
OptiMUS
99.6
98.4
99.5
100.0
94.0
OptiTree
100.0
100.0
100.0
100.0
99.0
A.2
The Greatest Search Depth
We report the greatest search depth across different datasets. For the harder datasets, the search depth tends to increase, indicating that more complex problems feature more sophisticated subproblem structures.
Table 6: The greatest search depth
NL40pt
MAMO EasyLP
MAMO ComplexLP
ComplexOR
IndustryOR
Greatest Search Depth
4
10
10
A.3 More Evaluation Results
The objective metric is standard in the LLM-based optimization modeling literature subsequent works ORLM, LLMOPT, OptMATH, OptiBench. However, defining a robust "partial credit" metric a significant challenge. Most existing benchmarks only contain labeled optimal value and do not contain annotated ground-truth optimization model, making the partial credit metric difficult to design. Even with ground-truth models, simple text-based or structural comparisons can be unreliable. A model may have minor syntactic differences from the ground truth but be semantically cquivalent. Conversely, a model might be nearly identical yet contain a critical error, such as misplaced inequality sign.
39 and in
For further evaluation, we find that the training set in OpIMATH has annotated models. We 100 problems for evaluation. As our method and the baselines were not trained on this dataset, the comparison is safe and fair. We present the percentages of L.L.--eeerrte.. models that align with the ground-truth models based on statistical information, including the number of variables, binary variables, integer variables, constraints and objective values. Note that all the statistical information is just reference, the mismatch of variables and constraints does not imply the model is incorrect. Notably, OptiTree exhibits the highest matching ratio with the ground-truth model, underscoring its reliability.
22

---

Table 7: Evaluation of partial credit (in %)
OptMATH
Var
Bin
Int
Cons
Obj
DeepSeek-RI
79.0
85.0
67.0
46.0
66.0
OpenAI-ol
83.0
87.0
93.0
50.0
68.0
ORLM
43.0
52.0
44.0
35.0
37.0
LLMOPT
56.0
65.0
57.0
37.0
41.0
CoE
67.0
78.0
85.0
46.0
58.0
OptiMUS
84.0
79.0
76.0
43.0
61.0
MCTS
75.0
80.0
81.0
46.0
63.0
Ours
90.0
92.0
83.0
68.0
71.0
A.4 Built OptiTree on More Models
We conduct experiments to build OptiTree on (1) stronger models, including GPT-ol and DeepSeek- RI; (2) weaker models, including Qwen-2.5 7B and Llama3-8B. The results in demoonttetttttttt that OptiTree significantly improve the performance of the LLMs.
Table 8: Improvement on more models.
NL40pt
MAMO EasyLP
MAMO ComplexLP
ComplexOR
IndustryOR
DeepSeek-R1
79.5
57.3
68.4
38.0
Ours (DeepSeck-RI)
97.9
96.9
82.5
84.2
57.0
OpenAl-ol
87.1
87.6
54.5
73.6
40.0
Ours (OpenAT-ol)
96.5
95.1
83.9
84.2
53.0
Qwen2.5 14B
79.41
79.6
45.0
57.9
31.0
Ours (Qwen2.5 14B)
88.2
89.6
78.7
73.6
37.0
Llama3, 1-8B
40.5
71.2
39.8
63.1
24.0
Ours (Llama3. --B)
55.0
75.9
64.4
73.7
28.0
A.5
Constructing Modeling Tree with Different Datasets
We investigate the robustness the datasets for tree construction. (1) For the first variant, we use 100 problems from MAMO EasyLP and 100 from ComplexLP, which we refer to as OptiTree (MAMO). (2) For the second variant, we 100 problems from the OR-Instruct 3K dataset, representing only 25% of the problems used in our main experiments, We call this variant OptiTree (100 OR-Instruct). We evaluate performance on three challenging benchmarks: MAMO ComplexLP, ComplexOR, and IndustryOR. Unlike the OR-Instruct 3K dataset, the MAMO datasets do not include ground-truth modeling process for tree construction; we rely solely on the final answers for this purpose. The results presented in Table reveal two key findings.
(1) Despite utilizing easier problems without ground-truth modeling process, Opti'Tree (MAMO) achieves high performance, with only slight drop compared to the original Opti'Tree (2) Opti Tree demonstrates data efficiency, as Opti'Tree (100 OR-Instruct) exhibits performance comparable to that of the full OptiTree. These findings suggest that common decomposition patterns and modeling techniques are widely applicable across OR problems, and the modeling tree effectively captures this general knowledge across different datasets.
Table 9: Constructing a modeling tree using different datasets.
Model
Method
MAMO ComplexI.P
ComplexOR
IndustryOR
OptiTree (MAMO)
84.4
79,0
44.0
GPT-4o
OptiTree (100 OR- (R-Instruct)
81.0
84.2
46.0
OptiTree
81.0
84.2
48.0
OptiTree (MAMO)
83.9
79.0
46.0
DeepSeek-V. V3
OptiTree (100 OR-Instruct)
81.5
84.2
54.0
OptiTree
81.5
84.2
54.0
23

---

B Subproblem Identification Analysis
We analyze the structure of the modeling tree, where the statistical information of the tree is presented in Table 10 We also examine the problems represented within the modeling tree. We also analyze the subproblem matching distribution in different datasets. We find significantly different distributions of the sbuproblems on different datasets. The consistent superior performance OptiTree across the datasets demonstrates the strong generalization ability across different problems from various scenarios and difficulty levels.
Table 10: Statistics of the modeling tree.
DeepSeck- V3
GPT--4o
Average Degree
2.42
2.74
Depth
10
10
Node Number
320
285
Figure 6: Subproblem distribution in NL4Opt.
24

---

Figure 7: Subproblem distribution in MAMO EasyLP.
Figure 8: Subproblem distribution in MAMO ComplexLP.
Figure 9: Subproblem distribution in Complex
25

---

Figure 10: Subproblem distribution in IndustryOR.
26

---

C Common Subproblem Decomposition Patterns
In combinatorial optimization, there are commonly subproblem decomposition patterns. Here, we provide observations and examples illustrate these patterns. First, expand subproblem into more complex problems using the following patterns.
Constraint Addition introduces new constraints to model refined requirements.
Variable Expansion incorporates new decision variables.
Dimensional Replication replicates the problem structure across multiple items.
We provide the following examples to demonstrate the three decomposition patters..
C.1 Analysis on CVPR and CVRPTW
The Capacitated Vehicle Routing Problem (CVRP) aims determine optimal routes for fleet of vehicles to serve a set of customers from a central depot while minimizing total travel cost or distance. The basic CVRP formulation includes constraints ensuring each customer is visited exactly once, vehicles return to the depot, and the fleet size is respected. In contrast, the Capacitated Vehicle Routing Problem with Time Windows (CVRPTW) extends the CVRP by adding temporal constraints, requiring each customer to be served within a predefined time window. This introduces additional complexity, as routes must now satisfy both spatial routing constraints and temporal synchronization.
The optimization model for CVRP is as follows. V is the set of nodes (depot and customers), Gi is the travel cost from i Fij is the binary decision variable for route inclusion. K is the fleet size.
Minimize
ΣΣ
JEV
Subject to
Σ
Fiy =
VIEV (0}
(Customer visited once)
jEV
Σ Tij 1,
Vj VEV (0)
(Flow conservation)
VEV
Σ Tnj & K
(Fleet size)
JEV
ΣΣ Fij |S|-1 1,
VSCV) # (Subtour elimination)
IES JES
Tij E {0,1), VijeV
The optimization model for CVRPTW is as follows. t, is the service start time at node i. [a,, by] is the time window for node i. s; is the service duration at i. dig is the travel time from to j. M is the big-M number.
Minimize
ΣΣ Cj NEV JEV
Subject to
All VRP constraints
a; S 4 S bi, ViE V. \\() {0} (Time window)
t, 2 + + dij - M(1 zgg), Vi,j E V (0) (Time consistency)
4 2 0, ViEV
Notice that CVRP is a subproblem of CVRPTW. We identify the following decomposition patterns.
Variable Expansion. The introduction of new continuous variables t, tracks service times, adding temporal dimension to the original CVRP.
Constraint Addition: CVRPTW introduces time windows a, < 4 < by and synchronization constraints (time consistency), which refine feasible solutions by eliminating temporally infeasible routes.
27

---

C.2 Analysis on SCMCFP and MCNEP
The Single-Cone Cogemo-y Minimum-Coo Cost Flow Problem (SCMCFP) optimizes the flow of homo- geneous good (e.g,, water, electricity) through network to meet supply/demand at nodes while minimizing costs, subject to are capacity constraints. Its linear programming formulation tracks flow conservation and capacity limits for a single product type. In contrast, the Multi-Commodity Network Flow Optimization Problem (MCNFP) generalizes this by handling multiple distinet commodities (e.g., different goods in logistics, data streams in networks) sharing the same infrastructure. Each commodity has unique sources, sinks, and demands, coupled through shared are capacity constraints.
The optimization model for SCMCFP is as follows. Suppose that G = (V, E)) is the network with nodes V and directed ares E. b; is the supply (> 0) demand (< 0) node Cij is the cost per unit flow on are (i.j). Usj is the capacity of are (i,j). Zig is the flow decision variable on are (i, j).
Minimize
Σ
CijTtij
(J)ER
Subject
Σ i((J))
Σ Iji bi, ei
(Flow conservation)
JUJER
0 S 2ij S Wiji v(i.)) E E (Capacity constraints)
The optimization model for MCNFP as follows. Suppose that K is the set of commodities. 8k, t is the source/sink nodes for commodity k. d₂ is the demand for commodity k. ct is the commodity-speiinf are cost. z.t the flow of commodity on are (i.
Minimize
Σ
Σ
ÆEK (i,))E
d2
if 8k
Subject to H(L)EE
Σ
Σ
dx
if la otherwise
vi K
j.G,EE
0
Σ
Miji
v(i,)) E
(Shared capacity)
kEK
20 0, Vi.j)
Notice that SCMCFP is subproblem of MCNFP, where we identify the following pattern.
Dimensional Replication: Adds commodity dimension k E to flow variables.
28

---

D Algorithm of OptiTree
Algorithm 1 Tree Search for Subproblem Decomposition
Require: Target problem P. modeling tree T
Ensure:
Hierarchical modeling thoughts T(P), and the maximal subproblem P
1: function TREESEARCH(P. T)
2: Initialize current node + The root of the modeling tree
3: Extract statement thoughts Cp
4: Identified subproblems
5:
while / has children do
6:
Get the children of N Prompt of Subproblem Identification Appendix J.2 Identify the subproblem of P among the children with similarity scores if has subproblem among the children then A < Subproblem with the max similarity score
7:
8:
9:
10:
11:
The maximal subproblem P < .V
else
13:
A <
None
end
15:
end while
Synthesize T(P) from T(P)
17:
return T(P). P
18:
end function
Algorithm 2 Modeling Tree Update
Require: New problem P, modeling tree Ensure: Updated modeling tree
1: function UPDATETREE(P,, 7)
2: T(P), P TreeSearch(P, T)
3: Prompts Modeling with Modeling Thoughts in [.3
4: Model the problem P using the modeling thoughts and solve the model for optimal value y
5:
if does not equal to the ground-truth objective value then
6:
# Prompts of Modeling Thoughts Distillation in Appendix J.4
7:
Distill schema (problem (ype.Cp.T(P)) from P
8:
Find the children of the maximal subproblem P for child Ps. in the children do Prompt of Add New Tree Nodes Appendix J.4
9:
P C Pk then
12:
Insert P as parent of Pe and children of p
else
14:
Insert P as sibling of Pe and children of P
end if
16:
end end for
17:
18:
return T
19:
end function
29

---

E
More Related Works
E.1 Machine Learning for Accelerating Mathematical Optimization Solving
Mathematical optimization finds broad applications across critical domains such chip design
38 and optimization (31] Driven by advances in graph models [27] and generative models [26].
machine learning techniques have been widely adopted to speed up combinatorial optimization
solving [S] These efforts follow main directions: improving key modules in branch-and-
algorithms
and predicting high-quality solutions warm-start solvers [24 15 19
F Proof of Proposition 4.2
Lemma F.1 (Transitivity of Es). Given three problems Pi, and Ps, Pf Ss P2 and P2 Es Pa. then P1 Es Ps.
Proof. We prove by induction. If the initial tree contains only the root node (abstract OR problem). The property holds trivially. Assume the modeling tree subproblem order- wyder-preserving after insertions. We show that the tree preserves the property when adding new node P. We Identify the maximum subproblem p(M) for P. For each child p!() of p(M), p( cannot be the subproblem of P. Thus, P cannot be in the descendent of P(A)) We have the following two situations.
(P becomes parent of P( By insertion rule, we have P(M) Es P. By assumption have P Es p( Finally, the transitivity ensures all ancestors of p(M) satisfy P' Es ((M)
Case 1 Analysis
Case 2 Analysis becomes sibling of M) First, the operation maintains P(M) Cs and ((M) Cs ()) We notice that no new uncestor-descendeee relationships are created between P and siblings, and existing subproblem relations are preserved through shared parent P(M)
Thus, the modeling tree remains subproblem order-preserving By induction, the proposition holds for tree updates.
G Limitations and Failure Cases
Following OptiMUS (1. the errors mainly come from three aspects: missing wrong constraints, incorrect modeling and coding errors. In [.] almost half of the errors come from the incorrect modeling (62.5% for ComplexOR), e.g., defining wrong binary variables in the model. We analyze the failures of Opti'rree and normalize the failure rates to sum to 1. We find that most errors are from the missing constraints. OptiTree can significantly reduce the error of incorrect modeling, which mainly comes from the wrong variable definitions. The constraint errors are the main error for Tree. First, accurately formulating constraints requires a deep and nuanced understanding of the specific problem scenario and its domain knowledge. For highly specialized or novel OR problems, existing background knowledge may not fully capture the intricate details necessary for precise constraint definitions. The second limitation is the intrinsic reasoning ability of the base LLM. While OptiTree provides a structured framework and knowledge, the final synthesis depends on the LLM's inherent reasoning capabilities. This framework may struggle with problems requiring significant logical or relational reasoning. For instance, in the staff rostering problem, the model must allocate staff for 24-hour shifts to meet coverage constraints (with workers working 8-hour days). If fails to recognize that the demand period from 1:00 to 2:00 AM covered by workers who began their shifts at 8:00 PM. it will result in an incorrect constraint and ultimately flawed model.
30

---

Table 11: Failure cases information
ComplexOR
IndustryOR
OptMATH
Incorrect modeling
0
10.9
23.8
Missing constraints
66.7
82.6
61.9
Coding errors
33.3
6.5
14.3
H
Case Analysis
H.I
Example: Inventory Problem
We provide detailed analysis of an example from the IndustryOR dataset. This example demon- strates that while OptiTree successfully corrects fundamental structural errors (what ( terms "Incorrect Modeling"), it still faces challenges with constraints that require deep, context-specific logical reasoning.
Problem. A factory requires specialized tool for n planning stages. Ty specialized tools are needed. At the end of this stage, all tools used within this stage must be sent for repair. There are two repair methods: one is slow repair, which is cheaper (costs b per tool) but takes longer (p = 3 stages to return); the other is fast repair, which costs per tool and requires q = stages to return. If the tools cannot meet the needs, new ones must be purchased, with cost of per new tool. Determine an optimal plan to minimize the cost.
The Errors of the Standard Output Model The standard output from DeepSeek- V3 produces structurally flawed model. tries to fulfill demand by combining new purchases with tools returning from repair, but it completely lacks any concept of inventory tools. The model given by the Standard output of DeepSeek- V3 as follows. Let xú 2 0 be the new tools purchased at stage J. 2 be the tools sent to slow repair at stage j. and fz 2 0 be the tools sent to fast repair at stage j.
min
Σ (ax; + bsj + cfj)
s.t.
8j + [] = Vj E (l....; Tj + Sk-p fn- 2r Vj (l.......
(Repair Requirement)
(Demand Fulfillment)
Following the errors described in OptiMUS [. the model output has the error type of Incorrect modeling, which fails to define the Inventory variables I.
The Improvement OptiTree OptiTree correctly identifies that this problem contains an Inven- tory Problem subproblem. By applying the modeling thoughts, it generates much-improved model that correctly introduces inventory variables and a proper inventory balance constraint. The model given by OptiTrree (DeepSeek- V3)) is follows. Let x. Z be the tools purchased at stage sy E Z, be the tools sent to slow repair at stage j. fj E Z, be the tools sent to fast repair at stage j. and I, Z, be the inventory of available tools start of stage j. OptiTree finds subproblem of the Inventory Problem for the original problem.
min Σ (any bag + cf₁)
s.t.
==
(Initial Inventory)
8, 1 =T; Vj E [I....,nI]
(Repair Requirement) (Inventory Balance) (Demand Fulfillment)
1,+1= +1y+ + - - ry) + Sj-p fz-q Vje nI.
2,,;, Vj (1.1..... [1....,m}
The Errors the Model Given by OptiTree Despite the structural correction, the OptiTree model still contains a subtle error that requires common-sense logical reasoning. The model does not
31

---

account for the finite 10-stage horizon. A human modeler would reason that it is illogical to pay for repair that will finish after the tools are no longer needed. Slow repairs (taking p = 3 stages) are disabled for the last 3 stages (j 8, 9, 10) since tools sent for repair at these stages wouldn' 't return by stage 10, and fast repairs (taking 7 = stage) are disabled for the final stage (j 10) for the same reason. The repair requirement uses inequality
8 + f rg (Repair Requirement)
rather than equality 5j + fg = rj. allowing flexibility to not repair tools when unnecessary particularly near the end of the horizon. Thus, the final corrected model should be
min
Σ (ax, + bsj + cff)
==1
s.t.
==
(Initial Inventory)
8j + Srj Vj E (l........) 1,+1 = (1++ + bj [3) + - S2-9 Vj (1.....n)
(Repair Requirement)
(Inventory Balance)
2 (1........
(Demand Fulfillment)
This demonstrates limitation where OptiTree applies general pattern correctly but misses nuanced, context-dependent constraint. The error stems not from lack of OR knowledge patterns but from a gap in the base LLM's logical reasoning about the problem's 's specific context. We believe this limitation will diminish as the underlying reasoning capabilities of LLMs continue to improve.
I Broader Impacts
This paper focuses on the automatic optimization modeling in operations research. The traditional modeling process often demands significant human effort and specialized domain knowledge, making both costly and time-consuming. Our work aims enhance the efficiency and accuracy of this process. We introduce novel tree-based method for organizing operations research problem data. Unlike existing approaches that treat each problem individually, our modeling tree leverages the relationships between different problems. During the modeling process, we can retrieve and utilize valuable modeling thoughts to improve overall effectiveness. Additionally, our research offers new perspectives organizing, utilizing, and managing knowledge within the field of operations research.
32

---

Prompts for LLMs
In this part, we present the meta-prompts we used in this paper.
J.1 Schema in OptiTree
Schema
Problem Type: Diet Problem with Integer Constraint,
Statement Thoughts: [
Statement Thoughts: The Diet Problem with Integer Constraint involves determining the quantity of each food item that should be consumed to meet nutritional requirements while minimizing cost. The twist is that the quantities must be integers, representing the whole number of servings or portions of each food item. The problem is formulated calories, protein, vitamins, etc.) are satisfied, and the total cost is minimized.,
ensure nutritional constraints (such
Nutritional Constraints: Ensure that the selected food items provide least the required amount nutrients, such calories, proteins, fats, vitamins, and minerals., Cost Minimization: The total be minimized while meeting nutritional constraints., Integer Servings: The servings food items must integer values, representing realistic portions of each food item.
of the selected food items should
].
Modeling Thoughts:
[Dffine Decision Variables] Define decision variables that represent the integer quantities of servings for each food item., [Define Objective Function] Minimize the total cost of the selected food items..
[Define Nutritional Constraints] Ensure that the nutrient intake meets or exceeds the minimum required levels for each nutrient., [Implement Integer Constraints] Ensure integer constraints for the serving sizes of each food item in the model.,
[Comprehensive Verification] Check the common errors in the optimization model.,
[Write Gurobi Code] Write the Gurobi code to solve the problem., [Gurobi Code] \n "n""pyhoon seython/niimort json Inmmprt numpy as np'nimport
math /nimprt gurobipy gp\nfrom gurobipy import GRB Create a new model \nmodel Modell (ondel('moder ('model) \n define parameters'nl \n\ define variables\n\nft define constraints in define objective An\ Optimize the model hwwlll/oooeee...mm opttmmzee () \nstatus model. status \n adlnojj_val None Check whether the model infeasible, has infinite solutions, or has optimal solution\nif status == gRBGRB. INFEASIBLE; \n obj_val \infeasiblel GRB. UNBOUNDED: \n obj_val = \unbounded \nllif status == gp. GRB. OPTIMAL: An obj_val model. objValllniimmeeee model. TimeLimit TimeLimit\nprint Apprint (VTimecosth: time) imprint (\0bjective Value:\, obj_val) \n 'r (error_tips)
status gp.
Ensure decision variables are defined integers., Confirm that all nutritional requirements are modeled correctly and constraints Review that cost coefficients are correctly assigned in the objective function.,
set accurately..
33

---

Example not provided since specific problem data is omitted; follow reasoning flow for formulation specifics.
J.2 Prompts for Subproblem Identification
Subproblem Identification
You are a mathematical formulator working with team of optimization experts. The objective tackle complex optimization problem.
You are given specific problem and its current basic problem type. You are also provided with list of subtypes for this basic problem type Input problem: (input_probles Its current basic problem type: (basic_type)
You given list of defined subtypes and the statement thoughts of subtypes: (statement__hhuggtt.imm
Your task is to determine if the specific problem belongs to one of the given subtypes. If it does, return the subtype directly. Importantly, you must return the only subtype vorbatim(don's return the statement thoughts), which is provided in the list. If it does not, return subtype not found.
Also, return a boolean value indicating whether the input problem belongs to the defined subtypes. Return only the final answer the following JSON format:
<<< jjson
{{
goeching_subtype srrthinngsuubyppe
reasoning: boasoning-process <boolean, value>
}}
<<<
Note that I'm going to use Python JSON. 1oads() function to parse the JSON file, so please make sure the format is correct (don't add ', before enclosing }}} '] characters.
Generate the complete JSON file and don't omit anything.
Use ><r 'sonn' and to enclose the json file.
J.3 Modeling
Modeling with Modeling Thoughts
You mathematical formulator working with team of optimization experts. The objective is to tackle complex optimization problem.
34

---

You are expert in problem analysis and can apply previous problem- solving approaches to new issues. The user will provide a specific task statement thoughts and modeling thought. Your goal is to analyze the user's task and generate a specific solution based on the modeling thought. If the instantiated solution involves Python code, only provide the code and 1et the compiler handle it. If the solution does not involve code, provide final answer that is easy to extract from the text.
It should be noted that all the Python code should be within block; the answer should not include more than one code block! And strictly follow the modeling thought to instantiate the Gurobi code, but you should also adjust the input parameter according to the user input!
code
User Input: {user_inpure
modeling thought: (modeling thought)
Please analyze the above user task statement thoughts and modeling
thought, and generate a specific, detailed solution. If the solution involves Python code, only provide the code. If not, provide clear and extractable final answer.
Code Correction
You excellent Python programming master who is proficient in analyzing and editing Python code, and you are also good at understanding real-world problems. Your task is:
1. Analyze the given Python code
2. Edit the input code to make sure the edited code is correct and run and solve the problem correctly.
Your response should follow the format below:
" "python
## Edited code here <<<
J.4 Tree Update
Statement Thoughts Distillation stopping at the root node
You are given specific combinatorial optimization problem.
task is to summarize the industrial scene type of specific problem and provide detailed statement thoughts of this type.
Importantly, you must classify the problem into more precise industrial scenarios, such as the Traveling Salesman Problem (TSP), facility location problem, Parallel Machine Scheduling, and on. Avoid using broad categories such as linear programming, mixed-integer optimization, integer optimization, Integer Linear Programming Problem, and so on.
Speccific Problem**: (specific_ppoblemn)
35

---

Please provide the following information in JSON format:
jjson {{
"industrial_ scene_type": "cindustrial_scon_ttpr
"statement
of _f__ttee::tttt
"statement thoughts"; "<the more precise of statement thoughts>", "constraints": {{
"<get the Constraint 1>"; "Detailed description of constraint 1",
"<get the Constraint 2>"; "Detailed description of constraint 2"
}}
}}
}}
<ce
Here is an output example:
{{
'industrial_scen _cce_ssteeeeeee.__ 'Maximum Flow Problem',
'statement frugghts_o__tppet {{
'statement thoughts': 'The Maximum Flow Problem involves determining the highest possible flow that can routed through a directed graph from specified source node to sink node, while adhering to the capacity limits of the edges. This problem foundational in network flow theory and has applications in transportation networks, communication systems, supply chain logistics, and resource distribution. The solution must respect edge capacities, flow directionality, and conservation laws at intermediate nodes.
constraints' {
'Directed Graph': 'Flow only travel in the direction specified by the edges in the graph.',
Capacity Constraints': "The flow each edge must be non- negative and cannot exceed the edge's maximum capacity." }b,
Flow Conservation 'For every node except the source and sink, the total incoming flow must equal the total outgoing flow.'
}}
}}
Statement Thoughts Distillation stopping at other node
You mathematical formulator working with of optimization experts. The objective is to tackle a complex optimization problem.
You are given a specific problem, its current basic problem type, and the statement thoughts of the basic problem type.
task is to determine the more specific subtype given basic problem type that the specific problem belongs to, and provide a more detailed statement thoughts of this subtype.
Sppecific Problem**: (specific_problee)
**Current Basic Problem Type**: {current_basii bws.bbaaccpp..... problem_typel **statement thoughts of Basic Problem Type**: (statement briigtts_ofbbasc_proboeeee
Please provide the following information in JSON format:
36

---

jsjon {{
".
Ccuurenttbasic.proble....m statement Nhoughts__f_bbaic__poooo.
current_basie wttpp_aacp.cobbe.tpppe..e.
(statement
thoughts_ of www_baasic.robbeeettppp..p
formulated__subtye:: <subtype?,
statement of
statement thoughts: <the more precise of statement thoughts>, constraints:
{{
<get the Constraint 1>: "Detailed description of constraint 1",
"<get the Constraint 2>"; "Detailed description of constraint 2"
}}
}}
}} <cc
Modeling Thoughts Distillation based Statement Thoughts
You are mathematical formulator working with team of optimization experts. The objective is tackle complex optimization problem.
Please list the steps to formulate a (problem_typol sype] problem and use the Gurobi code to solve it. You need to record some errors that are easy to make during the formulation process. Please output JSON format.
You are given specific combinatorial optimization problem, its solution process, and the problem type, along with its statement thoughts.
**Problem Type**: {problem_ type]
**statement thoughts of Problem Type**: (statement thoughts}
**Specific Problem**: (specific.problec)
**Solution step of Specific Problem**; (solution_step)
Your task is to return modeling thought for this problem type, which includes the following five parts:
1. **problem_typer The provided problem type.
2. **statement thoughts**: The provided statement thoughts of the problem type.
**reason_flopw*, A detailed step-by-step reasoning process for solving series of problems that belong to problem type, according to the provided solution process of the specific problem.
4. *example__appe attpplleepppccaiioo........
detailed example application that matches the specific problem and its solution process.
5. *xincremente: list.
Additionally,
solution steps, the Gurobi code included. You must only use the fixed Gurobi code mentioned below in the solution steps. This is the fixed Gurobi code ---- "### Gurobi Code:\n'< sython\nimpors json Animpor numpy np'nimport math gurobipy as gp nnmmfrom gurobipy import GRB Create a new model Ammodel gp. Model ( ('model' +) An An# define parameters\n define variables\nle \n#
37

---

define constraints define objective \m\n# Optimize the model \ nmodel. optdeieo () Instatus sodel.stature wtw.tssttttsnantboooaaaaoo Annnoojjvvall None An# Check whether the model is infeasible, has infinite solutions, optimal solution\ni: nnf status gR.GRB. INFEASIBLE: \n obj_val \" infeasible\ "(nelf status = gP GRB. UNBOUNDED: An obj_val = \" unbounded) "\nelif status gp.GRB GRB BRBB.PTTMALL An obj_val model. objVal\ ntime Tiwieliiimmmmmmttpppeee (1"rmecoo" time) Amprint (\ "Objeccvvv Value:\", obj_val) (n \n
has
Please provide the following information in JSON format:
Here is modeling thought example:
{{
"Problem Type": "Travelling Sales Person Problem", sstatement thoughts': {{
'statement thoughts': "The Transportation Problem involves optimizing the shipment of goods from multiple distribution centers various destinations to minimize total transportation costs while meeting destination demands. In this scenario, company with four distribution centers (A, B, C, D) must supply five destinations (1, 2, 3, 4, 5) such that each destination's demand is fully satisfied. The key objective is to determine the optimal shipment quantities from each center to each destination that result in the lowest possible transportation costs. This problem is a linear progranming model where decision variables represent the amount shipped from each center to each destination, subject to supply and demand limitations.",
'onstraints' {{'Supply Constraints': 'The total quantity of goods transported from each distribution center to all destinations must not exceed the available supply at that center.', 'Demand Constraints'; "The total quantity of goods received by each destination from all distribution centers must exactly match the destination's 's specified demand.", ", 'Non-Negative Transportation': The amount of goods transported from any distribution center to destination must be non-negative (i.e., shipments cannot have negative quantities).. '}}
}}
"Modeling Thoughts": [
[Define Decision Variables] Define decision variables for edges A x_[[ij}} W and possibly auxiliary variables for MTZ \ u W
[Define Objective Function] Sum distances multiplied by \V x_{{ ij}} \\",,
[Define Degree Constraints] Each node entered and exited exactly
once",
[Define Subtour Elimination Constraints] Subtour elimination via MTZ callbacks",
[Comprehensive Verification] Check the common errors in the optimization model",
[Write Gurobi Code] Write the Gurobi code the solve the problem.", [Gurobi Code] An "pyy""""yhooaaan (ppython'nimporr json lnimort numpy np\nimport math nimport gurobipy as gP gn\nfrom gurobipy import GRB\n Create model\nnmode!
gp. -p.Model www.Mode('mool ('model An\ define parameters\nn \n) n# define variables' nn define constraints An define objective An Optimize the model (omoeel oottiiiee () Instatus model.
status AnntusAnten An in\nooj_vall = None\n# Check whether the model is infeasible, has infinite solutions, or has optimal solution\nif status gp. GRB. INFEASIBLE; \n obj_val \"infeasible' "\nelif status == gp.
38

---

GRB. UNBOUNDED: An obj_val = \"unbounded) "\nelif status = gP CRB. OPTIMAL: An vbjl model. obii.ooooaaalaieeeee model. TimeLimit Amprnt (VTimecost\ : time) (ttp//pppnnttiittaii (\"Djeettve Value:\", obj_val) (n [Common Errors to Avoid]\n1. **Incorrect Subtour Ellminations*:
Ensure MTZ constraints exclude the starting city and are applied to correct indices. /n2. **Indexing Mistakes**: Use consistent 0- based 1-based indexing for cities. \n3. **self-Loops**:
Explicitly disable \V( x_ {{ii}} \V variables. \n4. **Bounds on MTZ Variables**: Set \V( u_i (V) bounds correctly (\( 1 Vileq u_i V/leq n-1 \V) An5. **Objective Function**: Ensure distances correctly paired with \V( x_((i}}) \V and exclude \\
\V An\nBy following these steps and avoiding common pitfalls, you can effectively model and solve TSP using Gurobi."
1.
}}
Important:
Use plain JSON without markdown syntax Ensure all quotes are properly escaped
Include all required keys: problem_ type, statement thoughts, reason_flow, crample_applicttinn innittioooiincemmmm. increment
Add New Tree Nodes
You are a mathematical formulator working with a team of optimization experts. The objective is to tackle complex optimization problem.
You given primary problem type and its statement thoughts. You also provided with a list of other problem types, each with its statement thoughts.
According statement thoughts, your task is determine which problem types in the list are subtypes of the given primary problem type. Return list of problem types that are identified subtypes of the primary problem type. To be more specific, the subtype contains the constraint form the primary problem type.
Importantly, the returned subtypes must be provided in the list; if there is any problem type that subtype of the given primary problem type in the list, return empty list.
*Primary Problem Type**: (primary-probll }
**statement thoughts Primary Problem Type**: Mstatement
thoughts_typel>
**List of Problem Types**: Mlist_of siiit_of_probblmmttpeeee
Please provide the following information in JSON format:
'sjsoon
{{
"primary-probll type": watppuu_prooeeemyrepe subtyyees: ["<problem_type>>
}
39

---

K Examples
To better understand OptiTree, provide two examples of OptiTree for each of the five datasets.
K.1
NL40pt
NL.40pt
Natural Language Deseription:
There is 1000 mg of gold available that is needed to make long and short cables. Long cables require 10 mg of gold while short cables require 7 mg of gold. Because their compact size, least 5 times the number of short cables needed than the long cables. In addition, there needs to at least 10 long cables made. If each long cable sold results in a $12 profit and each short cable sold results in $5 profit, how many of each type of cable should be made maximize profit?
Subproblem Identification Process:
{
"matchhing.probbee.tyyyp "Product Mix Optimization",
"reasoning": "The problem involves determining the optimal number of long and short cables to produce given constraints on resource availability (gold) and demand (minimum number of cables), with the objective of maximizing profit. This aligns with the 'Product Mix Optimization' problem type, which deals with optimizing the mix of products produce under resource constraints maximize profit minimize cost.", Beslongs.to_proolemmtyy.. true
}
"matching_subtype": "Sales and Inventory Optimization with Profit Maximization",
"reasoning": "The problem involves determining the optimal number of
long and short cables to produce to maximize profit, considering constraints the available gold and the ratio of short to long cables. This aligns with the 'Sales and Inventory Optimization with Profit Maximization' subtype, which focuses maximizing profit under given constraints, including storage (in this case, gold availability) and integer constraints on production quantities.", Dhelongs_to_subtype true
}
"uabch";ng_subyype "subtype not find",
"reasoning"; "The input problem involves maximizing profit by determining the number of long and short cables to produce, considering gold availability and production constraints. It does not involve inventory holding costs, selling prices, demand, or warehouse capacity constrainte, which key features of the Single-Period Inventory Optimization with Capacity Constraints' subtype. Therefore, it does not match the provided subtype.", geelongs_to_subtypeet false
40

---

Get the Modeling Thoughts:
{
'Problem Type': 'Sales and Inventory Optimization with Profit Maximization',
'Statement Thoughts';
TThis subtype Product Mix Optimization focuses on determining
optimal sales and inventory quantities for different products to maximize total profit while considering inventory holding costs and storage space limitations. The problem involves balancing the trade- off between sales revenue and inventory costs under given iettrraints.Sttraaee Space Constraint-The total inventory quantity of all products cannot exceed a specified limit (e.g., 1000 units this case). Integer Constraint-Sales and inventory quantities must be integers due to the indivisibility of the products.',
"ooellng Thoughts':
[Define Decision Variables] Define integer decision variables for sales and inventory quantities for each product.',
[Define Objective Function] Maximize total profit by considering sales revenue and subtracting inventory holding costs.
[Define Constraints] Add constraints for storage space limitations and ensure non-negativity of variables.',
[Comprehensive Verification] Check for common errors such as incorrect profit calculation constraint formulation.', [Write Gurobi Code] Write the Gurobi code to solve the problem. [Gurobi Code]:', ""'yyhon',, 'import json', 'import numpy as np', import math', 'import gurobipy as gp', 'from gurobipy import GRB Create new model', "model sp.Model('model1 parameters', '# define variables', 'x aodel.aadvarr(typpe--ttt (vtype=GRB. INTEGER, name="x")', 'y model. addVar (vtype=GRB. INTEGER, name="y ")², '# define constraints', 'model. addConstr =" "IIventoryppcceoosstrrat""""""""
'# define
<= 1000, name '# define objective', 'model. setObjective(Bxx 7*y, GRB MAXIMIZE)) *# Optimize the model', model optimize()', *status model. status', 'obj_val val None', "# Check whether the model is infeasible, has infinite solutions, has an optimal solution', 'if status gp gp.GRB GRB. INFEASTBLE:
obj_val = "infeasible"', 'elif status == gP GRB UNBOUNDED:
obj_val "unbounded", elli status GRB. PRA.OOPTIMA:"
obj_val = model. model.objVal', 'time = model.Runtime', 'print ("TimecoTto :", time)', 'print ("OjjeecOeectvve Value:", obj_val)', )(<()
[Common Errors to Avoid], '1. **Incorrect Profit Calculationww
Ensure the objective function correctly accounts for both sales revenue and inventory costs.', 22. **Constraint Formulation
Verify that the storage space constraint is correctly formulated and does not exceed the specified limit. ' $3. **Variable Types **: Ensure variables are defined as integers to comply with the
indivisibility products.', '4. **Non- Mebon-eegttivity**: Explicitly enforce non-negativity constraints if not implicitly included.', '5. **Model Status Check**; Always check the model status handle infeasible or unbounded cases appropriately."
}
Solver Code:
41

---

import gurobipy as gP from gurobipy import GRB
# Create a new model model gp Model ( "ableProdduction
# Define decision variables
model. addVar (vtype= INTEGER, name="long. labllelng.sll"" cables")
short_cables addVaaadaaaavvyypeee INTEGER, name="short_cableee
# Define objective function: maximize profit model. seoeel.se0bjjectvee22 long_cables + short_cables, GRB. (ABIMIIIE
# Define constraints
# Gold usage constraint: 10+long 7+short 1000 model. addConstr (10 * long_cables + 7
<= 1000, name="
GoldConstraint")
# Ratio constraint: short 5+long
model. m addConstr (sblrttcaabeee cbbls >= 5 lables, name= "ati""""RtioCnntraann"""
# Minimum long cables constraint
model adConssr (long_ 10, name="MinLoonCaalles
# Optimize the model model.optimizee.
# Check and display results if model.status == CRB.OP OPTIMAL:
print (f"ttmimll number of long cables: (long_cables. x)""
print (f"Ottimal number of short cables: (short_cablee x)")
print MMaximmum profit: ommodel.objVal)"")
elif model.statur = GRB. INFEASIBLE:
print ("Model is infeasible")
elif model.stattin == GRB. UNBOUNDED: print ("Model is unbounded")
NL40pt
Natural Language Description:
A patient can be hooked up to two machines have medicine delivered, machine I and machine 2. Machine delivers 0.5 units of medicine to the heart per minute and 0.8 units of medicine per minute to the brain. Machine 2 delivers 0.3 units of medicine per minute the heart and 1 unit of medicine minute to the brain. In addition however, machine creates 0.3 units of waste per minute while machine 2 creates 0.5 units waste per minute. If most 8 units of medicine can be received by the heart and at least 4 units of medicine should be received by the brain, how many minutes should each machine be used to minimize the total amount of waste produced?
Subproblem Identification Process:
{
wwtppppooooopeeeeeeeeeeeeeeeeeee "Resource Allocation Problem", "reasoning": "The problem involves allocating resources (time on machines) to meet certain constraints (medicine delivery heart and brain) while minimizing waste, which fits the definition of Resource Allocation Problem.".
42

---

"teloongs.to.problemm types": true
{
mmatchhnggsuubyyppeee "Cost-Minimizing Resource Allocation with Capacity Constraints",
"reasoning": "The problem involves allocating resources (machine usage time) to minimize total waste (cost) while meeting specific medicine delivery requirements (capacity constraints) for the heart and brain. This aligns with the subtype's focus on minimizing total cost under capacity constraints.", sasllongstt_suubypees true
{
Seaatching_subbypee "subtype not find",
"reasoning": "The given problem involves minimizing waste production while meeting medicine delivery constraints to the heart and brain. It does not fit any of the provided subtypes, which focus budget allocation, parallel project resource allocation, revenue-maxinn maximmzinxiiin load management, or supplier selection and equipment allocation. The problem is standard Mixed Integer Linear Programming (MILP) problem with constraints on medicine delivery and waste minimization, but it does not align with the specific subtypes listed.", false
}
Get the Modeling Thoughts:
{
'Problem Type': 'Cost-Minimizing Resource Allocation with Capacity Constraints',
SStttement Thoughts':
'This subtype of the Resource Allocation Problem focuses on minimizing the total cost while allocating resources (sensor deployments and data analysis teams) to meet specific requirements (data collection and processing) under capacity and budget constraints. The goal to optimally assign sensors to plots and allocate data processing tasks teams such that all data collection requirements are met, and the total cost is minimized., Balance Constraint: must be matched by the data processing capacity of the assigned team, ensuring that all collected data is processed without exceeding team capacities.,
data collection requirements for each plot
Budget Constraint: The total cost deploying sensors and utilizing data analysis teams must not exceed the available budget, ensuring cost- effective resource allocation.',
"Modeling Thoughts'; [
[Define Decision Variables] Define integer variables for the number of times each team is used (e.g., \V x_A \)), \V x_B W [Define Objective Function] Minimize the total cost, which includes sensor deployment costs and data processing costs.', [efine Data Balance Constraint] Ensure the total data processed equals the sum of data collection requirements.',
43

---

[Define Budget Constraint] Ensure the total cost does not exceed the available budget.',
[Compreeeessve Verification] Check for common errors such incorrect variable bounds, constraint formulation, and objective function alignment.",
[write Gurobi Code] Implement the model in Gurobi to solve the problem. '],
"python [Gurobi Code] 'python'nan hnimort
numpy as np\nimport
math math\nimport gurobipy gp\nfrom gurobipy import GRB Create a new model\nmooe
gP gp.Model ('model\)) \n)n define parameters n define pariables\niae define constraints'n An define objective \n Optimize the model\nmoded vodelliimmelloopiinize() \nstatus model.status cestatuusm//ooj..... \n\nobj_val
None\n# Check whether the model is infeasible, has infinite solutions, or has an optimal solution nif status gR. INFEASIBLE: obj_val "infeasible" nelif status == gP Gp..RRBUR UNBOUNDED: An obj_val = "unbounded" Inelif status gp. GRB. OPTIMAL: obj_val model.objVall obj model. time) Anprint ("Objentt"eitiive Value:",
www.immtttprintttiiinniim obj_val) (nn \n
[Common Errors to Avoid] Am1. #Icorreect Variable Types**: Ensure variables are defined as integers if fractional allocations are not allowed. \n2. **Constraint Formulation*+ Verify that constraints correctly represent the problem requirements (e.g., data balance must be exact) An3. **Ojjective Function Aligmment **: Ensure the objective function includes all relevant costs (e. g., both sensor deployment and data processing costs) An4. ** Budget Constraint Omission*:: Do not forget to include the budget constraint if applicable. \n5. **Indexing Errors**: Ensure all indices and summations are correctly implemented in the code.
}
Solver Code:
import gurobipy as gP
from gurobipy import GRB
# Create new model model gp Mo.Model Mo.MMode((MMiiiineeeeee "MedicineDelivery"))
# Define decision variables: minutes each machine used
x1 = model. addVar addaar (1b=0, Soype=GRB.CONTINUUN name=""Machinel_mintte
x2 model. addear (1b=0,
CONTINUOUS, Mamee
# Set objective: minimize total waste sedeel.setbbjectieee... (0.3 * x1 0.5 x2, MINIMIII
# Add constraints
# Heart constraint: at most units
model. addConstr (0.5 x1 0.3 x2 <= "Heart_limit")
# Brain constraint: at least 4 units
model. m addConstr x1 1.0 x2 >=
"Brain minimum")
# Optimize the model
44

---

model. oodel.optimize()
# Check solution status
status mroellsstatur
if status == GRB. OPTIMAL
print print(f (fpttmmal solution found:
print (Machiie 1 minutes: (x1.x}")
(f"MMahi 2 minutes: (x2.x}")
print (f"Total waste produced: smodel.objVal]]
elif status == GRB. INFEASIBLE:
print ("Model is infeasible")
elif status = GRB. UNBOUNDE:: print ("iooel is unbounded")
K.2
MAMO EasyLP
MAMO EasyLP
Natural Language Description:
An environmental organization is planning to invest in two projects: Project X which involves planting, and Project Y which focuses on waste management. The investment each project must be whole number due to the indivisible nature of resources. The total combined investment for both projects cannot exceed 20 units due to budget limitations. Additionally, the overall environmental impact score, calculated as twice the investment in Project X plus the investment Project should be at least 10 points to meet their objectives. Fach unit of investment Projects X and Y has associated cost of 4 and 5 units respectively, and the organization aims minimize this total cost while meeting all constraints. Given these conditions, what the minimum total cost required for this scenario? Please provide your answer rounded to the nearest whole number.
Subproblem Identification Process:
{
"matchingg_robbem.tppe "Capital Budgeting Problem",
"reasoning": "The problem involves selecting investments in projects (Project and Project Y) with integer investment amounts, budget constraints, and objective to minimize total cost while meeting environmental impact requirements. This aligns with the Capital Budgeting Problem, which deals with allocating limited resources among competing projects to maximize or minimize a certain objective under constraints.", htwpnngsttooroolemtttyyeo true
}
{
seaetchinngsubtype.. "subtype not find",
"reasoning": "The input problem involves selecting investments in two projects with integer constraints, budget limitations, and objective to minimize total cost while meeting an environmental impact score. The provided subtypes focus facility location with service balance and capacity constraints, and multi- objective optimization with weighted objectives, neither of which align with the given problem's characteristics." tt_tsss__tsuuuyeeee_eeee false
45

---

}
Get the Modeling Thoughts:
{
2 Prroblem Type': 'Capital Budgeting Problem',
'Statement Thoughts':
3 'The Capital Budgeting Problem involves selecting combination of investments or purchases to maximize or minimize an objective (e.g., cost profit) while adhering budget constraints, operational requirements, and other limitations. In this case, the airline must choose between meeting range, quantity, and operating cost constraints. This problem is common in industries requiring strategic resource allocation, such as transportation, manufacturing, and infrastructure development.,,
aircraft models minimize total costs while
Range Requirement Constraint: The combined range of all purchased aircraft must meet or exceed 40, 000 kilometers to fulfill operational needs., Aircraft Quantity Constraint: The total number of aircraft purchased must be at least 8 to ensure flight safety and operational redundancy.,
Operating Cost Constraint: The total hourly operating cost of all aircraft must not exceed $150,000 USD to maintain financial sustainability.
'Modeling Thoughts': [
[Define Decision Variables] Define integer decision variables for the number of each type of aircraft purchase.',
[Define Objective Function] Formulate the objective to minimize
total cost, including purchase and operating costs.',
[Define Range Constraint] Ensure the combined range of all aircraft
meets or exceeds the required range.',
[Define Quantity Constraint] Ensure the total number of aircraft purchased meets the minimum requirement.",
[Define Operating Cost Constraint] Ensure the total hourly operating cost does not exceed the specified limit.',
[Comprehensive Verification] Check for common errors such as incorrect cost calculations or constraint formulations." [Write Gurobi Code] Implement the model in Gurobi to solve the problem. '],
[ Gurobi Code], '''pytho'', 'import json', 'import numpy as np', import math', 'import gurobipy gp', 'from gurobipy import GRB '# define
'# Create a new model', "model parameters', *# define variables', * define constraints', " define objective ', '# Optimize the model', 'model pondel.optimize() status model.status" model is infeasible, has infinite solutions, or has an optimal solution', 'if status gp. GRB. INFEASTBLE: obj_val infeasible", 'elif status = GRB. UNBOUNDED: obj_val = unbounded'), 'elif status gp. OPTIMAL:' obj_val model. objVal', 'time = model. TimeLimttm, 'print ("Timecost"; 'ime)) print ("Objective Value:", obj_val),, scee,
'obj_val None', '# Check whether the
46

---

[Common Errors to Avoid]', 21. **Incorrect Cost Calculation Ensure the operating cost is correctly included in the objective function.', '2. **Constraint Formulation*:: Verify that constraints are correctly formulated (e.g., vs <=).², '3. Integer Variables**; Ensure decision variables integers.', '4. **Units Consistency*:: Ensure all costs and ranges are in consistent units.', '5. **Solver Status Check**; Always check the solver status to confirm an optimal solution was found.')
defined as
}
Solver Code:
import gurobipy as gP from gurobipy import GRB
# Create new model
model sp.Model( (' anvirrommentll_Pojaectaa
# Define decision variables (integer variables for investment units)
model addVar (vtyye-GRV INTEGER, name="Project_ Investment")
y model addVar (vtyye=:ByyyBeBBBe INTEGRR, name="Project_ Y_ Investment")
# Set objective function: soddelssttbjectivee (4*x + 5+y, CRB.MINIMIZE)
minimize total cost (4*X 5+Y)
# Add constraints
# Budget constraint: + 20 addonnaadc y <= 20,
# Environmental impact constraint: 2X 10 addonstrr + >= 10, "Environmental. Impact_Constraint")
# Non neg-nnegtyv constraints
model. addConstr (x 0, "Mon_Negativity__""
model addonnttr (y >= o, "Non Moon.eegatiiity.W.
# Optimize the model model. optimiee)
# Check solution status == GRB OPTIMAL:
if print("Kinimn ("Minimum Total Cost:", round(mode1.033) objVal)
print
else:
print( (oNo optimal solution found")
MAMO EasyLP
Natural Language Deseription:
A tourism company is planning allocate resources between two major services: X represents local sightseeing tours and Y represents adventure activities. The total number services that be offered in month cannot exceed 200 due to resource constraints. The minimum number local sightsecing tours (X) they need to offer is at least 50, and for adventure activities (Y),
47

---

cannot be less than 30. Each service has associated operational costs, with each local sightseeing tour costing $300 and each adventure activity costing $500. The company aims minimize the total cost while meeting all the constraints(X, Y are integers). What is the minimum possible monthly operational cost (in dollars) for the company? Round your answer the nearest dollar.
Subproblem Identification Process:
{
"matching.probler
"Resource Allocation Problem",
"reasoning": "The problem involves allocating limited resources total services <= 200) between two services (X and Y) with specific constraints (minimum requirements for X and Y) and an objective to minimize costs. This fits the definition of a Resource Allocation Problem, where the goal to optimally distribute resources under given constraints.", Beglongs.to_probeem_yyyy true
}
{
shaatcching_subtpee.. "Cost-Minimizing Resource Allocation with Capacity Constraints",
"reasoning": "The problem involves allocating resources (local
sightseeing tours and adventure activities) to minimize total operational costs while adhering to capacity constraints (total services <= 200, minimum services for X >= 50 and Y >= 30). This matches the subtype 'Cost-Minimizing Resource Allocation with Capacity Constraints', which focuses on minimizing costs under capacity and other constraints.", lacllonns_tt_suuyyppeee true
}
"matchhng_subtypee" "Integer Linear Programming for Budget Allocation",
"reasoning": "The problem involves allocating resources (local sightseeing tours and adventure activities) with integer constraints to minimize total operational costs while satisfying various linear constraints (total services, minimum requirements) This matches the description of 'Integer Linear Programming for Budget Allocation' where the goal is to minimize total cost under integer constraints and linear constraints.",
"belongs_to__sutyype. true
}
{
"matching subbichhinnsuubtpee.. "Integer Linear Programming for Resource Allocation with Multiple Constraints", "reasoning": "The input problem involves allocating resources (local sightseeing tours and adventure activities) to minimize total cost while meeting specific constraints (minimum number of services, total service limit). The decision variables (X and y) must be integers, similar to the subtype which involves integer allocations to meet constraints and minimize costs.", "belongs_ta tt_ts_tttsuuuutpss"se true
48

---

{
wwwcchingeubbtpe". "Integer Linear Programming for Resource Allocation with Proportional and Range Constraints", "reasoning": "The input problem involves allocating resources between two services (local sightseeing tours and adventure activities) with integer constraints, aiming to minimize the total cost while satisfying combined resource limits and range constraints (minimum number of services for each type). This matches the description of the subtype 'Integer Linear Programming for Resource Allocation with Proportional and Range Constraints', which also involves allocating resources between two services with integer constraints and similar types of constraints.".
tosnnngs_tt_subyeeeete true
{
"matchhing_subtype" "Integer Linear Programming for Service Allocation with Demand and Staffing Constraints",
"reasoning": "The input problem involves allocating resources ( services) between two types (local sightseeing tours and adventure activities) with integer constraints. The goal minimize total cost while satisfying minimum demand requirements adventure activities)
(at least local tours resource limitation (total services cannot exceed 200). This matches the subtype 'Integer Linear Programming for Service Allocation with Demand and Staffing Constraints', which also involves allocating services with integer constraints, minimizing cost, and satisfying demand and resource constraints.", sosionngstto_subyppses. true
}
mmatching_subtypel. "Integer Linear Programming for Staff Allocation with Service Capacity and Cost Constraints", "reasoning": "The input problem involves allocating integer resources (services) between two types (local sightseeing tours and adventure activities) with the goal of minimizing total operational costs while meeting minimum service requirements and adhering total service limit. This closely matches the subtype description, which involves allocating integer staff members between service types to minimize costs while meeting demand and staffing constraints. Both problems involve integer decision variables, cost minimization, and similar constraint structures.",
"belongs_to_ss tubbttpesss
}
Get the Modeling Thoughts:
"Problem Type": "Integer Linear Programming for Staff Allocation with Service Capacity and Cost Constraints", "Statement Thoughts":
49

---

"This problem involves allocating integer numbers of staff members between two types of after-sales services (phone support and on-site service) with the goal of minimizing total employment costs while meeting daily service demand requirements and adhering to total staffing limit. The decision variables represent the number of staff allocated to each service type, and all allocations must be integers.,
Service Demand Constraint: Each phone support staff member can handle 50 phone consultations and 20 remote technical support sessions per day, while each on-site service staff member can provide 10 on-site repairs and 5 equipment replacements per day. The total service capacity must meet or exceed the daily demand for each service type.,
Staffing Constraint: The total number of phone support and on-site service staff members cannot exceed 100." "
"Modeling Thoughts"; [
[Define Decision Variables] Define integer decision variables for the number of phone support staff members (x) and on-site service staff members (y).",
[Define Objective Function] Minimize the total employment cost: 200
+ 300y.",
" [Define Service Demand Constraints] Ensure the total service capacity meets exceeds the daily demand for each service type
[Define Staffing Constraint] Ensure the total number of staff members does not exceed 100.", [Comprehensive Verification] Check for common errors such incorrect constraint formulation, non-integer solutions, and infeasible demand requirements.".
J. "[write Gurobi Code] Write the Gurobi code to solve the problem."
*[ Gurobi Code], ><<' ""'ppyhon', 'import json', 'import numpy as np', import math', 'import gurobipy gp', 'from gurobipy import GRB
*# Create a new model', "model gp.Model ("model')", '# define parameters', '# define variables', '# define constraints
"# define objective ', '# Optimize the model', 'model.
bodel.status. 'obj_val None', '# Check whether the model is infeasible, has infinite solutions, or has an optimal solution', 'if status gp. INFEASIBLE:', obj_val "infeasible",, 'elif status == gp. GRB. UNBOUNDDUND obj_val "unbounded"), 'elif status gp. GRB. OPTIMAL: obj_val model. obbVal', 'time model. TimeLimit', 'print(" (" Timecost": time))" pgrin(("Obectivy) Value:", obj_val) 2680) [Common Errors to Avoid:]",
optimize()', 'status
"1. **Incorrect Demand Constraints**: Ensure the service capacity constraints are correctly formulated ."
"2. *NNon-Integer Solutions*s: Ensure variables are defined as integers (vtype-GRB INTEGER).
"3. *NInfeasible Demand**: Check if the demand values are too high to be met with the staffing limit.",
"4. **Objective Function**: Ensure the cost coefficients are correctly applied .",
"5. **Indexing Mistakes**; Ensure all constraints use the correct variables."
]
}
50

---

Solver Code:
import gurobipy as gP
from gurobipy import GRB
# Create new model
model = gp ModeMllll (ordel('Tuure (TTurrsennssourcccllocoooooo)o))
# Define variables
X bodelladdVass wwt.yp==CB..INEEEGE name="X") Local sightseeing tours
Y model. (ww.aa=GRBBBBBIIGGGGGG name="Y") # Adventure activities
# Define constraints
addConstd Y <= 200, nane=
model addConstr (X >= 50, "amo=""(inlocalloourrr"""
model addConstr >= 30, name= aaaeeeaMiiadvvauurrlliiiissssee"
# Define objective: minimize total cost (300X + 500Y) 500 Y, Gense=GRB.MINIMTZA
model seteb..ettOeeeccivee
# Optimize the model model optimiee)
# Check solution status and output results if model.statine GRB OPTIMAL:
print ("Minimum monthly operational cost: $", round (modeelobbjal) else:
print("No optimal solution found")
K.3
MAMO ComplexLP
MAMO ComplexLP
Natural Language Description:
Natural Languange description: Imagine you're 're college student aiming to balance your diet and budget. You have identified nine different food items from your local grocery store that you can include in your menu: Chicken, Rice, Apples, Steak, Lentils, Fish, Tofu, Cheese, and Bread. Each of these foods provides varying amounts of protein, carbohydrates, and calories, and each comes with its own price. Here the detailed nutritional content and cost for each food item: Chicken: Gives you 15 grams of protein, 18 grams of carbohydrates, and 300 calories for $4.
Rice: Offers gram of protein, 25 grams of carbohydrates, and 267 calories for $2 Apples:
Provide gram of protein, 21 grams of carbohydrates, and 266 calories for S5. Steak: Contains 6 grams of protein, 3 grams of carbohydrates, and 119 calories for higher cost of $10. Lentils:
These give grams of protein, grams of carbohydrates, and 166 calories for just$2. Fish: Delivers 17 grams of protein, 13 grams of carbohydrates and 129 calories for $8. Tofu: Offers
a substantial grams of protein, 27 grams of carbohydrates, and 216 calories for $10. Cheese:
Gives 12 grams of protein, 17 grams of carbohydrates, and 76 calories for $9. Bread: Provides
2 grams of protein, a massive 30 grams of carbohydrates, and 258 calories for $4. Your daily dietary goal is to consume at least 90 grams of protein, 105 grams of carbohydrates, and 1805 calories. Your challenge to figure out how meet these nutritional requirements from the food options mentioned above while spending the least amount of money. So, what is the least amount of money you need to spend meet your daily dietary requirements? Please note that the response should be a single answer, asking for only the optimal value.
51

---

Subproblem Identification Process:
{
"matchiigg.problem.tyyy "Diet Problem",
"reasoning": "The given problem involves selecting a mix of food items that meet specific nutritional requirements while minimizing cost, which is characteristic of the Diet Problem, standard form of linear programming introduced by George Stigler. The aim is to decide quantities of food to meet nutritional constraints within constraints, similar to the Diet Problem listed.", Begtongs.to_problem..ooo
true
}
{
"matchinggsuubype" "Diet Problem with Integer Constraint", "reasoning": "The given problem involves determining the quantity each food item to meet nutritional requirements while minimizing cost. The quantities must be integers, representing whole servings of each food item. This aligns with the 'Diet Problem with Integer Constraint' subtype, which includes nutritional constraints, cost minimization, and integer servings.", true
}
Get the Modeling Thoughts:
{
"Problem Type": "Diet Problem with Integer Constraint",
"Statement Thoughts":
"The Diet Problem with Integer Constraint involves determining the quantity of each food item that should be consumed to meet nutritional requirements while minimizing cost. The twist is that the quantities must be integers, representing the whole number of servings or portions
each food item. The problem formulated to ensure nutritional constraints (such as calories, protein, vitamins, etc.) are satisfied, and the total cost minimized., Nutritional Constraints: Ensure that the selected food items provide at least the required amount of nutrients, such as calories, proteins, fats, vitamins, and minerals.,
Cost Minimization: The total cost of the selected food items should be minimized while meeting nutritional constraints.,
Integer Servings: The servings of food items must be integer values, representing realistic portions of each food item.".
"Modeling Thoughts": [
[Define Decision Variables] Define decision variables that represent the integer quantities of servings for each food item
[Define Objective Function] Minimize the total cost of the selected food items.".
[Define Nutritional Constraints] Ensure that the nutrient intake meets exceeds the minimum required levels for each nutrient.", [Implement Integer Constraints] Ensure integer constraints for the serving sizes of each food item the model.",
52

---

"[Comprehensive Verification] Check the common errors in the optimization model.", "[Write Gurobi Code] Write the Gurobi code to solve the problem.",
"[Gurobi Code]: An : popyytooonimmoorrr.o.r..o json'nimpors numpy uplnimport math\nimport gurobipy as gp\nfrom gurobipy import CRB\ Create new model \mmdell
nn define parameters
n# define variables nn define constraints /n nn define objective model.
AnAn# Optimize the model hwt.a/mmoooooiimiii...........ee () Anstatus
status Sosbuus\nnoojjjvaa -all = None\n# Check whether the model is infeasible has infinite solutions,
has optimal solution\nil inif status = gP GRB.RB... INFEASIBLE: \n obj_val = \"infeasiblel " "Aellif status == gP.GRB. UNBOUNDED: An obj_val \"unboundedV nAellif status gp. GRB. RRB.OPTIMAL:VV in obj_vat val model.objjalllltinnn ittim = model. TimeLimitt
nprint (\ "TTmmmcost time) (mprint() "Objecttvv Value:\", obj_val)) n cccn
[error_tipsl
"Ensure decision variables are defined as integers.",
"Confirm that all nutritional requirements are modeled correctly
and constraints are set accurately."
"Review that cost coefficients are correctly assigned in the objective function.",
"Example not provided since specific problem data is omitted; follow reasoning flow for formulation specifics."
}
Solver Code:
import gurobipy as gP from gurobipy import GRB
# Create new model model gp Model ( ('DietProblem')
# Def ine the food items and their nutritional content and cost foods ['Chicken', 'Rice', 'Apples', 'Steak', 'Lentils', 'Fish', 'Tofu ;, Cheese', 'Bread']
protein [15, 1, 1, 6, 3, 17, 18, 12,
carbs [18, 25, 21, 3, 7, 13, 27, 17, 30] calories [300, 267, 266, 119, 166, 129, 216, 76, 258]
cost [4, 2, 5, 10, 2, 8, 10, 9, 4]
# Define the nutritional requirements required_protein = 90
required_carbs 105
required_calories 1805
# Define decision variables for the servings of each food item x model. addVars (foodds, Soyp==GRB.NNTEGEE name="x")
# Define the objective function: Minimize total cost
53

---

model. betObjective (gp. qusumuuu (cost [i] * [foods [i]] for i in range (len foods))) ), GRB. MINIMIZE)
# Define nutritional constraints
hrgpaooontttogggggiiiiiaamooooro model. m addConstr (gp. qwwckuuuupuppaae (prottinn * I[foods [i]] for in range (1en(
foods))) >= required_protesn
"ProteinConstrrinnt")
model. addelladdCoonsrr(( (gp www.-uuiiuuucrbrrraeee (ia x [[fods for i in range (1en
foods))) >= required carbs, "GarbsConstraint""
(calories [i] x[foods [i]] for i in range (len addenssrdConstredee wgw.uuiccuuuuuuuuueccccco
(foods)) >= caaloccceuccaorieess
caaiireddcaories, "GaloriesConstrainn"))
# Optimize the model model. nodel.optimmiz((
# Extract optimal value
if status == GRB.OPTIN OPTIMAL:
print (rinee"Ojettiive Value:", model.objVal
else:
print (NNo optimal solution found.
MAMO ComplexLP
Natural Language Description:
Consider a courier company that needs to deliver packages to five distinct cities, denoted as E, F, G. and The courier can start from any city, but they must visit each city only once and then return to the starting point. The aim is to find route that would minimize the total delivery cost. The cost might include factors like distance, fuel expenses, or traffic conditions. Here's 's an outline of the delivery cost between these cities: The cost to deliver from City E to F is 50 units, 48 units,
99 units, and I 91 units. From City F, it costs 50 units deliver E, 57 units to deliver to G, 84 units to H, and 72 units to I. For City G, the delivery costs are 48 units E, units to F, units to and 86 units to I. If the package starts from City H. costs 99 units to deliver to F, 84 units to F, 46 units to G, and 29 units to I. Lastly, from City I, it costs 91 units to deliver to E, 72 units to F, 86 units to G, and 29 units to H. What is the least total delivery cost for the courier to visit each city exactly once and then return to the starting point?
Subproblem Identification Process:
{
wwwpchiing-pobbemttyype "TSP Problem",
"reasoning": "The specific problem described involves finding the least cost route for a courier to visit each city once before returning to the starting point, which aligns with the Travelling Salesman Problem (TSP). delivery cost fits the criteria for TSP, one of the defined problem types.",
objective minimizing the total
trrnnng_tt__pootie httpingstttoprooeettyyoooe true
}
Get the Modeling Thoughts:
{
54

---

"Problem Type": "TSP Problem", "Statement Thoughts":
"The Traveling Salesman Problem (TSP) involves finding the shortest possible route that visits each city exactly once and returns to the original city. The problem is represented as matrix of distances between cities. It is an NP-hard problem in combinatorial optimization, important for logistics, planning, and routing., Tour Constraints: Each city must be visited exactly once, forming a single continuous tour."
Subtour Elimination: Constraints are necessary to prevent the formation of disconnected subtours (mini-tours not connected the main tour)
.., "Modeling Thoughts": [
[Define Decision Variables] Define binary decision variables for each edge AV x_fij} \V indicating if the edge used in the tour.",
[Define Objective Function] Minimize the sum distances chosen edges.",
" [Define Degree Constraints] Ensure each city entered and exited exactly once.",
" [Define Subtour Elimination Constraints] Implement constraints, such MTZ constraints, to enforce single tour formation.", "[Compreeessive Verification] Check the model for common errors such as incorrect indexing missing constraints.",
"Write Gurobi Code] Implement the model using Gurobi to solve the TSP."
[[ Gurobi Code], ""''yytoon' 'import json', 'import numpy np', import math', 'import gurobipy as gp', 'from gurobipy import GRB
*# Create new model', "model ModMModel(() ('model')", '#
define parameters', *# define variables', '# def constraints
*# define objective '# Optimize the model', 'model.
optimize()', 'status whether the model is infeasible, has infinite solutions, has an optimal solution', 'if status == gp GRB. INFEASIBLE:', obj_val "infeasible"), 'elif status gp. gp.GRB GRB. UNBOUNDED: obj_val = "unbounded"), eelif status == GRB. PIBB..PTTMAA:... obj_val model. objVa',, 'time model. TimeLimit', 'print("
sadelsstatus', 'obj_val None', '# Check
Timecost": time)" "print(""beettii
Value:", obj_val)', >(())
" [Coommon Errors to Avoid]: \n1. Incorrect Subtour Elimination:
Ensure MTZ constraints exclude the starting city and are applied correct indices. \n2. Indexing Mistakes: Use consistent 0- based 1-based indexing for cities. \n3. Self-Loops: Explicitly disable AV( x_ {ii} W) variables. \n4. Bounds on MTZ Variables: Set \V u_i WV bounds correctly (N)( Wileq u_i \lleq n-1 \)).
\n5. Objective Function: Ensure distances are correctly paired with \\( {ij} WV and exclude \V i \
]
}
Solver Code:
import gurobipy gp
from gurobipy import GRB
55

---

# Number of cities
n
# Distance matrix dist
[o, 50, 48, 99, 91], From City E
[50, 0, 57, 84, 72], From City F
[48, 57, 0, 46, 86]. From City G
[99, 84, 46, 0, 29], From City H
[91, 72, 86, 29, 0] # From City I
# Create model
m gP Model (?TSP*)
# Variables: x[i,j] = if edge i->j is used x m. (n, n, vtype=GRB. BINARY, name='x²) for i in range (n)
x[i,1]. UB
Disable self-loops
# Assignment constraints for i in range(n):
m. (gp-
(ewpunstttrppuqqccuuuuumu quickuum (xtccksumxxxii. [i,j] for j range(n) if j i) 1,
name=f"out_(iil
m. addaddddnsrrrrccc. (gp. (sg.uustrrpp.uucccuuu quickuumuuuuumee (x[] ii] for j in range(n) if j i) 1,
nam)=f"in_((i"")
# MTZ variables and constraints for subtour elimination
u m. addVars (range addVars(range
n), 1b=1, ub=n-1, vtype=GRB. COW.IINOUSCTTTNUUSSUCCOCC name=Pu')
for i in range(1, n):
for j in range (1, n): if i != j: (u[i] u[j] x[i,j] <= 1, name=f"mtz_(i: (j}")
# Objective function: Minimize the total delivery cost obj gp. (uicksum(x(11 dist [j] for i range (n) for j range if i != j)
setbbbectiiie GRB MINIMIZE)
# Solve the model optimizee)
# Extract and print the optimal tour and its cost if m.status GRB. ORR.MOPTIAA::
print ('Optimal tour:?)
current 0 tour [current]
visited set ([current]) while len (viisiteed) n: for j in (a)ge(n):
if != current and x[current,j] 0.5: tour. tour. append
current =
visited. add (current) break
tour appond (0) # Return to start
56

---

print -> (mars,n tour))) print (f (fTotal delivery cost: {m. 0b)Val)))
else:
print solution found.')
K.4
IndustryOR
IndustryOR
Natural Language Description:
The number of salespeople required a 24-hour convenience store in different time periods is as
follows: 2:00-6:00- 10 people, 6:00- 10:00 15 people. 10:00-14:00- 25 people, 14:00- 18:00-18:00- 20 people, 18:00-22:00- 18 people, 22:00-2:00- 12 people. Salespeople start their shifts at 2:00, 6:00, 10:00, 14:00, 18:00, and 22:00, working continuously for hours. Determine the minimum number of salespeople needed to meet the requirements.
Subproblem Identification Process:
Beeatching_probee_eeee "reasoning": "The problem involves determining the minimum number salespeople needed to meet varying demand across different time periods, with specific shift start times durations. This aligns with the 'Staff Rostering Problem', which deals with scheduling staff to meet demand while minimizing costs or the number of staff.", beglongstoo_problee.ttppee true
"Staff Rostering Problem",
}
Get the Modeling Thoughts:
{
"Problem Type": "Staff Rostering Problem",
"Statement Thoughts": {
"Assign shifts to employees over scheduling period while satisfying labor regulations, employee availability, and operational coverage requirements. This problem common industries such as healthcare, retail, and hospitality, where shift-based workforces are essential. Key features include handling multiple shift types e.g., morning, evening, night), accommodating employee preferences and time-off requests, ensuring adequate staffing levels, and complying with legal and contractual obligations. The goal is to create a feasible and equitable schedule that balances organizational needs with employee well-being.,
Labor Regulations Compliance: Shifts must comply with labor laws, including maximum consecutive working days, mandatory rest periods between shifts, and weekly working hour limits.,
Employee Availability: "Employees cannot be assigned to shifts during their declared unavailability (e.g., time-off, preferred days off) overlapping with existing assignments.",
57

---

Operational Coverage Requirements: Each shift must meet a minimum staffing level, which may vary by shift type, day, or role (e.g., peak hours require more employees)
Shift Sequence Restrictions: Employees must have sufficient rest between consecutive shifts (e.g., minimum gap of 12 hours after night shift).,
Contractual Work Hours: Assignments must respect employment contracts, including part-time/full-tiie distinctions and maximum allowable hours per pay period.",
Fair Shift Distribution: Shifts must be distributed equitably among employees to avoid overburdening individuals, considering preferences, seniority, and historical assignments.". Skill and Role Matching: Employees must possess required certifications or qualifications for specialized shifts (e.g., a licensed pharmacist for medication dispensing shifts).",
"Modeling Thoughts"; [
" [Define Decision Variables] Create binary variables for employee-
shift-day assignments",
[Define Objective Function] Minimize undrstaaffinggoeesssaffnn
penalties or maximize employee preference satisfaction",
[Define Coverage Constraints] Ensure minimum required staff per shift".
" [Define Availability Constraints] Respect employee unavailability days",
"Define Legal Constraints] Enforce maximum consecutive shifts and minimum rest periods",
"[Define Pattern Constraints] Prevent prohibited shift sequences", "[Compreeensive Verification] Validate constraint logic and variable indexing",
[[rite Gurobi Code] Implement model using Gurobi API"
[ Gurobi Code], 'python''', 'import json', 'import numpy as np', import math', 'import gurobipy gp', 'from gurobipy import GRB "# define parameters', '# define variables', *# def constraints', '# define objective ', *# Optimize the model', 'model. optdel.optimize() status
*# Create new model', "model = Model(mmodel)))
'obj_val None', Check whether the model is infeasible, has infinite solutions, or has an optimal solution', 'if status gp. INFEASIBLE:", obj_val infeasible'), 'elif status == gp. GRB UNBOUNDED: obj_val = unbounded"), 'elif status gp. GRB. OPTIMAL: obj_val model. objVal', 'time = TimeLimtt,,,,, print ("Objective Value:", obj_val)', ,<<(," [Common Errors to Avoid:]",
periit("Tmecost"" time))
"1. **Incorrect Indexing**: Mixing up employee/day/shie dimensions in variables",
"2. **Missed Constraints**: Forgetting to enforce minimum rest periods between shifts",
"3. ##Overlooking Part-Time Rules**: Not accounting for maximum weekly hours",
"4. ##Inefficient Modeling**: Creating excessive variables for simple patterns",
"5. **aata Mismatches**: Alignment between availability data and variable indices".
"6. #Objective Imbalance**; Not properly scaling understaffing/ overstaffing penalties"
]
}
58

---

Solver Code:
import gurobipy as gP from gurobipy import GRB
# Create new model model gp ModeM (* "ShhfttSchedliingg)
# Time periods and their requirements
time_ _eineed [:2:00-6::0 00', '6:00-10:00', '10:00-14:00', '14:00-18:00',
'18:00-22:001 00',, 222:00-2:009 requirements [10, 15, 25, 20, 18, 12] shift_starts = [o, 1, 2, 3, 4, 5] 0:2:00, 1:6:00, etc.
# Decision variables: number of people starting at each shift x addarrs (6, vtype=CRB. INTEGER, name="x")
# Objective: minimize total number of employees
bodel..etObjecttio (gp. (gp.quuu hup..quicksu(( (x[]] for in range(6)), MINIMIIEZ
# Coverage constraints
# Each time period must be covered by people who started in the current
or previous shifts
# (since each shift covers 4 time periods)
model. addoonstrr [x[0] x[5] requirements [0] "Coverage_
addConstr (x[0] x[1] >= requirements [1]
"Coverage_1")
model. addelsad [x[]] x[2] requirements [2].
"Coverage_2")
adleettaadConssrx((133 x[3] >= requirements [3]
"Coverage_3"
model. [3]] x[4] >= requirements [4]
"Coverage_ _""
addensrd (x[ x[5] >= requirements [5]
"Coverage_5"
# Optimize the model model. optimize)
# Output the solution
if model.status == GRB. OBB.MPTIAL:
ofintif"mmmmmm number of salespeople needed: {int (model. (omodel.objVal))")
print print("Siff assignments:")
for i in range(6):
print (fa"ttrrt (time_periods [i] split(p-)) [o]}: (int(x(i) .x)}
people")
else:
print ("No optimal solution found")
IndustryOR
Natural Language Description:
A wealthy noble passed away, leaving the following inheritance:
painting by Caillebotte: $25000
A bust of Diocletian: $5000
Yuan dynasty Chinese vase: $20000
A 911 Porsche: $40000
Three diamonds: each $12000
A Louis XV sofa: $3000
Two very precious Jack Russell racing dogs: each $3000 (will stipulates they must not be
59

---

separated)
A sculpture from 200 AD: $10000
A sailing boat: $15000
-A Harley Davidson motorcycle: $10000
-A piece of furniture once belonging to Cavour: $13000
which must be shared between two sons. How formulate mathematical program
and solve it using COPTPY to minimize the difference in value between the two parts?
Subproblem Identification Process:
{
Seeetchinng-roblmmmmtee "Knapsack Problem",
"reasoning": "The problem involves dividing set of items ( inheritance) into parts (sons) with the objective of minimizing the difference in value between the two parts. This is classic example of the Knapsack Problem, specifically partition problem which is a variant of the Knapsack Problem where the goal is to divide items into two subsets with equal as equal as possible sums.", thelongs.to_proolem.tto :rooss: true
}
{
Seatchingg_subype".. "subtype not find",
"reasoning": "The input problem is about dividing inheritance items between two sons to minimize the difference in value, which is a form of the Partition Problem, a special case of the Knapsack Problem. The provided subtype 'Integer Linear Programming (ILP) with Knapsack Constraints' is about selecting optimal numbers of AI representatives to meet demand constraints, which is not relevant inheritance division problem.", low.:ongsst__uuuypese false
Get the Modeling Thoughts:
{
"Problem Type": "Knapsack Problem",
"Statement Thoughts":
"The city's planning department aims to maximize the total capacity increase of major traffic intersections (A, B, C, D) by selecting expansion projects under a given budget. Each intersection has specific expansion options with associated costs and capacity increases. The problem is modeled as a 0-1 Knapsack Problem, where each expansion treated as an item with weight (cost) and value (capacity increase), and the goal is to select a subset of items to maximize the total value without exceeding the budget.,
Budget Limitation: The total cost of all selected expansions must not exceed the allocated budget.",
Binary Selection: Each expansion project for an intersection is either fully selected or not selected; partial or fractional expansions are not allowed,
60

---

Non-negative Costs and Capacities: The cost and capacity increase associated with each expansion must be non-negative values., Mutual Exclusivity per Intersection: At most one expansion project can selected per intersection (if multiple options exist for a single intersection)..
"Modeling Thoughts"; [
[Defiie Decision Variables] Integer variables for the number of expansions for each intersection.",
[Define Objective Function] Maximize the total capacity increase: 200x_A 300x_B 400x_C + 500x_D.",
[Define Constraints] Budget constraint: 100x_A 150x_ 200x C 250x_D \u2264 500. Total capacity requirement: 200x_A + 300x_B + 400x_C 500x_D \u2265 1000.",
[Comprehensive Verification) Check variable bounds, constraint coefficients, and objective direction.",
[write Gurobi Code] Implement model using Gurobi's Python API. " ### Gurobi Code: \n "python hnimprtt json numpy np)
nimport math math\nimport gurobipy as gP\nfrom gurobipy import GRBAn\n Create new model \mmodel gp.Model( ModMellmmodee
define parameters n define variables \n\ define constraints nn define objective \n'n# Optimize the model lomeeelmmmmel.ccmmm opttiizzee)) nstatus = staiel..sattslnnnnonne
= None\n# Check whether the model infeasible, has infinite solutions, or has an optimal solutionlnif status == GRBGRB. INFEASIBLE: \n obj_val vall \" infeasiblee\"nelif status gP. GRB. UNBOUNDED: \n obj-val \" "abounded\"\neliit status == gp GRB. : An boj_val = model. obj Vntime model. m TimeLimit Amprint ( "Timecost \"; ttmme) \mprint ( (V"bjective Value:\", obj_val) (n
"### Common Errors to Avoid:An1 **Incorrect Variable Type**: Using CONTINUOUS instead of INTEGER for the number of expansions.. \n2. **Missing Constraints**: Forgetting to add the budget constraint the capacity requirement. \n3. **Ojjective Direction**: Minimizing instead of maximizing the total capacity increase. \n4. **Constraint Formulation*:: Incorrectly formulating the budget capacity constraints, \n5. **Non-negativiitye:: Forgetting to set lower bounds on variables."
]
}
Solver Code:
import gurobipy as gP
from gurobipy import GRB
# Create a new model model gp. .odeelll (* Pinheritance,dee "
# Items and their values (must keep dogs together)
items [
("Painting", 25000),
("Bust", 5000), ("Vase", 20000),
("Porsche", 40000), ("Diamond1", 12000),
61

---

12000),
("Dimmond3", 12000),
("Sofa", 3000), ("Dogs", 6000), Combined value since they must stay together ("Sculpture", 10000),
("Boat", 15000),
("Hotorcycle", 10000), ("Furniture", 13000)
# Binary variables for each item (1 if assigned to son1, if son2) x aadelaaddVars (items), vtype=GRB. Ttyp==GRB.BINARY, name= assign))
# Difference variable to minimize diff @odel.addVar albVar(10O,, (1b=0, ytype=GRB.CONTINNE nafe=rdifferencee)
# Objective: minimize the difference model setbjlettttbeetiieee (diff, GRB MBBIMIIMZEE)
# Calculate total values for each son
soni_value gp. qppqqucksum (x[i] items [i] [1] for i (len )
son2_value gp quicksum x[i]) * items [i] [1] for i in range (len( items)))
# Constraint: difference is >= absolute difference between son values model addConstr (diff >= soni_value son2_value!
addonsst (diff >= son2_value soni_value!
# Optimize the model model.optimize
# Check solution status if model.status == :.B.IPTTMAL:
print("Optima solution found")
print (f (Miniimu difference: $<model. objVal: :
print ("InSon 1 receives:") soni_total
for i in range (1en (items)):
if x[i].X 0.5: print (f"- {items [i] [0]}: $(items [i] [1]}")
soni_total items [i] [1]
print ("nnSon 2 receives:")
son2_total =
for i in range (len (ittmms))
if x[i]. X < 0.5:
print (f"- (items [i] [0]}: $(items [i] [1]}")
son2_total += items [1]
print(f" 1 total: $(soii print (f total: $(son2 total)")
elif model.status GRB. INFEASIBLE: print ("Model is infeasible") elif model.status GRB. UNBOUNDED: print("Mode) is unbounded")
62

---

K.5
ComplexOR
ComplexOR
Natural Language Description:
This problem involves optimizing the number of raw rolls from stock roll meet specific width orders using various cutting patterns. This is a cutting stock problem. Given a roll of width RollWidth and of NumWidths widths Widths be cut. Each width has certain number of orders Orders_i. There are NumPatterns patterns and each pattern j has a certain number of rolls of each width NumRolls SiiRRollWidthPatteeeet the total number of raw rolls cut. It is constrained that for each width i, the total number of rolls cut meets the total orders. The decision be made concerns how to decide the number of rolls cut using each pattern j. The number of widths to be cut is 5. The total number of patterns The set of widths to cut from the roll [2, 3, 5J. The width of the raw roll 10. The number of orders for each width is [4, 2, 2]. The number of rolls of each width in each pattern j is [[1, 2, 0], [O, O, 1]]. Number of rolls cut for each width non-negative. Total number of rolls cut for each width must meet exceed Orders i. Number of rolls cut using each pattern j must non-negative. Minimize the total number of raw rolls cut to meet the orders.
(]). The problem aims to minimize
Subproblem Identification Process:
Beaetching_problmmeee "reasoning": "The specific problem described involves optimizing cutting of raw rolls to meet specific width orders using various cutting patterns. This is a classic example of a Cutting Stock Problem, which is explicitly listed in the provided problem types The objective and constraints while satisfying order requirements align directly with the characteristics of the Cutting Stock Problem.", Baa.lonssto_pprolemmttte
"Cutting Stock Problem",
minimizing raw material usage
true
}
Get the Modeling Thoughts:
{
"Problem Type":
"Cutting Stock Problem",
"Statement Thoughts": "The Cutting Stock Problem is a combinatorial optimization problem commonly encountered manufacturing and logistics. involves determining the optimal way to cut raw material rolls of fixed length into smaller pieces specified lengths and quantities required by customers, with the objective of minimizing the total number rolls used and thereby reducing waste. The challenge lies in efficiently allocating the cuts to satisfy all customer demands while adhering to the physical limitations of the raw material rolls,
Roll Capacity: Each raw material roll has a fixed length, and the total length of all pieces cut from single roll must not exceed this length., Demand Satisfaction: The total number of each type of piece produced across all rolls must exactly match the customer's specified demand for that type.,
63

---

Integrality Constraint: The number of pieces of each type cut from roll and the number of rolls used must be non-negen non-negative integers, as partial pieces partial rolls are not feasible.",
"Modeling Thoughts": [
"[Define Decision Variables] Define integer variables for the number of times each cutting pattern is used.", [Define Objective Function] Minimize the total number of material rolls used.",
[Define Demand Constraints] Ensure each customer's demand is met by the sum of pieces from all patterns." .,,
[Define Pattern Validity] Ensure each cutting pattern does not exceed the raw material length.", "Comprehensive Verification] Check for valid patterns, correct demand calculations, and integer constraints.",
[write Gurobi Code] Implement the model using Gurobi with column generation or predefined patterns."
### Gurobi Code: \n "pyt""p Animport json'nimport numpy np) nimport mathonimport gurobipy as gP\nfrom gurobipy import GRB Create new model \mmodel
(ommm((mmme)))) parameters n define variables (n In# define constraints An \n# define objective \n'n# Optimize the model (mmodel. optiiizzee) nstatus = stndel..sattsllnnoonnn
define
= None\n# Check whether the model infeasible, has infinite solutions, or has an optimal solution\nif status == gp. INFEASIBLE: \n obj_val val \" infeasiblee\"neelf status gp. GRB. UNBOUNDED: \n obj_val \" "abounded\""meliif status == gp GRB. : \n bbj_val = model. obj Antimee model. TimeLimit Amprint "Timecost ;,mmmme)) \mprint ( (O"bjective Value:\", obj_val) (n
"### Common Errors to Avoid:(n1. #*Invalid Patterns**: Ensure each pattern's total length does not exceed the raw material length. n2. Inteeer Variables**: Use integer variables for the
number of rolls. \n3. #Incorrect Demand Calculation**: Verify that each pattern's 's contribution to demand is correctly multiplied by the number of rolls. An4. *IInsufficient Patterns**: Predefined patterns may not cover optimal solutions; consider column generation for better results. \n5. **Indexing Mistakes**; Align pattern indices correctly with sizes in constraints."
Solver Code:
import gurobipy as gP from gurobipy import GRB
# Define data
roll_width 10
widths = [2, 3, 5]
orders [4, 2, 2]
num_ pat_tatterns =
patterns [[1, 2, 0], [o, 0, 1]]
nun_widths len (widths)
# Create model
64

---

model gp. Model (? "CuttingStock')
# Define variables
# Integer variable y-j representing the number of times pattern j used
y model. (num patterns, vtype=GRB. name="y")
# Set objective
# Minimize the total number of rolls used
model. wet.llsetttbeiiieeeeeee (gp. (ww.ee/ggg.iccceeeee qusp..uucckuuuumcm [j] for in range (num (num_patterss)) CRB. MINIMIZE)
# Define constraints
# Demand satisfaction constraint
in range (nuu_widths))
aedel.addConstrr
gP. up.quicksure (patterns [j] [i] y[j] for j range (mmepammaatttrrs))
>= orders [i]
"ame-=ddemand_B11 [1}"
# Pattern validity is inherent in the input and problem formulation
# Optimize the model model. optimize)
# Check the solution status and print the result if model.station == GRB. OPB.PPTIAA:
print("Optinng Total Number Of Raw Rolls Cut:", model. Sodel.objVall for j in range (num_patterns):
( NNumerr of times pattern {j} is used: [y[j] .x"") elif model.statur print("Model ("Model is infeasible") elif model. print ("Model is unbounded")
GRB. INFEASIBEE
GRB. URB.UNDDDD
else:
print ("Optimization was stopped with status", podel.status)
ComplexOR
Natural Language Description:
Capacitated facility location problems focus on determining the optimal placement of a certain number of facilities to serve set number of customers in way that minimizes the total cost, considering fixed costs, capacities, customer demands, and transport costs. Capacitated facility location problems deal with locating NumberOOfacilltties facilities to serve NumberOfCuutonee customers, at minimum total cost. Considering potential facility locations and customer zones as fixed points in a network, each facility has a fixed FacilityFixedCostt and a Facilityaaaacity Furthermore, there exists CustomerDemand for each customer zone, and a Facility ToCustomer cannstomerrrnsporCoooo representing the cost transport between facilities and customer zones. The number of potential facilities that can be established is 10. The number customer zones to be served is 20. The fixed cost associated with establishing a facility [8517, 5068, 9433, 6127, 6033, 5966, 7762, 9406, 6602, 7040]. The cost of transporting goods from each facility to each customer zone is [[80, 94, 44, 51, 190, 44, 129, 178, 129, 91, 172,
119, 177, 150, 90, 51, 53, 97, 184, 87], [139, 33, 104, 135, 50. 176, 97, 121, 47, 29, 186, 163,
149, 108, 156, 169, 100, 160, 153, 85), [153, 36, 18, 170, 18, 181, 178, 68, 171, 106, 159, 110, 21, 106, 91, 29, 144, 140, 155,, 116], [103, 59, 78, 125, 14, 11, 152, 95. 76, 173, 36, 148.
75, 132, 59, 153, 113, 74, 185, 71], [193, 186, 130, 145, 114, 150, 33, 154, 20, 75, 103, 30,
65

---

137, 131, 167, 32, 53, 150, 176, 166], [159, 130, 156, 65, 36, 59, 199, 124, 104, 72, 180, 73,
43, 152, 143, 90, 161, 65, 172, 141], [173, 121, 110, 127, 22, 159, 195, 137, 47, 10, 87,
154, 66, 126, 60, 152, 54, 20, 25). [181, 34, 186. 152, 109, 195, 133, 198, 30, 65, 19, 109,
143, 108, 196, 59, 133, 10, 123], [82, 113, 147, 21, 88. 24, 38, 16, 70, 122, 148, 192, 116,
108, 18, 20, 143, 18, 116, 142], [176, 170, 87, 91, 195, 183, 124, 89, 72, 97, 89, 23, 45, 196, 97. 27, 83, 81, 171. 148]]. The capacity of each facility, which limits the amount goods the facility can handle or produce is [301. 291, 453, 472. 492, 375, 493, 297, 331, 246]. The demand of each customer zone that must be met by the facilities [117, 86, 69, 53, 110. 74, 136, 140, 126, 79, 54, 86, 114, 76, 136. 73, 144. 51, 53, 120J. Each facility has maximum capacity of FacilityCapaciiy, Total number of facilities to located NumberOfFacilities. Each customer zone is served by at least one facility and its demand must be met. Total output for each facility cannot exceed its capacity. The number of facilities and customers is fixed and non- negative. Minimize the total cost of locating facilities and transporting goods customer zones.
Subproblem Identification Process:
{ wwwpatching..obleee.ty.ee "Facility Location-Allocation Problem", "reasoning": "The specific problem described is a capacitated
facility location problem, which involves determining optimal placement of facilities to serve customers while minimizing costs. This aligns with the Facillity location-Allocation Problem from the provided list, as it involves decisions about where to locate facilities and how to allocate resources to meet customer demands.".
:: true
}
{
Seaatchingsuubtppee "Capacitated Facility Location Problem", "reasoning": "The input problem matches description Capacitated Facility Location Problem' as it involves minimizing the total costs including fixed costs and transportation costs while considering the capacities of facilities and customer demands. meets the constraints of Demand Satisfaction, Facility Capacity Constraint, Binary Facility Opening, Non- Negative Allocation, and City Demand Allocation, which align closely with those described under the 'Capacitated Facility Location Problem'.",
true
}
seaatching_subbtype "Capacitated Facility Location Problem with Distances",
"reasoning": "The input problem involves determining the optimal placement of facilities to serve customer zones while minimizing total costs, including fixed facility costs and transportation costs between facilities and customer zones. This aligns with the description of the 'Capacitated Facility Location Problem with Distances' subtype, which focuses minimizing transportation costs proportional to distances between facilities and regions, while respecting capacity constraints.", true
66

---

Get the Modeling Thoughts:
{
"Problem Type": "Capacitated Facility Location Problem with Distances",
"Statement Thoughts":
"The Capacitated Facility Location Problem with Distances is a specialized version of the Facility Location-Allocatio Problem where each facility has a limited capacity for service, and allocation of customers to facilities involves transportation costs proportional to the distance between them. The goal is to determine the optimal set of facilities to open and the allocation of customer demands to these facilities in a way that minimizes the total cost, which includes the construction costs of facilities and the transportation costs associated with the distance, while respecting capacity constraints..
Demand Satisfaction with Distance Costs: Each region's population demand must be fully met with the consideration of minimizing transportation costs, which are proportional to the distance between facilities and regions.",
Facility Capacity with Population Limits: The sum of the populations allocated facility must not exceed its maximum response capacity.,
Facility Activation: Facilities must either open or closed. Only open facilities incur construction costs and can be used for serving regions.,
Exclusive Assignment: Each region must be fully served by one open facility prevent splitting of demand across multiple facilities.",
"Moldeing Thoughts"; [
[Define Decision Variables] Define binary decision variables to determine if facility is opened and continuous variables to represent the population served by facilities.",
[Define Objective Function] Minimize total cost by summing construction costs and distance-based response time costs.", [Define Demand Constraints] Each region's population demand must be fully met.",
[Define Capacity Constraints] Ensure each facility does not exceed its capacity, using binary variables to enforce activation.", "Comppeeemsive Verification] Check common errors in the optimization model, such incorrect indexing or capacity constraints.",
" [Write Gurobi Code] Write Gurobi code to solve [Gurobi Code] : An' "python\nimpon" math\nimport gurobipy gp Ep\nfrom gurobipy import GRB\n Create new model (mmoel gp. Model
problem."
ason'nimport numpy as np apinimport
(odee("mmdelll ("model') An define parameters'nl define variables'y lembllsssnntte nn define constraints nn# define objective An\n# Optimize the model ammodel.optiminnn An\nobj_val None Check whether the model is infeasible, has infinite solutions,
Anstatus = model.
has an optimal colutioonnif status == gp- GRB. INFEASIBBEL An obj_val "infeasible""melli status gp.GRB. UNBOUNDED: \n obj_val = 'unbounded' \nelif status == gp OPTIMAL in obj_val model. vbjvallntmme model. www.TTimmmmmmmmmiiiiiii Timecost:', time) Amprntt ('Objective Value:', obj_val)\n sc [ommon Errors to Avoid] An1 **Incorrect Constraints*#: Ensure population demand constraints align with assigned populations. \n2 **Capacity Constraints Misapplicationte. Apply constraints
67

---

correctly with binary variables enforcing activation. \n3. ** Parameter Indexing**: Accurately align index references for facilities, distances, and regions. \n4. **0bjective Calculation Mistakes**: Properly associate distances with population served by facilities. \n5. **Binary Activation Variables**; Ensure binary variables correctly regulate facility activation."
}
Solver Code:
import gurobipy gP from gurobipy import GRB
# Parameters num_facilities 10
nun_customers = 20
facility_fixed 6602, 7040]
[8517, 5068, 9433, 6127, 6033, 5966, 7762, 9406,
transport_cost
[
[80, 94, 44, 51, 190, 44, 129, 178, 129, 91, 172, 119, 177, 150, 90,
51, 53, 97, 184, 87],
[139, 33, 104, 135, 50, 176, 97, 121, 47, 29, 186, 163, 149, 108,
156, 169, 100, 160, 153, 85],
[153, 36, 18, 170, 18, 181, 178, 68, 171, 106, 159, 110, 21, 106, 91, 29, 144, 140, 155, 116].
[103, 59, 78, 125, 14, 11, 152, 95, 76, 173, 36, 148, 75, 132, 59,
153, 113, 74, 185, 71],
[193, 186, 130, 145, 114, 150, 33, 154, 20, 75, 103, 30, 137, 131,
167, 32, 53, 150, 176, 166],
[159, 130, 156, 65, 36, 59, 199, 124, 104, 72, 180, 73, 43, 152, 143,
90, 161, 65, 172, 141],
[173, 121, 110, 127, 22, 159, 195, 137, 47, 10, 87, 11, 154, 66, 126, 60, 152, 54, 20, 25].
[181, 34, 186, 152, 109, 195, 133, 198, 30, 65, 69, 19, 109, 143,
108, 196, 59, 133, 10, 123].
[82, 113, 147, 21, 88, 24, 38, 16, 70, 122, 148, 192, 116, 108, 18, 20, 143, 18, 116, 142],
[176, 170, 87, 91, 195, 183, 124, 89, 72, 97, 89, 23, 45, 196, 97, 27, 83, 81, 171, 148]
facility_capacity [301, 291, 453, 472, 492, 375, 493, 297, 331, 246] mustomer_demand [117, 86, 69, 53, 110, 74, 136, 140, 126, 79, 54, 86, 114, 76, 136, 73, 144, 51, 53, 120]
# Create new model model gp modee (* Capacitated Facility Location')
# Decision Variables
addVars (num_facilities. num_customers, :
name='x')
y model.addVas (nm__fcilittiss vtype=GRB CyypeR name=?y')
# Objective Function: Minimize total cost
68

---

model. model. setObjective
coste y [i] for i in range g num_facilities))
gP wwu.uicksumttrassprttttttm cost [i] [j] x(i, jl for in range
num_facti fum_ffailities) for in range (num customerrm))))
GRB. MINIMIZE
# Constraints
# Demand Satisfaction
for in range (ttuuuuu__ssosrsss_
addonsad (gr.trrggguuuuueeeuueuu (x, j] for i in range customer_demand [j])
# Capacity Limits
for i in range (num_facilities):
model. aodee..adoonnstr(pp-quuu -upptssrrlpp.guuuuckuuuuiii j] in range (num_customerss)
<= facility.capccityll * y[i])
# Non Non-negativity
for in (ange(nmmfacilltties)) for in range (mm___usttmers) model. addelsssdConstr (i j]
# Optimize the model model ooteeloptimizze)
# Output
if status CRB.OP OPTIMAL:
print ( ('pptimal Objective Value:', model.objVal
selected_facilitties = [i for i in range (wwm_facilitiene if y[i] x 0.5]
allocation = {(i, j): x[i, jl.x for i in range (nm_eeemmmailttiei for j
in range (num_ customers) if x[i, jl.x 0} print ('Seleecce Facilities:', selected_facilittes)) print('Allen ('Allocationn: allocation)
else:
print optimal solution found.
69


Reviews:
[{"review_id": "CSjuxMo8ZH", "reviewer": "Reviewer_JMeQ", "summary": "This paper presents OptiTree, a novel approach for improving LLM-based optimization modeling through hierarchical problem decomposition. The work addresses the challenge of automating operations research modeling, where complex problems described in natural language must be converted into mathematical optimization models. The core innovation lies in organizing OR problems into a tree structure where complex problems are decomposed into simpler subproblems, enabling more effective modeling through adaptive rather than fixed-step approaches.", "questions": "In table 2, I am confused by how the compute times for tree search and modeling are calculated. My understanding is that modeling should be a 1-time cost when the tree is originally built. Is this reflected in the table?", "limitations": "Limitations could be discussed more thoroughly.", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 2, "significance": 2, "originality": 3, "strengths_and_weaknesses": "The paper demonstrates good results with comprehensive experiments across five datasets, showing consistent 10%+ improvements on challenging benchmarks compared to both prompt-based methods and fine-tuned models. The methodology is rigorous, including proper comparisons to state-of-the-art reasoning LLMs like OpenAI-o1 and DeepSeek-R1, along with thorough ablation studies examining tree search, modeling thoughts, search depth, and statement thoughts components. \n\nHowever, the paper suffers from clarity issues and has some experimental concerns. The motivating observations lack crucial details - it's unclear which specific dataset was used for the three motivational experiments, what constitutes the \"50 standard OR problems,\" or what it means to \"provide ground-truth models for that subproblem.\" Technical details are often relegated to appendices, making it difficult to understand how statement thoughts are extracted or how the similarity function SimLLM operates. The evaluation has notable limitations, relying solely on solving accuracy (whether optimal objectives match ground truth) without analyzing partial credit. \n\nThe scalability and practical deployment aspects raise additional concerns. Tree construction seems to require human curation for new domains, and it's unclear how this approach scales or what happens when problems don't fit existing tree structures. The paper lacks analysis of tree maintenance costs over time and provides no thorough error analysis of failure cases. From a significance standpoint, \nit seems like the evaluation is limited to standard OR problem types and it may be difficult for this approach to generalize to ML more broadly.", "was_revised": true, "final_justification": "I am raising my score by 1 since the rebuttal helps address some of my questions. Overall, the paper is interesting but I think the methodology may be difficult to generalize to ML more broadly. There are also some concerns with clarity and reproducibility which has also been flagged by the other reviewers.", "rebuttal": "Thank you for your valuable comments. We sincerely hope that we could properly address your concerns.\n\n> W1: Details of motivating observations\n\n- We use the **IndustryOR** dataset for three experiments. The \"**50 standard OR problems**\" refer to a collection of foundational OR problems in the OR textbook [1], including classical problems such as the standard TSP, Knapsack, set packing, assignment, and facility location problems. \n\n- **Providing the ground-truth model**. (1) We first collect the optimization models in the textbook [1] as a ground-truth model for the 50 standard problems. (2) For a problem in IndustryOR to formulate, we use LLM to identify whether the problem contains subproblems in the 50 standard OR problems. (3) If a subproblem is identified, we augment the LLM's prompt for optimization modeling by integrating the relevant ground-truth model of the subproblem. The simplified prompt is as follows.\n\n  > You are a mathematical formulator to formulate the given OR problem as an optimization model and generate Gurobi code to solve the model. \n  >\n  > {problem description} \n  >\n  > The problem has a subproblem of {subproblem name}. During the modeling process, we can refer to the subproblem model: {subproblem model}\n\n> W1: Details of statement thoughts extraction and similarity function SimLLM.\n\nThe extraction of statement thoughts and the similarity function SimLLM are both processes handled by **a LLM using specific prompts**.\n\n- **Statement thoughts** are concise, high-level statements that summarize the key features and requirements of the problem. They are generated to create a clear and comprehensible format for subproblem identification. We provide an example here (Appendix H.1).\n\n  > Diet Problem with Integer Constraint\n  >\n  > - The Diet Problem with Integer Constraint involves determining the quantity of each food item to meet nutritional requirements while minimizing cost. \n  > - Nutritional Constraints: The selected food items provide at least the required amount of nutrients.\n  > - Cost Minimization: The total cost of the selected food items should be minimized.\n  > - Integer Servings: Food items must be integer values. \n\n  An example prompt to obtain statement thoughts is: \n\n  >  Your task is to summarize the type of this specific problem and provide a detailed statement thoughts of this type. You must classify the problem into more precise scenarios, such as the Traveling Salesman Problem (TSP), the facility location problem, and so on. \n  >\n  >  Specific Problem: {problem description} \n  >\n  >  Here is an output format example ...\n\n- **SimLLM** provides a similarity score directly from the LLM, used during the tree search to measure how closely a candidate subproblem’s statement thoughts align with those of the target problem. This involves a detailed prompt asking the LLM to compare a list of statement thoughts and return the most similar one in JSON format. The output includes a discrete score of 0, 1, or 2, where 2 indicates high similarity. SimLLM is used to select the best-matching subproblem at each step of the tree search.\n\n  > Input problem: {input_problem_statement_thoughts}. \n  >\n  > You are given a list of defined subtypes and the statement thoughts of subproblems: {subproblems_statement_thoughts}. \n  >\n  > Your task is to determine if the specific problem belongs to one of the given subtypes. Return in the following JSON format: \n  >\n  > json{\n  >\n  > ​\tmatching_subtype: \"\", \n  >\n  > ​\treasons: \"\", \n  >\n  > ​\tsimilarity: [0,1,2]\n  >\n  > }\n\n> W1: Evaluation with partial credit.\n\nThe objective metric is standard in the LLM-based optimization modeling literature [2, 3], and in subsequent works ORLM, LLMOPT, OptMATH, OptiBench. However, defining a robust \"partial credit\" metric is a significant challenge. \n\n- Most existing benchmarks **only contain labeled optimal value** and **do not contain annotated ground-truth optimization model**, making the partial credit metric difficult to design. \n- Even with ground-truth models, simple text-based or structural comparisons can be unreliable. A model may have minor syntactic differences from the ground truth but be semantically equivalent. Conversely, a model might be nearly identical yet contain a critical error, such as a misplaced inequality sign.\n- To further address your concerns, we find that the training set in OptMATH has annotated models. We use 100 problems for evaluation. As our method and the baselines were not trained on this dataset, the comparison is safe and fair. We present the percentages of LLM-generated models that align with the ground-truth models based on statistical information, including the number of variables, binary variables, integer variables, constraints and objective values. Note that all the statistical information is just a reference, as the **mismatch of variables and constraints does not imply the model is incorrect**. Notably, OptiTree exhibits the highest matching ratio with the ground-truth model, underscoring its reliability.\n\n**Table 1**: Evaluation of partial credit. \n\n|OptMATH|Num Var|Num Bin|Num Int|Num Cons|Obj|\n|-|-|-|-|-|-|\n|DeepSeek-R1|79.0|85.0|67.0|46.0|66.0|\n|OpenAI-o1|83.0|87.0|**93.0**|50.0|68.0|\n|ORLM|43.0|52.0|44.0|35.0|37.0|\n|LLMOPT|56.0|65.0|57.0|37.0|41.0|\n|CoE|67.0|78.0|85.0|46.0|58.0|\n|OptiMUS|84.0|79.0|76.0|43.0|61.0|\n|MCTS|75.0|80.0|81.0|46.0|63.0|\n|Ours|**90.0**|**92.0**|83.0|**68.0**|**71.0**|\n\n> W2: Tree construction seems to require human curation, and it's unclear whether the scalability and what happens when problems don't fit existing tree structures. \n\n- We want to clarify that the tree construction and updating process is **fully automated and does not require human curation** for new domains. We construct the modeling tree using 400 randomly selected problems in the OR-Instruct dataset (training dataset for ORLM). We run across problems in the dataset to update the tree and use the single tree across the testing benchmarks.\n- Scalability. We use **just 400 problems** from the OR-Instruct dataset for tree construction and test across a wide range of different problem domains. The superior performance demonstrates the scalability. \n- If the tree search process cannot find any relevant subproblems for a given task (i.e., the search halts at the root node), **OptiTree simply provides no modeling thoughts**. In this case, the framework defaults to the LLM's baseline modeling capability without the enhancement from OptiTree. \n\n> W2 & Q: Analysis of tree maintenance costs over time and the results in Table 2 in the main text.\n\n- Your understanding of the **1-time cost for tree construction is right**. However, this part of the time is not included in Table 2 in the main text. The result in Table 2 represents the inference time required to generate the final optimization model for each new problem. We (1) use tree search to find an appropriate problem and (2) perform optimization modeling, combining the modeling thoughts from the problem. The two parts of time (Tree search and modeling) refer to these two steps. \n- We provide the tree maintenance costs. We also provide the sum of tree construction and inference time (CPU time) as follows (in **hours**, and the reported **Average Time in seconds**). Compared to the inference time of the baselines or the time cost for fine-tuning LLMs, our method is the most efficient. \n\n**Table 2**: The comparisons of the inference time. \n\n||Tree Construction/Fine-tune Time (h)|NL4Opt (h)|MAMO EasyLP (h)|MAMO ComplexLP (h)|ComplexOR (h)|IndustryOR (h)|Total Time (h)|Average Time (In Seconds)|\n|-|-|-|-|-|-|-|-|-|\n|14B LLM|>80|-|-|-|-|-|-|-|\n|CoE|-|2.98|7.71|4.50|0.42|2.27|17.88|50.64|\n|OptiMUS|-|2.11|4.08|3.11|0.36|1.60|11.26|31.89|\n|MCTS|-|8.28|20.06|6.53|1.00|3.46|39.33|111.39|\n|Optitree|3.00|1.11|1.68|0.78|0.16|0.55|7.28|**20.62**|\n\n> W2:  generalize to ML more broadly\n\nWhile our work centers on optimization modeling within OR, the core principle of our approach—**leveraging a hierarchical knowledge structure to guide an LLM in decomposing complex problems into simpler, solvable subproblems and retrieving contextual hints for each**—represents a generalizable reasoning paradigm. We argue that **hierarchical knowledge retrieval with tree search** offers a versatile framework that could inspire advancements in other domains requiring multi-step, complex reasoning.\n\n> W2: Error cases and limitations\n\nFollowing [2], the errors mainly arise from three aspects: missing or wrong constraints, incorrect modeling and coding errors. In [2], almost half of the errors come from the incorrect modeling (62.5% for ComplexOR), e.g., defining wrong binary variables in the model. We analyze the failures of OptiTree and normalize the failure rates to sum to 1. The results are presented in Table 3. We find that most errors are from the missing constraints, and the ratio of incorrect modeling is low. We have the following conclusions. (1) **OptiTree can significantly reduce the error of incorrect modeling, primarily caused by wrong variable definitions**. The results coincide with those in Table 3, where the number of variables is closest to the ground-truth model. (2) We can also see the **limitations of OptiTree**. While it substantially mitigates incorrect modeling through decomposition and modeling thoughts, it still relies on the base model's capacity to understand and interpret problems. The requisite OR knowledge for problem comprehension remains a limitation.\n\n**Table 3**: Failure cases information. \n\n||ComplexOR|IndustryOR|OptMATH|\n|-|-|-|-|\n|Incorrect modeling|0|10.9|23.8|\n|Missing constraints|66.7|82.6|61.9|\n|Coding errors|33.3|6.5|14.3|\n\n[1] Optimization in Operations Research\n\n[2] OptiMUS: Scalable Optimization Modeling with (MI)LP Solvers and Large Language Models\n\n[3] Chain-of-Experts: When LLMs Meet Complex Operations Research Problems"}, {"review_id": "Bi7yAjeiCj", "reviewer": "Reviewer_MotJ", "summary": "OptiTree is a prompt-based framework that improves LLM-driven optimization modeling by recursively decomposing a natural-language problem into a chain of simpler subproblems. It constructs an offline modeling tree that organizes OR problem types in a taxonomy; each node stores high-level statement thoughts (key features) and modeling thoughts (variable, constraint, and objective templates). At inference time, an LLM follows the tree from the root to the deepest matching node, assembles the retrieved thoughts into one prompt, and generates solver-ready code.", "questions": "1. The paper briefly mentions the limitations of OptiTree. Could the authors elaborate on these limitations in more detail? Specifically, analyzing scenarios where OptiTree may underperform and discussing the potential reasons would provide a more balanced perspective.\n\nFor other questions, please refer to the weaknesses.", "limitations": "The paper briefly mentions the limitations of OptiTree. Could the authors elaborate on these limitations in more detail? Specifically, analyzing scenarios where OptiTree may underperform and discussing the potential reasons would provide a more balanced perspective.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 2, "significance": 3, "originality": 2, "strengths_and_weaknesses": "Strengths:\n1.  Focuses on a long-standing bottleneck in operations research by turning LLMs into reliable optimization-modeling assistants. \n2. Constructs a Modeling Tree that stores both “statement thoughts” and “modeling thoughts”, turning prompt retrieval into a structured, hierarchical memory for LLMs.\n2. Proposes an incremental insertion algorithm that allows the tree to grow continuously without retraining.\n\nWeaknesses:\n1.  The paper lacks a clear explanation of how to construct the modeling tree. After reading it, key details remain unclear, such as how to add tree nodes or evaluate whether a problem should be integrated. Is this process fully automated?\n2.  How is the greatest search depth determined during tree traversal?\n3.  Although the paper shows that the Modeling Tree as a whole improves solution quality, it never measures how performance evolves when thoughts are aggregated level-by-level along the search path. Without such a vertical study, it is hard to verify that deeper, more-specific nodes truly add incremental value (rather than the final node alone doing all the work) and to understand the cost–benefit trade-off between prompt length and accuracy.\n4. In the experimental section, it would be beneficial to include comparisons with the latest methods, such as Evo-Step [15] and OptMATH [16].", "was_revised": true, "final_justification": "The rebuttal meaningfully addresses my initial concerns, which significantly strengthens the paper’s clarity and empirical grounding. The authors provide a concrete, fully automated pipeline for constructing and updating the modeling tree. I have raised my score by one.", "rebuttal": "Thank you for your valuable comments. We sincerely hope that we could properly address your concerns.\n\n> W1: Explanation of constructing the modeling tree\n\nThe modeling tree construction is **fully automated**. To construct a modeling tree, we need a dataset (OR-Instruct) with various problems containing the problem description and the ground-truth optimization models.\n\n- First, we explain the **tree search process** to find an appropriate subproblem. \n  - OptiTree uses an LLM to distill the description of the target problem into a set of statement thoughts, which summarize the problem's key features and requirements into a schema. The statement thoughts are used for subproblem identification (**Appendix H.1 for an example**). \n\n  - The search begins at the **root node** of the modeling tree. Optitree evaluates the children of the current node to find the best match for the target problem. The search halts when it reaches a node where none of its children qualify as a subproblem for the target problem. The last subproblem found in this process is called the **maximum subproblem**, and its modeling thoughts are used to guide the final solution.\n\n    The simplified prompt for subproblem identification in tree search. \n\n    > Input problem: {input_problem_statement_thoughts}. \n    >\n    > You are given a list of defined subtypes and the statement thoughts of subproblems: {subproblems_statement_thoughts}. \n    >\n    > Your task is to determine if the specific problem belongs to one of the given subtypes. Return only the final answer in the following JSON format: \n    >\n    > ‘‘‘json{\n    >\n    > ​\tmatching_subtype: \"\", \n    >\n    > ​\treasons: \"\", \n    >\n    > ​\tsimilarity: [0,1,2]\n    >\n    > }‘‘‘\n  \n    The simplified prompt for modeling using modeling thoughts. \n  \n    > You are a mathematical formulator to formulate the given OR problem as an optimization model and generate Gurobi code to solve the model. \n    >\n    > {problem description} \n    >\n    > The problem has a subproblem of {subproblem name}. During the modeling process, we can refer to the subproblem model: {subproblem model}\n  \n- Second, we explain the evaluation process **whether a problem should be updated into the tree**. For each problem in a given dataset, we perform a tree search to find the maximum subproblem and use the modeling thoughts to enhance the modeling of the original problem. We solve the generated optimization model and obtain the final answer of the objective value. **If the final answer matches the ground-truth answer**, no update is necessary, indicating that the tree can already address this type of problem. **Otherwise**, the unsuccessful problem is used to expand the tree.\n\n\n- Third, we explain the **adding process of the tree nodes**.  \n\n  - **Distill a Schema**: First, a new modeling schema (including problem type, statement thoughts, and modeling thoughts) is automatically distilled for the failed problem. The prompt is as follows. \n  \n     > Your task is to summarize the type of this specific problem and provide a detailed statement thoughts of this type. You must classify the problem into more precise scenarios, such as the Traveling Salesman Problem (TSP), the facility location problem, and so on. \n     >\n     > Specific Problem: {problem description} \n     >\n     > Here is an output format example ...\n  \n  - **Position Among Siblings**: The new node is placed as a child of the maximum subproblem. The system then uses an LLM to verify the relationship between the new problem and the existing children of the maximum subproblem.\n  \n     - If P is a subproblem of an existing child, P is inserted between the parent and that child. \n     - Otherwise, P is inserted as a new direct child, becoming a sibling to the others. \n  \n     > You are given a primary problem type and its statement thoughts.\n     >\n     > {problem_statement_thoughts}\n     >\n     > You are also provided with a list of other problems with their statement thoughts. Your task is to determine which problem types in the list are subtypes of the given primary problem type. \n     >\n     > {list_of_problem_types_and_statement_thoughts}\n\n> W2: What is the greatest search depth?\n\nWe report the greatest search depth across different datasets. For the harder datasets, the search depth tends to increase, indicating that more complex problems feature more sophisticated subproblem structures.\n\n**Table 1**: The greatest search depth. \n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|-|-|\n|Greatest Search Depth|4|4|10|9|10|\n\n> W3: Performance evolution when thoughts are aggregated along the search path/ cost–benefit trade-off between prompt length and accuracy.\n\n- We have conducted the related experiments in Section 5.4, Impact of the Search Depth. We compared the performance of OptiTree with an unrestricted search depth against variants with maximum depths of 1 or 3. The results in Table 3 demonstrate that performance improves with deeper searches.\n- We analyze the prompt length for the modeling step, which includes the fixed prompt template, the problem length, and the length of the modeling thoughts. Table 2 shows that the prompt length does not significantly increase as the search goes deeper.\n- Given that we only use the thoughts from the final node, the cost-benefit trade-off is not about a growing prompt length, but rather about **search time vs. accuracy**. The search time for different search depths is presented as follows. Table 3 shows that the cost is a small component of the overall efficient process.\n\n**Table 2**: The prompt length for the problems (characters). \n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|-|-|\n|Depth=1|4201|5294|5837|6302|5018|\n|Depth=2|4143|5382|5795|6512|4923|\n|Depth=3|4340|5434|5893|6659|5195|\n\n**Table 3**: The comparisons of trade-off between search depth (search time) and the performance. \n\n|||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|-|-|-|\n|Depth=1|Time|10.3|6.1|10.1|23.0|14.2|\n||ACC|93.8|93.3|75.4|68.4|40.0|\n|Depth=3|Time|12.0|8.5|12.5|26.5|15.6|\n||ACC|96.2|95.6|80.1|79.0|44.0|\n|No limit Depth|Time|13.9|9.3|13.3|31.0|19.9|\n||ACC|96.2|95.6|81.0|84.2|48.0|\n\n> W4: Comparisons with the latest methods, such as Evo-Step and OptMATH\n\nWe include Evo-Step and OptMATH in our baselines. The Evo-Stop and OptMATH are fine-tuned models. We also include two new benchmarks, the OptiBench and OptMATH datasets for testing. As the fine-tuned models for Evo-Step and OptMATH have not yet been released, results are drawn from the original papers. The results illustrate the superior performance of OptiTree compared to these baselines across benchmarks.\n\n**Table 4**: The comparisons with more datasets and baselines. \n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|OptiBench|OptMATH|\n|-|-|-|-|-|-|-|-|\n|DeepSeek-R1|86.1|79.5|57.3|68.4|38.0|70.2|33.1|\n|OpenAI-o1|87.1|87.6|54.5|73.6|40.0|71.5|34.9|\n|ORLM|85.7|82.3|37.4|63.2|38.0|51.1|2.6|\n|LLMOPT|93.0|**97.0**|68.0|72.7|46.0|66.4|40.0|\n|Evo-Step|84.5|85.3|61.6|-|36.4|-|-|\n|OptMATH|95.9|89.9|54.1|-|31.0|66.1|34.7|\n|CoE (GPT-4o)|76.4|85.7|46.4|68.4|34.0|43.2|18.6|\n|OptiMUS (GPT-4o)|82.0|85.1|47.3|79.0|34.0|45.8|20.2|\n|MCTS (GPT-4o)|90.3|87.4|56.8|68.4|42.0|64.0|37.3|\n|**Ours (GPT-4o)**|**96.2**|95.6|**81.0**|**84.2**|**48.0**|**71.9**|**45.8**|\n|CoE (DeepSeek-V3)|79.2|85.9|43.1|63.2|33.0|55.2|24.1|\n|OptiMUS (DeepSeek-V3)|80.6|87.1|45.2|79.0|36.0|58.8|32.5|\n|MCTS (DeepSeek-V3)|89.6|88.0|51.6|79.0|46.0|67.9|38.6|\n|**Ours (DeepSeek-V3)**|**98.3**|**96.9**|**81.5**|**84.2**|**54.0**|**74.7**|**52.4**|\n\n> Q1: Analyzing scenarios where OptiTree may underperform and discussing the potential reasons.\n\n- **Failure cases analysis**. Following [4], the errors mainly come from three aspects: missing or wrong constraints, incorrect modeling and coding errors. In [4], almost half of the errors come from the incorrect modeling (62.5% for ComplexOR), e.g., defining wrong binary variables in the model. We analyze the failures of OptiTree and normalize the failure rates to sum to 1. We find that most errors are from the missing constraints. **OptiTree can significantly reduce the error of incorrect modeling, which mainly comes from the wrong variable definitions**. \n- **Limitations**. The constraint errors are the main error for OptiTree. \n  - First, accurately formulating constraints requires a deep and nuanced **understanding of the specific problem scenario and its domain knowledge**. For highly specialized or novel OR problems, existing background knowledge may not fully capture the intricate details necessary for precise constraint definitions.\n  - The second limitation is the intrinsic **reasoning ability of the base LLM**. While OptiTree provides a structured framework and knowledge, the final synthesis depends on the LLM's inherent reasoning capabilities. This framework may struggle with problems requiring significant logical or relational reasoning. For instance, in the staff rostering problem, the model must allocate staff for 24-hour shifts to meet coverage constraints (with workers working 8-hour days). If it fails to recognize that the demand period from 1:00 to 2:00 AM is covered by workers who began their shifts at 8:00 PM, it will result in an incorrect constraint and ultimately a flawed model.\n\n**Table 5**: Failure cases information. \n\n||ComplexOR|IndustryOR|OptMATH|\n|-|-|-|-|\n|Incorrect modeling|0|10.9|23.8|\n|Missing constraints|66.7|82.6|61.9|\n|Coding errors|33.3|6.5|14.3|\n\n[1] Evo-Step: Evolutionary Generation and Stepwise Validation for Optimizing LLMs in OR. \n\n[2] OptMATH: A Scalable Bidirectional Data Synthesis Framework for Optimization Modeling. \n\n[3] OptiBench Meets ReSocratic: Measure and Improve LLMs for Optimization Modeling. \n\n[4] OptiMUS: Scalable Optimization Modeling with (MI)LP Solvers and Large Language Models."}, {"review_id": "IVdKUckGeE", "reviewer": "Reviewer_vacN", "summary": "This paper develops a method to improve LLM-based optimization modeling through a modeling tree that organizes a wide range of OR problems based on their hierarchical problem taxonomy and complexity. Then, they recurrently search the tree to identify a series of simpler subproblems and synthesize the global modeling thoughts. The authors perform thorough experiments to show the performance benefits of their method.", "questions": "1. While the authors see improvements using GPT-4o and deepseek-v3 to build the tree, can your method further improve (1) stronger models like the reasoning models GPT-o1/3 and deepseek-R1? (2) weaker models like qwen and llama, if they use these models to build the tree and construct solutions? \n2. I wonder if the authors proposed pipeline is sensitive to different dataset used to build the tree? Also, if the pipeline is sensitive of different seeds (do you get drastically different trees if you run the code with different seeds)?\n3. Main paper, Line 221: if $P \\subseteq P_k^{(M)}$: is this a typo, should it be the other way around $P_k^{(M)} \\subseteq P$?\n4. Figure 2: can the authors provide a few examples of the errors in IndustryOR and how their methods help the performance? \n5. Can the authors provide the entire tree built from the algorithm and a minimal script to reproduce the result so that we can examine the meaningfulness of the tree and the algorithm?", "limitations": "The authors discussed limitations in Sec F of the Appendix.", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 1, "significance": 3, "originality": 3, "strengths_and_weaknesses": "**Strengths:**\n\n1. The high level concepts proposed in the paper make sense and the performance substantially improves from existing methods, especially on the MAMO complex dataset where they raise the performance from 56.8% (previous methods) to 81.5% (their methods).\n2. The authors provide a few ablation studies to justify their methods empirically.\n3. Their motivated observations in Sec. 3 seem insightful.\n\n**Weaknesses:**\n\n 1. The pseudocode provided in the appendix seems unclear and insufficient to reproduce the entire experiments. There are many things that I find confusing, and the authors should revise the pseudocode to provide more clarity:\n     - Page 19: you should explicitly refer to the exact name of the prompt you are using on each line. Just a few examples I find confusing:\n        1. I'm confused about which prompt is used to “synthesize $Tau(P)$ from $Tau(P(M))$” (Algorithm 1, Line 21) - your modeling prompts on page 25-27 does not seem to require the $Tau(P(M))$ information, so how do you generate modeling thoughts by combining information from the maximal subproblem’s modeling thought?\n        2. Algorithm 2, line 3: “modeling fails” - please make it more clear where is this executed and what does this mean.\n        3. Algorithm 2, line 4: What prompt is used to “distill schema (problem type, CP, $Tau(P)$) from P”? \n        4. Algorithm 2, Line 5: $P(M) ← MaximalSubproblem(P, T)$: is this $P(M)$ the same $P(M)$ that you get from Algorithm 1, Line 20?          \n    - Page 23: Modeling Thoughts Distillation: there seems to be two prompts (separated by “You are given a specific combinatorial optimization problem.” on page 24. what’s the difference? \n    - Page 23: Code Correction: how is this prompt used? How many code correct iterations do you do and when do you do it? How much performance benefit do you get from code correction? It seems like the authors did not mention this part at all in the main paper or in the pseudocode.\n    - What’s the difference between the Subproblem Identification prompt (Page 22) and Add New Tree Nodes prompt (Page 27)? Is it just in Page 22 you output an extra similarity score, but for Page 27 you don’t.\n    - Page 24: The “constraints” information in the statement thoughts outputs - are they used anywhere? Do you only use <the more precise of statement thoughts> as the “statement thoughts” for your subproblem matching, or you use the whole json for the matching? \n\nAs a side remark (reproducibility): I strongly encourage the authors to provide the code during the rebuttal period. It seems like this field has issue with code opensourcing, publishing papers without code or delay the opensourcing detrimentally hurt the field’s progress, especially the paper heavily depends on prompting off-the-shelf LLMs. \n\n2. The authors rely on off-the-shelf LLMs for their entire algorithm, which raises the question of robustness of their method (see question 2 for additional questions). The authors should also have a discussion regarding when their tree modeling fails, given that the reliance on the off-the-shelf LLMs.\n3. The authors should report the performance on recent benchmarks including Optmath and Optibench.", "was_revised": true, "final_justification": "Overall, I find this paper interesting and the results reported promising, but I feel like this paper (in the current form) lacks clarity and reproducibility due to the missing details, typos, and lack of open-source code in the submission stage. I increased the score from 3 to 4 to acknowledge the authors' effort in the rebuttal stage, but due to the reproducibility concerns, I personally feel like this paper would be significant stronger if it undergoes another run of revision and resubmission.", "rebuttal": "Thank you for your valuable comments. We sincerely hope that we could properly address your concerns.\n\n> W1: The pseudo-code and prompts\n\n- We first explain the pseudocode.\n\n  - **Global thoughts synthesis process**. We apologize for not including this prompt in the Appendix. We generate modeling thoughts by integrating information from the maximal subproblem’s modeling thought and the current problem description.\n\n    > This is an OR problem with the following problem description\n    >\n    > {problem description}\n    >\n    > The problem contains a subproblem of {subproblem name}. The modeling thoughts to model this subproblem are as follows. Please refer to the thoughts and list the modeling thoughts for the original OR problems. \n    >\n    > {subproblem modeling thoughts}\n    >\n    \n  - **Modeling fails** means that the final objective value of the generated optimization model does not equal the ground-truth value for that problem. In the tree update, if the generated answer for the current problem is incorrect, the system determines that the current modeling tree is insufficient for that problem type and updates the current problem into the tree. \n  \n  - **The distillation prompts** are listed in Appendix H.4. The first block of prompts is used for statement thoughts distillation, and the second block of prompts is used for modeling thoughts and schema distillation.\n  \n  - Yes. The **maximal subproblem** is the same as Algorithm 1. \n  \n- Two prompts for **modeling thoughts distillation**. We apologize for mislabeling. These blocks of prompts are used for statement thought distillation. \n\n  - The first prompt is used for situations when we have to find subproblems in the previous search. It asks the LLM to take the specific problem and its current basic subproblem type as input and then determine a more precise subproblem. \n  - The second prompt is used for situations when the search process stops at the root node. Thus, we cannot refer to any prior subproblem for thought construction. \n\n- **Code correction**. We will revise the manuscript to include it for clarity. \n\n  - The **code correction module** is a standard component of the prompt-based optimization modeling methods, such as CoE and OptiMUS. It is applied after the solver codes generated by the LLM raise errors. The prompt instructs the LLM to analyze the bugs in the code. We use **one iteration** of this correction step.\n  - **The code correction is not a core contribution and a trick in our work**. We find in practice that the trigger of the code correction module is less than 3%. This implies that the successful execution rate for the initial codes is high, and the benefits of the correction prompt are not significant. \n\n\n- The **Subproblem Identification Prompt** is used during the **tree search** to find the single best subproblem to proceed with at each level. It returns the single best matching subproblem and a JSON object containing a similarity score. \n\n  **Add New Tree Nodes Prompt** is used during the **tree update** phase to correctly position a new node within the tree's hierarchy. The LLM uses the prompt and identify all parent-child relationships between a new problem and its potential siblings. It returns a list of all problem types that are identified as subtypes of the primary one; it does not output a similarity score. \n\n- Yes, the \"constraints\" information is used, and the entire JSON object is used for the subproblem matching.\n\n\n> W2: When their tree modeling fails.\n\nFollowing the paper of OptiMUS, the errors mainly come from three aspects: missing or wrong constraints, incorrect modeling and coding errors. Almost half of the errors of OptiMUS come from the incorrect modeling (62.5% for ComplexOR), e.g., defining the wrong binary variables in the model. The results for OptiTree are presented in Table 1. OptiTree reduces the errors of incorrect models and the constraint errors are the main error for OptiTree. \n\n- First, accurately formulating constraints requires a deep and nuanced **understanding of the specific problem scenario and its domain knowledge**. For highly specialized or novel OR problems, existing background knowledge may not fully capture the intricate details necessary for precise constraint definitions.\n- The second limitation is the intrinsic **reasoning ability of the base LLM**. This framework may struggle with problems requiring significant logical or relational reasoning. For instance, in the Staff Rostering problem, the model must effectively allocate staff for 24-hour shifts to meet coverage constraints (the workers work for 8 hours a day). If it fails to recognize that the demand period from 1:00 to 2:00 AM is covered by workers who began their shifts at 8:00 PM, it will result in an incorrect constraint and ultimately a flawed model.\n\n**Table 1**: Failure cases information. \n\n||ComplexOR|IndustryOR|OptMATH|\n|-|-|-|-|\n|Incorrect modeling|0|10.9|23.8|\n|Missing constraints|66.7|82.6|61.9|\n|Coding errors|33.3|6.5|14.3|\n\n> W3: Performance on recent benchmarks\n\nWe include the fine-tuned baselines, Evo-Step and OptMATH. We also include two new benchmarks, the OptiBench and OptMATH datasets for testing. The fine-tuned models for Evo-Step and OptMATH have not yet been released, so results are drawn from the original papers. The results demonstrate the superior performance of OptiTree over the baselines across benchmarks.\n\n**Table 2**: The comparisons with more datasets and baselines. \n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|OptiBench|OptMATH|\n|-|-|-|-|-|-|-|-|\n|DeepSeek-R1|86.1|79.5|57.3|68.4|38.0|70.2|33.1|\n|OpenAI-o1|87.1|87.6|54.5|73.6|40.0|71.5|34.9|\n|ORLM|85.7|82.3|37.4|63.2|38.0|51.1|2.6|\n|LLMOPT|93.0|**97.0**|68.0|72.7|46.0|66.4|40.0|\n|Evo-Step|84.5|85.3|61.6|-|36.4|-|-|\n|OptMATH|95.9|89.9|54.1|-|31.0|66.1|34.7|\n|CoE (GPT-4o)|76.4|85.7|46.4|68.4|34.0|43.2|18.6|\n|OptiMUS (GPT-4o)|82.0|85.1|47.3|79.0|34.0|45.8|20.2|\n|MCTS (GPT-4o)|90.3|87.4|56.8|68.4|42.0|64.0|37.3|\n|**Ours (GPT-4o)**|**96.2**|95.6|**81.0**|**84.2**|**48.0**|**71.9**|**45.8**|\n|CoE (DeepSeek-V3)|79.2|85.9|43.1|63.2|33.0|55.2|24.1|\n|OptiMUS (DeepSeek-V3)|80.6|87.1|45.2|79.0|36.0|58.8|32.5|\n|MCTS (DeepSeek-V3)|89.6|88.0|51.6|79.0|46.0|67.9|38.6|\n|**Ours (DeepSeek-V3)**|**98.3**|**96.9**|**81.5**|**84.2**|**54.0**|**74.7**|**52.4**|\n\n> Q1: Improvement of (1) stronger models like reasoning models, (2) weaker models like Qwen and llama.\n\nWe conduct experiments to build OptiTree on (2) stronger models, including GPT-o1 and DeepSeek-R1; (2) weaker models, including Qwen-2.5 7B and Llama3-8B. The results in Table 3 demonstrate that OptiTree can significantly improve the performance of the LLMs. \n\n**Table 3**: Improvement on more models.\n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|-|-|\n|DeepSeek-R1|86.1|79.5|57.3|68.4|38.0|\n|Ours (DeepSeek-R1)|97.9|96.9|82.5|84.2|57.0|\n|OpenAI-o1|87.1|87.6|54.5|73.6|40.0|\n|Ours (OpenAI-o1)|96.5|95.1|83.9|84.2|53.0|\n|Qwen2.5 14B|79.4|79.6|45.0|57.9|31.0|\n|Ours (Qwen2.5 14B)|88.2|89.6|78.7|73.6|37.0|\n|Llama3.1-8B|40.5|71.2|39.8|63.1|24.0|\n|Ours (Llama3.1-8B)|55.0|75.9|64.4|73.7|28.0|\n\n> Q2: Sensitivity to different datasets used to build the tree and different seeds.\n\n- First, we show that the pipeline is not sensitive to the different datasets used to build the tree. We conduct the following experiments. (1) We randomly select 400 different problems in the OR-Instruct dataset for tree construction. (2) We randomly select 100 problems for tree construction. (3) We select problems from the NL4Opt and MAMO ComplexLP datasets for tree construction. We found that OptiTree maintains stable performance across different datasets.\n\n- Second, we run the code with different seeds for tree construction and testing.  We find that OptiTree achieves a stable performance across the random seeds.\n\n\nTable 4: Sensitivity analysis. \n\n||MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|\n|Randomly Selected 1|78.7|79.0|46.0|\n|Randomly Selected 2|82.0|84.2|48.0|\n|Randomly Selected 3|79.6|84.2|48.0|\n|Fewer Problems 1|81.5|84.2|48.0|\n|Fewer Problems 2|80.5|84.2|46.0|\n|NL4Opt (all)|74.9|73.7|44.0|\n|MAMO Complex (20 problems)+NL4Opt (all)|84.4|79.0|46.0|\n|Tree Construction Seed 1|83.9|84.2|48.0|\n|Tree Construction Seed 2|78.7|84.2|46.0|\n|Tree Construction Seed 3|82.9|79.0|48.0|\n\n> Q3: Line 221: Is this a typo?\n\n$P$ is a subproblem of $P_k^{(M)}$, and thus $P$ is the parent as the deeper node represents a more complex problem, i.e., $P \\subseteq P_k^{(M)}$.\n\n> Q4: Figure 2: Examples of the in IndustryOR\n\nWe provide a simplified example due to the space limit. \n\n- Problem: A store plans to purchase and sell the goods for the first quarter of next year. The warehouse capacity is $M$ units, and the initial goods in stock are $M_0$ units. Determine the units to be purchased and sold each month to maximize total profit, with purchase and sales prices for the $i^{th}$ month denoted as $p_i$ and $s_i$.\n\n- Analysis. OptiTree can reduce the errors in incorrect models.\n\n  - **Without OptiTree**. Define $x_i$ as the units purchased at the beginning of each month and $y_i$ as the units sold each month.\n\n    $max_{x,y}\\sum_i s_iy_i-p_ix_i$\n\n    $x_0-y_0+M_0\\le M$\n\n    $x_i-y_i\\le M,i>0$, inventory constraints\n\n  - **OptiTree** identifies this problem as an inventory problem, with $I_i$ representing the inventory at each month.\n\n    $max_{x,y}\\sum_i s_iy_i-p_ix_i$\n\n    $I_0=M_0$\n\n    $I_i=I_{i-1}+x_i-y_i$\n\n    $I_{i-1}+x_i\\le M$, inventory constraints\n\n    $y_i\\le I_{i-1}+x_i$, sale constraints\n\n\n> Q5: The code for the paper\n\nThank you for your interest in our work and your valuable suggestions. However, **we are sorry that authors cannot include links to external pages (including anonymous repositories) during the rebuttal period**. We will publicly release all code and final modeling trees shortly."}, {"review_id": "UjQm7k7VdF", "reviewer": "Reviewer_9LBo", "summary": "OptiTree proposes a tree-search framework that adaptively breaks down complex operations-research problems into a sequence of simpler subproblems, navigating a “modeling tree” whose nodes store distilled hierarchical modeling thoughts for large-language-model guidance. During inference, the system selects the most relevant subproblems, assembles their thoughts into a unified modeling plan, and continually updates the tree to preserve subproblem order while capturing new decomposition patterns. Experiments on five optimization-modeling benchmarks show OptiTree lifts solving accuracy by over 10 percentage points versus state-of-the-art prompt and fine-tuned baselines.", "questions": "* Can you include results when OptiTree is applied on top of reasoning LLMs (e.g., GPT-o1, DeepSeek-R1) and fine-tuned LLMs (e.g., ORLM, LLM-OPT). This would make the empirical case even more compelling.\n* What is the setup for comparing Efficiency? Because runtime is dominated by tree breadth/depth and LLM calls, does OptiTree’s speed-up stem mainly from exploring a smaller search tree (fewer iterations), or from other engineering choices? Is bigO time complexity possible to provide?  How does OptiTree scale for complex problems?\n* Since high “variable-definition failure” rates motivate the method, can you quantify how much OptiTree lowers this specific error relative to baselines—ideally with a before-and-after breakdown.", "limitations": "yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 4, "significance": 3, "originality": 3, "strengths_and_weaknesses": "# Strengths\n\n* Introduces a modeling-thought tree that stores and retrieves subproblem reasoning snippets, adding a clear structural advance over standard chain-of-thought prompting.\n* Yields double-digit accuracy gains and nearly perfect code-execution rates while cutting inference latency versus prior prompt pipelines.\n* The paper motivates its design with diagnostic analyses, intuitive diagrams, and thorough ablations that clarify each component’s contribution.\n* The method generalize well across all benchmark when the tree is constructed with different dataset.\n\n# Weaknesses\n\n* Focuses on exact objective matches (accuracy). Can provide deeper insight with measuring near-optimality, solver tolerance, or robustness—key factors in real-world optimization.\n* The link between diagnosed variable-definition errors and the chosen decomposition remedy improvements are not convincingly demonstrated.\n* Setup for efficiency comparison is unclear.", "was_revised": true, "final_justification": "The rebuttal resolved my main concerns: added metrics beyond objective value, clarified efficiency setup, and linked variable-definition errors to decomposition with quantified improvements. Additional experiments (robustness, diverse LLM backbones, error breakdown) strengthen the technical contribution and generalizability. Remaining issues are minor and do not affect overall merit. Given these clarifications, I maintain my positive score.", "rebuttal": "Thank you for your valuable comments. We sincerely hope that we could properly address your concerns.\n\n> W1: Focuses on exact objective matches. Deeper insight with measuring near-optimality, solver tolerance, or robustness.\n\nWe provide additional results on modeling accuracy beyond just the objective value. However, many benchmarks lack labeled models in their datasets. Therefore, we conducted experiments on a subset of the OptMATH training set (100 problems) that includes annotated models. Since our method and the baselines were not trained on this dataset, the comparison is both safe and fair.\n\n- **Optimality and Tolerance**. We present the solver execution time and code pass rate in Table 1. The code pass rate indicates the ratio of code without bugs. In the existing optimization modeling datasets, we solve the optimization models to optimal solutions within seconds, so we do not set solver tolerances for these experiments.\n- **Robustness**. We ask the LLM to randomly rewrite the problem and test performance on these rewritten versions. The rewriting process alters 10% of the sentences by changing their order and rephrasing another 10% while maintaining their meaning. Results in Table 2 demonstrate the model's robustness to perturbations in the problem.\n- For **deeper insights** into the optimization modeling, we provide more metrics on the correctness of the optimization models. To further address your concerns, we find the datasets with annotated models and provide the proportion that LLM-generated models match with the ground-truth models in some statistical information, such as the number of variables, binary variables, integer variables, and constraints of the optimization models.  As shown in Table 1, OptiTree achieves the highest matching ratio with the ground-truth model, underscoring its reliability.\n\n**Table 1**: More metrics.\n\n|OptMATH|Var Num|Bin Num|Int Num|Cons Num|ACC|Solver Time|Code Pass|\n|-|-|-|-|-|-|-|-|\n|DeepSeek-R1|79.0|85.0|67.0|46.0|66.0|0.0047|97.0|\n|OpenAI-o1|83.0|87.0|**93.0**|50.0|68.0|0.0042|98.0|\n|ORLM|43.0|52.0|44.0|35.0|37.0|0.0040|92.0|\n|LLMOPT|56.0|65.0|57.0|37.0|41.0|0.0040|93.0|\n|CoE (GPT-4o)|67.0|78.0|85.0|46.0|58.0|0.0041|93.0|\n|OptiMUS (GPT-4o)|84.0|79.0|76.0|43.0|61.0|0.0043|96.0|\n|MCTS (GPT-4o)|75.0|80.0|81.0|46.0|63.0|0.0045|95.0|\n|**Ours (GPT-4o)**|**90.0**|**92.0**|83.0|**68.0**|**71.0**|0.0040|**98.0**|\n\n**Table 2**: Rubustness of OptiTree.\n\n||Nl4Opt|MAMO ComplexLP|IndustryOR|\n|-|-|-|-|\n|OptiTree|96.2|81.0|48.0|\n|OptiTree (Perturbed)|95.8|80.1|46.0|\n\n\n> Q1: Results when OptiTree is applied on top of reasoning LLMs\n\nWe conducted experiments to build OptiTree on various LLMs. The results are shown in Table 3, demonstrating that OptiTree generalizes well across different LLMs and significantly improves their performance.\n\n**Table 3**: Results on more LLMs. \n\n||NL4Opt|MAMO EasyLP|MAMO ComplexLP|ComplexOR|IndustryOR|\n|-|-|-|-|-|-|\n|DeepSeek-R1|86.1|79.5|57.3|68.4|38.0|\n|Ours (DeepSeek-R1)|97.9|96.9|82.5|84.2|57.0|\n|OpenAI-o1|87.1|87.6|54.5|73.6|40.0|\n|Ours (OpenAI-o1)|96.5|95.1|83.9|84.2|53.0|\n|ORLM|85.7|82.3|37.4|63.2|38.0|\n|Ours (ORLM)|93.7|88.8|72.5|79.0|44.0|\n|LLMOPT|93.0|97.0|68.0|72.7|46.0|\n|Ours (LLMOPT)|93.6|96.2|78.7|84.2|48.0|\n\n> W3&Q2: Setup for efficiency comparison is unclear.\n\nThe efficiency comparison setup involves measuring the average time, in seconds, for each method to solve a single problem from the various benchmark datasets.  \n\n- The result in Table 2 of the main text represents the inference time required to generate the final optimization model for each new problem. We (1) use tree search to find an appropriate problem and (2) perform optimization modeling, combining the modeling thoughts from the problem and we solve the model. The total time includes both the tree search and modeling phases.\n- The total runtime for each prompt-based baseline (like CoE, OptiMUS, and MCTS) and for the OptiTree pipeline was recorded for every problem attempted. These times were then averaged across each dataset.\n- We know you may wonder about the solver execution time for the solver code of each problem. This time is included in the modeling time. As shown in Table 1, the solver time is under a second, which can be considered negligible.\n\n> Q2: Reason for OptiTree to speed up. Time complexity analysis. How does OptiTree scale for complex problems?\n\n- **The high efficiency of OptiTree**.The speed of OptiTree, especially compared to other prompt-based methods, can be attributed to two main factors.\n\n  - OptiTree explores a **much smaller search space**. Existing methods involve iterative searches through variables, constraints, and objective functions, which can exponentially enlarge the search space as problem complexity increases. In contrast, OptiTree searches predefined candidate subproblems, requiring only the identification of the most suitable subproblem within a finite set, leading to greater efficiency.\n  - **OptiTree has fewer iterations in the workflow**. Existing methods often involve repeated calls to certain agents in a multi-agent system for optimization modeling. For example, for complex problems, existing methods may call the terminology interpretation repeatedly. These methods use a management agent to control the workflow automatically. However, the agent's hallucination can lead to suboptimal decision chains. In contrast, OptiTree avoids this multi-agent system, resulting in a more streamlined and efficient workflow.\n\n- We try to estimate the **time complexity** of OptiTree. Given a problem $\\mathcal{P}$, we analyze its two main components: Tree Search and Modeling. \n\n  - The complexity of tree search is influenced by the depth of the search path $H$ and the number of children at each node for comparison $NumChild_h$ in each step $h$. \n\n  -  The modeling time is influenced by the complexity of the original problem description $Com(\\mathcal{P})$ and the length of the modeling prompt. The promplt length can be roughly esitimated by $l(\\mathcal{P})+l(\\mathcal{T}(\\mathcal{P}))+C$, depending on the length of problem description $l(\\mathcal{P})$ and the modeling thoughts $l(\\mathcal{T}(\\mathcal{P}))$. The notation $C$ is the fixed length of the prompt template. \n\n  - We suppose further that the time for LLM generation is $\\alpha\\cdot Com\\cdot l$, where $\\alpha$ is a constant, $Com$ is the reasoning complexity ratio measuring the reasoning complexity of the task, and $l$ is the prompt length.  For subproblem identification, the reasoning complexity is low and set to 1 for simplicity. Suppose further that $l(child)$ is the text length for each child in the tree. Thus, the total time estimation is given by \n\n    $\\alpha\\sum_{h=1}^H NumChild_h\\cdot l(child)+\\alpha\\cdot Com(\\mathcal{P})\\cdot(l(\\mathcal{P})+l(\\mathcal{T}(\\mathcal{P}))+C)$\n\n- **The scalability of OptiTree**. OptiTree is designed to scale for problems with longer question lengths or higher complexities. For longer question lengths, we avoid implementing a complex multi-agent workflow that calls agents repeatedly for specific tasks. Instead, we search within a finite subproblem space, significantly reducing the number of requests to the LLM. As shown in Table 2 of the main text, the search process is efficient.\n\n> W2&Q3: The link between diagnosed variable-definition errors and the chosen decomposition remedy. Quantify how much OptiTree lowers this specific error.\n\nWe explain the link between them.\n\n- **Variable Definition Challenge**. Following the paper of OptiMUS, the errors mainly come from three aspects: missing or wrong constraints, incorrect modeling and coding errors. **The incorrect models mostly come from the wrong variable definition**, e.g., defining the wrong binary variables in the model. Almost half of the errors of OptiMUS come from the incorrect modeling (62.5% for ComplexOR). Our initial analysis in **Motivation 1** pinpoints that this is also the main error for CoT. For the complex OR problems, directly defining variables is a challenging task for LLMs. This observation motivated us to enhance the variable definition process using step-wise guidance.  \n- **Our approach is addressing the incorrect modeling from the perspective of variable definition**. We do so in the three aspects. \n  - **Step-by-Step Decomposition**. Instead of defining complex variables for the entire problem at once, OptiTree decomposes the task into modeling a series of simpler subproblems. Modeling a subproblem and correctly defining its variables are less challenging tasks for an LLM. Our experiment in **Motivation 3** confirms this, showing a significant accuracy improvement when providing the LLM with a ground-truth model of a subproblem first. \n  - **Enhancement with Modeling Thoughts**. The process is further enhanced by retrieving modeling thoughts for the identified subproblem. As shown in the schema examples, these thoughts provide explicit, step-by-step guidance, starting with how to **define variables**. This provides a strong, reliable template that the LLM can adapt.\n\n\n- We present the percentage of all kinds of mistakes for methods in Table 4. OptiTree reduces the **errors of variable definitions**. \n\n**Table 4**: Failure cases information. \n\n||ComplexOR|||IndustryOR|||\n|-|-|-|-|-|-|-|\n||CoT|OptiMUS|OptiTree|CoT|OptiMUS|OptiTree|\n|Wrong Variables/In correct modeling|54.5|62.5|0|59.1|60.6|10.9|\n|Missing constraints|18.1|12.6|66.7|24.0|18.2|82.6|\n|Coding errors|27.4|24.9|33.3|16.9|21.2|6.5|"}]

Author rebuttal:

Meta-review: This paper studies the modeling of optimization problems from natural language descriptions. It proposes to progressively model an optimization problem by modeling subproblems, in order to improve the success rate. The reviewers all had ackowledge the novelty of this paper and lean to acceptance. However, it should be noticed that this work introduces a heavy dependence on the subproblem space. The proposed approach is expected to perform well when the subproblem space covers the target problem space. The experiments conducted in this paper fall into this category. Meanwhile, when sovling general optimization problems that are far from the subproblem space, the approach's effort of modeling subproblems could only introduce confusing context for the LLM. The authors should discuss the affect of the coverage of the subproblem space and conduct experiments.
Decision: Accept (poster)