The CLP Procedure

LINCON Statement

  • LINCON linear_constraint-1 <…,linear_constraint-n>;

  • LINEAR linear_constraint-1 <…,linear_constraint-n>;

where linear_constraint has the form

linear_expression-l type linear_expression-r

where linear_expression has the form

<+|->linear_term-1 <…, (+|-) linear_term-n>

where linear_term has the form

(variable | number<* variable>)

The keyword type can be one of the following:

<, <=, =, >=, >, <>, LT, LE, EQ, GE, GT, NE

The LINCON statement allows for a very general specification of linear constraints. In particular, it allows for specification of the following types of equality or inequality constraints:

sigma-summation Underscript j equals 1 Overscript n Endscripts a Subscript i j Baseline x Subscript j Baseline left-brace less-than-or-equal-to StartAbsoluteValue less-than EndAbsoluteValue equals StartAbsoluteValue greater-than-or-equal-to EndAbsoluteValue greater-than vertical-bar not-equals right-brace b Subscript i Baseline normal f normal o normal r i equals 1 comma ellipsis comma m

For example, the constraint 4 x 1 minus 3 x 2 equals 5 can be expressed as

var x1 x2;
lincon 4 * x1 - 3 * x2 = 5;

and the constraints

StartLayout 1st Row 1st Column 10 x 1 minus x 2 2nd Column greater-than-or-equal-to 3rd Column 10 2nd Row 1st Column x 1 plus 5 x 2 2nd Column not-equals 3rd Column 15 EndLayout

can be expressed as

var x1 x2;
lincon 10 <= 10 * x1 - x2,
       x1 + 5 * x2 <> 15;

Note that variables can be specified on either side of an equality or inequality in a LINCON statement. Linear constraints can also be specified by using the CONDATA= data set.

Regardless of the specification, you must define the variables by using a VARIABLE statement or implicitly by specifying the USECONDATAVARS= option.

User-specified scalar values are subject to rounding based upon a platform-dependent tolerance.

Last updated: September 16, 2021