Up to this point all of the changes that have been made could be referenced by specifying a single constraint or variable. In changing a coefficient, however, a constraint and a variable must be specified in order to identify the correct coefficient. As an example, let's change the coefficient of x3 in the new3 constraint from 3 to 30.
x3
new3
As usual, you must first specify which change command option to use:
change
change coefficient
You must now specify both the constraint row and the variable column identifying the coefficient you wish to change. Enter both the constraint name (or number) and variable name (or number) on the same line, separated by at least one space. The constraint name is new3 and the variable is number 3, so in response to the following prompt, type new3 and 3, like this, to identify the one to change: Change which coefficient ['constraint' 'variable']: new3 3 Present coefficient of constraint 'new3', variable '3' is 3.000000.
3
Change which coefficient ['constraint' 'variable']: new3 3 Present coefficient of constraint 'new3', variable '3' is 3.000000.
Change which coefficient ['constraint' 'variable']: new3 3
Present coefficient of constraint 'new3', variable '3' is 3.000000.
The final step is to enter the new value for the coefficient of x3. Change coefficient of constraint 'new3', variable '3' to what: 30 Coefficient of constraint 'new3', variable '3' changed to 30.000000.
Change coefficient of constraint 'new3', variable '3' to what: 30 Coefficient of constraint 'new3', variable '3' changed to 30.000000.
Change coefficient of constraint 'new3', variable '3' to what: 30
Coefficient of constraint 'new3', variable '3' changed to 30.000000.
To change a coefficient in the objective function, or in the right-hand side, use the corresponding change command option, objective or rhs. For example, to specify the right-hand side of constraint 1 to be 25.0, we could enter the following (but for this tutorial, do not enter this now):
objective
rhs
change rhs 1 25.0