Descriptions of C API functions

Descriptions of the C API functions are given in alphabetical order. Each entry consists of: the name of the function, its C function prototype, a brief description of each item in the calling sequence, and descriptions of what the function does and what it returns. To avoid having one very large file contain descriptions of all the functions, the functions whose names begin with "ekk_get" and "ekk_set" have been split off in a separate file named featCMGS.htm. The following alphabetized list provides links to descriptions of the remaining functions. Interlineal insertions provide links to entries elsewhere in the list. To conserve space in the list, the four characters "ekk_" have been omitted. Finally, in the documentation below, the names of the functions themselves (ekk_...) are hypertext links back to the beginning of the list.
                                                      C,     D - L,     M - Q,     R - V    
  activateCutoff     addColumnElementBlock     addColumnElementBlockWithOffsets
  addColumns     addElementBlock     addElementBlockWithOffsets
  addIntegerSet     addOneColumn     addOneRow
  addRows     addSOS1Set     addSOS2Set
  addSOS3Set     addSpaceForColumnElementBlock     allSlackBasis
  barrier     baseModel     blockColumn
  blockColumnBase     blockElement     blockNumberColumns
  blockNumberElements     blockRow     blockRowBase
                                                      A - B,     D - L,     M - Q,     R - V    
  blockType     branchAndBound     clearBrnuCallBack
  clearChnuCallBack     clearEvnuCallBack     clearItruCallBack
  clearMsguCallBack     clearNoduCallBack     clearOrduCallBack
  clearSlvuCallBack     colaux     collower
  colrcosts     colscales     colsol
  colstat     columnNamePointers     columnStatus
  colupper     context     copyCollower
  copyColrcosts     copyColsol     copyColstat
  copyColumnNames     copyColupper     copyModel
  copyObjective     copyRowacts     copyRowduals
  copyRowlower     copyRowNames     copyRowstat
  copyRowupper     copySubModel     crash
  createBInverse     createColumnCopy     createNames
                                                      A - B,     C,     M - Q,     R - V    
  createRowCopy     crossover     deactivateCutoff
  decomposeCrash     deleteColumns     deleteIntegerInformation
  deleteMatrixCopy     deleteModel     deleteNames
  deleteRows     double     dropLastElementBlock
  dualNetwork     dualSimplex     eitherSimplex
  endContext     exportBasis     exportModel
  get ... functions     findSOS     formBInverseb
  formBInverseTransposeb     free     freeVector
  fromBinary     importBasis     importModel
  importModelFree     importQuadraticData     infeasibilities
  initializeContext     int     integerType
  isColumnBasic     isModelInteger     isModelQuadratic
  isRowBasic     lastAlgorithm     listOfIntegers
  loadDspace     loadQuadraticData     loadRimModel
                                                      A - B,     C,     D - L,     R - V    
  makeBinary     markAsInteger     markColumnsAsBasic
  markRowsAsBasic     matrixTransposeVector     matrixVector
  mergeBlocks     messagePrintOff     messagePrintOn
  messagesPrintOff     messagesPrintOn     messageUserExitOff
  messageUserExitOn     model     mset
  newModel     numberOfModels     objective
  pivotRow     postSolve     preSolve
  primalNetwork     primalSimplex     printBase
  printSolution     quadraticBarrier     quadraticBlockColumn
  quadraticBlockColumnBase     quadraticBlockElement     quadraticBlockNumberColumns
  quadraticBlockNumberElements     quadraticBlockRow     quadraticBlockRowBase
  quadraticBlockType     quadraticParametrics     quadraticSimplex
                                                      A - B,     C,     D - L,     M - Q    
  registerBrnuCallBack     registerChnuCallBack     registerEvnuCallBack
  registerItruCallBack     registerMsguCallBack     registerNoduCallBack
  registerOrduCallBack     registerSlvuCallBack     regularized
  repeatElementBlock     replaceColumn     replaceElements
  replaceRow     resizeElementBlock     resizeModel
  resizeModelExact     restoreModel     rowacts
  rowaux     rowduals     rowlower
  rowNamePointers     rowscales     rowstat
  rowStatus     rowupper     saveModel
  scale     scaleElements     scaleRim
  scaling     selectionList     sellistcol
  sellistrow     senseBound     senseObjective
  sequenceOut     set ... functions     simplex
  sizeMatrix     sort     sortOnDouble
  sortOnInt     stderrNumber     tableauArtificialColumn
  tableauStructuralColumn     tableauRow     unloadDspace
  userData     validateIntegers     validateModel
      Bottom of page  
                                                      A - B,     C,     D - L,     M - Q,     R - V


ekk_activateCutoff

