Optimizer Attributes

All editions of Analytica show the Identifier, Title, Units, Description, and Definition for each variable. This page describes Attributes of Variables that have specific use in optimization problems, which are always visible or can be made visible in the Optimizer edition.

Optimizer Attributes Object Class Visibility
Domain and Bounds Decision Always visible
Intrinsic Indexes Decision, Constraint Always visible
Initial Guess Decision Hidden by default, visible if chosen

Domain and Bounds

The domain attribute specifies the set of possible values for a variable. In general, a domain can be various combinations of continuous or discrete, and bounded or unbounded. The grouped integer category is a special case, requiring variables to be discrete, bounded, and unique within a variable group.

In most cases, you can specify the desired domain using the convenient popup menus in the Object window for a decision variable. Domains can also be entered in expression format which can add more flexibility (using array-based expressions for example).

Bounds

Entering bounds will constrain the variable within lower and upper limits. These do not count as constraints for optimization engines that impose limitations on the total number of constraints.

Domains

Automatic

By default, the domain for a new decision variable is set to Automatic. This setting allows Analytica to determine appropriate domain based on the definition of the variable, leaving it unbounded. The domain will automatically switch from Automatic to Continuous when bounds are applied.

Continuous

Allows any double-precision decimal value between –1040 to 1040 . Although Analytica’s double float ranges from -8.988e10307 to 8.988e10307 (-21023 and 21023), most optimizer engines treat anything larger than as equivalent to infinity.

Integer

Restricts values to integers.

Grouped Integer

Some optimization problems require a solution where each variable is assigned a unique value among discrete choices. The Grouped Integer domain establishes a sequence of integers 1 through N, where N is the size of the group. All decision variables in the group are assigned an integer, and no two scalar values can share the same assignment.

If all elements of the decision array belong to the same group:

1. Select Grouped Integer from the domain list.
2. Enter a group name (optional if there is only one group in your model).

Multiple decision nodes can share the same group name if all scalar values in the combined must have unique values. The size of the integer group is equal to the total number of scalar decision values assigned to it. If an array is assigned to a group, the group will contain all scalar elements in the array.

You can assign multiple groups within the same decision node by entering the Grouped Integer information in expression mode and entering an array expression for the group name parameter. (See Domain Expressions) This advanced technique is demonstrated in the Sudoku with Optimizer.ana example file.

Boolean

Restricts values to either 0, 1.

Discrete

This pop-up menu choice is not used in Optimization problems because discrete values must be listed explicitly. Instead of this choice, use Explicit Values or the Discrete() function in expression format.

Explicit Values

This choice allows you to enter a list of possible values for the variable. These can be numbers, expressions, or text strings.

Copy from Index

This choice populates the explicit values list using the elements of an existing index.

Domain and Bounds Expressions

Each type of Domain listed above can be specified as an expression. These expressions are fully generalized. smf even include arrays and conditional statements. To specify a domain as an expression, select Expression from the Domain pop-up menu in the Object window.

Domain expression syntax Examples
Continuous(lb, ub) Leaving bounds unspecified:

Continuous()

Continuous (lb: 0, ub: 2.734)

Continuous(0, 2.734)

Continuous(lb, ub, orZero: true)

Semi-continuous: Between bounds or zero.

Lower bound only:
Continuous(lb: 1K, orZero: true)

Both bounds:

Continuous(lb:10, ub:15, orZero:true)

Integer(lb,ub) Leaving bounds unspecified:
Integer()

Integer(lb: 0, ub: 3)

Integer(0, 3)

Boolean()

Restricts values to 0 or 1.

Boolean()
Discrete(value1, value2, ...)

Variable can only take on listed values.

Discrete(2, 4, 6, 8)Discrete("Win", "Place", "Show")
GroupedInteger(GroupName)

All variables within the same group are assigned different integer values.

Single group assignment:
GroupedInteger("Sales_Ranking")

Assign multiple groups using an array expression:

GroupedInteger("C"&Column_index)

Intrinsic Indexes

