AMPL_SUFFIX#

group AMPL_SUFFIX

Suffixes available on AMPL entities and instances.

This group contains enumerations defining the string and numeric suffixes that can be queried on AMPL entities such as variables, constraints, objectives, sets, and parameters.

In AMPL, a suffix represents additional information associated with an entity or a specific instance of that entity. Typical examples include:

  • primal values

  • dual values (shadow prices)

  • bounds

  • slacks

  • reduced costs

  • solver status information

The C API provides functions such as:

to retrieve suffix values programmatically.

Suffixes are divided into:

Enums

enum AMPL_STRINGSUFFIX#

String-valued suffixes available on AMPL entities and instances.

These suffixes return string information associated with variables, constraints, and objectives (e.g., solver statuses or messages).

Values:

enumerator AMPL_ASTATUS#

Solver status of the individual entity (e.g., basic, nonbasic).

enumerator AMPL_SSTATUS#

Solver status in symbolic/string form.

enumerator AMPL_STATUS#

Solve status of the model or entity.

enumerator AMPL_MESSAGE#

Message returned by the solver.

enumerator AMPL_RESULT#

Result string returned by the solver.

enumerator AMPL_SENSE#

Optimization sense of an objective (e.g., “minimize”, “maximize”).

enum AMPL_NUMERICSUFFIX#

Numeric suffixes available on AMPL entities and instances.

These suffixes return numeric values associated with variables, constraints, and objectives, such as primal values, dual values, bounds, slacks, and reduced costs.

Values:

enumerator AMPL_VALUE#

Current value of the entity (primal value).

enumerator AMPL_DEFEQN#

Defined equation value.

enumerator AMPL_DUAL#

Dual value (shadow price).

enumerator AMPL_INIT#

Initial value provided by the user.

enumerator AMPL_INIT0#

Default initial value.

enumerator AMPL_LB#

Lower bound.

enumerator AMPL_UB#

Upper bound.

enumerator AMPL_LB0#

Original lower bound.

enumerator AMPL_UB0#

Original upper bound.

enumerator AMPL_LB1#

First lower bound (multi-bound context).

enumerator AMPL_UB1#

First upper bound (multi-bound context).

enumerator AMPL_LB2#

Second lower bound (multi-bound context).

enumerator AMPL_UB2#

Second upper bound (multi-bound context).

enumerator AMPL_LRC#

Lower reduced cost.

enumerator AMPL_URC#

Upper reduced cost.

enumerator AMPL_LSLACK#

Lower slack value.

enumerator AMPL_USLACK#

Upper slack value.

enumerator AMPL_RC#

Reduced cost.

enumerator AMPL_SLACK#

Slack value.

enumerator AMPL_BODY#

Constraint body value.

enumerator AMPL_DEFVAR#

Defined variable value (for defined constraints).

enumerator AMPL_DINIT#

Dual initial value.

enumerator AMPL_DINIT0#

Default dual initial value.

enumerator AMPL_LBS#

Lower bound slack.

enumerator AMPL_UBS#

Upper bound slack.

enumerator AMPL_LDUAL#

Lower dual value.

enumerator AMPL_UDUAL#

Upper dual value.

enumerator AMPL_VAL#

Value for logical constraints.

enumerator AMPL_EXITCODE#

Solver exit code for the objective.