Difference between revisions of "Display of constraint results"

m
Line 4: Line 4:
 
[[Analytica User Guide]] > [[Formatting Numbers, Tables, and Graphs]] > [[Display of constraint results]]
 
[[Analytica User Guide]] > [[Formatting Numbers, Tables, and Graphs]] > [[Display of constraint results]]
  
Constraint nodes are used in Analytica Optimizer models, and are defined as a comparison such as '''x+y <= z'''. When the result of a constraint node is displayed, both the left-hand and right-hand side values of the comparison are displayed using the selected number format. For example, the constraint might contain the definition:
+
Constraint nodes are used in Analytica [[Optimizer]] models (not usable in lower Editions of Analytica. The Definition of a Constraint is a comparison such as '''x+y <= z'''.  
 +
 
 +
When displaying the result of a constraint it evaluates and displays the result of the left-hand and right-hand side values, which it displays along with the comparison operator using the selected number format. For example, the constraint defined as
 
:<code>GetFract(Expenses,75%) <= GetFract(Revenue,25%)</code>
 
:<code>GetFract(Expenses,75%) <= GetFract(Revenue,25%)</code>
  
but when the result of the constraint is displayed, a cell in the result displays might display as:
+
might show as a result as:
 
:<code>845.1 <= 12.3K</code>
 
:<code>845.1 <= 12.3K</code>
  
Not that in a non-constraint node, the result of a comparison would display as a boolean value, i.e., 0 or 1.
+
Note that in a non-constraint node, the result of a comparison would display as a Boolean value, i.e., 0 or 1 (False or True).
 +
 
 +
When the constraint is violated the display is proceeded by <code>{!}</code>, e.g.,
 +
 
 +
<code>{!}28<=21</code>.  
  
When the constraint is violated the display is proceeded by <code>{!}</code>, e.g., <code>{!}28<=21</code>. This display is helpful when debugging optimization models, since it allows you to see the actual values of each side of the constraint. When the '''Boolean '''number format is selected, the comparison display is not used -- <code>True</code> is displayed when the constraint is satisfied, <code>False</code> when it is violated. Beware that the optimizer solver engines generally find solutions that are within an epsilon of satisfying each constraint, but when displaying the constraint result, you will see <code>False</code> when the constraint is violated only by epsilon and the solver engine considers it satisfied.
+
This information can help you debug an optimization model by showing the actual values of each side of the constraint. If you select the '''Boolean '''number format, it doesn't show the comparison display but rather <code>True</code> is displayed when the constraint is satisfied, <code>False</code> when it is violated. Beware that the optimizer solver engines sometimes find solutions that are within an epsilon (tiny number) of satisfying each constraint, and may show the constraint result as <code>False</code> because the constraint is violated only by epsilon, even though the solver engine considers it satisfied.
  
 
==See Also==
 
==See Also==

Revision as of 23:32, 7 September 2015


Analytica User Guide > Formatting Numbers, Tables, and Graphs > Display of constraint results

Constraint nodes are used in Analytica Optimizer models (not usable in lower Editions of Analytica. The Definition of a Constraint is a comparison such as x+y <= z.

When displaying the result of a constraint it evaluates and displays the result of the left-hand and right-hand side values, which it displays along with the comparison operator using the selected number format. For example, the constraint defined as

GetFract(Expenses,75%) <= GetFract(Revenue,25%)

might show as a result as:

845.1 <= 12.3K

Note that in a non-constraint node, the result of a comparison would display as a Boolean value, i.e., 0 or 1 (False or True).

When the constraint is violated the display is proceeded by {!}, e.g.,

{!}28<=21.

This information can help you debug an optimization model by showing the actual values of each side of the constraint. If you select the Boolean number format, it doesn't show the comparison display but rather True is displayed when the constraint is satisfied, False when it is violated. Beware that the optimizer solver engines sometimes find solutions that are within an epsilon (tiny number) of satisfying each constraint, and may show the constraint result as False because the constraint is violated only by epsilon, even though the solver engine considers it satisfied.

See Also

Date formats <- Display of constraint results -> Multiple formats in one table
Comments


You are not allowed to post comments.