alwaysIn

OPL constraint (scheduling) used on a cumulative function or a state function

Purpose

OPL constraint (scheduling) used on a cumulative function or a state function.

context type
Model files (.mod)
boolean (1 if the constraint is true, 0 otherwise)

Syntax

alwaysIn(f, u, v, hmin, hmax)
alwaysIn(f, a, hmin, hmax)


Where:

int u;
int v;               // u <= v
int hmin;            // 0 <= hmin
int hmax;            // hmin <= hmax
cumulFunction f;
stateFunction f;
dvar interval a;

Description

This constraint is used to confine the values of the cumulFunction or stateFunction f to the non-negative range [hmin, hmax]. The function is restrained to this range everywhere on the interval [u, v) or between the start and end of interval a, if present.

Note:
  • For a state function, alwaysIn allows the stateFunction to have the noState value, which will be displayed as -1 in scripting.

  • alwaysIn cannot be used on a meta-constraint.