Difference between revisions of "Optimizer Attributes"
Jhernandez3 (talk | contribs) |
Jhernandez3 (talk | contribs) |
||
Line 151: | Line 151: | ||
# Click OK. | # Click OK. | ||
− | [[File:6-1.png| | + | [[File:6-1.png|500px]] |
Specifying that there are NO Intrinsic Indexes | Specifying that there are NO Intrinsic Indexes |
Revision as of 04:17, 21 November 2015
This chapter describes the special node attributes used in optimization problems:
- Domain and Bounds
- Intrinsic Indexes
- Guess
Visible and Hidden Attributes
The default set of attributes Analytica displays depends on the edition. Standard attributes for Analytica Professional and Analytica Enterprise include Identifier, Title, Units, Description, and Definition. This chapter focuses on some additional attributes that are specific to Analytica Optimizer. These include:
Analytica Optimizer Attributes | Node Type | 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:
- Select Grouped Integer from the domain list.
- 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 and Bounds 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
Every Domain choice listed above can be entered in expression format. These expressions are fully generalized. They can even include array formulas and conditional statements.
To enter a domain in expression format, select Expression from the Domain pop-up menu in the Object window.
Domain expression syntax | Examples |
---|---|
Continuous(lb,ub) | Leaving bounds unspecified:
Assign upper and lower bounds:
|
Continuous(lb,ub,orZero:true)
Semi-continuous: Between bounds or zero. |
Lower bound only:Continuous(lb:1K, orZero:true)
Both bounds:
|
Integer(lb,ub) | Leaving bounds unspecified:Integer()
Assign upper and lower bounds:
|
Boolean() Restricts values to 0 or 1. |
Boolean()
|
Discrete(value1, value2, ...)
Variable can only take on listed values. |
Discrete(2,4,6,8)
|
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:
|
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 Chapter 3 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:
- Select Edit.
- Open the Object window for Decision or Constraint node
- Click the Indexes button next to the Intrinsic Index attribute. An index selection window will appear.
- 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.
- 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:
- Select Edit.
- Open the Object window for the Decision variable.
- Click the Indexes button next to the Intrinsic Index attribute. An index selection window will appear.
- 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.
- With the selected indexes list blank, Click OK.
- 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.
Enable comment auto-refresher