The MIP User Exit Subroutines

This chapter describes the MIP user exit subroutines EKKBRNU, EKKCHNU, EKKCUTU, EKKEVNU, EKKHEUU, EKKNODU, and EKKSLVU, which you can use to affect the processing of a MIP problem. "Understanding Mixed-Integer User Exit Subroutines" has more information about how to use these subroutines. Sample subroutines appear in "Sample Mixed-Integer User Exit Subroutines".


[ EKKCHNU | EKKCUTU | EKKEVNU | EKKHEUU | EKKNODU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKBRNU - Branch User Exit Subroutine

EKKBRNU is called from EKKMSLV, and it allows you to override a branching choice.

Note:

EKKBRNU can only be written in C or FORTRAN. EKKBRNU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkbrnu(double *dspace, int * mspace, int * reason, int * iarray, double * rarray, int * userrtcd);
FORTRAN  EKKBRNU(dspace,mspace,reason,iarray,rarray, userrtcd)
On Entry
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Specified as: a one-dimensional array of fullword integers with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

reason
is the situation when EKKBRNU is called, where:

If reason=1, the subroutine is being called before any set is processed, and iarray and rarray are not used.
If reason=2, the subroutine is being called before processing each set, and only: set number, type of set, priority, and number in set are valid in iarray and rarray.
If reason=3, the subroutine is being called after processing each variable in the set, and all of iarray and rarray are valid, and you may change pseudocosts (takes effect on the next branch).
If reason=4, the subroutine is being called after processing each set, and all of iarray and rarray are valid, and you may change variable number and priority (takes effect on next branch).
If reason=5, the subroutine is being called after processing all sets, and all of iarray and rarray are valid, and the set number is the chosen set, which you may now change.

Specified as: a fullword integer

iarray
is an array of special ordered set information, where:

The first element of iarray identifies the number of the set being processed.
The second element of iarray identifies the type of the set being processed, where:

If the second element of iarray is 1, a SOS of type 1 is processed
  (original definition, just one nonzero allowed).
If the second element of iarray is 2, a SOS of type 2 is processed
  (one or two adjacent nonzeros allowed).
If the second element of iarray is 3, a SOS of type 3 is processed
  (0-1, and just one nonzero allowed).
If the second element of iarray is 4, the single variables are processed
  (a set only in terms of priority).
The third element of iarray is the branching priority (1 is highest).
The fourth element of iarray is the number of variables in the set
  (a variable may be in more than one set).
The fifth element of iarray is the variable column number of the current variable.
The sixth element of iarray identifies the direction of the branching, where: If the sixth element of iarray equals 0, the next branch is down.
If the sixth element of iarray equals 1, the next branch is up.

Specified as: a one-dimensional array of integers.

rarray
is an array of values, where:

The first element of rarray is the current value of the variable in the continuous solution.
The second element of rarray is the down pseudocost.
The third element of rarray is the up pseudocost for single variables. For sets
     it is the reference row entry. When reason=4, it is the branch point for
     special ordered sets.
The fourth element of rarray is the estimated degradation for the down branch.
The fifth element of rarray is the estimated degradation for the up branch.

Specified as: a one-dimensional array of doublewords.

userrtcd
is the user return code from this user exit subroutine. This will be set to 1 on entry on the first call for each set (when reason=2) If you set this to 0 before returning to the calling routine, then EKKBRNU will be called for each variable in the set. If userrtcd is still nonzero, then EKKBRNU will only be called after the set. This will allow improved performance by not calling this subroutine needlessly.

Specified as: a one-dimensional integer array of fullwords.

On Return
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Returned as: a one-dimensional array of fullword integers with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

iarray
is an array of special ordered set information, where:

The first element of iarray is the number of the set being processed.

If reason=5, this is the chosen set and may be changed. To insure the use of your choice of branching strategy instead of the default, set the chosen set to the negative of the one you want.

Note:

If you set the first element of iarray to 0, the solution will be declared integer feasible. Similarly, if the solution has been declared integer feasible (the first element of iarray was set to 0 on entry), you can reset the first element of iarray to force further branching  

The fifth element of iarray is the variable column number of the current variable.

If reason=4, this is the chosen variable and may be changed.
The sixth element of iarray identifies the direction of the branching, where:
If the sixth element of iarray equals 0, the next branch is down.
If the sixth element of iarray equals 1, the next branch is up.

Returned as: a one-dimensional array of integers.

rarray
is an array of values, where:

The second element of rarray is the down pseudocost.
The third element of rarray is the up pseudocost for single variables. For sets
     it is the reference row entry. When reason=4, it is the branch point for
     special ordered sets.

Note:

If you set the second or third element of rarray, or both, they will be used on the next branch  

Returned as: a one-dimensional array of doublewords.

userrtcd
is the user return code from this user exit subroutine. This will be set to 1 on entry on the first call for each set (when reason =2) If you set this to 0 before returning to the calling routine, then EKKBRNU will be called for each variable in the set. If userrtcd is still nonzero, then EKKBRNU will only be called after the set. This will allow improved performance by not calling this subroutine needlessly.

Returned as: a one-dimensional integer array of fullwords.

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKBRNU, and to "Mixed-Integer User Exit EKKBRNU" and "Mixed-Integer User Exit EKKBRNU2" for sample subroutines.


[ EKKBRNU | EKKCUTU | EKKEVNU | EKKHEUU | EKKNODU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKCHNU - Choose Node User Exit Subroutine

EKKCHNU is called from EKKMSLV, and it allows you to modify the choice of nodes during branch-and-bound processing.

Note:

EKKCHNU can only be written in C or FORTRAN. EKKCHNU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkchnu(double *dspace, int * mspace, int * reason, int * iarray, double * rarray, int * userrtcd);
FORTRAN  EKKCHNU(dspace,mspace,reason,iarray,rarray, userrtcd)
On Entry
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Specified as: a one-dimensional integer array of fullwords with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

reason
is the situation when EKKCHNU is called, where:

If reason=1, the subroutine is being called before going through the list of active nodes.
If reason=2, the subroutine is being called as each active node is processed.
If reason=3, the subroutine is being called after going through the list of active nodes.

Specified as: a fullword integer.

iarray
is an array of branch and bound search information, where:

The value of the first element of iarray depends on the value of reason.

If reason=1, the first element of iarray is the number of active nodes,
     and the rest of iarray and all of rarray are not meaningful.
If reason=2, the first element of iarray is the number of the current node.
If reason=3, the first element of iarray is the number of the chosen node,
     and the rest of iarray and all of rarray are not meaningful.
The second element of iarray is the number of unsatisfied variables.
The third element ofiarray is the depth of the node.
The fourth element of iarray identifies the branch type being processed, where:
If the fourth element of iarray is 1, a SOS of type 1 is processed
  (original definition, just one nonzero allowed).
If the fourth element of iarray is 2, a SOS of type 2 is processed
  (one or two adjacent nonzeros allowed).
If the fourth element of iarray is 3, a SOS of type 3 is processed
  (0-1, and just one nonzero allowed).
If the fourth element of iarray is 4, the single variables are processed
  (a set only in terms of priority).
The fifth element of iarray is the variable column number, or the set number for SOSs.
The sixth element of iarray identifies the direction of the branching, where:
If the sixth element of iarray equals 0, the next branch is down.
If the sixth element of iarrayequals 1, the next branch is up.

Specified as: a one-dimensional array of full word integers.

rarray
is a array of values, where:

The first element of rarray is the estimated degradation.
The second element of rarray is the solution value of the parent node.
The third element of rarray is the value of the continuous variable in
  the parent/reference value where the set was split.
The fourth element of rarray is the sum of integer infeasibilities.

Specified as: a one-dimensional array of doublewords.

userrtcd
is the user return code from this user exit subroutine. When reason=1, userrtcd is set to 1 on entry on the first call. If you set this to 0 before returning to the calling routine, EKKCHNU will be called with reason=2 If userrtcd is still nonzero, then EKKCHNU will be called only at the end of the list. This will allow improved performance by not calling this subroutine needlessly.

Specified as: a fullword integer.

Note:

If reason does not equal 1, userrtcd is ignored  

On Return
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Returned as: a one-dimensional integer array of fullwords with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

iarray
is an array with node information in its first element, if the value of reason is 3:
If reason=3, the first element of iarray is the number of the chosen node, and the rest of iarray and all of rarray are not meaningful. You may reset the first element of iarray at this point to change the choice of node.

Returned as: a one-dimensional array of integers.

userrtcd
is the user return code from this user exit subroutine. When reason=1, userrtcd is set to 1 on entry on the first call. If you set this to 0 before returning to the MIP processing routine, then EKKCHNU will be called with reason=2 If userrtcd is still nonzero, then EKKCHNU will only be called at the end of the list. This will allow improved performance by not calling this subroutine needlessly.

Returned as: a fullword integer.

Note:

If reason does not equal 1, userrtcd is ignored  

Note

This subroutine allows you to change the choice of the node using any criteria you want (for example, some rule balancing the objective with the number of integer infeasibilities).

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKCHNU, and to "Mixed-Integer User Exit EKKCHNU" for a sample subroutine.


[ EKKBRNU | EKKCHNU | EKKEVNU | EKKHEUU | EKKNODU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKCUTU - Cut Generation User Exit Subroutine

EKKCUTU allows you to generate "cuts", or additional constraint rows, to a problem matrix. It is called during EKKMPRE preprocessing, or during supernode processing in EKKMSLV.

Note:

EKKCUTU can be written in FORTRAN or C EKKCUTU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkcutu(double *dspace, int * mstatbin, int * mtobin, int * mcadd, int * mradd, double * deadd, int * nbin, int * nadd, int * naddmax, int * nrow, int * nrowmax);
FORTRAN  EKKCUTU(dspace,mstatbin,mtobin,mcadd,mradd, deadd, nbin, nadd, naddmax,nrow,nrowmax)
On Entry
dspace
is the user-provided work area.

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

mstatbin
is the current status of the 0-1 variables, where:

If the pth element of mstatbin = 0, the pth 0-1 variable has not been fixed.
If the pth element of mstatbin = -1, the pth 0-1 variable has been fixed down to 0.
If the pth element of mstatbin = 1, the pth 0-1 variable has been fixed up to 1.

Specified as: a one-dimensional integer array of length nbin.

mtobin
is an array with an entry for each variable in the problem. The entry describes the type of variable, where:

If the pth entry in mtobin = 0, & nbsp; the pth variable is continuous.
If the pth entry in mtobin is < 0, the pth variable is an integer variable
     that is not a 0-1 variable.
If the pth entry in mtobin is > 0, the pth variable is a 0-1 integer variable.
     In this case, the pth entry in mtobin is the FORTRAN index into the
     mstatbin array of the entry corresponding to the pth problem variable.

Specified as: a one-dimensional integer array of fullwords of length Inumcols.

mcadd
is the column indices of the cuts to be added.

Specified as: a one-dimensional integer array of fullwords of maximum length naddmax.

mradd
is the row indices of the cuts to be added.

Specified as: a one-dimensional integer array of fullwords of maximum length naddmax.

deadd
is the elements in the cuts to be added.

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

nbin
is the number of 0-1 variables contained in mstatbin.

Specified as: a fullword integer.

nadd
is the current combined number of entries in mcadd, mradd, and deadd.

Specified as: a fullword integer.

naddmax
is the maximum number of entries allowed in the matrix. It is the amount of space available in dspace for cuts at the time EKKCUTU was called.

Specified as: a fullword integer.

nrow
is the current number of rows in the matrix (including the added cuts).

Specified as: a fullword integer.

nrowmax
is the maximum number of rows allowed in the matrix at the time EKKCUTU was called.

Specified as: a fullword integer.

On Return
mcadd
is the column indices of the cuts to be added.

Specified as: a one-dimensional integer array of fullwords.

mradd
is the row indices of the cuts to be added.

Specified as: a one-dimensional integer array of fullwords.

deadd
is the elements in the cuts to be added.

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

nadd
is the current combined number of entries in mcadd, mradd, and deadd.

Specified as: a fullword integer.

nrow
is the current number of rows in the matrix (including the added cuts).

Specified as: a fullword integer.

Notes

  1. Cuts that are added before the first heuristic pass during EKKMPRE processing are permanent cuts. Other cuts will disappear after the heuristic pass or EKKMSLV supernode processing is completed.
  2. See "Mixed-Integer Programming (EKKMPRE and EKKMSLV)" for an explanation of when EKKCUTU is called.
  3. A cut may be discarded, if it becomes nonbinding.
  4. The array mtobin is a mapping of all the variables. It indicates whether a variable is continuous, general integer, or 0-1 integer. If a variable is a 0-1 integer, its entry in mtobin is the FORTRAN index of the corresponding entry in mstatbin. mstatbin contains the status of all 0-1 variables - fixed to 0, fixed to 1, or free. For example, if variable 200 is the 30th 0-1 variable, and it has been fixed to 0, then the 200th entry of mtobin would be 30, and the 30th entry of mstatbin would be -1.
  5. EKKCUTU should return a series of cuts when it concludes. This is done by entering the cuts into the arrays mcadd, mradd, deadd, and nadd The first element of mcadd is the first variable (column) of the problem matrix, and the Inumcols element of mcadd is the last, where Inumcols is an integer control variable. If the pth element of mcadd is set to -1, it denotes a lower bound on row p, and a value of -2 denotes an upper bound. For example, if on entry nadd is 1002 and nrow is 205, the entries in the arrays to add a single cut of x + 2y   2, the entries in the arrays might be:
  6.   iadd   mcadd(iadd)   mradd(iadd)  deadd(iadd)
      1003        5           206           1 0
      1004      407           206           2 0
      1005       -2           206           2 0

    The entries in mcadd indicate that x is variable 5, y is variable 407, and that the cut being added is an upper bound.

    The entries in mradd indicate that this cut is constraint 206 (the first available place for a cut as indicated by nrow).

    The entries in deadd indicate that the cut is 1x, 2y, and that the value of the right-hand side is 2.

    On exit, nadd is changed to 1005, and nrow is changed to 206.

  7. It is the user's responsibility to insure that EKKCUTU respects the maximum limits.
  8. The following subroutines can be called from EKKCUTU: EKKMSET
    EKKMSTR
    EKKNAME
    EKKPRTS
    EKKSEL
    EKKSMAP
    EKKSTAT

    You can also call EKKCGET, EKKCSET, EKKIGET, EKKISET, EKKRGET, and EKKRSET for specifying informational variables (such as Ilogfreq).

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKCUTU, and to "Mixed-Integer User Exit EKKCUTU" for a sample subroutine.


[ EKKBRNU | EKKCHNU | EKKCUTU | EKKHEUU | EKKNODU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKEVNU - Evaluate a Node User Exit Subroutine

EKKEVNU is called from EKKSLVU, which in turn is called from EKKMSLV, to evaluate a node in branch-and-bound processing.
 

Note:

EKKEVNU can only be written in C or FORTRAN. EKKEVNU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkevnu(double *dspace, int * mspace, int * userrtcd);
FORTRAN  EKKEVNU(dspace,mspace,userrtcd
On Entry
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Specified as: a one-dimensional integer array of fullwords with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

userrtcd
is the user return code from this user exit subroutine.

Specified as: a fullword integer.

On Return
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Returned as: a one-dimensional integer array of fullwords with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

userrtcd
is the user return code from this user exit subroutine, where:

If userrtcd=0, processing continues.
If userrtcd=3, EKKMSLV returns as if Imaxnodes had been reache.
If userrtcd is not 0 and not 3, this node is regarded as infeasible.

Returned as: a fullword integer.

Notes

  1. The EKKEVNU subroutine provided with the Library calls EKKSSLV with the dual option to evaluate the node. By providing your own EKKEVNU subroutine, you can modify the solution strategy to use primal, use another solve method, or stop the solver. Following is the default code for EKKEVNU supplied with the Library:
  2.       SUBROUTINE EKKEVNU(DSPACE,MSPACE,JRTCOD)
          INCLUDE (OSLI)
          REAL*8    DSPACE(*)
          INTEGER*4 MSPACE(*)
          INTEGER*4 JRTCOD
          CALL EKKSSLV(JRTCOD,DSPACE,2,1)
          CALL EKKIGET(IRTCOD,DSPACE,OSLI,OSLILN)
    C  Set the user return code to 1 if the optimal solution was not found 
          IF(IPROBSTAT NE 0) JRTCOD =  1
          RETURN
          END
  3. You should not set EKKMSLV-related control variables from EKKEVNU.
  4. You can call any of the library subroutines from EKKEVNU except the following:
    EKKDSCA
    EKKDSCM
    EKKGTMD
    EKKGTMI
    EKKIMDL
    EKKLMDL
    EKKMPRE
    EKKMPS
    EKKMSLV
    EKKPTMD
    EKKPTMI
    EKKQMDL
    EKKQMPS
    EKKSMDL

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKEVNU, and to "Mixed-Integer User Exit EKKEVNU" for a sample subroutine.


[ EKKBRNU | EKKCHNU | EKKCUTU | EKKEVNU | EKKNODU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKHEUU - Heuristic Fixing User Exit Subroutine

EKKHEUU gives you control over the fixing of variables to their upper or lower bounds. It can be used to override the default choice of variables in EKKMPRE or EKKMSLV for supernode processing. This information can be used to analyze and prune nodes from the problem.
 

Note:

EKKHEUU can only be written in C or FORTRAN. EKKHEUU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkheuu(double *dspace, int * mstatbin, int * mtobin, int * mfix, int * nbin, int * nfix1, int * nfix2, int * jtype);
FORTRAN EKKHEUU(dspace,mstatbin,mtobin,mfix,nbin, nfix1, nfix2,jtype)
On Entry
dspace
is the user-provided work area.

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

mstatbin
is the current status of the 0-1 variables, where:

If the pth element of mstatbin = -1, the pth 0-1 variable has been fixed to 0.
If the pth element of mstatbin = 0, the pth 0-1 variable has not been fixed.
If the pth element of mstatbin = 1, the pth 0-1 variable has been fixed to 1.

Specified as: a one-dimensional integer array of length nbin.

mtobin
is an array with an entry for each variable in the problem. The entry describes the type of variable, where:

If the pth entry in mtobin = 0, the pth variable is continuous.
If the pth entry in mtobin is < 0, the pth variable is an integer variable,
   but not a 0-1 variable.
If the pth entry in mtobin is > 0, the pth variable is a 0-1 integer variable,
   and the value of the entry is the FORTRAN index of the entry corresponding
   to the pth problem variable in the mstatbin array.

Specified as: a one-dimensional integer array of fullwords of length specified in the control variable inumcols.

nbin
is the number of 0-1 variables contained in mstatbin.

Specified as: a fullword integer.

nfix1
is the number of variables to be fixed to 0 or 1 on the current branch. nfix1 is set when EKKHEUU is called from either EKKMPRE preprocessing or EKKMSLV supernode processing.

Specified as: a fullword integer.

nfix2
is the number of variables to be fixed to 0 or 1 on the postponed branch. nfix2 is set when EKKHEUU is called from EKKMSLV supernode processing.

Specified as: a fullword integer.

jtype
identifies the type of processing currently being done, where:

If jtype=1, EKKHEUU is being called during EKKMPRE preprocessing.
If jtype=2, EKKHEUU is being called during supernode processing from EKKMSLV.

Specified as: a fullword integer.

On Return
dspace
is the user-provided work area.

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

mfix
is a list of 0-1 variables to be fixed to 0 or 1 This is the branch that EKKHEUU returns to the calling routine (EKKMSLV or EKKMPRE).

If for some p, the pth element of mfix = -x, the xth 0-1 variable is set to 0,
and if the pth element of mfix = x, the xth 0-1 variable is set to +1.

Returned as: a one-dimensional real array of doublewords, with a length of nfix1 + nfix2.

nfix1
is the number of variables to be fixed to 0 or 1 on the current branch. nfix1 is set when EKKHEUU is called from either EKKMPRE preprocessing or EKKMSLV supernode processing.

Returned as: a fullword integer.

nfix2
is the number of variables to be fixed to 0 or 1 on the postponed branch. nfix2 is set when EKKHEUU is called from EKKMSLV supernode processing.

Returned as: a fullword integer.

Notes

  1. See "Mixed-Integer Programming (EKKMPRE and EKKMSLV)" for an explanation of when EKKCUTU is called.
  2. The array mtobin is a mapping of all the variables. It indicates whether a variable is continuous, general integer, or 0-1 integer. If a variable is a 0-1 integer, its entry in mtobin is the FORTRAN index of the corresponding entry in mstatbin. mstatbin contains the status of all 0-1 variables (fixed to 0, fixed to 1, or free) For example, if variable 200 is the 30th 0-1 variable, and it has been fixed to 0, then the 200th entry in mtobin would be 30, and the 30th entry in mstatbin would be -1.
  3. EKKHEUU should return a valid branch in the array mfix when it concludes. Processing continues, setting 0-1 variables to their bounds using the first nfix1 entries in mfix The postponed branch (which is only used if jtype is 2) is given by the next nfix2 entries of mfix.
  4. The following subroutines can be called from EKKHEUU: EKKMSET
    EKKMSTR
    EKKNAME
    EKKPRTS
    EKKSEL
    EKKSMAP
    EKKSTAT

    You can also call EKKCGET, EKKCSET, EKKIGET, EKKISET, EKKRGET, and EKKRSET for specifying informational variables (such as Ilogfreq).

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKHEUU, and to "Mixed-Integer User Exit EKKXHEUU" for a sample subroutine.


[ EKKBRNU | EKKCHNU | EKKCUTU | EKKEVNU | EKKHEUU | EKKSLVU ]
[ Top of Page | Bottom of Page ]

EKKNODU - Node User Exit Subroutine

EKKNODU is called from EKKMSLV It allows you to save extra information about a node before creating a node, and to restore that information when the node is created.
 

Note:

EKKNODU can only be written in C or FORTRAN. EKKNODU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekknodu(double *dspace, int * mspace, int * reason, int * iarray, double * darray, int * muser, int * nuser);
FORTRAN  EKKNODU(dspace,mspace,reason,iarray,darray, muser, nuser)
On Entry
dspace
is the main user-provided work area.

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

mspace
is the integer version of the work area.

Specified as: a one-dimensional integer array of fullwords with twice the number of entries as dspace.

Note:

dspace and mspace have the same starting location. 

reason
is the situation when EKKNODU is called, where:

If reason=1, the subroutine is being called before the node has been created (that is, after EKKMSLV has called EKKBRNU).
If reason=2, the subroutine is being called after the node has been chosen, but before it has been processed (that is, after EKKMSLV has called EKKCHNU).

Specified as: a fullword integer.

iarray
is an array of branching information, where:

The first element of iarray identifies the branch type being processed, where:

If the first element of iarray is 1, a SOS of type 1 is processed
  (original definition, just one nonzero allowed).
If the first element of iarray is 2, a SOS of type 2 is processed
  (one or two adjacent nonzeros allowed).
If the first element of iarray is 3, a SOS of type 3 is processed
  (0-1, and just one nonzero allowed).
If the first element of iarray is 4, the single variables are processed
  (a set only in terms of priority).
If the first element of iarray is 99, the action depends on
  the value of reason.
If reason=1, the values you set for the second and third elements
   of iarray, and for darray are used to choose a node.
If reason=2, no variables will be fixed.
The second element of iarray identifies the direction of the branching, where:
If the second element of iarray equals 0, the next branch is down.
If the second element of iarray equals 1, the next branch is up.
The third element of iarray is the variable column number, or the set number for SOSs.

Specified as: a one-dimensional array of fullword integers, of length at least 3.

darray
is a single element array whose one element is the value of the continuous variable in the parent/reference value where the set was split.

Specified as: a one-dimensional array of doublewords of length 1.

muser
is the user-specified array to be saved or restored. It contains information that you wish to save and restore.

If reason=1, the user-created muser is saved.
If reason=2, the previously saved muser is restored.

Specified as: a one-dimensional real array of length nuser.

nuser
is the length of the muser array.

Specified as: a fullword integer 0 nuser   Imiplength, where Imiplength is an integer control variable.

On Return
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Returned as: a one-dimensional array of fullword integers with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

Note: The following subroutines can be called from EKKNODU:

EKKMSET
EKKMSTR
EKKPRTS

You can also call EKKCGET, EKKCSET, EKKIGET, EKKISET, EKKRGET, and EKKRSET for specifying informational variables such as Ilogfreq.

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKNODU, and to "Mixed-Integer User Exit EKKNODU" for a sample subroutine.


[ EKKBRNU | EKKCHNU | EKKCUTU | EKKEVNU | EKKHEUU | EKKNODU ]
[ Top of Page | Bottom of Page ]

EKKSLVU - Branch User Exit Subroutine

EKKSLVU is called from EKKMSLV, and it allows you to override the default solver routine.

Note:

EKKSLVU can only be written in C or FORTRAN. EKKSLVU should not make any calls that could cause recursion errors.

Function prototype:

C  int ekkslvu(double *dspace, int * mspace, double * dobjval, int * jrtcod, int * jtype);
FORTRAN  EKKSLVU(dspace,mspace,dobjval,jrtcod,jtype)
On Entry
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Specified as: a one-dimensional array of fullword integers with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

jtype
identifies the situation in which EKKSLVU is called, where:

If jtype=1, the subroutine is being called to solve the problem with
  the integrality constraints relaxed.
If jtype=2, the subroutine is being called to solve a node of the branch and bound tree.
If jtype=3, the subroutine is being called to do a final solve of the optimal node.

On Return
dspace
is the user-provided work area.

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

mspace
is the integer version of the work area.

Returned as: a one-dimensional array of fullword integers with twice the number of entries as dspace.

Note:

mspace and dspace have the same starting location. 

dobjval
is the value of the objective function for feasible nodes.

Returned as: a doubleword real.

jrtcod
is the value of iprobstat after the solution of the node.

Returned as: a fullword integer.

Notes

  1. You may write code that uses either EKKSSLV or EKKQSLV to solve the nodes of the branch and bound tree.
  2. The default version of EKKSLVU that is distributed with the library includes the only call to EKKEVNU. If a user supplied version of EKKSLVU is linked with a library application program, then EKKEVNU may not be referred to at all, and thus might be neither called nor even linked.

Example

Refer to "Understanding Mixed-Integer User Exit Subroutines" for an example of the use of EKKSLVU, and to "Sample User Exit Subroutine EXSLVU" for a sample subroutine.


[ Top of Page | EKKBRNU | EKKCHNU | EKKCUTU | EKKEVNU | EKKHEUU ]
[ EKKNODU | EKKSLVU | Previous Page | Next Page | Table of Contents ]