Setting up the problem

Before you can perform constrained optimization, your diagram must be set up to compute the values of the constraint functions and the objective function for given values of the variables. This is accomplished using a cost block for the objective function and one globalConstraint block for each constraint.

Embed can solve problems without constraints. In this case, there are no globalConstraint blocks.