## Performing constrained
optimization

Simulation design problems tend to have conflicting goals.
Usually there is a desired ideal response that cannot be obtained exactly due to
either modeling or physical constraints. The system response is determined by a
few variables that may in themselves be bounded. Mathematically, such a
situation is represented by:

Minimize or maximize *g*(*X*) subject to

*glb*_{i} ≤ *g*_{i}(*X*)*
*≤
*gub*_{i}
for *i=1,...,m, *

*xlb*_{j} ≤ *x*_{j} ≤*
xub*_{j}
for *j=1,...,n*,

*X* is a vector on *n* variables, *x*_{1
},...,x_{n}, and the functions *g*_{1
},...,g_{m} all depend on *X*.

The function to be minimized
*g*(*X*) is called the objective (or cost) function. Constraints are
given by the function *g*_{i}(*X*). The decision variables
*x*_{1 },...,x_{n}, may have bounds. The analogous data
structures are represented by the following blocks:

Block |
Purpose |

cost |
objective or cost
function |

globalConstraint |
constraint
functions |

parameterUnknown |
decision
variables |

Upper and lower bounds are set in the globalConstraint block for the constraint
functions, and upper and lower bounds are set in the parameterUnknown block for the decision
variables.

Embed uses first partial derivatives of each function
*g*_{i} with respect to each variable *x*_{j}. These
are automatically computed by finite difference approximations. After an initial
data entry segment, the program operates in two phases. If the initial values of
the variables you supply do not satisfy all *g*_{i} constraints, a
Phase I optimization is started. The Phase I objective function is the sum of
the constraint violations. This optimization run terminates either with a
message that the problem is infeasible or with a feasible solution. Beware that
if an infeasibility message is produced, it may be because the program became
stuck at a local minimum of the Phase I objective. In this case, the problem may
actually have feasible solutions.

Phase II begins with a feasible solution — either found by
Phase I or with you providing a starting point — and attempts to optimize the
objective function. After Phase II, a full optimization cycle has been
completed and summary output is provided.