Display of constraint results

Revision as of 22:05, 21 November 2017 by Lchrisman (talk | contribs) (Actual identifier of Sys_ComparisonTolerance)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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 preceded by {!}, e.g.,

{!}28 <= 21.

(New to Analytica 5.0) When the system variable Sys_ComparisonTolerance (actual identifier=Sys_ComparisonTolera) has a non-zero value, the {!} only appears when the amount of violation exceeds the value in Sys_ComparisonTolerance, which defaults to 1e-6. For example, this slight violation does not display {!}:

28.0000001 <= 28

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. The setting 'Precision' controls the amount by which the solver engines tolerate a constraint to be not-perfectly-satisfied, so if you set Sys_ComparisonTolerance to match, the display of {!} will come out consistently.

See Also


Comments


You are not allowed to post comments.