Difference between revisions of "Optimizer Attributes"

Line 28: Line 28:
 
| Hidden by default, visible if chosen
 
| Hidden by default, visible if chosen
 
|}
 
|}
<footer> Key Concepts: The Airline NLP Example / {{PAGENAME}} / Optimizer Function Reference</footer>
+
 
 +
== 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'''
 +
 
 +
<nowiki> </nowiki>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'''
 +
 
 +
<nowiki> </nowiki>Allows any double-precision decimal value between –10<sup>40</sup> to 10<sup>40</sup> . Although Analytica’s double float ranges from -8.988e10<sup>307</sup> to 8.988e10<sup>307</sup> (-2<sup>1023</sup> and 2<sup>1023),</sup> most optimizer engines treat anything larger than as equivalent to infinity.
 +
 
 +
'''Integer'''
 +
 
 +
<nowiki> </nowiki>Restricts values to integers.
 +
 
 +
'''Grouped Integer'''
 +
 
 +
<nowiki> </nowiki>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'''
 +
 
 +
<nowiki> </nowiki>Restricts values to either 0, 1.
 +
 
 +
'''Discrete'''
 +
 
 +
<nowiki> </nowiki>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'''
 +
 
 +
<nowiki> </nowiki>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'''
 +
 
 +
<nowiki> </nowiki>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.<footer> Key Concepts: The Airline NLP Example / {{PAGENAME}} / Optimizer Function Reference</footer>

Revision as of 03:32, 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:

  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 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.

Comments


You are not allowed to post comments.