Changing Sense

Next, change the sense of the new3 constraint from to using the sense option of the change command. At the CPLEX> prompt type:

  change sense 

ILOG CPLEX prompts you to specify a constraint. There are two ways of specifying this constraint: if you know the name (for example, new3), you can enter the name; if you do not know the name, you can specify the number of the constraint. In this example, the number is 3 for the new3 constraint. Try the first method and type:

  Change sense of which constraint: new3 
  Sense of constraint 'new3' is '>='.

ILOG CPLEX tells you the current sense of the selected constraint. All that is left now is to enter the new sense, which can be entered as <=, >=, or =. You can also type simply < (interpreted as ) or > (interpreted as ). The letters l, g, and e are also interpreted as , , and = respectively.

  New sense ['<=' or '>=' or '=']: <= 
  Sense of constraint 'new3' changed to '<='.

The sense of the constraint has been changed.

The sense of the objective function may be changed by specifying the objective function name (its default is obj) or the number 0 when ILOG CPLEX prompts you for the constraint. You are then prompted for a new sense. The sense of an objective function can take the value maximum or minimum or the abbreviation max or min.


Previous Page: Changing Constraint or Variable Names   Return to Top Next Page: Changing Bounds