# Optimizing stochastic models

If your model is
stochastic, the
results of the single model run may not be representative. The OptQuest
Engine supports objective values that are based
on
experimentation through the General Replication Algorithm. This feature
allows the user to provide the OptQuest Engine with results of multiple
replications per simulation/iteration. The OptQuest Engine
allows
you to run a fixed number of replications per simulation or a varying
number of replications per simulation.

When running a varying number of replications, you will specify minimum
and maximum number of replications to be run. The OptQuest Engine will
always run the minimum number of
replications for a solution. OptQuest then determines if more
replications are needed. The OptQuest Engines stops evaluating
a
solution when one of the following occurs:

- The true objective value is within a given percentage of
the mean of the replications to date.
- The current replication objective value is not converging.
- The maximum number of replications has been run.

Optimization
experiment's properties view. Replications section

To
schedule fixed number of replications
- In the Projects
view, select the optimization experiment.
- In the Replications
section of the Properties view,
select the Use
Replications check box.
- Choose the Fixed
number of replications option.
- Specify the number of Replications
per iteration
in the edit box.

To
schedule varying number of replications
- In the Projects
view, select the optimization experiment.
- In the Replications
section of the Properties view,
select the Use
Replications check box.
- Choose the Varying
number of replications (Stop
replications after minimum
replications, when confidence level is reached) option.

- Specify the minimum number of replications in the Minimum replications edit
box.
- Specify the maximum number of replications in the Maximum replications
edit box.
- Define the Confidence
level to be evaluated for the objective.
- Specify the percent of objective for which the confidence
level is determined in the Error
percent field.

#### Related topics