Utility Routines

  • EKKCLCB - Clear Registration of all Callback Functions
  • EKKCOL - Add, Replace, Get, or Delete a Column in the Problem Matrix
  • EKKCOPY - Create a Copy of the Constraint Matrix
  • EKKGTMI - Get Model Information
  • EKKHIS - Reserve Permanent Space for the User
  • EKKINIT - Initialize OSL
  • EKKMSAV - Save the Option Settings for a Message
  • EKKMSET - Set New Option Settings for a Message
  • EKKMSTR - Restore the Saved Option Settings for a Message
  • EKKNAME - Specify or Retrieve Names for Rows and Columns in a Model
  • EKKNWMT - Create a New Copy of the Problem Matrix
  • EKKPOPS - Pop Storage: Restore Storage Pointers
  • EKKPSHS - Push Storage: Save Current Storage Pointers
  • EKKPTMI - Put Current Model Information
  • EKKQRMD - Query Model Number
  • EKKRGCB - Register a Callback Function
  • EKKROW - Add, Replace, Get, or Delete a Row in the Problem Matrix
  • Index to all Optimization Libarary Modules

  • [ Top of Page | EKKCOPY | EKKNWMT | EKKCOL | EKKROW | EKKNAME ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKINIT - Initialize OSL

    This subroutine initializes the library workspace, dspace. It also resets many control variables as part of the initialization. It is invoked automatically by the first library subroutine you call. All calls to EKKDSCA except the first one should be preceded by a call to EKKINIT. You generally should not call EKKINIT unless you are calling EKKDSCA multiple times. See "OSL Terms and Concepts" for more information on control variables.

    Syntax

    FORTRAN CALL EKKINIT(rtcod,dspace)
    C  ekkinit(&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.
    See "Return Codes" for an explanation of return codes.

    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.

    Note

    EKKINIT does not affect the message options.

    Example

    Refer to "Sample FORTRAN Program EXINIT" for an example of using EKKINIT.


    [ Top of Page | EKKINIT | EKKNWMT | EKKCOL | EKKROW | EKKNAME ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKCOPY - Copy the Problem Matrix Stored by Columns or by Rows

    This subroutine creates your copy of the matrix stored by either columns or rows in sparse matrix format. This copy is put in the high end of dspace and not used by any of the Optimization Library modules. It is for your use alone.

    Syntax

    FORTRAN  CALL EKKCOPY(rtcod,dspace,type)
    C  ekkcopy(&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 matrix to be created, where:

    If type=1, two matrices are created, one stored by columns and one stored by rows.
    If type=2, the matrix is stored by columns.
    If type=3, the matrix is stored by rows.

    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.
    See "Return Codes" for an explanation of return codes.

    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.

    Notes

    1. Depending on the value of the parameter type, some or all of the following index control variables will be reset by EKKCOPY: Nrowcc, Ncolrc, Nelemcc, Nelemrc, Nrowrc, Ncolcc, Nlastfree.
    2. EKKCOPY does not explicitly store a zero coefficient that was specified by one or more calls to EKKLMDL, EKKDSCB, EKKMPS, EKKNMDL, EKKSMDL, or EKKRPTB in the new copy of the matrix.
    3. EKKCOPY will consolidate all blocks of the matrix into one block in the new copy of the matrix.
    4. EKKCOPY cannot be used to make a column or row copy of network data structures created by EKKNMDL.

    Examples

    Refer to the following sample programs for examples of using EKKCOPY:
    [ Top of Page | EKKINIT | EKKCOPY | EKKCOL | EKKROW | EKKNAME ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKNWMT - Create a New Copy of the Constraint Matrix

    This subroutine creates a new permanent version of the problem matrix in the low end of dspace. If extra blocks have been added by EKKDSCB, EKKRPTB, EKKROW, or EKKCOL, and if better performance is desired, then EKKNWMT should be called. It is not necessary to call EKKNWMT after any of the subroutines.
     
    Note: This subroutine is usually called for performance purposes. In particular, calling EKKNWMT with type set to 3 or 4 before any of the solve subroutines will allow library modules to take better advantage of the IBM Vector Facility and the architectures on all workstations. 

    Syntax

    FORTRAN  CALL EKKNWMT(rtcod,dspace,type)
    C  ekknwmt(&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 matrix to be created, where:

    If type=1, a copy of the matrix is stored by indices.
    If type=2, a copy of the matrix is stored by columns.
    If type=3, a copy of the matrix is stored in vector block format.
    If type=4, a copy of the matrix is stored in vector-block-of-1's format (if the matrix is composed of all 0's and 1's).
    If type=5, a copy of the matrix is stored in network format (multiple blocks are compressed into a single network).

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

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

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.

    Notes

    1. EKKNWMT consolidates all blocks of the constraint matrix into one block in the new copy of the matrix, and updates the values of the index control variables Nblockcol, Nblockrow, and Nblockelem to reflect that the entire matrix is now stored as a single block.
    2. EKKNWMT will NOT explicitly store in the new copy of the constraint matrix a zero coefficient that may have been explicitly stored by a call to one (or more) of: EKKLMDL, EKKDSCB, EKKMPS, EKKNMDL, EKKSMDL, or EKKRPTB.
    3. For network programming problems (type=5), EKKNWMT creates and loads the necessary data structures. An index or column copy of the constraint matrix must exist in order to use this option. The following three tasks are done, if necessary:
    4. On mainframe platforms without an IBM Vector Facility, type=2 will be used for calls when type=3 or 4 is specified.
    5. If a warning message is issued, EKKNWMT must be called with type=5 to verify that your problem is a network problem.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKROW | EKKNAME ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKCOL - Add, Replace, Get, or Delete a Column in the Constraint Matrix

    This subroutine adds, replaces, gets, or deletes a column in the problem matrix.

    Syntax

    FORTRAN  CALL EKKCOL(rtcod,dspace,type,numcol,numelem, elems, rownums)
    C  ekkcol(&rtcod,dspace,type,numcol,&numelem, elems, rownums);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    type
    is the type of function to perform, where:

    If type=1, the column is replaced.
    If type=2, the column is obtained and elems, rownums, and numelem are set.
    If type=3, only the last column is deleted. Therefore, numcol must be set to the number of the last column.

    Specified as: a fullword integer. Its value must be 1, 2, or 3.
    Note: If type is 1, and if the value of numcol is one more than the number of columns currently in the matrix, then a column is added. 

    numcol
    is the number of the column to add or change.

    Specified as: a fullword integer.
    numelem
    is the number of nonzero elements in the column being added or changed.

    Specified as: a fullword integer.
    elems
    is an array of the nonzero element values.

    Specified as: a one-dimensional real array of doublewords of at least length numelem.
    rownums
    is the row numbers corresponding to the values specified in elems.

    Specified as: a one-dimensional integer array of fullwords of at least length numelem.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.
    The following variables are set, if type=2:
    numelem
    is the number of nonzero elements in the column being obtained.

    Returned as: a fullword integer.
    elems
    is an array of the nonzero element values.

    Returned as: a one-dimensional real array of doublewords of at least length numelem.
    rownums
    is the row numbers corresponding to the values specified in elems.

    Returned as: a one-dimensional integer array of fullwords of at least length numelem.

    Notes

    1. If you are adding a column, you should add the corresponding coefficient to the objective function and the corresponding upper and lower bounds for that column.
    2. When you use EKKCOL to add a column, you need to reserve space for "spares," using the Imaxcols control variable, before calling EKKMPS, EKKLMDL, EKKNMDL, or EKKSMDL. If you do this before a call to EKKMPS, EKKLMDL, or EKKSMDL, a negative value of Imaxcols indicates that (-Imaxcols) extra columns will be allocated. Also note that, if you want to set Imaxcols before calling EKKMPS, EKKLMDL, or EKKSMDL, then you must call EKKDSCM before EKKIGET and EKKISET. For an example of this, see "Sample FORTRAN Program EXNAME".
    3. Changes or additions that are made with EKKCOL will be added in a new block that has been reserved in advance for this purpose. This block has room for Iextrblk elements. If you wish to change the value of Iextrblk, you should do so before calling EKKDSCM.
    4. For each element that is changed or added, the entries in this new block will be set to the new value requested on the call to EKKCOL, minus the value that the element had before the call. Because overlapping entries in separate blocks are added, this will yield the matrix requested by the call. A subsequent call to EKKNWMT will consolidate the overlapping entries.

      You may also want to work on the matrix without calling EKKNWMT, and then discard the updates made with EKKCOL by eliminating the block. The newly added block will be ignored, if you call EKKIGET, subtract 1 from the value of Inumblocks, and then call EKKISET. Note that decrementing Inumblocks affects the most recently added block, so this must be done before adding any more blocks.

    5. You can delete any column mathematically by replacing it with an array of zeros.
    6. If you add a column to the scaled matrix, the newly added column will automatically be scaled for you.
    7. If your application is a network, and if there is an index or column copy of the constraint matrix, you can make changes to rows or columns that cause the network structure to be lost. Calling EKKNSLV with init set to 5 or 6 will initiate a reinspection of the constraint matrix to see if the network structure has been restored by subsequent calls to EKKCOL.
    8. If your application is a network problem, you must have an index or column copy of the constraint matrix in order to use EKKCOL.
    9. If you create or change column names directly or through the use of EKKNAME, you may change column names for the spare rows that are not in the matrix. If you add a spare column later, it will still have the name that was assigned to it.
    10. If you create or change column selection lists directly or through the use of EKKSEL, you may change the fullwords in the selection list corresponding to spare rows that are not in the matrix. If you add a spare column later, its corresponding fullword in the selection list will still have the value that was assigned to it.

    11. In all Optimization Library modules, 1031 is used as an operational value for +infinity, and -1031 is used as an operational value for -infinity.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKNAME ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKROW - Add, Replace, Get, or Delete a Row in the Constraint Matrix

    This subroutine adds, replaces, gets, or deletes a row in the problem matrix.

    Syntax

    FORTRAN  CALL EKKROW(rtcod,dspace,type,numrow,numelem, elems, colnums)
    C  ekkrow(&rtcod,dspace,type,numrow,&numelem, elems, colnums);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    type
    is the type of function to perform, where:

    If type=1, the row is replaced or added.
    If type=2, the row is obtained and elems, colnums, and numelem are set.
    If type=3, the last row is deleted.

    Specified as: a fullword integer. Its value must be 1, 2, or 3.
     
    Note: If type is 1, and if the value of numrow is one more than the number of rows currently in the matrix, then a row is added. 

    numrow
    is the number of the row to add or change.

    Specified as: a fullword integer.
    numelem
    is the number of nonzero elements in the row being added or changed.

    Specified as: a fullword integer.
    elems
    is an array of the nonzero element values.

    Specified as: a one-dimensional real array of doublewords of at least length numelem.
    colnums
    is the column numbers corresponding to the values specified in elems.

    Specified as: a one-dimensional integer array of fullwords of at least length numelem.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.
    The following variables are set, if type=2:
    numelem
    is the number of nonzero elements in the row being obtained.

    Returned as: a fullword integer.
    elems
    is an array of the nonzero element values.

    Returned as: a one-dimensional real array of doublewords of at least length numelem.
    colnums
    is the column numbers corresponding to the values specified in elems.

    Returned as: a one-dimensional integer array of fullwords of at least length numelem.

    Notes

    1. If you are adding a row, you should add the corresponding upper and lower bounds for that row.
    2. When you use EKKROW to add a row, you need to reserve space for "spares," using the Imaxrows control variable, before calling EKKMPS, EKKLMDL, EKKNMDL, or EKKSMDL. Note that if done before a call to EKKMPS, EKKLMDL, or EKKSMDL, a negative value of Imaxrows indicates that (-Imaxrows) extra rows will be allowed. Also note that, if you want to set Imaxrows before calling EKKMPS, EKKLMDL, or EKKSMDL, then you must call EKKDSCM before EKKIGET and EKKISET.
    3. Changes or additions that are made with EKKROW will be added in a new block that has been reserved for this purpose. This block has room for Iextrblk elements. If you want to change the value of Iextrblk, you should do so before calling EKKDSCM.
    4. For each element that is changed or added, the entries in this new block will be set to the new value requested on the call to EKKROW, minus the value that the element had before the call. Because overlapping entries in separate blocks are added, this will yield the matrix requested by the call. A subsequent call to EKKNWMT will consolidate the overlapping entries.

      You may also want to work on the matrix without calling EKKNWMT, and then discard the updates made with EKKROW by eliminating the block. The newly added block will be ignored, if you call EKKIGET, subtract 1 from Inumblocks, and then call EKKISET. Note that decrementing Inumblocks affects the most recently added block, so this must be done before adding any more blocks.

    5. You can delete any row mathematically by replacing it with an array of zeros.
    6. If you add a row to the scaled matrix, the added row will be autmatically scaled for you.
    7. If your application is a network, and if there is an index or column copy of the constraint matrix, you can make changes to rows or columns that cause the network structure to be lost. Calling EKKNSLV with init set to 5 or 6 will initiate a reinspection of the constraint matrix to see if the network structure has been restored.
    8. If your application is a network problem, you must have an index or column copy of the constraint matrix in order to use EKKROW.
    9. If you create or change row names directly or through the use of EKKNAME, you may change row names for the spare rows that are not in the matrix. If you add a spare row later, it will still have the name that was assigned to it.
    10. If you change row selection lists directly or through the use of EKKSEL, you may change the fullwords in the selection list corresponding to spare rows that are not in the matrix. If you add a spare row later, its corresponding fullword in the selection list will still have the value that was assigned to it.

    11. 1031 is used as an operational value for +infinity, and -1031 is used as an operational value for -infinity.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKNAME - Specify or Retrieve Names for Rows and Columns in a Model

    This subroutine gives you a convenient way of specifing or retrieving names for any or all rows and columns in a model. To do this, you can modify dspace directly, but the process may be awkward. With EKKNAME, you can directly create, change, or retrieve row and column names.
     
    Note: EKKNAME is not guaranteed to work in PL/I programs. The PL/I ILC does not directly support the passing of character strings to VS FORTRAN routines. A PL/I program may work correctly if the correct PL/I data types are used. Note that the compiler may generate a warning message. 

    See "Utilities" for more information on how to use EKKNAME.

    Syntax

    FORTRAN  CALL EKKNAME(rtcod,dspace,numrow,rownames, startrow, numcol, colnames, startcol, oslnames)
    C  ekkname(&rtcod,dspace,numrow,rownames, startrow, numcol, colnames, startcol, oslnames);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    numrow
    is the number of row names you want to specify or retrieve. If you are specifying names, the first numrow names out of rownames are copied. If you are retrieving names, EKKNAME copies numrow names from dspace starting at the row numbered lvbar startrow rvbar into rownames.

    Specified as: a fullword integer; numrow 0.
    rownames
    is the names to be specified for the rows or the names for the rows retrieved from dspace.

    Specified as: a one-dimensional array of character strings of a length equal to Inumchar. The length of the array is at least equal to numrow.
    startrow
    is the row number where the first name will be created, changed, or retrieved, where:

    If startrow > 0, the first name will be created or changed starting at row number startrow.
    If startrow < 0, the first name will be retrieved starting at row number abs(startrow).
    Specified as: a fullword integer.

    numcol
    is the number of column names you want to specify or retrieve. If you are specifying names, EKKNAME copies the first numcol names out of colnames. If you are retrieving names, EKKNAME copies numcol names from dspace starting at the column numbered abs(startcol) into colnames.

    Specified as: a fullword integer; numcol 0.
    colnames
    is the names to be specified for the columns or the names for the columns retrieved from dspace.

    Specified as: a one-dimensional array of character strings of a length equal to Inumchar. The length of the array is at least equal to numcol.
    startcol
    is the column number where the first name will be created, changed, or retrieved, where:

    If startcol > 0, the first name will be created or changed starting at column number startcol.
    If startcol < 0, the first name will be retrieved starting at column number abs(startcol).
    Specified as: a fullword integer.

    oslnames
    is a flag indicating whether EKKNAME should generate names, where:

    If oslnames=0, do not generate names in dspace when specifying names; use only those in rownames and colnames. When retrieving names, do not generate names in rownames and colnames.
    If oslnames=1, generate 8-character names in the form Cnnnnnnn (for column names) or Rnnnnnnn (for row names), where nnnnnnn is a number ranging from 0000001 to 9999999. When you are specifying names, the generated names are put in dspace; when you are retrieving names, the generated names are put in rownames and colnames. See the notes below for details on where EKKNAME puts the generated names.
    Specified as: a fullword integer. Its value must be 0 or 1.

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

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.

    Notes

    1. If row and column names do not already exist when you are specifying names, EKKNAME reserves enough space for the storage of row and column names on the basis of the values of Imaxrows and Imaxcols. When you are retrieving names, space for row and column names in dspace must already exist, or EKKNAME will generate a warning message.
    2. When you are specifying names, any existing row or column names are overwritten. If only user-specified names are used (that is, oslnames=0), only those rows or columns for which names are specified on the call to EKKNAME have their names overwritten. All other names remain at their previous values. If generated names are specified (oslnames=1), all names are overwritten by a user-specified name or by a generated name.
    3. When you are retrieving names, any existing names in rownames or colnames are overwritten. The names being retrieved are placed in the arrays beginning at the first element in the array. If OSL-generated names are retrieved (oslnames=1), row names are placed in rownames immediately following the last name retrieved from dspace. EKKNAME will generate (Imaxrows minus (abs(startrow) plus numrow) plus 1) of these names. A similar procedure is performed for column names.
    4. If numrow is greater than the number of rows between the row indicated by startrow and the row indicated by Imaxrows, EKKNAME issues an informational message and uses the smaller number of names from rownames. If numrow is less than zero, EKKNAME issues a warning message, and no names are specified or retrieved.
    5. Similarly, if numcol is greater than the number of columns between the column indicated by startcol and the column indicated by Imaxcols, EKKNAME issues an informational message and uses the smaller number of names from colnames. If numcol is less than zero, EKKNAME issues a warning message, and no names are specified or retrieved.

    6. EKKNAME checks for duplicate row or column names if there is enough room in dspace when you are specifying names.
    7. If you are retrieving names, make sure rownames and colnames are at least as long as the number of names you are retrieving. If you are specifying or retrieving names, make sure that the length of each element in the arrays is equal to Inumchar; otherwise, unpredictable results may occur.
    8. If OSL-generated row and column names are used:
    9. EKKNAME does not use selection lists.
    10. The index control variables Nrownames and Ncolnames can be used to retrieve row and column names directly.
    11. If the row and column names in rownames and colnames contain the null C string terminator, EKKNAME treats it as regular character data. In other words, EKKNAME does not expect the names in rownames and colnames to be null-terminated. Therefore, if EKKNAME is called from a C program, care should be exercised when creating the row and column names to be used by EKKNAME. For more information, see "Sample C Program EXSELNAM".
    12. Similarly, when names are retrieved from dspace, the null C string terminator is not appended to the row and column names put in rownames and colnames. Therefore, if EKKNAME is called from a C program, you should be careful when using the row and column names retrieved from dspace.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKMSAV - Save the Option Settings for a Message

    This subroutine allows you to save the option settings for a message in your own storage for your future use. This subroutine is a companion to EKKMSTR.

    Syntax

    FORTRAN  CALL EKKMSAV(rtcod,dspace,strtnum,tabent)
    C  ekkmsav(&rtcod,dspace,strtnum,tabent);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    strtnum
    is the number of the message whose options you want to save.

    Specified as: a fullword integer.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.
    tabent
    is the name of a storage area where the message option table entry is stored.

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

    Note

    It is possible to save the option settings for an unmodifiable message, but they cannot be changed with EKKMSTR.

    Example

    Refer to "Sample FORTRAN Program EXMSAV" for an example of using EKKMSAV.


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSTR | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKMSET - Set New Option Settings for a Message

    This subroutine allows you to set new option settings for a message. Refer to Table 11 for the default message option table. You can use EKKMSAV to save the option settings.

    Syntax

    FORTRAN  CALL EKKMSET(rtcod,dspace,strtnum,maxalw,maxprt, trace, usrexit, endnum, nonum)
    C  ekkmset(&rtcod,dspace,strtnum,maxalw,maxprt, trace, usrexit, endnum, nonum);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    strtnum
    is the message number of the message to be changed. If you are specifying a range of messages, strtnum is the number of the first message you want to change.

    Specified as: a fullword integer.
    maxalw
    is the maximum number of times the error condition can occur before the program stops running, where:

    If maxalw<1, the previous setting remains in effect.
    If maxalw>255, an unlimited number of repetitions is allowed.

    Specified as: a fullword integer.

    maxprt
    is the maximum number of times the message will be printed, where:

    If maxprt=0, a previous setting remains in effect.
    If maxprt<0, the message does not print.
    If maxprt>255, the message always prints.

    Specified as: a fullword integer.

    trace
    gives you the choice of having FORTRAN traceback support, where:

    If trace=1, no traceback information is printed after the message.
    If trace=2, traceback information is printed after each occurrence of the message.
    If trace is neither 1 nor 2, the trace setting is not changed.

    Specified as: a fullword integer.
     
    Note: This is ignored on operating systems that do not have traceback support. 

    usrexit
    is the user exit subroutine control, where:

    If usrexit=1, the user exit subroutine is not used.
    If usrexit=2, the subroutine EKKMSGU will be called for this message.
    If usrexit is neither 1 nor 2, the usrexit setting is not changed.

    Specified as: a fullword integer.
     
    Note: Refer to "Understanding Informational User Exit Subroutines", "EKKMSGU - Message User Exit Subroutine", and "Sample User Exit Subroutine EXMSGU" for additional information on EKKMSGU.

    endnum
    is the message number, greater than strtnum, that specifies that the settings are to be applied to all messages beginning with strtnum and ending at endnum.

    Specified as: a fullword integer.
     
    Note: If endnum is less than strtnum, the specified range will be ignored, and only the message associated with strtnum will be affected.
    nonum
    controls the printing of message numbers, where:

    If nonum=1, the message number will not be printed with this message.
    If nonum=2, the message number will be printed with this message.
    If nonum is neither 1 nor 2, the nonum setting is not changed.

    Specified as: a fullword integer.

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

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.

    Notes

    1. If transfer of control to a user-supplied message routine (EKKMSGU) is desired, the value of maxalw must be 2 or greater.
    2. maxalw, maxprt, trace, and usrexit may be affected by some of the control variables:
    3. If you reset a "severe" message, and you call any other library subroutine, results are unpredictable.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKPTMI | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKMSTR - Restore the Saved Option Settings for a Message

    This subroutine takes existing options saved with the EKKMSAV subroutine and restores them to the message you specify. This subroutine is a companion to EKKMSAV.

    Syntax

    FORTRAN  CALL EKKMSTR(rtcod,dspace,strtnum,tabent)
    C  ekkmstr(&rtcod,dspace,strtnum,tabent);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    strtnum
    is the message number of the message to be restored.

    Specified as: a fullword integer.
    tabent
    is the name of a storage area where the message option table entry was stored.

    Specified as: a one-dimensional integer array of fullwords of length 2.
     
    Note: tabent must be a valid message table entry. It is obtained with EKKMSAV.
     
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.

    Example

    Refer to "Sample FORTRAN Program EXMSAV" for an example of using EKKMSTR.


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKGTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKPTMI - Put Current Model Information

    This subroutine saves current model information in a special save area within dspace. This information includes all the control variable information, pointers to the matrix and model-specific arrays, and other information needed to restore the model later. EKKPTMI is a companion subroutine to EKKGTMI, which restores model information.

    See "Getting and Putting Model Information (EKKGTMI and EKKPTMI)" for more information on how to use EKKPTMI.

    Syntax

    FORTRAN  CALL EKKPTMI(rtcod,dspace,savenum)
    C  ekkptmi(&rtcod,dspace,savenum);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    savenum
    is the model number. Information for the current model is stored as model number savenum.

    Specified as: a fullword integer; 0 < savenum <= nmodel in EKKDSCA.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.

    Note

    EKKPTMI saves model information for the current model. It is stored as model number savenum. Therefore, it is possible to save the current model as a different model number than that designated in the preceding call to EKKDSCM. This will result in an error message being generated, but you can ignore this message, if you really want to change the model number.

    Example

    Refer to "Sample FORTRAN Program EXDANWOL" for an example of using EKKPTMI.


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKRGCB ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKGTMI - Get Model Information

    This subroutine restores model information, including control variables, pointers to the matrix and model-specific arrays, and other information. EKKGTMI is a companion subroutine to EKKPTMI, which is used to save information about a model. When you call EKKGTMI, the model that is restored becomes the current model.
     
    Note: EKKPTMI will not be called automatically when you call EKKGTMI. If you wish to save the current model information, call EKKPTMI before you call EKKGTMI. 

    See "Getting and Putting Model Information (EKKGTMI and EKKPTMI)" for more information on how to use EKKGTMI.

    Syntax

    FORTRAN  CALL EKKGTMI(rtcod,dspace,model)
    C  ekkgtmi(&rtcod,dspace,model);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    model
    is the model number of the model saved with EKKPTMI that you are retrieving.

    Specified as: a fullword integer.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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 EKKGTMI:


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKRGCB - Register a Callback Function

    This subroutine registers (i.e., makes known) a user exit subroutine by associating its name with a number that corresponds to the stub provided with the library. This allows one to override the default implementation of a user-exit functions in a PC environment with the DLL version of the library. It also enables one to identify user exit subroutines by different names than those of the stubs provided, or to develop several different versions of a user exit routine, various ones of which may be called under different conditions to be determined at run time.

    In its present form, EKKRGCB can only be called from a program written in C. This follows from the second argument in the calling sequence of EKKRGCB being typed "void *", which FORTRAN, at least, cannot accomodate. This shortcoming can be overcome by writing a C subroutine, to be called from an application program written in something other than C, that can call EKKRGCB. This user supplied C subroutine should include the file (supplied with the Library) named "ekkc.h," and assuming that the user exit subroutine whose name will be passed to EKKRGCB is other than the default name, also a prototype declaration for this subroutine.

    Syntax

    C  ekkrgcb(cbid,cbptr);
    On Entry
    cbid
    is the identifier of the callback function to be registered.
    Specified as: an integer.
     
    cbptr
    is the name of the user callback function to be registered.
    Specified as: a character string.

    The correspondence between the number identifiers and the names of the user exits is as follows.
     
      1 corresponds to MIP User Exit EKKBRNU,
      2 corresponds to MIP User Exit EKKCHNU,
      3 corresponds to MIP User Exit EKKCUTU,
      4 corresponds to MIP User Exit EKKEVNU,
      5 corresponds to MIP User Exit EKKHEUU,
      6 corresponds to Iteration User Exit EKKITRU,
      7 corresponds to Message User Exit EKKMSGU,
      8 corresponds to MIP User Exit EKKNODU,
      9 corresponds to Row Ordering User Exit EKKORDU, and
    10 corresponds to MIP User Exit EKKSLVU.

    Examples

    Refer to the following sample program for examples of the using EKKRGCB:


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKRGCB | EKKHIS | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKCLCB - Clear Registration of a Callback Functions

    This subroutine clears the registration of a specified user callback function that has been registered by the companion subroutine EKKRGCB. Registering a new callback function overrides a previous registration of that function, so in most cases a call to EKKCLCB would be unnecessary. However, in a large or complicate application program it is advisable to use EKKCLCB as an aid to good housekeeping.

    Syntax

    C  ekkclcb(cbid); 
    On Entry
    cbid
    is the identifier of the callback function to be cleared.
    Specified as: an integer.
     

    The correspondence between the number identifiers and the names of the user exits is given above, in the description of EKKRGCB.

    Example

    Refer to the following sample program for examples of using EKKCLCB:


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKRGCB | EKKCLCB | EKKPOPS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKHIS - Reserve Permanent Space for the User

    This subroutine reserves permanent space in dspace for your use. See "Storage Allocation" for additional information on dspace.

    Syntax

    FORTRAN  CALL EKKHIS(rtcod,dspace,ndwrd,indx)
    C  ekkhis(&rtcod,dspace,ndwrd,&indx);
    On Entry
    dspace
    is the user-provided work area.

    Specified as: a one-dimensional real array of doublewords.
    ndwrd
    is the number of doublewords to be reserved.

    Specified as: a fullword integer; ndwrd 0.
    On Return
    rtcod
    is the return code for the subroutine, where:

    If rtcod = 0, the subroutine completed successfully. Only informational messages were issued.
    See "Return Codes" for an explanation of return codes.

    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.
    indx
    is the FORTRAN index into dspace for the first entry of the reserved array.

    Returned as: an fullword integer.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKRGCB | EKKCLCB | EKKHIS | EKKPSHS | EKKQRMD | Bottom of Page ]

    EKKPOPS - Pop Storage: Restore Storage Pointers

    This subroutine restores the FORTRAN index of the last entry in dspace used in low storage (Nfirstfree - 1) and the FORTRAN index of the first entry in dspace used in high storage (Nlastfree + 1). Refer to "Storage Allocation" and "Storage Management Subroutines" for more information on dspace. This subroutine is a companion to EKKPSHS.

    Syntax

    FORTRAN  CALL EKKPOPS(rtcod,dspace)
    C  ekkpops(&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.
    See "Return Codes" for an explanation of return codes.

    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.

    Note

    EKKPOPS restores the storage pointers that were saved with EKKPSHS.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKRGCB | EKKCLCB | EKKHIS | EKKPOPS | EKKQRMD | Bottom of Page ]

    EKKPSHS - Push Storage: Save Current Storage Pointers

    This subroutine saves the FORTRAN index of the last entry in dspace used in low storage (Nfirstfree - 1) and the FORTRAN index of the first entry in dspace used in high storage (Nlastfree + 1). Refer to "Storage Allocation" and "Storage Management Subroutines" for more information on dspace. This subroutine is a companion to EKKPOPS.

    Syntax

    FORTRAN  CALL EKKPSHS(rtcod,dspace)
    C  ekkpshs(&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.
    See "Return Codes" for an explanation of return codes.

    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.

    Note

    The storage pointers that are saved by EKKPSHS may be restored by calling EKKPOPS.

    Examples

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


    [ Top of Page | EKKINIT | EKKCOPY | EKKNWMT | EKKCOL | EKKROW ]
    [ EKKNAME | EKKMSAV | EKKMSET | EKKMSTR | EKKPTMI | EKKGTMI ]
    [ EKKRGCB | EKKCLCB | EKKHIS | EKKPOPS | EKKPSHS | Bottom of Page ]

    EKKQRMD - Query Model Number

    This subroutine returns the current model number in the third parameter of its calling sequence.

    Syntax

    FORTRAN  CALL EKKQRMD(rtcod,dspace number)
    C  ekkqrmd(&rtcod,dspace,&number);
    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.
    See "Return Codes" for an explanation of return codes.

    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.
    number
    is the number of the current model being processed.
    Specified as: an integer. 

    [ Top of Page | EKKCLCB | EKKCOL | EKKCOPY | EKKGTMI | EKKHIS ]
    [ EKKINIT | EKKMSAV | EKKMSET | EKKMSTR | EKKNAME | EKKNWMT ]
    [ EKKPOPS | EKKPSHS | EKKPTMI | EKKQRMD | EKKRGCB | EKKROW ]
    [ Index to Modules ]