Annotation Operator (Solver Foundation)

Adds metadata to a parameter, decision, constraint, or goal.

Annotation[expr, kind, value]

Example

Decisions[Reals, Annotation[x, “description”, “This is a decision”]]
Constraints[c1 -> Annotation[x == 0, “description”, “x must be zero”]]
Constraints[c1 -> Annotation[x == 0, “enabled”, False]]
Goals[Maximize[g1 -> Annotation[x, “order”, 1], g2 -> Annotation[y + z, “order”, 2]]

Annotations may be nested. There are three types of annotation.

  1. Description, which provides a human-readable description of a model element. It has a string value and applies to a parameter, decision, constraint, or goal.

  2. Enabled, which causes the model element to be ignored if its value is a. It has a Boolean value and applies to a constraint or goal.

  3. Order, which overrides the normal ordering of goals. It has a numeric value and applies to a goal.

See Also

Concepts

Optimization Modeling Language (OML)