This blog post is based on webinar presented by Amit Kumar from SimWell, an official partner of AnyLogic.
At some point, every team runs into the same problem. On paper, the decision looks straightforward: reduce cost, improve service, increase throughput, and use resources more efficiently. You run the numbers, build the model, and arrive at an answer.
And yet, something does not feel quite right.
Because in real operations, nothing behaves as neatly as it does in a spreadsheet.
Orders arrive unpredictably, processing times fluctuate, priorities shift, equipment fails, and customer expectations change. The system you are trying to optimize is not static, and once that reality starts to matter, traditional approaches begin to fall short.
This is where simulation-based optimization becomes not just useful, but necessary.
Instead of simplifying reality, it lets you test decisions in a model that behaves much closer to the real system. So, you are not just analyzing what happens. You are testing what should happen next.
Contents:
- Limits of traditional optimization
- What simulation-based optimization does
- Simulation in analytics
- Job shop example in AnyLogic
- Why scheduling rules matter
- Framing the optimization problem
- Managing complexity and runs
- Delivering real business value
- Final thoughts
Why traditional optimization is not always enough
Classical optimization methods such as linear programming and mixed-integer programming are powerful. In the right conditions, they deliver clean, precise answers.
But those conditions are rarely present in real operations. A typical system, whether it is a warehouse, a factory, or an entire supply chain, includes:
- Uncertainty in demand and arrivals.
- Variability in processing times.
- Multiple resources interacting at once.
- Operational rules that influence outcomes.
- Constant trade-offs between cost, service, and utilization.
Once these factors start to matter, the model becomes harder to express analytically without simplifying it to the point where it no longer reflects reality.
And that is the core problem. A mathematically correct answer is not always a practically correct one.
Simulation changes that. It allows you to model how the system actually behaves over time, including randomness, constraints, and decision logic. When you layer optimization on top of that, you are no longer searching for the best answer in theory. You are searching for the best answer in practice.
What simulation-based optimization actually does
At its core, the idea is simple.
You begin with a simulation model of your system and define the parameters you can control, such as staffing levels, scheduling rules, reorder points, or machine capacity. In simulation-based optimization, these parameters are systematically adjusted, the simulation is run, the results are evaluated, and better-performing combinations are explored.
But there is an important nuance here.
Real systems are stochastic, meaning that the same decision can lead to different outcomes depending on random variation. For that reason, a single simulation run is not enough to evaluate performance reliably.
This is where replication count and margin of error become critical, not as technical details, but as the foundation of trust in the results.
Instead of relying on a single run, each candidate solution is tested multiple times, and performance is evaluated based on aggregated outcomes. In stochastic systems, individual results can be misleading, as they may reflect random variation rather than the true quality of a decision.
Running multiple replications reduces this risk by providing a more reliable estimate of expected performance and its variability. A solution that performs well once may be interesting, but a solution that performs consistently across replications is far more valuable in practice.
This is what makes the combination so powerful. Simulation brings realism, and optimization brings direction. Together, they turn a model into a decision-making tool.
Read also: If you want to make your simulation models not only accurate but easier to build and maintain, explore how to develop your own simulation toolkit in AnyLogic
The role of simulation in analytics
Simulation is often treated as a separate category of tools, but in practice, it spans multiple layers of analytics.
A well-designed simulation model can support descriptive analytics by explaining how a system behaves. It can also contribute to predictive analytics by projecting how the system is likely to perform under different conditions.
When combined with optimization, simulation also enables prescriptive analytics by evaluating alternatives and recommending better decisions.
This broader perspective reflects how organizations actually use models. They are not built only to observe systems but also to support decisions.
Practical example: optimizing a job shop in AnyLogic
To make this concrete, let’s consider a job shop model created using AnyLogic simulation software.
The system includes four work centers, multiple product types, and different routing paths. Even at this level, interactions between flows create complexity.
But the real challenge comes from uncertainty:
- Order arrivals fluctuate.
- Product mix is probabilistic.
- Processing times vary.
- Due dates differ across orders.
This type of system is difficult to capture accurately with a static analytical model. Within this setup, the decision variables are practical and directly tied to operations.
The simulation model allows you to adjust:
- The number of machines at each workstation.
- The scheduling rule that determines job priority.
And evaluate performance based on service level, measured by on-time completion and total investment cost.
This reflects a familiar business challenge: improving performance without overspending or reducing cost without compromising service. Simulation-based optimization makes it possible to explore this trade-off in a realistic and controlled environment.
Continue with the webinar recording below for the full presentation and a closer look at this example in practice!
Scheduling rules matter more than you might think
One of the more interesting insights from this example is that performance is not driven only by capacity. It is also shaped by how decisions are made inside the system.
Different scheduling rules can produce noticeably different outcomes, for example:
- First come, first serve.
- Earliest due date.
- Least slack time.
- Critical ratio.
Some of these rules are static, while others adapt dynamically as conditions change.
This is often overlooked in practice. Many teams focus on increasing capacity as the primary lever for improvement, while decision logic receives less attention. In reality, adjusting how work is prioritized and processed can lead to meaningful gains without requiring additional resources.
Two ways to frame the same problem
Another advantage of simulation-based optimization is its flexibility in problem formulation.
The same system can be optimized in different ways depending on the business objective. For example, one formulation may focus on minimizing cost while maintaining a required service level, which is common when service commitments are fixed.
Another formulation may reverse the objective by maximizing service level within a predefined budget, which is relevant when financial constraints are non-negotiable.
Both perspectives are realistic and align with how decisions are made in practice, and switching between them is straightforward within a simulation-based framework.
Managing complexity and runs
As models become more detailed and realistic, optimization problems can quickly grow in complexity.
The number of possible parameter combinations increases, making the search process more demanding. This is especially true in simulation-based optimization, where each candidate solution must be evaluated through repeated simulation runs.
A few practical habits can make a big difference:
- Break the problem into smaller parts when possible.
- Focus on the variables that matter most.
- Start broad, then narrow the search.
- Expand boundaries if the optimizer keeps hitting limits.
These are not advanced tricks. They are what make the difference between an academic exercise and a usable solution.
Delivering real business value
Simulation-based optimization is already applied across a wide range of industries.
In e-commerce, it helps determine more effective truck scheduling strategies. In quick-service restaurants, it supports staffing decisions that balance service quality and labor cost. In pharmaceutical supply chains, it helps manage trade-offs between service levels and product obsolescence.
Different contexts, same underlying challenge: making better decisions in systems where uncertainty and operational detail matter.
Explore AnyLogic case studies to learn how companies use simulation to improve staffing, optimize schedules, manage uncertainty, and make better business decisions.
In the end, what actually works
It is important to recognize the limitations of the approach.
Optimization engines, particularly black-box methods such as genetic algorithms, are not universally efficient, and their performance can degrade as problems scale in size and complexity. No single method is optimal for every situation.
But that does not reduce the value of the approach. In practice, the goal is rarely to find a mathematically perfect solution. The goal is to find decisions that are strong, practical, and defensible in a complex environment.
And this is exactly where simulation-based optimization delivers.
The real shift it introduces is conceptual rather than technical. Instead of asking what the best decision on paper is, you start asking what decision actually works in reality.
Simulation-based optimization helps you answer that question before you commit resources, before you take risks, and before the system responds in ways you did not expect.
And that is what makes it valuable.
Not just as a modeling technique, but as a better way to decide.