Intrinsic Index attributes are present in Decision and Constraint nodes. Analytica incorporates designated intrinsic indexes within optimizations and avoids abstracting over them. See Optimizing with Arrays for a more complete explanation of the meaning of intrinsic and extrinsic indexes in the context of optimizations.

Specifying Intrinsic Indexes

To populate the Intrinsic index list:

1. Select Edit .
2. Open the Object window for Decision or Constraint node
3. Click the Indexes button next to the Intrinsic Index attribute. An index selection window will appear.
4. Select the desired indexes from the list on the left. Click the transfer button to move them to the selected indexes list on the right.
5. Click OK.

Specifying that there are NO Intrinsic Indexes

You can explicitly specify that a Decision should NOT have any intrinsic indexes. This means that the optimizer will treat the Decision as a single scalar value within any single optimization. This makes all dimensions of the array eligible for abstraction, whereby Analytica will perform separate optimizations for every element of the array.

To specify scalar status for a decision:

1. Select Edit .
2. Open the Object window for the Decision variable.
3. Click the Indexes button next to the Intrinsic Index attribute. An index selection window will appear.
4. If there are any indexes in the selected indexes list on the right, use the transfer button to move them back to the available indexes list on the left.
5. With the selected indexes list blank, Click OK.
6. A dialog box will appear asking if you want to clear index status (leaving status unspecified) or to specify the node as scalar. Choose Scalar.

Leaving Intrinsic Index lists unspecified

If you leave the Intrinsic Index list unspecified, Analytica will analyze the optimization problem to infer the intrinsic indexes of your unspecified decision or constraint using heuristics. Although these inference algorithms are complex, there are a few guidelines:

• Indexes appearing in the various attributes of a decision — the definition, domain and bounds, or initial guess — provide the heuristics with a set of candidate indexes. If an index doesn’t appear in any of these attributes, it won’t be inferred to be an intrinsic or extrinsic index of the decision.
• If your model operates over a candidate index, such that the index is eliminated by the time a downstream constraint or objective is computed, then the index is inferred to be intrinsic.
• If an index is explicitly declared as intrinsic, or inferred to be intrinsic, in another decision or constraint within the optimization problem, then it is usually taken to be intrinsic to the decision or constraint in question.
• Extra dimensions in a decision’s domain, bounds, or initial guess that aren’t inferred to be intrinsic are inferred to be extrinsic. Extra dimensions found in the definition are inferred to be parametric and ignored for the purposes of optimization.
• Given the explicit and inferred intrinsic index assignment for all decisions, any indexes that end up in the objective are taken to be extrinsic.
• Extra dimensions in a constraint are inferred to be intrinsic if they appear specified elsewhere in the optimization as intrinsic, otherwise, they are inferred to be extrinsic.
Tip
If there is any question about index status, consider the question, “Does the optimizer need to consider all elements of this index for an overall solution?” If YES, list the index in the Intrinsic Indexes attribute.

Initial Guess

Initial guesses are utilized for optimizations that use gradient search methods. These include non-convex QP problems and all NLP problems. Initial guess values will be ignored if they don’t apply to the problem type.

By default, the defined value of the input decision node will be used as an initial guess for the optimization. Therefore, the initial guess attribute is hidden by default. If used, the initial guess attribute will override the defined value of the node.

To use the defined value of the Decision node as an initial guess

• (No action necessary. Keep the Initial Guess attribute hidden)

To enter an Initial Guess that overrides the defined value of the Decision input node:

1. Select Attributes from the Object menu.
2. Check the Initial Guess box.
3. Open the Object window of the Decision node.
4. Enter override value in the Initial Guess attribute.

You can use general Analytica expressions as initial guesses, including expressions that are conditional or array valued.

Tip
The Initial Guess attribute is a good way to run multiple optimizations with different starting points. If the Initial Guess expression evaluates to an array with dimensions that are not intrinsic elsewhere in the optimization, Analytica will perform separate optimizations for each starting point.

To return an Initial Guess to the default state (not visible)

1. Delete all Initial Guess expressions.
2. Select Attributes from the Object menu.
3. Uncheck the Initial Guess box.