Function prototype:
int ekk_activateCutoff( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
activates a "cutoff" feature of the branch and bound algorithm used to solve mixed integer programming problems. When this feature is activated, ekk_dualSimplex will return with the current solution, if this solution is feasible and the objective value is greater than or equal to the value of Rbbcutoff (which may be set with ekk_setRbbcutoff and retrieved with ekk_getRbbcutoff). This feature is provided for those who are interested in implementing their own version of a branch and bound algorithm. If an error occurred, ekk_activateCutoff returns a nonzero value, otherwise it returns zero.

ekk_addColumnElementBlock

Function prototype:
int ekk_addColumnElementBlock( EKKModel * model , int numberColumns , const int * indexRow , const int * startOfEachColumn , const double * elements );

Where:
model
is a pointer to the current model,
numberColumns
is the number of columns in the block to be added,
indexRow
is a pointer to an array that contains the row indices of the elements of the block to be added,
startOfEachColumn
is a pointer to an array that contains the column starts for the elements of the block to be added,
elements
is a pointer to an array that contains the values of the elements to be added.

This function
adds a new block, stored by columns, to the current model. The first column passed in corresponds to the first column of the constraint matrix. If an error occurred, ekk_addColumnElementBlock returns a value of -1, otherwise it returns the block number of the added column element block.

ekk_addColumnElementBlockWithOffsets

Function prototype:
int ekk_addColumnElementBlockWithOffsets( EKKModel * model , int numberColumns , int baseColumn, int rowOffset , const int * indexRow , const int * startOfEachColumn , const double * elements );

Where:
model
is a pointer to the current model,
numberColumns
is the number of columns in the part of the matrix being passed in,
baseColumn
indicates where the first column passed will be in the matrix,
rowOffset
is the offset to be added to each row index,
indexRow
is a pointer to an array that contains the row indices of the elements of the block to be added,
startOfEachColumn
is a pointer to an array that contains the column starts for the elements of the block to be added,
elements
is a pointer to an array that contains the values of the elements to be added.

This function
adds a new block to the matrix. It allows the user to append new columns to the matrix. The first column start need not be zero; together with the row offset this allows added flexibility in building up a matrix. If an error occurred, ekk_addColumnElementBlockWithOffsets returns a nonzero value, otherwise it returns zero.

ekk_addColumns

Function prototype:
int ekk_addColumns( EKKModel * model , int numberToAdd , const double * objective , const double * lowerBound , const double * upperBound , const int * startOfEachColumn , const int * indexRow , const double * elements );

Where:
model
is a pointer to the current model,
numberToAdd
is the number of columns to be added,
objective
is a pointer to an array that contains the objective function coefficients for the columns to be added to the model,
lowerBound
is a pointer to an array that contains the lower bounds for the columns to be added to the model,
upperBound
is a pointer to an array that contains the upper bounds for the columns to be added to the model,
startOfEachColumn
is a pointer to an array that contains the starting indices for the columns to be added,
indexRow
is a pointer to an array that contains the row indices in for the new columns,
elements
is a pointer to an array that contains the values of the new elements to be added to the constraint matrix.

This function
adds new columns, and their bounds and objective coefficients, to the current model. If any of the data related pointers is null, then default values are stored in the corresponding data array. I.e., if objective is null, then all the new objective function coefficients are set to zero; if lowerBound is null, then all the new lower bounds are set to 0.0; if upperBound is null, then all the new upper bounds are set to 1.031. If an error occurred, ekk_addColumns returns a nonzero value, otherwise it returns zero.

ekk_addElementBlock

Function prototype:
int ekk_addElementBlock( EKKModel * model , int numberElements , const int * indexRow , const int * indexColumn , const double * elements );

Where:
model
is a pointer to the current model,
numberElements
is the number of elements to be added,
indexRow
is a pointer to an array that contains the row indices of the elements to be added,
indexColumn
is a pointer to an array that contains the column indices of the elements to be added,
elements
is a pointer to an array that contains the values of the elements to be added.

This function
adds a new block, stored by indices, i.e., as triplets, to the current model. If an error occurred, ekk_addElementBlock returns a value of -1, otherwise it returns the block number of the added element block.

ekk_addElementBlockWithOffsets

Function prototype:
int ekk_addElementBlockWithOffsets( EKKModel * model , int numberElements , const int * indexRow , const int * indexColumn , const double * elements , int rowOffset , int ColumnOffset );

Where:
model
is a pointer to the current model,
numberElements
is the number of elements in the block to be added,
indexRow
is a pointer to an array that contains the (relative) row indices of the elements of the block to be added,
indexColumn
is a pointer to an array that contains the (relative) column indices of the elements of the block to be added,
elements
is a pointer to an array that contains the values of the elements to be added,
rowOffset
is the offset to be added to the row indices,
columnOffset
is the offset to be added to the column indices.

This function
adds a block of elements passed by triples. This has the same effect as if the user modified the indexRow array by rowOffset and the indexColumn array by columnOffset, but is provided for greater flexibility. If an error occurred, ekk_addElementBlockWithOffsets returns a nonzero value, otherwise it returns zero.

ekk_addIntegerSet

Function prototype:
int ekk_addIntegerSet( EKKModel * model , int priority , int number , const int * columns , const double * downPseudoCost , const double * upPseudoCost );

Where:
model
is a pointer to the current model,
priority
is the branching priority to be assigned to this set of integer variables,
number
is the number of elements in the set of integers being identified,
columns
is a pointer to an array that contains the column indices for the elements being identified as a set of integer variables,
downPseudoCost
is a pointer to an array that contains the down pseudocosts for the set of integer variables being identified,
upPseudoCost
is a pointer to an array that contains the up pseudocosts for the set of integer variables being identified.

This function
adds a new set of integers to the current model. If either of the pseudocost arrays are NULL then default values of 0.001 are used for that array. If an error occurred, ekk_addIntegerSet returns a nonzero value, otherwise it returns zero.

ekk_addOneColumn

Function prototype:
int ekk_addOneColumn( EKKModel * model , double objectiveCoefficient , double lowerBound , double upperBound , int numberElements , const int * indexRow , const double * elements );

Where:
model
is a pointer to the current model,
objectiveCoefficient
is the value of the objective function coefficient for the new column,
lowerBound
is the value of the lower bound for the new column,
upperBound
is the value of the upper bound for the new column,
numberElements
is the number of coefficients for the new column,
indexRow
is a pointer to an array that contains the row indices of the, new elements to be added to the constraint matrix,
elements
is a pointer to an array that contains the values of the new elements to be added to the constraint matrix,

This function
adds one column to the current model. This includes upper and lower bounds on the value of the new column, the value of the coefficient of the new column in the objective function, and new elements for the appropriate constraint rows. If an error occurred, ekk_addOneColumn returns a nonzero value, otherwise it returns zero.

ekk_addOneRow

Function prototype:
int ekk_addOneRow( EKKModel * model , double lowerBound , double upperBound , int numberElements , const int * indexColumn , const double * elements );

Where:
model
is a pointer to the current model,
lowerBound
is the value of the lower bound for the new constraint,
upperBound
is the value of the upper bound for the new constraint,
numberElements
is the number of coefficients for the new constraint,
indexRow
is a pointer to an array that contains the column indices of the new elements to be added to the constraint matrix,
elements
is a pointer to an array that contains the values of the new elements to be added to the constraint matrix,

This function
adds one new constraint to the current model. If an error occurred, ekk_addOneRow returns a nonzero value, otherwise it returns zero.

ekk_addRows

Function prototype:
int ekk_addRows( EKKModel * model , int numberToAdd , const double * lowerBound , const double * upperBound , const int * startOfEachRow , const int * indexColumn , const double * elements );

Where:
model
is a pointer to the current model,
numberToAdd
is the number of rows to be added to the model,
lowerBound
is a pointer to an array that contains the lower bounds for the rows to be added,
upperBound
is a pointer to an array that contains the upper bounds for the rows to be added,
startOfEachRow
is a pointer to an array that contains the starting index column for each row to be added,
indexColumn
is a pointer to an array that contains the column indices of the elements of the rows to be added,
elements
is a pointer to an array that contains the values of the elements in the rows to be added.

This function
adds new constraint rows to the model. If one of the bound related pointers is null, then default values are stored in the corresponding bound arrays. I.e., if lowerBound is null, then all the new lower bounds are set to -1.031, and if upperBound is null, then all the new upper bounds are set to 1.031. If an error occurred, ekk_addRows returns a nonzero value, otherwise it returns zero.

ekk_addSOS1Set

Function prototype:
int ekk_addSOS1Set( EKKModel * model , int priority , int number , const int * columns , const double * downPseudoCost , const double * referenceRow );

Where:
model
is a pointer to the current model,
priority
is the branching priority to be assigned to this set of integer variables,
number
is the number of variables in the set of integers being identified,
columns
is a pointer to an array that contains the column indices for the variables being identified as a special ordered set of type 1,
downPseudoCost
is a pointer to an array that contains the down pseudocosts for the special ordered set of integer variables being identified,
referenceRow
is a pointer to the array giving the "shape" of the set.

This function
adds a special ordered set of type 1 to the model (at most one variable nonzero). If downPseudoCost is NULL then default values of 0.001 will be used. If referenceRow is null then values 1.0, 2.0, 3.0, ..... will be used. The set will be ordered in increasing values of the reference row. The size as well as order matters. If we have a set with 4 entries and the first takes a value of 0.3 in a solution, while the last takes a value of 0.7 then with 1.0, 2.0, 3.0, 4.0 the branch would be at 0.3*1.0 + 0.7*4.0 or 3.1, so between 3 and 4. If the reference row entries had been 0.0, 1000.0, 1001.0, 1002.0, then the branch would have been between 1 and 2. If an error occurred, ekk_addSOS1Set returns a nonzero value, otherwise it returns zero.

ekk_addSOS2Set

Function prototype:
int ekk_addSOS2Set( EKKModel * model , int priority , int number , const int * columns , const double * downPseudoCost , const double * referenceRow );

Where:
model
is a pointer to the current model,
priority
is the branching priority to be assigned to this set of integer variables,
number
is the number of variables in the set of integers being identified,
columns
is a pointer to an array that contains the column indices for the variables being identified as a special ordered set of type 2,
downPseudoCost
is a pointer to an array that contains the down pseudocosts for the special ordered set of integer variables being identified,
referenceRow
is a pointer to the array giving the "shape" of the set.

This function
adds a special ordered set of type 2 to the model (at most two variables nonzero and if two then they must be adjacent in terms of the reference row order). See ekk_addSOS1Set for more on a reference row. If an error occurred, ekk_addSOS2Set returns a nonzero value, otherwise it returns zero.

ekk_addSOS3Set

Function prototype:
int ekk_addSOS3Set( EKKModel * model , int priority , int number , const int * columns , const double * downPseudoCost , const double * referenceRow );

Where:
model
is a pointer to the current model,
priority
is the branching priority to be assigned to this set of integer variables,
number
is the number of variables in the set of integers being identified,
columns
is a pointer to an array that contains the column indices for the variables being identified as a special ordered set of type 3,
downPseudoCost
is a pointer to an array that contains the down pseudocosts for the special ordered set of integer variables being identified,
referenceRow
is a pointer to the array giving the "shape" of the set.

This function
adds a special ordered set of type 3 to the model (exactly one variable may be nonzero and must take value 1). See ekk_addSOS1Set for more on a reference row. If an error occurred, ekk_addSOS3Set returns a nonzero value, otherwise it returns zero.

ekk_addSpaceForColumnElementBlock

Function prototype:
int ekk_addSpaceForColumnElementBlock( EKKModel * model , int baseColumn , int numberColumns , int numberElements );

Where:
model
is a pointer to the current model,
baseColumn
is the location of the first column in the constraint matrix,
numberColumns
is the number of columns in this block,
numberElements
is at least the number of elements in this block.

This function
is intended to be used with large problems where passing in a copy of a matrix would cause performance degradation. This reserves necessary space which the user can carefully fill in using ekk_blockColumn etc. If an error occurred, ekk_addSpaceForColumnElementBlock returns a nonzero value, otherwise it returns zero.

ekk_allSlackBasis

Function prototype:
int ekk_allSlackBasis( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
creates a starting basis of all slack variables for the simplex solver. If an error occurred, ekk_allSlackBasis returns a nonzero value, otherwise it returns zero.

ekk_barrier

Function prototype:
int ekk_barrier( EKKModel * model , int mode );

Where:
model
is a pointer to the current model,
mode
is an indicator ( 0, 1, 2, or 3 ) for switching to the simplex algorithm to obtain a basic feasible solution. If mode=0, this switch over is never made.
If mode=1, the switch over is made, if numerical instabilities arise.
If mode=2, the switch over is made, if numerical instabilities arise.
If mode=3, the switch over is made immediately, if it is appropriate after analyzing the matrix, or if numerical instabilities arise.

This function
provides the functionality of ekkbslv to solve a LP problem using a primal dual interior point algorithm with predictor corrector. The mode parameter corresponds to the sslvswch parameter in the calling sequence of ekkbslv. The crossover phase is now done by ekk_crossover. If an error occurred, ekk_barrier returns a nonzero value, otherwise it returns zero.

ekk_baseModel

Function prototype:
EKKModel * ekk_baseModel( );

This function
ekk_baseModel returns a pointer to the "base" model for the OSL context, unless an error occurred, in which case it returns a null pointer. This base model is created when ekk_initializeContext is called. At any time the user may set tolerances etc. in this model. In that case these modified values will be used whenever a new model is created.

ekk_blockColumn

Function prototype:
int * ekk_blockColumn( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose column information array is to be located.

This function
returns a pointer to the array of column starts, or column indices, for the specified block of the constraint matrix.

ekk_blockColumnBase

Function prototype:
int ekk_blockColumnBase( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose column base is to be returned.

This function
returns the "column base" (i.e., numerical offset) for the indices of the columns in the specified block of the constraint matrix.

ekk_blockElement

Function prototype:
double * ekk_blockElement( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block of matrix elements of interest.

This function
returns a pointer to the matrix coefficients for this block. This should be used in conjunction with ekk_blockColumn and ekk_blockRow.

ekk_blockNumberColumns

Function prototype:
int ekk_blockNumberColumns( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose number of columns is desired.

This function
returns the number of columns in the specified block or -1 if a triplet block.

ekk_blockNumberElements

Function prototype:
int ekk_blockNumberElements( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose number of elements is desired.

This function
returns the number of elements in the specified block.

ekk_blockRow

Function prototype:
int * ekk_blockRow( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose row indices are to be located.

This function
returns a pointer to the array of row indices for the elements of the specified block of the constraint matrix.

ekk_blockRowBase

Function prototype:
int ekk_blockRowBase( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose row base is to be returned.

This function
returns the "row base" (i.e., numerical offset) for the indices of the rows in the specified block of the constraint matrix.

ekk_blockType

Function prototype:
int ekk_blockType( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose storage type is to be determined.

This function
returns "1" if the elements of the specified block of of the constraint matrix is stored by indices, i.e., as triplets, and returns "2," if they are stored by columns.

ekk_branchAndBound

Function prototype:
int ekk_branchAndBound( EKKModel * model , const char * matrixFile , const char * basisFile );

Where:
model
is a pointer to the current model,
matrixFile
is a pointer to a character string containing the name of a file to be used to hold matrix information, or null, if no such file is to be used,
basisFile
is a pointer to a character string containing the name of a file to be used to hold basis information, or null, if no such file is to be used.

This function
provides the functionality of ekkmslv to solve a MIP problem using a branch and bound algorithm. If an error occurred, ekk_branchAndBound returns a nonzero value, otherwise it returns zero.

ekk_clearBrnuCallBack

Function prototype:
void ekk_clearBrnuCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerBrnuCallBack as a substitute for the default version of the MIP User Exit ekk_brnu.

ekk_clearChnuCallBack

Function prototype:
void ekk_clearChnuCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerChnuCallBack as a substitute for the default version of the MIP User Exit ekk_chnu.

ekk_clearEvnuCallBack

Function prototype:
void ekk_clearEvnuCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerEvnuCallBack as a substitute for the default version of the MIP User Exit ekk_evnu,

ekk_clearItruCallBack

Function prototype:
void ekk_clearItruCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerItruCallBack as a substitute for the default version of the Iteration User Exit ekk_itru.

ekk_clearMsguCallBack

Function prototype:
void ekk_clearMsguCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerMsguCallBack as a substitute for the default version of the Message User Exit ekk_msgu.

ekk_clearNoduCallBack

Function prototype:
void ekk_clearNoduCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerNoduCallBack as a substitute for the default version of the MIP User Exit ekk_nodu,

ekk_clearOrduCallBack

Function prototype:
void ekk_clearOrduCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerOrduCallBack as a substitute for the default version of the Row Ordering User Exit ekk_ordu.

ekk_clearSlvuCallBack

Function prototype:
void ekk_clearSlvuCallBack( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
clears the registration of an alternate user exit subroutine, which had been registered with ekk_registerSlvuCallBack as a substitute for the default version of the MIP User Exit ekk_slvu.

ekk_colaux

Function prototype:
double * ekk_colaux( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the column auxiliary solve information. If an error occurred, ekk_colaux returns a null pointer.

ekk_collower

Function prototype:
double * ekk_collower( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the column lower bounds. If an error occurred, ekk_collower returns a null pointer.

ekk_colrcosts

Function prototype:
double * ekk_colrcosts( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains reduced costs for the columns. If an error occurred, ekk_colrcosts returns a null pointer.

ekk_colscales

Function prototype:
double * ekk_colscales( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains scale factors for the columns. If an error occurred, ekk_colscales returns a null pointer.

ekk_colsol

Function prototype:
double * ekk_colsol( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains solution values. If an error occurred, ekk_colsol returns a null pointer.

ekk_colstat

Function prototype:
int * ekk_colstat( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains status values for the columns. If an error occurred, ekk_colstat returns a null pointer.

ekk_columnNamePointers

Function prototype:
const char * const * ekk_columnNamePointers( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the column names for the specified model. If there are no column names, it returns null.

ekk_columnStatus

Function prototype:
int ekk_columnStatus( EKKModel * model , int iColumn );

Where:
model
is a pointer to the current model,
iColumn
is the C index of the column whose status is desired.

This function
returns the column status of the specified column. The only bit of interest is the top bit, i.e. 0x80000000, which if 1, indicates a basic variable.

ekk_colupper

Function prototype:
double * ekk_colupper( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the column upper bounds. If an error occurred, ekk_colupper returns a null pointer.

ekk_context

Function prototype:
EKKContext * ekk_context( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to the OSL context. This allows a user to use the context to look at other models. If an error occurred, ekk_context returns a null pointer.

ekk_copyCollower

Function prototype:
int ekk_copyCollower( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for lower bounds on the column activities. ekk_copyCollower returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyColrcosts

Function prototype:
int ekk_copyColrcosts( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for reduced costs for the columns. ekk_copyColrcosts returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyColsol

Function prototype:
int ekk_copyColsol( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for solution values of the columns. ekk_copyColsol returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyColstat

Function prototype:
int ekk_copyColstat( EKKModel * model , const int * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the status of the columns. ekk_copyColstat returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyColumnNames

Function prototype:
int ekk_copyColumnNames( EKKModel * model , const char * const * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the names of the columns. ekk_copyColumnNames returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyColupper

Function prototype:
int ekk_copyColupper( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for upper bounds on the column activities. ekk_copyColupper returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyModel

Function prototype:
int ekk_copyModel( EKKModel * model , EKKModel * oldModel );

Where:
model
is a pointer to the current model,
oldModel
is a pointer to the model to be copied into the current model,

This function
copies the contents of oldModel into model. If an error occurred, ekk_copyModel returns a nonzero value, otherwise it returns zero.

ekk_copyObjective

Function prototype:
int ekk_copyObjective( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the objective coefficients for the columns. ekk_copyObjective returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowacts

Function prototype:
int ekk_copyRowacts( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the row activities. ekk_copyRowacts returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowduals

Function prototype:
int ekk_copyRowduals( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the duals on the rows. ekk_copyRowduals returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowlower

Function prototype:
int ekk_copyRowlower( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for lower bounds on the row activities. ekk_copyRowlower returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowNames

Function prototype:
int ekk_copyRowNames( EKKModel * model , const char * const * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the names of the rows. ekk_copyRowNames returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowstat

Function prototype:
int ekk_copyRowstat( EKKModel * model , const int * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for the status of the row slacks. ekk_copyRowstat returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copyRowupper

Function prototype:
int ekk_copyRowupper( EKKModel * model , const double * fromArray , int toStart , int toEnd );

Where:
model
is a pointer to the current model,
fromArray
is a pointer to the user array from which model data is to be copied,
toStart
is the index of the first entry of the target array (identified by the name of the function itself) into which data will be copied, and
toEnd
is one more than the index of the last entry of the target array into which data will be copied.

This function
copies the contents of fromArray into the OSL region for upper bounds on the row activities. ekk_copyRowupper returns a nonzero value if an error occurred, otherwise it returns zero.

ekk_copySubModel

Function prototype:
int ekk_copySubModel( EKKModel * model , EKKModel * oldModel , int numberRows2 , int numberColumns2 , const int * selectedRows , const int * selectedColumns );

Where:
model
is a pointer to the current model,
oldModel
is a pointer to the model from which data is to be copied into the current model,
numberRows2
is the number of rows in the new model,
numberColumns2
is the number of columns in the new model,
selectedRows
is a pointer to an array of row indices of length numberRows2 which are the rows to be included in the new model,
selectedColumns
is a pointer to an array of column indices of length numberColumns2 which are the columns to be included in the new model.

This function
copies data from the specified rows and columns of oldModel into model. The order of rows and columns in the new model is as given by the arrays. Also a row or column may appear more than once. Note that at present any quadratic information is lost, as is any Presolve information. If an error occurred, ekk_copySubModel returns a nonzero value, otherwise it returns zero.

ekk_crash

Function prototype:
int ekk_crash( EKKModel * model , int mode );

Where:
model
is a pointer to the current model,
mode
is an indicator ( 1, 2, 3, 4 ) for the type of "crash" processing to be done. If mode=1, dual feasibility may not be maintained.
If mode=2, dual feasibility is maintained, if possible, by not pivoting on variables that are in the objective function.
If mode=3, dual feasibility may not be maintained, but the sum of the infeasibilities will never increase.
If mode=4, dual feasibility is maintained, if possible, by not pivoting on variables that are in the objective function, and in addition, the sum of the infeasibilities will never increase.

This function
provides the functionality of ekkcrsh to obtain a starting basis for the simplex LP solver. The value of mode corresponds to the "type" parameter in the calling sequence of ekkcrsh. If an error occurred, ekk_crash returns a nonzero value, otherwise it returns zero.

ekk_createBInverse

Function prototype:
int ekk_createBInverse( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides the functionality of ekkinvt to generate the primal and dual solutions corresponding to the current basis. If an error occurred, ekk_createBInverse returns a nonzero value, otherwise it returns zero.

ekk_createColumnCopy

Function prototype:
int ekk_createColumnCopy( EKKModel * model , EKKMatrixCopy * copy );

Where:
model
is a pointer to the current model,
copy
is a pointer to the struct into which the new column copy of the constraint matrix is to be stored.

This function
allocates space for, and creates a copy of the constraint matrix (stored by columns) in, the struct pointed to by the copy parameter. The EKKMatrixCopy struct is defined by:
    struct EKKMatrixCopy {
      int *index;
      int *start;
      double *element;
    };
    typedef struct EKKMatrixCopy EKKMatrixCopy;

Data are stored in this struct as follows.
The values of the matrix elements are stored in the element array.
If the matrix is stored by columns, then: the elements from each column are stored in consecutive entries of the element array, though they need not be stored in order by row number;
the index array contains the row numbers of the matrix elements in the order in which the elements are stored in the element array; and
the start array contains in element number j the index into the other two arrays of the first entry for column number j.
If the matrix is stored by rows, then:
the elements from each row are stored in consecutive entries of the element array, though they need not be stored in order by column number;
the index array contains the column numbers of the matrix elements in the order in which the elements are stored in the element array; and
the start array contains in element number i the index into the other two arrays of the first entry for row number i.

If an error occurred, ekk_createColumnCopy returns a nonzero value, otherwise it returns zero.

ekk_createNames

Function prototype:
int ekk_createNames( EKKModel * model , int lengthOfEachName );

Where:
model
is a pointer to the current model,
lengthOfEachName
is the number of characters in the names being created.

This function
creates default OSL names (of the form Rnnnnnnn and Cnnnnnnn, where "n" is a decimal digit) for the rows and columns of the current model. Afterward, one can use the ekk_copyRowNames and ekk_copyColumnNames functions to overwrite the defaults. If an error occurred, ekk_createNames returns a nonzero value, otherwise it returns zero.

ekk_createRowCopy

Function prototype:
int ekk_createRowCopy( EKKModel * model , EKKMatrixCopy * copy );

Where:
model
is a pointer to the current model,
copy
is a pointer to the struct into which the new row copy of the constraint matrix is to be stored.

This function
allocates space for, and creates a copy of the constraint matrix (stored by rows) in, the struct pointed to by the copy parameter. The form of this struct, and a brief explanation of "storage by rows," are given above. If an error occurred, ekk_createRowCopy returns a nonzero value, otherwise it returns zero.

ekk_crossover

Function prototype:
int ekk_crossover( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides part of the functionality of ekksslv to make the "crossover" from the interior point solver to the simplex solver to obtain a basic feasible solution to a LP programming problem. If an error occurred, ekk_crossover returns a nonzero value, otherwise it returns zero.

ekk_deactivateCutoff

Function prototype:
int ekk_deactivateCutoff( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
deactivates the "cutoff" feature of the branch and bound algorithm that can be activated by ekk_activateCutoff, described above. This feature is provided for those who are interested in implementing their own version of a branch and bound algorithm. If an error occurred, ekk_deactivateCutoff returns a nonzero value, otherwise it returns zero.

ekk_decomposeCrash

Function prototype:
int ekk_decomposeCrash( EKKModel * model , int type , int strategy , int numberBlocks );

Where:
model
is a pointer to the current model,
type
is an indicator ( 1, 2, or 3 ) for the type of structure or decomposition.
     If type=1, ekk_decomposeCrash looks for a staircase structure.
     If type=2, ekk_decomposeCrash does one pass of a Dantzig-Wolfe decomposition.
     If type=3, ekk_decomposeCrash performs a full Dantzig-Wolfe decomposition;
strategy
is an indicator ( 0, 1, 2, or 3 ) to be used with type to identify the strategy to be used;
     For a staircase structure problem (type=1):
If strategy=0,
ekk_decomposeCrash checks to see whether the problem can be decomposed to a staircase structure. If it can, ekk_decomposeCrash marks the rows and columns and exits. Otherwise, it issues a message and returns;
If strategy=1,
each subproblem is solved with the neighboring coupling columns free;
If strategy=2,
each subproblem is solved with the columns coupling it to the previous subproblem free, and the columns coupling it to the next subproblem fixed at lower bound;
If strategy=3,
ekk_decomposeCrash builds up the size of the (triangular) sub-problem.
     For one pass of Dantzig-Wolfe decomposition (type=2):
If strategy=0,
ekk_decomposeCrash checks to see whether the problem can be decomposed to a Dantzig-Wolfe structure. If it can, ekk_decomposeCrash marks the rows and columns and exits. Otherwise, it issues a message and returns.
If strategy=1,
ekk_decomposeCrash solves each decomposed subproblem independently, and forms dual feasible bases to the original problem. You would then normally solve the problem using a simplex solver with the dual algorithm option.
If strategy=2,
ekk_decomposeCrash partitions the right-hand side for each subproblem.
If strategy=3,
ekk_decomposeCrash takes an approach similar to that used when strategy=2, except that it puts every second block together until no blocks remain to be added to the problem.
     For multiple passes of Dantzig-Wolfe decomposition (type=3):
If strategy=0,
ekk_decomposeCrash checks to see whether the problem can be decomposed to a Dantzig-Wolfe structure. If it can, ekk_decomposeCrash marks the rows and columns and exits. Otherwise, it issues a message and returns.
If strategy=1,
ekk_decomposeCrash performs full Dantzig-Wolfe decomposition; the master rows are ignored for the initial solution.
If strategy=2,
ekk_decomposeCrash partitions the RHS of the master problem and gives some portion of it to each subproblem.
If strategy=3,
ekk_decomposeCrash does full Dantzig-Wolfe decomposition, using the current solution in memory as an initial solution. This solution may have been created by any of the OSL LP solvers.
numberBlocks
is an indicator ( < 0, = 0, or > 0) for the number of blocks into which the problem is to be decomposed.
If numberBlocks < 0,
the user must have placed block numbers in the row status region.
If numberBlocks = 0,
ekk_decomposeCrash determines the number of blocks to be used.
If numberBlocks > 0,
ekk_decomposeCrash attempts to decompose the problem into numberBlocks blocks.

This function
provides the functionality of ekklpdc to generate a starting basis for a structured LP problem using a Dantzig Wolfe decomposition. See ekk_setIlpdcflag which is only active if numberBlocks is -1. If an error occurred, ekk_decomposeCrash returns a nonzero value, otherwise it returns zero.

ekk_deleteColumns

Function prototype:
int ekk_deleteColumns( EKKModel * model , int numberToDelete , const int * which );

Where:
model
is a pointer to the current model,
numberToDelete
is the number of columns to be deleted,
which
is a pointer to an array that contains the indices of the columns to be deleted.

This function
deletes specified columns from the model. If an error occurred, ekk_deleteColumns returns a nonzero value, otherwise it returns zero.

ekk_deleteIntegerInformation

Function prototype:
int ekk_deleteIntegerInformation( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
deletes specified integer information from the model. This can be useful if integer information to be re-entered in a more structured manner. If an error occurred, ekk_deleteIntegerInformation returns a nonzero value, otherwise it returns zero.

ekk_deleteMatrixCopy

Function prototype:
int ekk_deleteMatrixCopy( EKKMatrixCopy * copy );

Where:
model
is a pointer to the current model,
copy
is a pointer to the struct in which is stored the copy of the constraint matrix to be deleted.

This function
deletes the copy of the constraint matrix stored in, and also deallocates the space for, the struct pointed to by the copy parameter. If an error occurred, ekk_deleteMatrixCopy returns a nonzero value, otherwise it returns zero.

ekk_deleteModel

Function prototype:
int ekk_deleteModel( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
deletes the current model and all memory associated with it. If an error occurred, ekk_deleteModel returns a nonzero value, otherwise it returns zero.

ekk_deleteNames

Function prototype:
int ekk_deleteNames( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
deletes row and column names the current model. (Allows one to save some space.) If an error occurred, ekk_deleteNames returns a nonzero value, otherwise it returns zero.

ekk_deleteRows

Function prototype:
int ekk_deleteRows( EKKModel * model , int numberTodelete , const int * which );

Where:
model
is a pointer to the current model,
numberTodelete
is the number of rows to be deleted,
which
is a pointer to an array that contains the indices of the rows to be deleted.

This function
deletes linear constraints from the current model. If an error occurred, ekk_deleteRows returns a nonzero value, otherwise it returns zero.

ekk_doParametrics

Function prototype:
int ekk_doParametrics( EKKModel * model )

Where:
model
is a pointer to the current model.

This function
does a parametric analysis of a LP problem. If an error occurred, ekk_doParametrics returns a nonzero value, otherwise it returns zero.

ekk_double

Function prototype:
double * ekk_double( int number_entries );

Where:
number_entries
is the number of double words to be "malloc"ed.

This function
returns a pointer to memory that has been "malloc"ed for an array of double words of length number_entries. ekk_double provides the functionality of the C malloc command for arrays of double words. ekk_double should be used instead of the native C malloc command for this purpose because the mechanics of dynamic memory support in C is implementation dependent, and your executable application code and the executable functions of the Optimization Library may be incompatible. ekk_double returns a null pointer, if an error occurred.

ekk_dropLastElementBlock

Function prototype:
int ekk_dropLastElementBlock( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
deletes the last block of constraints from the current model. If an error occurred, ekk_dropLastElementBlock returns a nonzero value, otherwise it returns zero.

ekk_dualNetwork

Function prototype:
int ekk_dualNetwork( EKKModel * model , int startup );

Where:
model
is a pointer to the current model,
startup
is an integer ( 1 - 4 ) that identifies the type of start-up to be used.
If startup=1, the current solution is used to develop an advanced basis. The network data is loaded into network data structures, and any previously existing network problem is overwritten.
If startup=2, the current status vector is used to develop an advanced basis. The network data is loaded into network data structures, and any previously existing problem is overwritten.
If startup=3, an artificial starting basis is used. The network data is loaded into network data structures, and any previously existing problem is overwritten.
If startup=4, processing continues from the existing network basis. Changes in data are not detected.

This function
provides the functionality of ekknslv to solve a network programming problem using the dual simplex method. The problem must be dual feasible on entry. See "Network Programming" for more information on how to solve network programming problems. If an error occurred, ekk_dualNetwork returns a nonzero value, otherwise it returns zero.

ekk_dualSimplex

Function prototype:
int ekk_dualSimplex( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides part of the functionality of ekksslv to solve a LP problem using the dual simplex algorithm with the basis already in memory. If an error occurred, ekk_dualSimplex returns a nonzero value, otherwise it returns zero.

ekk_eitherSimplex

Function prototype:
int ekk_eitherSimplex( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides part of the functionality of ekksslv to solve a LP problem using the primal or dual simplex algorithm based on the characteristics of the problem. If an error occurred, ekk_eitherSimplex returns a nonzero value, otherwise it returns zero.

ekk_endContext

Function prototype:
void ekk_endContext( EKKContext * context );

Where:
context
is the current OSL context,

This function
deallocates system resources allocated by ekk_initializeContext and used by Optimization Library functions. ekk_endContext will also delete all models and the context space.

ekk_exportBasis

Function prototype:
int ekk_exportBasis( EKKModel * model , const char * fileName , int ifCharacter );

Where:
model
is a pointer to the current model,
fileName
is a pointer to the name of the file to be written, fileName may also be passed as a literal, e.g. "basis.123"
ifCharacter
is an indicator ( 0 , 1 or 2 ) for whether not to write ( 0 ) or whether to write the values of the variables into the output file - normally, if ( 1 ), or in a more precise machine dependent way, if ( 2 ).

This function
provides the functionality of ekkbaso to write basis information (in MPS format) to the specified file. The use of ifCharacter set to 2 will save the full 64 bits of floating point number in 12 printable characters for greater accuracy. However this format may not be portable across different computer architectures. If an error occurred, ekk_exportBasis returns a nonzero value, otherwise it returns zero.

ekk_exportModel

Function prototype:
int ekk_exportModel( EKKModel * model , const char * fileName , int ifCharacter , int numberFields );

Where:
model
is a pointer to the current model,
fileName
is a pointer to the name of the file to be written, fileName may also be passed as a literal, e.g. "prob123.mps"
ifCharacter
is an indicator ( 1 or 2 ) for how to write the values of the variables into the output file - normally if ( 1 ) or in a more precise machine dependant way ( 2 ).
numberFields
is the number ( 1 or 2 ) of row/coefficient pairs to be written on each line of the COLUMNS section of the file to be written.

This function
provides the functionality of ekkbcdo to write model information (in MPS format) to the specified file. The use of ifCharacter set to 2 will save the full 64 bits of floating point number in 12 printable characters for greater accuracy. However this format may not be portable across different computer architectures. Using 2 fields yields a more compact representation but having only one field may allow the use of simple tools such as grep to extract part of the model. If an error occurred, ekk_exportModel returns a nonzero value, otherwise it returns zero.

ekk_findSOS

Function prototype:
int ekk_findSOS( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides the functionality of ekksos to identify special ordered sets of types 1 and 3 in the current model, which should (of course) correspond to a MIP problem. If an error occurred, ekk_findSOS returns a nonzero value, otherwise it returns zero.

ekk_formBInverseb

Function prototype:
int ekk_formBInverseb( EKKModel * model , double * b );

Where:
model
is a pointer to the current model,
b
is a pointer to an array which on entry holds the right hand side vector, and on exit holds the solution vector.

This function
provides the functionality of ekkges to compute the solution of AB x = b where AB is the current basis matrix and the right hand side is the vector b supplied. The result is written into the array b provided in the calling sequence. If an error occurred, ekk_formBInverseb returns a nonzero value, otherwise it returns zero.

ekk_formBInverseTransposeb

Function prototype:
int ekk_formBInverseTransposeb( EKKModel * model , double * b );

Where:
model
is a pointer to the current model,
b
is a pointer to an array which on entry holds the right hand side vector, and on exit holds the solution vector.

This function
provides the functionality of ekkges to compute the solution of ABTx = b where ABT is the transpose of the current basis matrix and the right hand side is the vector b supplied. The result is written into the array b provided in the calling sequence. If an error occurred, ekk_formBInverseTransposeb returns a nonzero value, otherwise it returns zero.

ekk_free

Function prototype:
void ekk_free( void * pointer );

Where:
pointer
is a generic pointer to an area of memory where space previously allocated is to be freed.

This function
provides the functionality of the C free command. ekk_free should be used instead of the native C command because the mechanics of dynamic memory support in C is implementation dependent, and user executable application code might be incompatible with Optimization Library executable functions. ekk_free should always be used to deallocate arrays returned by OSL functions, which it is the user's responsibility to delete, or when ekk_int or ekk_double were used to obtain memory. Otherwise ekk_free should never be used.

ekk_freeVector

Function prototype:
void ekk_freeVector( EKKVector * vec );

Where:
vec
is the name of an EKKVector struct for which the space is to be freed.

This function
frees the space associated with the EKKVector struct identified by vec. This struct is defined by:

EKKVector {
int *index;
double *element;
int numNonZero;
};
typedef struct EKKVector EKKVector;

The OSL C API functions that allocate space for, and return, structs of this form are ekk_getColumn and ekk_getRow. Three functions take structs of this form as arguments, namely: ekk_tableauArtificialColumn, ekk_tableauStructuralColumn, and ekk_tableauRow.

ekk_freeVector does not return anything.

ekk_fromBinary

Function prototype:
int ekk_fromBinary( EKKModel * originalmodel , EKKModel * binarymodel );

Where:
originalmodel
is a pointer to the original general integer model,
binarymodel
is a pointer to the transformed binary model.

This function
provides the functionality of ekkbmps to transform the data of the 0/1 MIP problem contained in binarymodel, which had been generated by ekk_makeBinary, back into an updated version of the original general integer MIP problem. It is the user's responsibility to delete the binarymodel. If an error occurred, ekk_fromBinary returns a nonzero value, otherwise it returns zero.

ekk_importBasis

Function prototype:
int ekk_importBasis( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is the name of a file from which a starting basis is to be read. fileName may also be passed as a literal, e. g., "basis.123".

This function
provides the functionality of ekkbasi to read in a basis previously written by ekk_exportBasis. If an error occurred, ekk_importBasis returns a nonzero value, otherwise it returns zero.

ekk_importModel

Function prototype:
int ekk_importModel( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name of an
MPS input file. fileName may also be passed as a literal, e.g. "input.mps". If fileName is "stdin" or "-", then ekk_importModel reads from stdin.

This function
provides the functionality of ekkmps to read in model data in MPS format, and to populate the model referenced in its calling sequence. If this model is not yet named when ekk_importModel is called, then the model will be given the name from the NAME field in the model data read in by ekk_importModel. On the other hand, if the model already has a name, then the name in the NAME field in the model data read in by ekk_importModel must match this name. If an error occurred, ekk_importModel returns a nonzero value, otherwise it returns zero.

ekk_importModelFree

Function prototype:
int ekk_importModelFree( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name of an
MPS input file. fileName may also be passed as a literal, e.g. "input.mps". If fileName is "stdin" or "-", then ekk_importModel reads from stdin.

This function
provides the functionality of ekkmps to read in model data in MPS format, and to populate the model referenced in its calling sequence. If this model is not yet named when ekk_importModelFree is called, then the model will be given the name from the NAME field in the model data read in by ekk_importModelFree. On the other hand, if the model already has a name, then the name in the NAME field in the model data read in by ekk_importModelFree must match this name. This is like ekk_importModel but it always reads in free format, it assumes a name length of up to 24 and sets the true length in ekk_getInumchar. If an error occurred, ekk_importModelFree returns a nonzero value, otherwise it returns zero.

ekk_importQuadraticData

Function prototype:
int ekk_importQuadraticData( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name
of an MPS input file containing quadratic objective coefficients, fileName may also be passed as a literal, e.g. "q_coef.mps"

This function
provides the functionality of ekkqmps to read in a quadratic objective coefficient matrix elements in MPS format, and to populate the model referenced in its calling sequence. The name in the NAME field in the model data read in by ekk_importQuadraticData must match the value of model supplied in its calling sequence. If an error occurred, ekk_importQuadraticData returns a nonzero value, otherwise it returns zero.

ekk_infeasibilities

Function prototype:
int ekk_infeasibilities( EKKModel * model , int mask , int output , int * index , int * table );

Where:
model
is a pointer to the current model,
mask
is a bit mask that determines the processing to be done. 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 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 of 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, then the resulting problem will be feasible.

This function
provides the functionality of ekknfes to analyze an infeasible LP problem. The mask parameter corresponds to the parameter of the same name in the calling sequence of ekknfes. If an error occurred, ekk_infeasibilities returns a nonzero value, otherwise it returns zero.

ekk_initializeContext

Function prototype:
EKKContext * ekk_initializeContext( );

This function
initializes an entire Optimization Library context. Among other things, it provides the functionality of ekk_init. However, it does not initialize a model. If an error occurred, ekk_initializeContext returns a null pointer, otherwise it returns a pointer to the OSL context. This pointer can be used to iterate over current models. The context pointer is an argument in the calling sequences of ekk_newModel, ekk_model, and ekk_numberOfModels.

ekk_int

Function prototype:
int * ekk_int( int number_entries );

Where:
number_entries
is the number of int words to be "malloc"ed.

This function
returns a pointer to memory that has been "malloc"ed for an array of integers of length number_entries. ekk_int provides the functionality of the C malloc command for arrays of integers. ekk_int should be used instead of the native C malloc command for this purpose because the mechanics of dynamic memory support in C is implementation dependent, and your executable application code and the executable functions of the Optimization Library may be incompatible in this respect. ekk_int returns a null pointer, if the "malloc" failed, or if an error occurred.

ekk_integerType

Function prototype:
char * ekk_integerType( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to a character array, if the current model includes integer variables, or NULL, if it does not. If the current model does include integer variables, then the array pointed to contains single character indicators (with possible values: 0, 1, and 2) that identify the type of each variable. An indicator is: 0 for a continuous variable, 1 for a binary integer variable, or 2 for a general integer variable.

ekk_isColumnBasic

Function prototype:
int ekk_isColumnBasic( EKKModel * model , int iColumn );

Where:
model
is a pointer to the current model,
iColumn
is the C index of the column of interest.

This function
returns a nonzero value, if the column whose C index is iColumn is basic. If an inverse exists, the value returned is 1 plus the index of the pivot row. If the column whose C index is iColumn is not basic, 0 is returned.

ekk_isModelInteger

Function prototype:
int ekk_isModelInteger( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns 1, if the current model has integer data, and 0 if it does not.

ekk_isModelQuadratic

Function prototype:
int ekk_isModelQuadratic( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns 1, if the current model had quadratic objective coefficients, and 0 if it does not.

ekk_isRowBasic

Function prototype:
int ekk_isRowBasic( EKKModel * model , int iRow );

Where:
model
is a pointer to the current model,
iRow
is the C index of the column of interest.

This function
returns 1 plus the index of the pivot row, if the row whose C index is iRow is basic, or 0, if this row is not basic.

ekk_lastAlgorithm

Function prototype:
int ekk_lastAlgorithm( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns the last simplex algorithm used as 1 for primal and 2 for dual. This is of most use when ekk_eitherSimplex was called.

ekk_listOfIntegers

Function prototype:
int * ekk_listOfIntegers( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an int array of length ekk_getInumints which contains the sequence numbers of the integer variables. It is up to user to free this array using ekk_free.

ekk_loadDspace

Function prototype:
int ekk_loadDspace( EKKModel * model , double * dspace , int lengthOfDspace );

Where:
model
is a pointer to the current model,
dspace
is a pointer to an array of doublewords to be used as the new workspace,
lengthOfDspace
is the number of doublewords in the dspace array.

This function
populates a new Optimization Library workspace, identified by dspace, whose size in double words is specified by lengthOfDspace, with data obtained from the model identified by model. This function enables one to create a workspace, and then use it with "old style" Optimization Library application code. If an error occurred, ekk_loadDspace returns a nonzero value, otherwise it returns zero.

ekk_loadQuadraticData

Function prototype:
int ekk_loadQuadraticData( EKKModel * model , int type , int numberElements , const int * row , const int * column , const double * element );

Where:
model
is a pointer to the current model,
type
is an indicator for the storage mode of the quadratic coefficient matrix (1 if stored by indices, 2 if stored by columns),
numberElements
is the number of elements to be loaded, if stored by indices, or the number of columns, if stored by columns,
row
is a pointer to the first element of an array of row indices,
column
is a pointer to the first element of an array of column indices or column starts,
element
is a pointer to the first element of an array of values to be used.

This function
loads the quadratic coefficient matrix for a QP problem. If an error occurred, ekk_loadQuadraticData returns a nonzero value, otherwise it returns zero.

ekk_loadRimModel

Function prototype:
int ekk_loadRimModel( EKKModel * model , int numberOfRows , const double * lowerRow , const double * upperRow , int numberOfColumns , const double * objective , const double * lowerColumn , const double * upperColumn );

Where:
model
is a pointer to the current model,
numberOfRows
is the number of rows in the model,
lowerRow
is a pointer to an array of doublewords that contains values for the row lower bounds,
upperRow
is a pointer to an array of doublewords that contains values for the row upper bounds,
numberOfColumns
is the number of columns in the model,
objective
is a pointer to an array of doublewords that contains values for the coefficients of the (linear) objective function,
lowerColumn
is a pointer to an array of doublewords that contains values for the column lower bounds,
upperColumn
is a pointer to an array of doublewords that contains values for the column upper bounds.

This function
populates the "Rim" of the current model. That is, it loads into the model structure the values supplied for the coefficients of the linear objective function, and the upper and lower bounds on the rows and columns of the model. If any of the data related pointers is null, then default values are stored in the corresponding data array. I.e. for rows, if lowerRow is null, then all the new lower bounds are set to -1.031, and if upperRow is null, then all the new upper bounds are set to 1.031. For columns, if objective is null, then all the new objective function coefficients are set to zero; if lowerColumn is null, then all the new lower bounds are set to 0.0; if upperColumn is null, then all the new upper bounds are set to 1.031. If an error occurred, ekk_loadRimModel returns a nonzero value, otherwise it returns zero.

ekk_makeBinary

Function prototype:
int ekk_makeBinary( EKKModel * model , int type );

Where:
model
is a pointer to the current model, and
type
is an indicator for the type of transformation desired. If type=1, the general integer variables are replaced by linear combinations of binary variables in which the coefficients are the powers of 2. This is referred to as a LOG2 transformation.
If type=2, the general integer variables are replaced by linear combinations of binary variables in which the coefficients are the natural numbers. This is referred to as a SOS transformation.

This function
provides the functionality of ekkbmpr to transform a general integer MIP problem into a 0/1 MIP problem. This function should be called early in the solution of such a problem. Since this ekk_makeBinary modifies data in the model supplied, one must save a copy of the original model, if one wishes to recover the solution to the original general integer problem. ekk_copyModel and ekk_fromBinary provide the capability to do this. If an error occurred, ekk_makeBinary returns a nonzero value, otherwise it returns zero.

ekk_markAsInteger

Function prototype:
int ekk_markAsInteger( EKKModel * model , int iColumn );

Where:
model
is a pointer to the current model,
iColumn
is the index of the problem variable to be marked as integer.

This function
marks a particular column as an integer variable. If an error occurred, ekk_markAsInteger returns a nonzero value, otherwise it returns zero.

ekk_markColumnsAsBasic

Function prototype:
int ekk_markColumnsAsBasic( EKKModel * model , int numberToMark , const int * which );

Where:
model
is a pointer to the current model,
numberToMark
is the number of columns to be marked,
which
is a pointer to a list of the C indices of the columns to be marked as being basic.

This function
marks columns as being basic.

ekk_markRowsAsBasic

Function prototype:
int ekk_markRowsAsBasic( EKKModel * model , int numberToMark , const int * which );

Where:
model
is a pointer to the current model,
numberToMark
is the number of rows to be marked,
which
is a pointer to a list of the C indices of the rows to be marked as being basic.

This function
marks rows as being basic.

ekk_matrixTransposeVector

Function prototype:
int ekk_matrixTransposeVector( EKKModel * model , double alpha , const double * x , double beta , double * y );

Where:
model
is a pointer to the current model,
alpha
is a coefficient to be multiplied onto the transpose of the constraint matrix A in the computation,
x
is a pointer to an array containing one set of vector elements to be used in the computation,
beta
is a coefficient to be multiplied onto the elements of y in the computation,
y
is a pointer to an array in which initially vector elements to be used in the computation are stored, and finally results of the computation will be stored.

This function
provides the functionality of ekkgemv to compute y   b y + a AT x. If an error occurred, ekk_matrixTransposeVector returns a nonzero value, otherwise it returns zero.

ekk_matrixVector

Function prototype:
int ekk_matrixVector( EKKModel * model , double alpha , const double * x , double beta , double * y );

Where:
model
is a pointer to the current model,
alpha
is a coefficient to be multiplied onto the constraint matrix A in the computation,
x
is a pointer to an array containing vector elements to be used in the computation,
beta
is a coefficient to be multiplied onto the elements of y in the computation,
y
is a pointer to an array in which initially vector elements to be used in the computation are stored, and finally results of the computation will be stored.

This function
provides the functionality of ekkgemv to compute y   b y + a A x. If an error occurred, ekk_matrixVector returns a nonzero value, otherwise it returns zero.

ekk_mergeBlocks

Function prototype:
int ekk_mergeBlocks( EKKModel * model , int ifColumnOrdered );

Where:
model
is a pointer to the current model,
ifColumnOrdered
is an indicator ( 1 => yes , 0 => no ) for whether the existing matrix blocks are stored by columns.

This function
creates a new copy of the constraint matrix in which all the blocks of elements have been merged into a single block. The resulting matrix will be stored by columns. This will make subsequent algorithms faster. If an error occurred, ekk_mergeBlocks returns a nonzero value, otherwise it returns zero.

ekk_messagePrintOff

Function prototype:
int ekk_messagePrintOff( int messageNumber );

Where:
messageNumber
is the number of the OSL message whose output is to be turned "off."

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn off the printing of the specified Optimization Library message. If an error occurred, ekk_messagePrintOff returns a nonzero value, otherwise it returns zero.

ekk_messagePrintOn

Function prototype:
int ekk_messagePrintOn( int messageNumber );

Where:
messageNumber
is the number of the OSL message whose output is to be turned "on."

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn on the printing of the specified Optimization Library message. If an error occurred, ekk_messagePrintOn returns a nonzero value, otherwise it returns zero.

ekk_messagesPrintOff

Function prototype:
int ekk_messagesPrintOff( int messageNumber );

Where:
startMessageNumber
is the number of the first OSL message whose output is to be turned "off."
endMessageNumber
is the number of the first OSL message whose output is not to be turned "off."

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn off the printing of the specified Optimization Library messages. If an error occurred, ekk_messagesPrintOff returns a nonzero value, otherwise it returns zero.

ekk_messagesPrintOn

Function prototype:
int ekk_messagesPrintOn( int messageNumber );

Where:
startMessageNumber
is the number of the first OSL message whose output is to be turned "on."
endMessageNumber
is the number of the first OSL message whose output is not to be turned "on."

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn on the printing of the specified Optimization Library messages. If an error occurred, ekk_messagesPrintOff returns a nonzero value, otherwise it returns zero.

ekk_messageUserExitOff

Function prototype:
int ekk_messageUserExitOff( int messageNumber );

Where:
messageNumber
is the number of the OSL message for which the call to the message user exit is to be turned "off"

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn off the call to the message user exit when the specified Optimization Library message is generated. If an error occurred, ekk_messageUserExitOff returns a nonzero value, otherwise it returns zero.

ekk_messageUserExitOn

Function prototype:
int ekk_messageUserExitOn( int messageNumber );

Where:
messageNumber
is the number of the OSL message for which the call to the message user exit is to be turned "on"

This function
provides some of the functionality of ekk_mset, with fewer parameters, to turn on the call to the message user exit when the specified Optimization Library message is generated. If an error occurred, ekk_messageUserExitOn returns a nonzero value, otherwise it returns zero.

ekk_model

Function prototype:
EKKModel * ekk_model( const EKKContext * context , int whichModel );

Where:
context
is the OSL context variable,
whichModel
is the model number within the context.

This function
returns the whichModel 'th model of the OSL context. As models are created and deleted then the models position in the context may change, so the user should use some identifier e.g. the name if this may happen. ekk_model returns null if an error occurred.

ekk_mset

Function prototype:
int * ekk_mset( EKKModel * model , int startNumber , int maxAllowed , int maxPrint , int userExit , int endNumber , int noNumber );

Where:
model
is a pointer to the current model,
startNumber
is the message number of the message whose output conditions are to be changed, or if these conditions are to be changed for several consecutively numbered messages, the first such message number,
maxAllowed
is the maximum number of times that the condition whose occurrence results in the issuance of the specified message(s) is to be allowed to occur before the application is to be terminated;
    if maxAllowed > 255, then an unlimited number of occurrences will be allowed, and
    if maxAllowed < 1, then the maximum number of allowable occurrences will not be changed.
maxPrint
is the maximum number of times the message will be printed;
    if maxPrint > 255, then the message(s) may be print an unlimited number of times,
    if maxPrint < 0, then the message(s) will not be printed at all, and
    if maxPrint = 0, then the maximum number of printings allowed will not be changed.
userExit
is an indicator for controlling calls to the message related callback function function;
    if usrExit=1, this callback function will not be called,
    if usrExit=2, this callback function will be called when the specified message is to be output, and
    if usrExit is neither 1 nor 2, then the usrExit setting is not changed.
endNumber
is a message number, to be interpreted as follows:
    if endNumber is less than or equal to strtnum, then the specified settings are to be applied only to the OSL message numbered startNumber,
    if endNumber is greater than strtnum, then its value is the number of the last of the consecutively numbered messages to which the specified settings are to be applied.
noNumber
is an indicator that controls the printing of message numbers
    if noNumber is 1, the message number will not be printed with the specified message(s),
    if noNumber is 2, the message number will be printed with the specified message(s), and
    if noNumber is neither 1 nor 2, the previous setting of nonum is not changed for the specified message(s).

This function
provides the capability to change the conditions under which specified OSL messages will be output. Notes

  1. If transfer of control to a user-supplied message related callback function (ekk_msgu or equivalent) is desired, then maxalw must be at least 2.
  2. the effects of maxalw, maxprt, trace, and usrExit may be altered by values of the integer control variables: Ilogfreq, Iloglevel, and Iintmask
  3. . In particular, if the printing of the specified message(s) has been suppressed by any these control variables, then:
  4. If you reset a "severe" message, and you call any other library function, results are unpredictable.

If an error occurred, ekk_mset returns a nonzero value, otherwise it returns zero.

ekk_newModel

Function prototype:
EKKModel * ekk_newModel( EKKContext * context , const char * nameOfModel );

Where:
context
is the current OSL context,
nameOfModel
is the name to be assigned to a new model being instantiated.

This function
creates a new (but empty) model, assigns the name supplied, and returns a pointer to the newly created model. If nameOfModel is null or "", then a name can be associated with this model by invoking ekk_importModel. If it is not null then the NAME card must match. ekk_newModel MUST be called in order to create a pointer to the model (which is an entirely different thing from the name of the model, i.e., the value of nameOfModel).
Note: ekk_newModel gets space for the new model from the operating system. To recover this space, after having processed (or lost interest in) the model, one should call ekk_deleteModel. A call to ekk_endContext recovers the space for all remaining models. ekk_newModel returns a null pointer, if an error occurred.

ekk_numberOfModels

Function prototype:
int ekk_numberOfModels( const EKKContext * context );

Where:
context
is the OSL context variable.

This function
returns the number of models in the OSL context. This would normally be used to loop over all models setting some tolerance.

ekk_objective

Function prototype:
double * ekk_objective( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the objective function coefficients. If an error occurred, ekk_objective returns a null pointer

ekk_pivotRow

Function prototype:
int ekk_pivotRow( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns the last pivot row - this is only useful in specialized algorithms when the problem is infeasible.

ekk_postSolve

Function prototype:
int ekk_postSolve( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name of the file in which transformation information is to be saved for use by ekk_postSolve to recover the original problem. fileName may also be passed as a literal, e.g. "presolve.info". If fileName is null, the information was saved in memory.

This function
provides the functionality of ekkpssl to recover a problem that has been processed by ekk_presolve. If an error occurred, ekk_postSolve returns a nonzero value, otherwise it returns zero.

ekk_preSolve

Function prototype:
int ekk_preSolve( EKKModel * model , int mode , const char * fileName );

Where:
model
is a pointer to the current model,
mode
is an indicator ( 0, 1, 2, or 3 ) for the type of reduction to be done. If mode=0, redundant rows are eliminated, and the variables summing to zero are fixed. If just one variable in a row is not fixed, then that row is used to impose an implicit upper or lower bound on the variable, and then the row is eliminated.
If mode=1, mode=0 reductions are done, and also doubleton rows (of the form aij xj + aik xk = bi ) are eliminated.
If mode=2, mode=0 reductions are done, and if rows of the form x1 - x2 - ... - xn = 0, are found (where each variable is nonnegative), then xi (the row and column) is eliminated from the problem by expressing the variable in terms of the others without violating the nonnegativity constraints.
If mode=3, all the reductions defined above are performed.
Note: the mode parameter corresponds to the type parameter in the calling sequence of ekk_preSolve.
fileName
is a pointer to a character string containing the name of the file in which transformation information is to be saved for use by ekk_postSolve to recover the original problem. fileName may also be passed as a literal, e.g. "presolve.info". If fileName is null, the information is saved in memory.

This function
provides the functionality of ekkprsl to simplify the constraint set of a LP problem. If an error occurred, ekk_preSolve returns a nonzero value, otherwise it returns zero.

ekk_primalNetwork

Function prototype:
int ekk_primalNetwork( EKKModel * model , int startup );

Where:
model
is a pointer to the current model,
startup
is an integer ( 1 - 6 ) that identifies the type of start-up to be used. If startup=1, the current solution is used to develop an advanced basis. The network data is loaded into network data structures, and any previously existing network problem is overwritten.
If startup=2, the current status vector is used to develop an advanced basis. The network data is loaded into network data structures, and any previously existing problem is overwritten.
If startup=3, an artificial starting basis is used. The network data is loaded into network data structures, and any previously existing problem is overwritten.
If startup=4, processing continues from the existing network basis. Changes in data are not detected.
If startup=5, processing continues from the existing network basis. Changes in the right hand side, the flow bounds, or the costs are detected.
If startup=6, processing continues from the existing network basis. Changes in the cost data are detected.

This function
provides the functionality of ekknslv to solve a network programming problem using the primal simplex method. See "Network Programming" for more information on how to solve network programming problems. If an error occurred, ekk_primalNetwork returns a nonzero value, otherwise it returns zero.

ekk_primalSimplex

Function prototype:
int ekk_primalSimplex( EKKModel * model , int startUpMode );

Where:
model
is a pointer to the current model,
startUpMode
is an indicator ( 0, 1, 2, 3 ) for the type of procedure to be used. If startUpMode=0, processing continues using the basis in memory and the pricing strategy from a previous call to a simplex solver. (This may be desired if a previous call has not resulted in an optimal solution.)
If startUpMode=1, Devex pricing is used.
If startUpMode=2, random pricing is used first for "fast" iterations, and then Devex pricing is used.
If startUpMode=3, values from a previous step in the solution process are used to start the simplex algorithm. (This can be useful, if you are calling the solver for a second time.)

Note startUpMode corresponds to the init parameter in the calling sequence of ekksslv.

This function
provides the functionality of ekksslv to solve a LP problem using the primal simplex algorithm. Note that regardless of the value startUpMode, the simplex solver uses the row and column status regions to determine a starting basis, and to identify non-basic rows and columns. If startUpMode=3, an advanced basis is determined from the existing primal solution vector, as well as the row and column status vectors, and the row activities. There is no provision for using dual solution values in selecting an advanced starting basis. There are very few problems for which startupMode=2 will give best results. If an error occurred, ekk_primalSimplex returns a nonzero value, otherwise it returns zero.

ekk_printBase

Function prototype:
void ekk_printBase( EKKModel * model , int base );

Where:
model
is a pointer to the current model,
base
is an indicator ( 0 or 1 ) for numbering output rows and columns. base = 0 means use C notation (first row and column numbered 0), and base = 1 means use FORTRAN notation (first row and column numbered 1).

This function
is provided to permit printing problem information in the "old style," with FORTRAN notation. Not everyone is a C programmer.

ekk_printSolution

Function prototype:
int ekk_printSolution( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides the functionality of ekkprts to output solution information. The user can exercise substantial control over what will be output by setting values for the index control variables: Isolmask and/or Iprintsens and/or Iprtinfomask (using the appropriate ekk_setI... function) and/or by modifying the row and column selection lists using ekk_sellistrow and/or ekk_sellistcol. Output is not necessarily directed to stdout, but to the current Logfile File, which can be set using ekk_setLogfileFilePointer or ekk_setLogfileFileName. If an error occurred, ekk_printSolution returns a nonzero value, otherwise it returns zero.

ekk_quadraticBarrier

Function prototype:
int ekk_quadraticBarrier( EKKModel * model , int mode );

Where:
model
is a pointer to the current model,
mode
is an indicator ( 0, 1, 2, or 3 ) for switching to the simplex algorithm to obtain a basic feasible solution, as for ekk_barrier.

This function
provides the functionality of ekkqslv (with alg = -1) to solve a QP problem using a regularized interior point algorithm. The initialization parameter, mode, takes values of 0 and 1. A value of 0 means "continue from a previous quadratic solution," and a value of 1 means "start from scratch." A value of 0 is recommended, when a previous solution is available. If an error occurred, ekk_quadraticBarrier returns a nonzero value, otherwise it returns zero.

ekk_quadraticBlockColumn

Function prototype:
int * ekk_quadraticBlockColumn( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose column information array is to be located.

This function
returns a pointer to the array of column starts, or column indices, for the specified block of the quadratic matrix.

ekk_quadraticBlockColumnBase

Function prototype:
int ekk_quadraticBlockColumnBase( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose column base is to be returned.

This function
returns the "column base" (i.e., numerical offset) for the indices of the columns in the specified block of the quadratic matrix.

ekk_quadraticBlockElement

Function prototype:
double * ekk_quadraticBlockElement( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block of matrix elements of interest.

This function
returns a pointer to the quadratic coefficients for this block. This should be used in conjunction with ekk_quadraticBlockColumn and ekk_quadraticBlockRow.

ekk_quadraticBlockNumberColumns

Function prototype:
int ekk_quadraticBlockNumberColumns( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose number of columns is desired.

This function
returns the number of columns in the specified quadratic block.

ekk_quadraticBlockNumberElements

Function prototype:
int ekk_quadraticBlockNumberElements( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose number of elements is desired.

This function
returns the number of elements in the specified quadratic block.

ekk_quadraticBlockRow

Function prototype:
int * ekk_quadraticBlockRow( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose row indices are to be located.

This function
returns a pointer to the array of row indices for the elements of the specified block of the quadratic matrix.

ekk_quadraticBlockRowBase

Function prototype:
int ekk_quadraticBlockRowBase( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose row base is to be returned.

This function
returns the "row base" (i.e., numerical offset) for the indices of the rows in the specified block of the quadratic matrix.

ekk_quadraticBlockType

Function prototype:
int ekk_quadraticBlockType( EKKModel * model , int whichBlock );

Where:
model
is a pointer to the current model,
whichBlock
is the index of the block whose storage type is to be determined.

This function
returns "1" if the elements of the specified block of of the quadratic matrix is stored by indices, i.e., as triplets, and returns "2," if they are stored by columns.

ekk_quadraticParametrics

Function prototype:
int ekk_quadraticParametrics( EKKModel * model , const double * parrhs , const double * parobj , double lambdaMin , double lambdaMax );

Where:
model
is a pointer to the current model,
parrhs
is an array of parametric adjustment vectors for the right hand sides;
(the dimension of this array is Inumrows, the number of rows in the problem),
parobj
is an array of parametric adjustment vectors for the objective function coefficients,
(the dimension of this array is Inumcols, the number of columns in the problem),
lambdaMin
is the (non-negative) initial multiplier for the elements of parrhs and parobj that will form the parametric adjustment vectors to be added to right hand sides of row constraints and objective function coefficients respectively,
lambdaMax
is the upper limit (not less than lambdaMin) on the multiplier used to form parametric adjustment vectors.

This function
provides the functionality of ekkqpar to parametrically analyze a QP problem. It modifies right hand sides of row constraints and the objective function coefficients (by adding lambdaMin times the values of parrhs and parobj respectively), and resolves the QP problem. If the optimal basis has changed, then the iteration user exit function, ekk_itru, is called; otherwise, the problem is again modified and re-solved until either a new optimal basis is found, or the number of repetitions exceeds the value of the control variable Iqparmaxiter), (which can be set with ekk_setIqparmaxiter), or the product of the number of repetitions with lambdaMin exceeds lambdaMax. ekk_quadraticParametrics itself does not generate any output. However, from ekk_itru one can output results, change values of control variables (including Iqparmaxiter), and call various other OSL functions. For more details, see the documentation of ekk_itru. If an error occurred, ekk_quadraticParametrics returns a nonzero value, otherwise it returns zero.

ekk_quadraticSimplex

Function prototype:
int ekk_quadraticSimplex( EKKModel * model , int mode );

Where:
model
is a pointer to the current model,
mode
is an indicator ( 0, 1, 2, or 3 ) for switching to the simplex algorithm to obtain a basic feasible solution, as for ekk_barrier.

This function
provides the functionality of ekkqslv (with alg = 1) to solve a QP problem using an iterative simplex based algorithm. The mode parameter takes values of 0 and 1. A value of 0 means "start from a previous quadratic solution," and a value of 1 "means start from scratch." A value of 0 is recommended, when a previous solution is available. If an error occurred, ekk_quadraticSimplex returns a nonzero value, otherwise it returns zero.

ekk_registerBrnuCallBack

Function prototype:
void ekk_registerBrnuCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the MIP User Exit ekk_brnu.

ekk_registerChnuCallBack

Function prototype:
void ekk_registerChnuCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the MIP User Exit ekk_chnu.

ekk_registerEvnuCallBack

Function prototype:
void ekk_registerEvnuCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the MIP User Exit ekk_evnu,

ekk_registerItruCallBack

Function prototype:
void ekk_registerItruCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the Iteration User Exit ekk_itru.

ekk_registerMsguCallBack

Function prototype:
void ekk_registerMsguCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the Message User Exit ekk_msgu.

ekk_registerNoduCallBack

Function prototype:
void ekk_registerNoduCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the MIP User Exit ekk_nodu,

ekk_registerOrduCallBack

Function prototype:
void ekk_registerOrduCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the Row Ordering User Exit ekk_ordu.

ekk_registerSlvuCallBack

Function prototype:
void ekk_registerSlvuCallBack( void * ekkcbptr );

Where:
ekkcbptr
is a pointer to an alternate subroutine which is to be called in place the default user exit.

This function
registers by name an alternate user exit subroutine to be called in place of the default version of the MIP User Exit ekk_slvu.

ekk_regularized

Function prototype:
int ekk_regularized( EKKModel * model , int mode );

Where:
model
is a pointer to the current model, and
mode
is an indicator for whether to change over to simplex as for ekk_barrier.

This function
solves a LP problem using the regularized interior point method. If an error occurred, ekk_regularized returns a nonzero value, otherwise it returns zero.

ekk_repeatElementBlock

Function prototype:
int ekk_repeatElementBlock( EKKModel * model , int whichBlock , int rowOffset , int columnOffset , int ifCopy );

Where:
model
is a pointer to the current model,
whichBlock
is the number of the block to be repeated,
rowOffset
is the offset to be applied to the row indices of the elements to create the repeated block,
ColumnOffset
is the offset to be applied to the column indices of the elements to create the repeated block,
ifcopy
is 0 to point to the original block, 1 to make a copy of that block.

This function
repeats a block of the constraint matrix an a location specified by the row and column offset values. If an error occurred, ekk_repeatElementBlock returns a nonzero value, otherwise it returns zero.

ekk_replaceColumn

Function prototype:
int ekk_replaceColumn( EKKModel * model , int iColumn , int numberElements , const int * indexRow , const double * elements );

Where:
model
is a pointer to the current model,
iColumn
is the index of the column to be replaced,
numberElements
is the number of elements in the replacement column
indexRow
is a pointer to the an array that contains the row indices of the elements of the replacement column,
elements
is a pointer to the an array that contains the values of the elements of the replacement column.

This function
replaces a column with a new one in the current model. i.e. a column, and the terms that reference it among the constraints, are deleted, and a new one is added. If an error occurred, ekk_replaceColumn returns a nonzero value, otherwise it returns zero.

ekk_replaceElements

Function prototype:
int ekk_replaceElements( EKKModel * model , int numberElements , const int * indexRow , const int * indexColumn , const double * elements );

Where:
model
is a pointer to the current model,
numberElements
is the number of elements in the replacement vectors
indexRow
is a pointer to the an array that contains the row indices of the elements to be modified
indexColumn
is a pointer to the an array that contains the column indices of the elements to be modified
elements
is a pointer to the an array that contains the values of the elements to be modified

This function
replaces or modifies elements in the model. If an indexRow, Column pair define an existing element then that element is given the new value, unless its value is less than or equal to ekk_getRtolmps when it is deleted. Any new elements are added (again if above the tolerance whose default value is 1.0e-12). If an error occurred, ekk_replaceElements returns a nonzero value, otherwise it returns zero.

ekk_replaceRow

Function prototype:
int ekk_replaceRow( EKKModel * model , int iRow , int numberElements , const int * indexRow , const double * elements );

Where:
model
is a pointer to the current model,
iRow
is the index of the row to be replaced,
numberElements
is the number of elements in the row to be inserted,
indexRow
is a pointer to the array that contains the column indices of the elements of the row to be inserted,
elements
is a pointer to the array that contains the values of the elements in the row to be inserted.

This function
replaces one constraint of the model with another. If an error occurred, ekk_replaceRow returns a nonzero value, otherwise it returns zero.

ekk_resizeElementBlock

Function prototype:
int ekk_resizeElementBlock( EKKModel * model , int iBlock , int maximumNumberElements , int ifCompress );

Where:
model
is a pointer to the current model,
iBlock
is the index of the block that is to be resized,
maximumNumberElements
is the maximum number of elements in the block,
ifCompress
is a binary indicator for whether the constraint block is to be compressed when the updated constraint block uses less memory.

This function
redefines the size of the given block. If the block is column ordered then it is always resized so that it can take any number of columns - up to the maximum currently defined. If an error occurred, ekk_resizeElementBlock returns a nonzero value, otherwise it returns zero.

ekk_resizeModel

Function prototype:
int ekk_resizeModel( EKKModel * model , int newNumberRows , int newNumberColumns , int ifCompress );

Where:
model
is a pointer to the current model,
newNumberRows
is the updated number of rows in the model,
newNumberCols
is the updated number of columns in the model,
ifCompress
is a binary indicator for whether the constraint matrix is to be compressed when the updated constraint matrix has fewer columns.

This function
resets the numbers of rows and columns for the existing model. If the number of rows or columns is increased to more than the current maximum then the maximum possible will be increased by more than the amount asked. This is to minimize the overhead of resizing one row or column at a time. If an error occurred, ekk_resizeModel returns a nonzero value, otherwise it returns zero.

ekk_resizeModelExact

Function prototype:
int ekk_resizeModelExact( EKKModel * model , int newNumberRows , int newNumberColumns , int maxRows , int maxCols , int ifCompress );

Where:
model
is a pointer to the current model,
newNumberRows
is an indicator for the desired number of rows in the resized model, if newNumberRows is negative, the number of rows will not be changed,
if newNumberRows is nonnegative, then newNumberRows is the desired number of rows,
newNumberColumns
is an indicator for the desired number of columns in the resized model, if newNumberColumns is negative, the number of columns will not be changed,
if newNumberColumns is nonnegative, then newNumberColumns is the desired number of columns,
maxRows
is the desired maximum number of rows in the resized model,
maxColumns
is the desired maximum number of columns in the resized model,
ifCompress
is a binary indicator for whether the constraint matrix for the resized model is to be compressed, if it has fewer columns than the original matrix.

This function
is as ekk_resizeModel. but if the new of rows or columns number is greater than the maximum it will be resized exactly. This means that repeated calls to ekk_resizeModelExact will be slower. If an error occurred, ekk_resizeModelExact returns a nonzero value, otherwise it returns zero.

ekk_restoreModel

Function prototype:
int ekk_restoreModel( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name of a file from which model information is to be read. fileName may also be passed as a literal, e.g. "putmod.data"

This function
provides the functionality of ekkgtmd to read model data from the file specified by the fileName parameter into the model, specified by the model parameter. If an error occurred, ekk_restoreModel returns a nonzero value, otherwise it returns zero.

ekk_rowacts

Function prototype:
double * ekk_rowacts( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the values of the row activities.

ekk_rowaux

Function prototype:
double * ekk_rowaux( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row auxiliary solve information.

ekk_rowduals

Function prototype:
double * ekk_rowduals( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row duals (note that the sign is changed to the more common usage when using the C API).

ekk_rowlower

Function prototype:
double * ekk_rowlower( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row lower bounds.

ekk_rowNamePointers

Function prototype:
const char * const * ekk_rowNamePointers( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row names for the specified model. If there are no row names it returns null.

ekk_rowscales

Function prototype:
double * ekk_rowscales( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains scale factors for the rows.

ekk_rowstat

Function prototype:
int * ekk_rowstat( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains status values for the rows.

ekk_rowStatus

Function prototype:
int ekk_rowStatus( EKKModel * model , int iRow );

Where:
model
is a pointer to the current model,
iRow
is the C index of the row whose status is desired.

This function
returns the status of the row slack. The only bit of interest is the top bit i.e. 0x80000000, which if set, indicates a basic variable.

ekk_rowupper

Function prototype:
double * ekk_rowupper( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row upper bounds.

ekk_saveModel

Function prototype:
int ekk_saveModel( EKKModel * model , const char * fileName );

Where:
model
is a pointer to the current model,
fileName
is a pointer to a character string containing the name of a file into which model information is to be written. fileName may also be passed as a literal, e.g. "putmod.data"

This function
provides the functionality of ekkptmd to save model data in the file specified by the fileName parameter. If an error occurred, ekk_saveModel returns a nonzero value, otherwise it returns zero.

ekk_scale

Function prototype:
int ekk_scale( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides the functionality of ekkscal to scale the coefficients of the constraint matrix. The purpose of scaling these coefficients is to reduce their numerical spread, in the hope of increasing the numerical stability of the computations to follow. Scaling is very important, and can be very effective in improving numerical stability. On the other hand, scaling a problem may hide some relationships between variables that would otherwise be apparent. In any case, you should realize that user is probably better able to scale the problem than any computer algorithm. One way to do this is: first choose appropriately scaled units for the extensive variables of the problem, e.g., consider using: kilo-tons instead of pounds, tank car loads instead of gallons, millions of dollars instead of pennies, or nanometers instead of meters, so that the numerical spread of the coefficients in each single constraint, and in the objective function, will be at most one or two orders of magnitude; and then second, scale the constraints themselves, by multiplying each entire constraint relation by an appropriate positive constant, so that the numerical spread of the coefficients in the different constraints is at most another one or two orders of magnitude. (Of course, these steps are not completely separable. A choice of units for a particular variable effects each constraint in which that variable appears. The best you can do is just the best you can do.) The scaling algorithm implemented in ekk_scale is intended to approximate this in its attempt to minimize the numerical spread of the matrix coefficients, but of course, a computer algorithm knows nothing about choosing appropriate units for extensive variables. If an error occurred, ekk_scale returns a nonzero value, otherwise it returns zero.

ekk_scaleElements

Function prototype:
int ekk_scaleElements( EKKModel * model , int mode );

Where:
model
is a pointer to the current model, and
mode
is an indicator ( 1 or 2 ) for what scaling is to be done.
     If mode=1, scale using existing scale factors.
     If mode=2, unscale.

This function
scales or unscales the elements of the matrix. (See the discussion of scaling given above.) It is an error if the request for scaling is incorrectly applied, i.e. if a request is made to scale (or to unscale) a problem that is already scaled (or unscaled). Normally after scaling, the elements are explicitly scaled while the "rim" is implicitly scaled i.e. will be scaled/unscaled on entry to solves. This allows more flexible scaling and unscaling. If an error occurred, ekk_scaleElements returns a nonzero value, otherwise it returns zero.

ekk_scaleRim

Function prototype:
int ekk_scaleRim( EKKModel * model , int mode );

Where:
model
is a pointer to the current model, and
mode
is an indicator ( 1 or 2 ) for what scaling is to be done. If mode=1, scale using existing scale factors. If mode=2, unscale.

This function
scales or unscales the bounds and objective coefficients of the model. (See the discussion of scaling given above.) It is an error if it is incorrectly applied, i.e. if a scaled problem is scaled or an unscaled problem is unscaled. Normally after scaling, the elements are explicitly scaled while the "rim" is implicitly scaled i.e. will be scaled/unscaled on entry to solves. This allows more flexible scaling and unscaling. If an error occurred, ekk_scaleRim returns a nonzero value, otherwise it returns zero.

ekk_scaling

Function prototype:
int ekk_scaling( EKKModel * mode );

Where:
model
is a pointer to the current model.

This function
returns information as to the scaled state of the model. It returns 0 if no scaling, -1 if scaling factors , +1 if elements scaled and +2 if rim scaled as well.

ekk_selectionList

Function prototype:
int ekk_selectionList( EKKModel * model , const char * name , char wildcard , char arbchar , int operation , int rowcol );

Where:
model
is a pointer to the current model,
name
is the character string to be compared with row and/or column names. The wild card, wildcard, and arbitrary, arbchar, characters are allowed.
wildcard
is the wild card character that matches any number of arbitrary characters
arbchar
is the arbitrary character that matches any single character,
operation
is an indicator for the logical operation to be applied: 1 for AND, 2 for OR, 3 for NOT, and 4 for XOR,
rowcol
is an indicator for what is to be tested: 1 means compare both row and column names, 2 means compare only row names, and 3 means compare only column names.

This function
sets up or modifies a selection list that influences OSL output based on a comparison of a string with row and/or column names. If an error occurred, ekk_selectionList returns a nonzero value, otherwise it returns zero.

ekk_sellistcol

Function prototype:
int * ekk_sellistcol( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the column selection list. If an error occurred, ekk_sellistcol returns a nonzero value, otherwise it returns zero.

ekk_sellistrow

Function prototype:
int * ekk_sellistrow( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a pointer to an array that contains the row selection list. If an error occurred, ekk_sellistcol returns a nonzero value, otherwise it returns zero.

ekk_senseBound

Function prototype:
int ekk_senseBound( EKKModel * model , int type , int respect );

Where:
model
is a pointer to the current model,
type
is an indicator ( 1, 2 or 3 ) for the type of analysis to be done, type = 1 => perform sensitivity analysis on column bounds only,
type = 2 => perform sensitivity analysis on row bounds only,
type = 3 => perform sensitivity analysis on both row and column bounds,
respect
is an indicator ( 1, 2 or 3 ) for whether to respect existing bounds, respect = 1 => ignore the existing bounds,
respect = 2 => respect the existing bounds,
respect = 3 => respect bounds on basic variables and rows, ignore others.

This function
provides the functionality of ekksbnd to analyze the sensitivity of the solution to changes in the bounds of the problem. The values of type and respect correspond to the parameters with the same names in the calling sequence of ekksbnd. If an error occurred, ekk_senseBound returns a nonzero value, otherwise it returns zero.

ekk_senseObjective

Function prototype:
int ekk_senseObjective( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
provides the functionality of ekksobj to analyze the sensitivity of a LP problem to changes in the objective function coefficients. If an error occurred, ekk_senseObjective returns a nonzero value, otherwise it returns zero.

ekk_sequenceOut

Function prototype:
int ekk_sequenceOut( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns the current value of the last variable leaving the basis. This is only of use for specialized purposes in the dual method, when the problem has been found to be infeasible.

ekk_simplex

Function prototype:
int ekk_simplex( EKKModel * model , int mode );

Where:
model
is a pointer to the current model,
mode
is an integer indicator that determines which simplex algorithm is to be used
   mode = 0, => choose primal or dual,
   mode = 1, => use primal,
   mode = 2, => use dual,
   mode = 3, => use primal after an experimental "crash."

This function
solves a linear programming problem using the primal or dual simplex algorithm, as specified by mode. Setting mode = 1 is suggested for novice users. ekk_simplex automatically does pre- and post- processing. If no error has occurred, ekk_simplex returns zero, but if an error occurred, ekk_simplex returns a nonzero value.

ekk_sizeMatrix

Function prototype:
int ekk_sizeMatrix( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns the number of stored elements in the constraint matrix of the current model. (Some of these could be stored zeros.) If an error occurred, ekk_sizeMatrix returns a nonzero value, otherwise it returns zero.

ekk_sort

Function prototype:
int ekk_sort( int * key , int number );

Where:
key
is a pointer to the array to be sorted, and
number
is the number of entries in the key array.

This function
sorts the key array in ascending order. If an error occurred, ekk_sort returns a nonzero value, otherwise it returns zero.

ekk_sortOnDouble

Function prototype:
int ekk_sortOnDouble( double * key , int * array , int number );

Where:
key
is a pointer to an array of double word floating point sort keys,
array
is a pointer to an array of integers to be sorted, and
number
is the number of elements in each of these arrays.

This function
sorts the entries of the key array, in ascending order, and moves the corresponding entries of the array of integers into the same relative positions. If an error occurred, ekk_sortOnDouble returns a nonzero value, otherwise it returns zero.

ekk_sortOnInt

Function prototype:
int ekk_sortOnInt( int * key , double * array , int number );

Where:
key
is a pointer to an array of int sort keys to be used,
array
is a pointer to an array of double word floating point numbers, and
number
is the number of elements in each of these arrays.

This function
sorts the entries of the key array, in ascending order, and moves the corresponding entries of the array of double words into the same relative positions. If an error occurred, ekk_sortOnInt returns a nonzero value, otherwise it returns zero.

ekk_stderrNumber

Function prototype:
void ekk_stderrNumber( EKKModel * model , int messageNumber );

Where:
model
is a pointer to the current model,
messageNumber
is an OSL message number.

This function
resets the threshold for OSL messages to be directed to stderr. All OSL messages are directed to stdout, unless output has been redirected by using ekk_setLogfileFilePointer or ekk_setLogfileFileName. An OSL message whose message number is greater than or equal to the threshold value will also be directed to stderr. The default value for this threshold is 7000. ekk_stderrNumber does not return anything.

ekk_tableauArtificialColumn

Function prototype:
int ekk_tableauArtificialColumn( EKKModel * model , int iColumn , double zeroTolerance , EKKVector *vec );

Where:
model
is a pointer to the current model,
iColumn
is the index of the artificial whose tableau entries are desired,
zeroTolerance
is a tolerance such that all values less than this will be treated as zero,
vec
the name of an EKKVector struct to be populated with the iColumnth column of the current model.

This function
copies the elements of the requested row, whose C index is iColumn, into the entries of the element array of the vec struct. This column is then updated by the inverse of the current basis. The index array of the struct is filled with the indices of the rows with nonzero element values. icolumn should be between 0 and Inumcols-1. If an error occurred, ekk_tableauArtificialColumn returns a nonzero value, otherwise it returns zero.

ekk_tableauStructuralColumn

Function prototype:
int ekk_tableauStructuralColumn( EKKModel * model , int iColumn , double zeroTolerance , EKKVector *vec );

Where:
model
is a pointer to the current model,
iColumn
is the index of the column whose tableau entries are desired,
zeroTolerance
is a tolerance such that all values less than this will be treated as zero,< /DD>
vec
the name of an EKKVector struct to be populated with the iColumnth structural column of the current model.

This function
copies the elements of the requested column, whose C index is iColumn, into the entries of the element array of the vec struct. This column is then updated by the inverse of the current basis. The index array of the struct is filled with the indices of the rows with nonzero element values. iColumn should be between 0 and Inumcols-1. If an error occurred, ekk_tableauStructuralColumn returns a nonzero value, otherwise it returns zero.

ekk_tableauRow

Function prototype:
int ekk_tableauRow( EKKModel * model , int iRow , double zeroTolerance , EKKVector *vec1, EKKVector *vec2 );

Where:
model
is a pointer to the current model,
iRow
is the index of the row to be retrieved,
zeroTolerance
is a tolerance such that all values less than this will be treated as zeroes,
vec1
is the name of an EKKVector struct to be populated with nonzero elements from row number iRow of the artificial columns,
vec2
is the name of an EKKVector struct to be populated with nonzero elements of the structural columns from row number iRow.

This function
loads the arrays of the vec1 and vec2 structs with indices and element values of artificial and structural columns from row number iRow of the tableau. If an error occurred, ekk_tableauRow returns a null pointer.

ekk_unloadDspace

Function prototype:
int ekk_unloadDspace( EKKModel * model , double * dspace );

Where:
model
is a pointer to the current model,
dspace
is a pointer to an array of doublewords to be used as the new workspace,

This function
populates the model identified by the first parameter in its calling sequence with data obtained from the Optimization Library workspace identified by the second parameter in its calling sequence. This function enables one to populate a model with data from an "old style" Optimization Library workspace, and then to use it with "new style" Optimization Library application code, as shown in the sample code. If an error occurred, ekk_unloadDspace returns a nonzero value, otherwise it returns zero.

ekk_userData

Function prototype:
void ekk_userData( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
returns a generic pointer previously stored by the user by means of ekk_setUserData. If this pointer has not been stored with the indicated model data by ekk_setUserData, then ekk_userData returns a null pointer.

ekk_validateIntegers

Function prototype:
int ekk_validateIntegers( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
checks the bounds on the integer variables, to verify that there is at least one integer between the upper and lower bounds on each integer variable, and that the variable type for each integer variable is consistent with its bounds. If an error occurred, ekk_validateIntegers returns a nonzero value, otherwise it returns zero.

ekk_validateModel

Function prototype:
int ekk_validateModel( EKKModel * model );

Where:
model
is a pointer to the current model.

This function
verifies the structure, but not the content, of the current model. If an error occurred, ekk_validateModel returns a nonzero value, otherwise it returns zero. It may also print error messages.


[ Top of Page | Overview of the C API | Sample code ]