Pre-processing and Post-processing


[ Top of Page | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL | EKKSOS ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKCRSH - Crash: Produce a Starting Basis

This subroutine produces a good starting basis (historically referred to as "crash"). EKKCRSH tries to form a triangular basis. This has a tendency to improve feasibility. Thus, calling EKKCRSH before a solve subroutine can improve performance.

It is recommended that you not use this subroutine before calling EKKBSLV or EKKNSLV.

See "Performance Considerations" for more information on how to use EKKCRSH.

Syntax

FORTRAN 

CALL EKKCRSH(rtcod,dspace,type

C 

ekkcrsh(&rtcod,dspace,type); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

type
is the type of crash procedure to be used, where:

If type=1, dual feasibility may not be maintained.
If type=2, dual feasibility is maintained, if possible, by not pivoting in variables that are in the objective function.
If type=3, dual feasibility may not be maintained, but the sum of the infeasibilities will never increase.
If type=4, dual feasibility is maintained, if possible, by not pivoting in variables that are in the objective function.
In addition, the sum of the infeasibilities will never increase.

Specified as: a fullword integer. Its value must be 1, 2, 3, or 4.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Examples

Refer to the following sample programs for examples of using EKKCRSH:


[ Top of Page | EKKCRSH | EKKPRSL | EKKPSSL | EKKSCAL | EKKSOS ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKNLBS - Create a Basis of All Logical Variables

This subroutine creates a basis from logical variables. It need only be called if you are re-solving your problem with a new objective function, a new RHS, or similar changes, and you want a new basis that has not been affected by a previous solution or by a previous call to EKKCRSH.

Syntax

FORTRAN 

CALL EKKNLBS(rtcod,dspace

C 

ekknlbs(&rtcod,dspace); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

On Return
rtcod
is the return code for the subroutine, where:


See "Return Codes" for an explanation of return codes.

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.

If rtcod is non-zero, its value is the return code associated with the first occurrence of the highest severity message.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Examples

Refer to the following sample programs for examples of using EKKNLBS:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPSSL | EKKSCAL | EKKSOS ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKPRSL - Presolve: Reduce the Problem Size

This subroutine presolves a linear or a mixed-integer programming problem. EKKPRSL may change the allocation of storage in dspace. This subroutine is a companion to EKKPSSL. See "Performance Considerations" for information on how to use EKKPRSL and EKKPSSL to improve performance.

Syntax

FORTRAN 

CALL EKKPRSL(rtcod,dspace,unit,type

C 

ekkprsl(&rtcod,dspace,unit,type); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

unit
is the unit number specifying where the original matrix is written for EKKPSSL.


Specified as: a fullword integer; 0 unit 99.

Notes:

  1. If you are using any variant of UNIX or any PC operating system, unit cannot be 0, 2, or 5.
  2. If you are using MVS, see "Processing Your Program" for information on the JCL needed to specify a unit.
type
is the type of reduction to be done to the problem, where:

If type=0, the redundant rows are eliminated, the variables summing to zero are fixed. If just one variable in a row is not fixed, then the row is used to impose an implicit upper or lower bound on the variable, and then the row is eliminated.
If type=1, type=0 reductions are done and the doubleton rows are eliminated (where a doubleton row is in the form a ij x j + a ik x k = b i).
If type=2, type=0 reductions are done, and if rows in the form x 1 - x 2 - ... - x n = 0, are found (where each variable is non-negative), then x i (the row and column) is eliminated from the problem by expressing the variable in terms of the others without violating the nonnegativity constraints.
If type=3, all of the above are performed.

Specified as: a fullword integer. Its value must be 0, 1, 2, or 3.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. This subroutine should not be used with a quadratic or a network programming problem.
  2. Refer to "Sample FORTRAN Program EXMPRSL" for an example of the use of EKKPRSL and EKKPSSL with EKKMSLV.
  3. If possible, EKKPRSL creates a copy of the matrix stored by columns, and overwrites the old one.
  4. If the intunit specified in EKKMPS is nonzero (that is, you are using mixed-integer programming), then EKKPRSL performs a subset of what it would do if the value of intunit were zero. For example, normally given a doubleton row x - 2 y = 0, one of the two variables would be eliminated. However, if x and y are integer variables, then it is not valid to eliminate either of them.
  5. If EKKSSLV has indicated that your model is infeasible, but the sum of the infeasibilities is small, try solving your model both with and without EKKPRSL. Models with numerical stability problems may yield different results with and without EKKPRSL. With EKKPRSL, your model may be infeasible, while without EKKPRSL, it may be feasible, or vice versa.
  6. For example, if one of your constraints has the form x = 10000.0 * y + 1.0, EKKPRSL may eliminate x from the problem. If this is done, then x must exactly equal 10000.0 * y + 1.0 (that is, x must be greater than or equal to 1.0 because y is greater than or equal to 0). Otherwise, EKKSSLV will indicate that your model is infeasible. However, if EKKPRSL is not called, x will not be removed from the problem, and a solution such as y = -10 -8 , x = 0.9999 would be valid within tolerances.

  7. Before returning, EKKPRSL does a C equivalent to a FORTRAN REWIND for the file specified by unit.
  8. Since the library modules are written in C, a FORTRAN open statement can not be used to associate a named file with a unit to be supplied to any of the library I/O modules. The library routine EKKFOPN (which see at "EKKFOPN - Open and Connect Files to FORTRAN I/O Units") is provided to mimic the FORTRAN open statement without using the FORTRAN operating environment. Similarly, one can not use a FORTRAN close statement to dissociate a named file from the unit supplied to a library module, nor a FORTRAN rewind statement to reinitialize reading from a named file associated with a unit that has been supplied to a library module. EKKFCLS ("EKKFCLS - Close and Disconnect FORTRAN I/O Units") and EKKREW ("EKKFREW - Rewind Files Associated with FORTRAN I/O Unit numbers") have been provided for these purposes.
  9. If you are going to include calls to any of the parametrics and sensitivity analysis routines to analyze a problem that has been presolved with EKKPRSL, you should postsolve with EKKPSSL and then resolve with EKKSSLV before using the sensitivity or parametrics routines. For example:
CALL EKKSSLV(RTCOD,DSPACE,1,3)

Examples

Refer to the following sample programs for examples of using EKKPRSL:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKSCAL | EKKSOS ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKPSSL - Postsolve: Map the Solution Back to Original Variables

This subroutine maps the solution back to the original variables. This subroutine is a companion to EKKPRSL. See "Performance Considerations" for information on using EKKPSSL and EKKPRSL to improve performance.

Syntax

FORTRAN 

CALL EKKPSSL(rtcod,dspace,unit

C 

ekkpssl(&rtcod,dspace,unit); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

unit
is the unit number specifying where the information created by EKKPRSL was stored.


Specified as: a fullword integer where unit equals the value specified for the unit parameter in EKKPRSL.

Notes:

  1. If you are using any variant of UNIX or any PC operating system, unit cannot be 1, 2, or 6.
  2. If you are using MVS, see "Processing Your Program" for information on the JCL needed to specify a unit.
On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. This subroutine should not be used with quadratic or network programming problems.
  2. After a call to EKKPSSL, the solution will be primal and dual feasible, but there may not be an optimal basis. To get an optimal basis, issue the following call:
  3. CALL EKKSSLV(RTCOD,DSPACE,1,3)
  4. unit should be attached to a file that was created by EKKPRSL for this problem.
  5. Since the library modules are written in C, a FORTRAN open statement can not be used to associate a named file with a unit to be supplied to any of the library I/O modules. The library routine EKKFOPN (which see at "EKKFOPN - Open and Connect Files to FORTRAN I/O Units") is provided to mimic the FORTRAN open statement without using the FORTRAN operating environment. Similarly, one can not use a FORTRAN close statement to dissociate a named file from the unit supplied to a library module, nor a FORTRAN rewind statement to reinitialize reading from a named file associated with a unit that has been supplied to a library module. EKKFCLS ("EKKFCLS - Close and Disconnect FORTRAN I/O Units") and EKKREW ("EKKFREW - Rewind Files Associated with FORTRAN I/O Unit numbers") have been provided for these purposes.
  6. If EKKPRSL was called before scaling the matrix with EKKSCAL, then scaling is switched off.
  7. EKKPSSL restores the original bounds, while EKKMSLV will return with bounds that give the optimal integer solution. To use EKKPSSL you should save the values of all integer variables and, after EKKPSSL but before EKKSSLV, set both the lower and upper bounds on integer variables to these values. Refer to "Sample FORTRAN Program EXMPRSL" for an example of the use of EKKPRSL and EKKPSSL with EKKMSLV.
  8. If you are using EKKPSSL with EKKMSLV, and there are integer variables in the problem, note that not all of the variables are eligible for type 1 or 2 presolve, because integer variables may not be eliminated by these tests. Also, it is possible for presolve to declare the problem infeasible when there are integer variables in the problem. For example, x 0.99 is equivalent to x = 0, if x is known to be a nonnegative integer variable.
  9. If you are going to include calls to any of the parametrics and sensitivity analysis subroutines in your program you should call EKKSSLV after the call to EKKPSSL, but before any of the sensitivity/parametrics subroutines are called.

Examples

Refer to the following sample programs for examples of using EKKPSSL:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSOS ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKSCAL - Scale the Coefficient Matrix

This subroutine scales the coefficient matrix. Scaling increases numerical stability on many problems. Refer to "Performance Considerations" for additional information on scaling.

Syntax

FORTRAN 

CALL EKKSCAL(rtcod,dspace

C 

ekkscal(&rtcod,dspace); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. This subroutine cannot be used with network problems.
  2. EKKSCAL creates a new permanent copy of the matrix stored by columns in low storage.
  3. EKKSCAL should usually be called before calling EKKBSLV, to improve numerical stability.

Examples

Refer to the following sample programs for examples of using EKKSCAL:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKSOS - Identify Special Ordered Sets of Types 1 and 3

This subroutine identifies special ordered sets of types 1 and 3 in a 0-1 MIP problem. Refer to "Special Ordered Set (SOS)" for more information.

Syntax

FORTRAN 

CALL EKKSOS(rtcod,dspace

C 

ekksos(&rtcod,dspace); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.

If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. EKKSOS identifies special ordered sets implied by row constraints whose right hand side is 1. Thus, for example, the SOS of type 3 implied by
    2 x 1 + 2 x 2 = 2 would not be found.
  2. EKKSOS should be applied ONLY to an unscaled problem (that is, before calling EKKSCAL).
  3. EKKSOS should be called after the model has been loaded into the workspace, and before calling EKKMPRE and EKKMSLV. EKKSOS attempts to add special ordered sets of integers. If such sets are found, additionial space may be required for the internal array in which integer information is stored. Therefore, when using EKKSOS, it is wise to allow extra space for this information. You can do this by setting the integer control variable Imaxintinfo (number 53) to the negative of an estimate of the extra space required. This should be done after the call to EKKDSCM, but before any calls to EKKMPS, EKKLMDL, EKKIMDL, or EKKSMDL. The neccessary increment to the value of Imaxintinfo cannot exceed the number of nonzero coefficients of integer variables in the constraint matrix, but this may be a difficult datum to obtain, and it may still be a generous estimate.

Example

Refer to "Sample FORTRAN Program EXSOS" for an example of the use of EKKSOS with EKKMSLV.


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKBMPR - Transform a General MIP Problem into a 0/1 MIP Problem

This subroutine transforms a linear mixed-integer programming problem involving general integers into an equivalent 0/1 mixed-integer programming problem. This subroutine is a companion to EKKBMPS.

Syntax

FORTRAN 

CALL EKKBMPR(rtcod,dspace,unit,type

C 

ekkbmpr(&rtcod,dspace,unit,type); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

unit
is the unit number specifying where the transformation information is to be written for EKKBMPS.


Specified as: a fullword integer; 0 unit 99.

Notes:

  1. If you are using any variant of UNIX or any PC operating system, unit cannot be 0, 2, or 5.
  2. If you are using MVS, see "Processing Your Program" for information on the JCL needed to specify a unit.
type
is the type of transformation to be done to the problem, where:

If type=1, the general integers are replaced by a linear combination of binary variables in which the coefficients are the powers of 2. This is referred as a LOG2 transformation.
If type=2, the general integers are replaced by a linear combination of binary variables in which the coefficients are the natural numbers. This is referred as a SOS transformation.

Specified as: a fullword integer. Its value must be 1 or 2.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.

If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. To use this routine, you must specify an extra model to EKKDSCA, causing it to allocate additional workspace for the transformed 0/1 model. This should be done in an initial call to EKKDSCA that specifies one more model than the number of models being processed. For example, if EKKBMPR were to be used in a particular application in which you had only one model, then the call to EKKDSCA should specify two models. (EKKDSCA(rtcod,dspace,maxspc,2))
  2. EKKBMPR should be called immediately after loading the model into the workspace (by EKKMPS, EKKLMDL, EKKGTMI or EKKGTMD etc.).
  3. If you wish to set any control variables for EKKMSLV, then you must do so only after EKKBMPR has been called. This is because EKKMSLV is called for the model transformed by EKKBMPR. Note that all the MIP user exit routines now automatically apply to the transformed model, not the original one.
  4. Other utility routines such as EKKPRSL, EKKSCAL, EKKCRSH, etc. should be invoked after EKKBMPR has been called, since these routines should work on the transformed model.
  5. When EKKBMPR is called with type=1, the intermediate solutions generated by EKKMPRE and EKKMSLV may contain two or more entries corresponding to a column name of the original model. In this case, the correct value of such a column would be the sum total of all the integer values associated with this column name.
  6. If space is available, EKKBMPR creates a new copy of the matrix stored in vector-block format, and overwrites the old one. If space is unavailable, EKKBMPR exits with a non-zero return code.
  7. If you have not explicitly opened a file and associated it with unit using EKKFOPN ("EKKFOPN - Open and Connect Files to FORTRAN I/O Units"), then EKKBMPR opens and uses the file named fort.xx, where "xx" is the value of unit.
  8. You can not use a FORTRAN open statement to associate a named file with a unit to be supplied to EKKBMPR. EKKFOPN is provided to mimic the FORTRAN open statement without using the FORTRAN operating environment.
  9. Before returning, EKKBMPR closes the file associated with unit.
  10. On some problems, particularly small ones, the time required for the extra work (caused by EKKBMPR) done by EKKMPRE may result in a longer solution time. If it appears that the transformed problem will require more solution time than the original problem, remove the call to EKKBMPR before the call to EKKMSLV.

Example

Refer to "Sample C Program EXBMPR" for an example of the use of EKKBMPR and EKKBMPS with EKKMSLV.


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKSPAR | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKBMPS - Map the Solution Back to Original General Integer Variables

This subroutine maps the solution back to the original integer variables. This subroutine is a companion to EKKBMPR.

Syntax

FORTRAN 

CALL EKKBMPS(rtcod,dspace,unit

C 

ekkbmps(&rtcod,dspace,unit); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

unit
is the unit number specifying where the transformation information created by EKKBMPR was stored.


Specified as: a fullword integer where unit has the value specified for the unit parameter in the preceding call to EKKBMPR.

Notes:

  1. If you are using any variant of UNIX, or any PC operating system, unit cannot be 0, 2, or 5.
  2. If you are using MVS, see "Processing Your Program" for information on the JCL needed to specify a unit.
On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. If you have not explicitly opened a file and associated it with unit using EKKFOPN ("EKKFOPN - Open and Connect Files to FORTRAN I/O Units"), then EKKBMPS opens and uses the file named fort.xx, where "xx" is the value of unit. Of course, the file accessed by EKKBMPS must be a file that was created by EKKBMPR, or by a user supplied substitute that mimics EKKBMPR.
  2. You can NOT use a FORTRAN open statement to associate a named file with unit to be accessed by EKKBMPS. EKKFOPN is provided to mimic the FORTRAN open statement without using the FORTRAN operating environment.
  3. EKKBMPS should be called after the transformed model has been solved by EKKMSLV (and postsolved by EKKPSSL, if EKKPRSL was called after EKKBMPR).
  4. Before returning, EKKBMPS closes the file associated with unit.
  5. After a normal return from EKKBMPS, both bounds of each of the integer variables are set to the solution value for that integer variable.

Example

Refer to "Sample C Program EXBMPR" for an example of the use of EKKBMPR and EKKBMPS with EKKMSLV.


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKBMPS | EKKSOBJ | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKSPAR - Parametrically Analyze a Linear Programming Problem

This subroutine determines how an LP solution varies as the following are changed:

For more information on how to use EKKSPAR, refer to "Using LP Sensitivity Analysis and LP Parametrics".

Syntax

FORTRAN 

CALL EKKSPAR(rtcod,dspace

C 

ekkspar(&rtcod,dspace); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. The solution given to EKKSPAR to analyze must be an optimal basic solution. If it is not, EKKSSLV will be called with the primal option to arrive at an optimal solution.
  2. Before calling EKKSPAR, the appropriate delta vectors should be set up. The delta vectors are defined with either EKKMPS or EKKPMDL. The current settings of these vectors are available through EKKNGET as indices 57 through 61 (Nsparcost, Nsparrlo, Nsparrup, Nsparclo, and Nsparcup, respectively). The vectors are:

If you want to read in the delta vectors using EKKMPS, you must set the character control variables Cchangeobj, Cchangerhs, Cchangerange, and Cchangebounds to the names of the corresponding delta vectors in the MPS file before calling EKKMPS.

  1. EKKSPAR uses the real control variables Rslambda, Rslambdadelta, and Rslambdalim. These default to 0.0, 0.1, and 1.0 respectively. If you want different values for these control variables, use EKKRGET and EKKRSET to set the values before calling EKKSPAR. See "Using LP Sensitivity Analysis and LP Parametrics", for more information on using these control variables.
  2. If Rslambda is not set to 0.0, the solver routines will add Rslambda times the existing parametric adjustment vectors. EKKSPAR will begin at the optimum to the linear programming problem that corresponds to the initial value of Rslambda.
  3. EKKSPAR calls the EKKITRU user exit subroutine with reason=10 at an increment point, and with reason=11 at a basis point. For a description of these points, refer to "Using LP Sensitivity Analysis and LP Parametrics".
  4. When using EKKSPAR, it is often more efficient to solve the linear programming problem first. This allows you to use all the tools (EKKPRSL, EKKPSSL, EKKCRSH, EKKSCAL, EKKLPDC, or EKKBSLV) to solve the original problem as efficiently as possible before entering EKKSPAR. However, make sure that if EKKPRSL is used, you then call EKKPSSL, followed by a call to EKKSSLV, before the call to EKKSPAR.

Examples

Refer to the following sample programs for examples of using EKKSPAR:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKBMPS | EKKSPAR | EKKSBND | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKSOBJ - Analyze the Sensitivity of a Solution to Objective Function

This subroutine examines an LP problem and determines the sensitivity of the solution to the individual coefficients in the objective function (or "costs"). In other words, the subroutine determines to what extent the costs have to be changed to cause the optimum solution to occur at a different point (that is, with a different basis).

See "Using LP Sensitivity Analysis and LP Parametrics" for more information on how to use EKKSOBJ.

Syntax

FORTRAN 

CALL EKKSOBJ(rtcod,dspace

C 

ekksobj(&rtcod,dspace); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. Before using EKKSOBJ, you should have first found an optimal basic solution. This can be done by calling EKKSSLV, EKKNSLV, EKKMSLV, or EKKBSLV (with the automatic switch to EKKSSLV). Note that EKKMSLV sometimes modifies the original problem as part of its processing. If you call EKKSOBJ after EKKMSLV processing, you may be performing sensitivity analysis on this modified problem, and the results may not be the same as they would have been on the original continuous problem.
  2. EKKSOBJ analyzes only the impact of changes to the objective function, or "costs," for your linear programming problem. To analyze the impact of changes to the bounds of a variable or row on your optimum solution, use EKKSBND.
  3. The user exit subroutine EKKITRU is not called by EKKSOBJ, because no iterations are performed.
  4. EKKSOBJ sets the following index control variables: Nsobjupc, Nsobjdnc, Nsobjupv, Nsobjdnv, Nsobjupe, Nsobjdne, Nsobjupl, and Nsobjdnl. Information about the results of the objective function sensitivity analysis can be obtained directly from these arrays, or by calling EKKPRTS.
  5. The integer control variable Iprintsens is set by EKKSOBJ so that any subsequent calls to EKKPRTS print the maximum amount of sensitivity to objective function information. You can prevent this information from printing by setting Iprintsens after the call to EKKSOBJ, but before calling EKKPRTS.
  6. As a special notation, if any of the entries in the arrays indexed by Nsobjdnl, Nsobjupl, Nsobjupe, and Nsobjdne represent rows, the entries are negated. For example, if row 12 would enter the basis when the cost for column 1 was increased, the entry at the (Nsobjupe)th entry of mspace would be -12.
  7. Selection lists may be used to control the processing of EKKSOBJ. Selection lists affect the information that is printed by EKKPRTS as a result of a call to EKKSOBJ.
  8. Note that if a problem is presolved with EKKPRSL, it must be postsolved with a call to EKKPSSL, followed by a call to EKKSSLV, before a call to EKKSOBJ.
  9. If the output from EKKSOBJ indicates that a nonbasic variable enters and leaves the basis as the result of a cost perturbation, this means that the value of the variable would change from one bound to the other under the perturbation.

Examples

Refer to the following sample programs for examples of using EKKSOBJ:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKNFES ]
[ EKKQPAR | Bottom of Page | Index to Modules ]

EKKSBND - Analyze the Sensitivity of a Solution to Row and Column Bounds

This subroutine examines an LP problem and determines the sensitivity of the solution to changes in the bounds of a row or column (variable). EKKSBND finds the increase and decrease required in the bounds specified to force the basis to change. You can specify that EKKSBND ignore the opposite bound when dealing with a row's or column's upper or lower bound. This gives you the flexibility to investigate specific conditions, such as driving an upper bound below the lower bound to find the basis change.

See "Using LP Sensitivity Analysis and LP Parametrics" for more information on how to use EKKSBND.

Syntax

FORTRAN 

CALL EKKSBND(rtcod,dspace,type,respect

C 

ekksbnd(&rtcod,dspace,type,respect); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

type
is the type of analysis to be performed, where:

If type=1, perform sensitivity analysis on column bounds only.
If type=2, perform sensitivity analysis on row bounds only.
If type=3, perform sensitivity analysis on both column and row bounds.

Specified as: a fullword integer. Its value must be 1, 2, or 3.

respect
indicates the influence the bounds have on EKKSBND analysis, where:

If respect=1, ignore the bounds, and drive the variable or row values up and down until an interesting basis change occurs.
If respect=2, respect the bounds. For example, do not allow the analysis of a variable's upper bound to go below the lower bound.
If respect=3, look at the variables and rows to determine the treatment of the bounds. For nonbasic variables or rows, respect the bounds; for basic variables and rows, consider only the difference between the bounds and the value of the variable or row.

Specified as: a fullword integer. Its value must be 1, 2, or 3.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. Before calling EKKSBND, you should have first found an optimal basic solution. This can be done by calling EKKSSLV, EKKNSLV, EKKMSLV, or EKKBSLV (with the automatic switch to EKKSSLV). Note that EKKMSLV sometimes modifies the original problem as part of its processing. If you call EKKSBND after EKKMSLV processing, you may be performing sensitivity analysis on this modified problem, but the results may not be the same as they would have been on the original continuous problem.
  2. EKKSBND analyzes only the change required to the variable or row bounds to force the problem solution to a new basis. To analyze the sensitivity of the objective function, or "costs," for your linear programming problem, use EKKSOBJ.
  3. The user exit subroutine EKKITRU is not called by EKKSBND, because no iterations are performed.
  4. EKKSBND sets the following index control variables: Nsbndcupb, Nsbndcdnb, Nsbndcupy, Nsbndcdnv, Nsbndcupe, Nsbndcdne, Nsbndcupl, Nsbndcdnl, Nsbndrupb, Nsbndrdnb, Nsbndrupv, Nsbndrdnv, Nsbndrupe, Nsbndrdne, Nsbndrupl, and Nsbndrdnl. Information about the results of the bounds sensitivity analysis can be obtained directly from these arrays or by calling EKKPRTS.
  5. The integer control variable Iprintsens is set by EKKSBND so that any subsequent calls to EKKPRTS print the maximum amount of sensitivity to objective function information. You can prevent this information from printing by setting Iprintsens after the call to EKKSBND, but before calling EKKPRTS.
  6. Note that respect may have an influence on how far EKKSBND will examine the effect of a change in bounds. respect=1 is very permissive in how far the bounds may be ranged; respect=2 is somewhat permissive; and respect=3 is very restrictive of the allowed changes of the bounds.
  7. As a special notation, if any of the entries in the arrays indexed by Nsbndcupl, Nsbndcdnl, Nsbndcupe, Nsbndcdne, Nsbndrupl, Nsbndrdnl, Nsbndrupe, or Nsbndrdne represent rows, the entries will be negated. For example, if row 5 would enter the basis when the upper bound on column 1 was increased, the entry at the (Nsbndcupe)th entry of mspace would be -5.
  8. Selection lists may be used to control the processing of EKKSBND. Selection lists will affect the information that is printed by EKKPRTS as a result of a call to EKKSBND.
  9. If the problem was presolved with EKKPRSL, it must be postsolved with EKKPSSL, followed by a call to EKKSSLV, before the call to EKKSBND.

Examples

Refer to the following sample programs for examples of using EKKSBND:


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND ]
[ EKKQPAR | Bottom of Page | Index to Modules ]


EKKNFES - Analyze an Infeasible Linear Programming Problem

This subroutine analyzes a linear programming problem that has been found to be infeasible. 

Syntax

FORTRAN 

CALL EKKNFES(rtcod,dspace,mask,output,index,table

C 

ekknfes(&rtcod,dspace,mask,output,index,table); 

On Entry
dspace
is the user-provided work area.

Specified as: an array of doubleword reals.

mask
is a bit mask that determines the processing to be done. (Bit masks are explained in the description of EKKIGET, see "EKKIGET - Request Current Values of Integer Control Variables".)

If mask=0, nothing is done.
If 1 mask, the infeasibilities are identified by name. These are the rows and columns whose activities are outside their bounds.
If 2 mask, powerful infeasibilities are identified by name. These are the rows and columns, whose activities are outside their bounds, with the property that if the bounds on all the other infeasible rows and columns are relaxed, the resulting problem is still infeasible.
If 4 mask, powerful constraints are identified by name. These are row bounds, column bounds, or both with the property that if just this single constraint is relaxed, then the number of infeasibilities in the resulting problem is less (by at least half) than the number infeasibilities in the original problem.
If 8 mask, EKKNFES attempts to identify an irreducible infeasible subset (IIS) of constraints. These are row and column bounds with the property that if all the other constraints are relaxed, then the resulting problem will still be infeasible, but if then any one of the constraints from the IIS is also relaxed, the resulting problem will be feasible.

Specified as: a fullword integer. Its value must be one of 0 - 15.
 

Note:

If 8 is not mask, then EKKNFES will ignore input values in output and index

output
defines the mode of output to be used for identifying the elements of an irreducible infeasible subset found, where:

  If output=0, members of the IIS found (if any) will not be identified, either in output messages or by entries in a user supplied table, and the index and table parameters that are the fifth and sixth arguments of this subroutine will be ignored.
  If output=1, members of the IIS found (if any) will be identified only in output messages, and the index and table parameters will be ignored.
  If output=2, members of the IIS found (if any) will be identified only by entries in the index and table arrays.
  If output=3, members of the IIS found (if any) will be identified both in output messages and by entries in the index and table arrays.

Specified as: a fullword integer. Its value must be 1, 2, or 3.

index
is a nine element array of fullword integers. On input, the value of the first element of this array is the size of the table array.

Specified as: a nine element array of fullword integers.

table
is an array of fullword integers whose dimension is equal to the input value of the first element of the index array.

Specified as: an array of fullword integers.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message. In most cases where EKKNFES is dealing with infeasible problems, rtcod = 100. If rtcod = 0, the problem is feasible.
See "Return Codes" for an explanation of return codes.

If rtcod = 0,the subroutine completed successfully. Only informational messages were issued.

If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.

Returned as: a fullword integer.

dspace
is the user-provided work area.

Returned as: an array of doubleword reals.

index
is an array of integers that provide information on the table array.

If an IIS was identified, the first entry of the index array will be the number of elements in the IIS identified. If no IIS was identified, the first entry of the index array will be 0. In this case, the nonzero entries in the remaining places in the index array, if any, point to entries in the table array that correspond to constraints that were determined to belong to some IIS, even though the entire IIS was not identified.
  The second entry of the index array is the FORTRAN index into the table array of the first row number for which the associated row lower bound is a member of the IIS. If there are no row lower bounds in the IIS, then the value returned in the second entry of the index array will be 0.
  The third entry of the index array is the FORTRAN index into the table array of the last row number for which the associated row lower bound is a member of the IIS.
  The fourth entry of the index array is the FORTRAN index into the table array of the first row number for which the associated row upper bound is a member of the IIS. If there are no row upper bounds in the IIS, then the value returned in the fourth entry of the index array will be 0.
  The fifth entry of the index array is the FORTRAN index into the table array of the last row number for which the associated row upper bound is a member of the IIS.
  The sixth entry of the index array is the FORTRAN index into the table array of the first column number for which the associated column lower bound is a member of the IIS. If there are no column lower bounds in the IIS, then the value returned in the sixth entry of the index array will be 0.
  The seventh entry of the index array is the FORTRAN index into the table array of the last column number for which the associated column lower bound is a member of the IIS.
  The eighth entry of the index array is the FORTRAN index into the table array of the first column number for which the associated column upper bound is a member of the IIS. If there are no column upper bounds in the IIS, then the value returned in the eighth entry of the index array will be 0.
  The ninth entry of the index array is the FORTRAN index into the table array of the last column number for which the associated column upper bound is a member of the IIS.

Returned as: a nine element array of fullword integers.

table
is an array of row and column numbers whose upper bounds, lower bounds, or both make up the constraints of the IIS found. The order of the data returned is as follows: row numbers of rows whose lower bounds are members of the IIS, row numbers of rows whose upper bounds are members of the IIS, column numbers of columns whose lower bounds are members of the IIS, and finally column numbers of columns whose upper bounds are members of the IIS,

Returned as: an array of fullword integers.

Notes:

  1. If 8 is not mask, or if 8 mask and the input value of the first entry in the index array is 0, then EKKNFES will not store any data in the table array.
  2. If a row or column number appears in both the row and column sections of the table array, then the interpretation is that this row or column is fixed, and therefore, both its upper and lower bounds are in the IIS. If the input value of output, is 1 or 3, then this IIS element will be identified in an output message as having a "fixed value."

Notes

  1. To begin the infeasibility analysis, EKKNFES calls the SIMPLEX solver, EKKSSLV, with the weight of the objective function (corresponding to the real control variable Rmaxmin) set to zero. In effect, this presents a classic phase one problem to the solver, and it is this phase one problem that EKKNFES will analyze further. In particular, the infeasibilities of this problem will be identified and analyzed, if the mask parameter includes 1 and/or 2. This could produce results unexpected by the user, since the final state of the phase one problem may (probably will) have fewer infeasibilities than that of the original problem, with its composite objective function.
  2. EKKNFES will ignore user settings of the control variables Rmaxmin and Imaxiter. All other control variables are available for use in controlling EKKSSLV. In particular, you might want to set Rtolpinf and Rtoldinf, if the sum of infeasibilities is known to be either quite large or quite small.
  3. EKKNFES makes use of a copy of the constraint matrix in one block stored by columns. If EKKNFES finds that the constraint matrix is made up of several blocks, or is not stored by columns, then it will make a call to the utility program EKKNWMT to generate a copy of the constraint matrix in the required format. This copy of the matrix is left in dspace on exit.
  4. EKKNFES makes repeated calls to the simplex solver, EKKSSLV. For each successive call, the problem is modified only slightly, but these small changes accumulate and the time required to solve the problems can increase significantly.
  5. After a call to EKKPRSL, row numbers may be shuffled. The mapping from the original row numbers to the shuffled row numbers is saved with other presolve information in the presolve data file. EKKNFES does not read the presolve data file to obtain this mapping, and thus it may be unable to supply correct row names for a problem that has been presolved.
  6. You can take control after every iteration of EKKSSLV with the user exit subroutine EKKITRU. You should give careful consideration to whether you want to do this for the numerous calls to EKKSSLV that may be made by EKKNFES. See "Understanding Informational User Exit Subroutines" for more information about EKKITRU.

Example

Refer to "Sample FORTRAN Program EXNFES" for an example of the use of EKKNFES.


[ Top of Page | EKKCRSH | EKKNLBS | EKKPRSL | EKKPSSL | EKKSCAL ]
[ EKKSOS | EKKBMPR | EKKBMPS | EKKSPAR | EKKSOBJ | EKKSBND ]
[ EKKNFES | Bottom of Page | Index to Modules ]

EKKQPAR - Parametrically Analyze a Quadratic Programming Problem

This subroutine analyzes a parametric quadratic programming problem. Refer to "Quadratic Programming (EKKQSLV and EKKQPAR)" for more information on the parametric quadratic algorithm. Before calling EKKQPAR, a nonzero quadratic matrix must be created using EKKQMPS or EKKQMDL.

For parametrically analyzing a linear programming problem, use EKKSPAR.

Syntax

FORTRAN 

CALL EKKQPAR(rtcod,dspace,parrhs,parobj,lambdamin,lambdamax); 

C 

ekkqpar(&rtcod,dspace,parrhs,parobj,lambdamin,lambdamax); 

On Entry
dspace
is the user-provided work area.


Specified as: a one-dimensional real array of doublewords.

parrhs
is the parametric adjustment vector for the RHS.


Specified as: a one-dimensional real array of doublewords of size Inumrows, where Inumrows is an integer control variable.

parobj
is the linear cost parametric adjustment vector.


Specified as: a one-dimensional real array of doublewords of size Inumcols, where Inumcols is an integer control variable.

lambdamin
is the lower limit on the parametric adjustment vectors.


Specified as: a doubleword real; lambdamin ge 0.

lambdamax
is the upper limit on the parametric adjustment vectors.


Specified as: a doubleword real; lambdamax ge lambdamin.

On Return
rtcod
is the return code for the subroutine, where:

If rtcod = 0, the subroutine completed successfully. Only informational
messages were issued.
If rtcod is not zero, its value is the return code associated with the first occurrence of the highest severity message.
See "Return Codes" for an explanation of return codes.

Returned as: a fullword integer.

dspace
is the user-provided work area.


Returned as: a one-dimensional real array of doublewords.

Notes

  1. At entry to EKKQPAR, as well as at each distinct optimal basis encountered by the algorithm, a user exit subroutine, EKKITRU, is called (subject to Iiterufreq) so that the primal and dual solutions can be accessed.
  2. The parametric adjustment vector parrhs is incrementally added to both upper and lower bounds on constraint rows.

Examples

Refer to the following sample programs for examples of using EKKQPAR:


[ Top of Page | EKKBMPR | EKKBMPS | EKKCRSH | EKKNFES | EKKNLBS ]
[ EKKPRSL | EKKPSSL | EKKQPAR | EKKSBND | EKKSCAL | EKKSOBJ ]
[ EKKSOS | EKKSPAR | Index to Modules ]