What is simulation optimization?

Searching for the best settings of a model's decisions by repeatedly running the simulation and comparing the results.

Simulation optimization diagram example

Public diagram from the Machinations Community. Open it on its own page

Simulation optimization is a method for finding the decision settings, such as staffing levels or prices, that give the best result in a simulation model. A search procedure proposes settings, the simulation evaluates them, and the search uses the answer to propose better ones. It matters because simulation models can show what happens under a setting but cannot say by themselves which setting is best.

How it works

There are three parts. The decision variables are the inputs that you control. The objective is the measure to maximize or minimize, such as profit or waiting time. The constraints are limits, such as a budget or a maximum wait. A search method, from simple grid search to genetic or gradient-based search, picks the next settings to try. Each try requires one or more simulation runs.

When the model is stochastic, each evaluation is noisy, so each setting needs several runs and the search must allow for noise. It is also easy to over-fit, picking a setting that wins on this model but not in reality. A parameter sweep tries a fixed grid of settings, while optimization searches adaptively. Check the winner with sensitivity analysis.

Example

Say a clinic can choose between 2 and 8 nurses. The objective is to minimize cost per patient, which is salary cost plus a penalty for waiting. Simulating each option gives 2 nurses at 62 per patient, 3 at 48, 4 at 41, 5 at 43, 6 at 49. The best choice is 4 nurses. More staff costs more than the waiting it saves, and fewer leaves long queues. This is an illustration with round numbers.

How to model it in Machinations

Place the decision in a Register moved by a Lever, and the objective in another Register, for example net profit. Play with a Forecast at several Lever values and compare the result ranges. Choose the setting with the best typical outcome and an acceptable worst case. The Pool and chart show how the objective behaves over time.

See simulation optimization in a system you can Play

Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.