Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

LP interface for MOSEK.

Author
Bo Jensen
Tristan Gally
Marc Pfetsch

Definition in file lpi_msk.c.

#include <assert.h>
#include "mosek.h"
#include "lpi/lpi.h"
#include "scip/bitencode.h"
#include "scip/pub_message.h"
#include <string.h>

Go to the source code of this file.

Data Structures

struct  SCIP_LPi
 
struct  SCIP_LPiState
 

Macros

#define MSKCONST   const
 
#define scipmskobjsen   MSKobjsensee
 
#define SENSE2MOSEK(objsen)   (((objsen)==SCIP_OBJSEN_MINIMIZE)?(MSK_OBJECTIVE_SENSE_MINIMIZE):(MSK_OBJECTIVE_SENSE_MAXIMIZE))
 
#define MOSEK_CALL(x)
 
#define SCIP_ABORT_FALSE(x)
 
#define IS_POSINF(x)   ((x) >= MSK_INFINITY)
 
#define IS_NEGINF(x)   ((x) <= -MSK_INFINITY)
 
#define DEBUG_PRINT_STAT   0
 
#define DEBUG_PARAM_SETTING   0
 
#define DEBUG_CHECK_DATA   0
 
#define DEBUG_EASY_REPRODUCE   0
 
#define DEBUG_DO_INTPNT_FEAS_CHECK   0
 
#define DEBUG_CHECK_STATE_TOL   1e-5
 
#define SHOW_ERRORS   0
 
#define SHOW_RELATIVE_OPTIMAL_GAP   0
 
#define ASSERT_ON_NUMERICAL_TROUBLES   0
 
#define ASSERT_ON_WARNING   0
 
#define FORCE_MOSEK_LOG   0 /* note that changing this AND setting lpinfo will lead to asserts in lpCheckIntpar */
 
#define FORCE_MOSEK_SUMMARY   0
 
#define FORCE_NO_MAXITER   0
 
#define SETBACK_LIMIT   250
 
#define STRONGBRANCH_PRICING   MSK_SIM_SELECTION_SE
 
#define SUPRESS_NAME_ERROR   1
 
#define WRITE_DUAL   0
 
#define WRITE_PRIMAL   0
 
#define WRITE_INTPNT   0
 
#define DEGEN_LEVEL   MSK_SIM_DEGEN_FREE
 
#define ALWAYS_SOLVE_PRIMAL_FORM   1
 
#define COLS_PER_PACKET   SCIP_DUALPACKETSIZE
 
#define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE
 

Typedefs

typedef enum MSKoptimizertype_enum MSKoptimizertype
 
typedef SCIP_DUALPACKET COLPACKET
 
typedef SCIP_DUALPACKET ROWPACKET
 

Functions

static MSKrescodee MSK_getsolutionstatus (MSKtask_t task, MSKsoltypee whichsol, MSKprostae *prosta, MSKsolstae *solsta)
 
static int colpacketNum (int ncols)
 
static int rowpacketNum (int nrows)
 
static void MSKAPI printstr (MSKuserhandle_t handle, const char *str)
 
static SCIP_RETCODE ensureBkxMem (SCIP_LPI *lpi, int ncols)
 
static SCIP_RETCODE ensureBkcMem (SCIP_LPI *lpi, int nrows)
 
static SCIP_RETCODE ensureAptreMem (SCIP_LPI *lpi, int n)
 
static void invalidateSolution (SCIP_LPI *lpi)
 
static void generateMskBoundkeys (int n, const double *lb, const double *ub, MSKboundkeye *bk)
 
static SCIP_RETCODE getEndptrs (int n, const int *beg, int nnonz, MSKint32t *aptre)
 
static SCIP_RETCODE getIndicesRange (int first, int last, int **sub)
 
static SCIP_RETCODE getIndicesFromDense (int *dstat, int n, int *count, int **sub)
 
static void scale_vec (int len, double *vec, double s)
 
static void scale_bound (MSKboundkeye *bk, double *bl, double *bu, double s)
 
static SCIP_RETCODE ensureStateMem (SCIP_LPI *lpi, int ncols, int nrows)
 
static SCIP_RETCODE getbase (SCIP_LPI *lpi, int ncols, int nrows)
 
static SCIP_RETCODE setbase (SCIP_LPI *lpi)
 
static const char * paramty2str (SCIP_LPPARAM type)
 
SCIP_RETCODE SCIPlpiGetIntpar (SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
 
SCIP_RETCODE SCIPlpiSetIntpar (SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
 
SCIP_RETCODE SCIPlpiGetRealpar (SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
 
SCIP_RETCODE SCIPlpiSetRealpar (SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
 
SCIP_Real SCIPlpiInfinity (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsInfinity (SCIP_LPI *lpi, SCIP_Real val)
 
SCIP_RETCODE SCIPlpiReadLP (SCIP_LPI *lpi, const char *fname)
 
SCIP_RETCODE SCIPlpiWriteLP (SCIP_LPI *lpi, const char *fname)
 
Miscellaneous Methods
const char * SCIPlpiGetSolverName (void)
 
const char * SCIPlpiGetSolverDesc (void)
 
void * SCIPlpiGetSolverPointer (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiSetIntegralityInformation (SCIP_LPI *lpi, int ncols, int *intInfo)
 
SCIP_Bool SCIPlpiHasPrimalSolve (void)
 
SCIP_Bool SCIPlpiHasDualSolve (void)
 
SCIP_Bool SCIPlpiHasBarrierSolve (void)
 
LPI Creation and Destruction Methods
SCIP_RETCODE SCIPlpiCreate (SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
 
SCIP_RETCODE SCIPlpiFree (SCIP_LPI **lpi)
 
SCIP_RETCODE SCIPlpiLoadColLP (SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
 
SCIP_RETCODE SCIPlpiAddCols (SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
 
SCIP_RETCODE SCIPlpiDelCols (SCIP_LPI *lpi, int firstcol, int lastcol)
 
SCIP_RETCODE SCIPlpiDelColset (SCIP_LPI *lpi, int *dstat)
 
SCIP_RETCODE SCIPlpiAddRows (SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
 
SCIP_RETCODE SCIPlpiDelRows (SCIP_LPI *lpi, int firstrow, int lastrow)
 
SCIP_RETCODE SCIPlpiDelRowset (SCIP_LPI *lpi, int *dstat)
 
SCIP_RETCODE SCIPlpiClear (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiChgBounds (SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
 
SCIP_RETCODE SCIPlpiChgSides (SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
 
SCIP_RETCODE SCIPlpiChgCoef (SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
 
SCIP_RETCODE SCIPlpiChgObjsen (SCIP_LPI *lpi, SCIP_OBJSEN objsen)
 
SCIP_RETCODE SCIPlpiChgObj (SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
 
SCIP_RETCODE SCIPlpiScaleRow (SCIP_LPI *lpi, int row, SCIP_Real scaleval)
 
SCIP_RETCODE SCIPlpiScaleCol (SCIP_LPI *lpi, int col, SCIP_Real scaleval)
 
SCIP_RETCODE SCIPlpiGetNRows (SCIP_LPI *lpi, int *nrows)
 
SCIP_RETCODE SCIPlpiGetNCols (SCIP_LPI *lpi, int *ncols)
 
SCIP_RETCODE SCIPlpiGetNNonz (SCIP_LPI *lpi, int *nnonz)
 
static SCIP_RETCODE getASlice (SCIP_LPI *lpi, SCIP_Bool iscon, int first, int last, int *nnonz, int *beg, int *ind, double *val)
 
SCIP_RETCODE SCIPlpiGetCols (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
 
SCIP_RETCODE SCIPlpiGetRows (SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs, int *nnonz, int *beg, int *ind, SCIP_Real *val)
 
SCIP_RETCODE SCIPlpiGetColNames (SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
 
SCIP_RETCODE SCIPlpiGetRowNames (SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
 
SCIP_RETCODE SCIPlpiGetObjsen (SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
 
SCIP_RETCODE SCIPlpiGetObj (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
 
SCIP_RETCODE SCIPlpiGetBounds (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
 
SCIP_RETCODE SCIPlpiGetSides (SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
 
SCIP_RETCODE SCIPlpiGetCoef (SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
 
static SCIP_RETCODE getSolutionStatus (SCIP_LPI *lpi, MSKprostae *prosta, MSKsolstae *solsta)
 
static MSKrescodee filterTRMrescode (SCIP_MESSAGEHDLR *messagehdlr, MSKrescodee *termcode, MSKrescodee res)
 
static SCIP_RETCODE SolveWSimplex (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiSolvePrimal (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiSolveDual (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiSolveBarrier (SCIP_LPI *lpi, SCIP_Bool crossover)
 
SCIP_RETCODE SCIPlpiStartStrongbranch (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiEndStrongbranch (SCIP_LPI *lpi)
 
static SCIP_RETCODE SCIPlpiStrongbranch (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
 
SCIP_RETCODE SCIPlpiStrongbranchFrac (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
 
SCIP_RETCODE SCIPlpiStrongbranchesFrac (SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
 
SCIP_RETCODE SCIPlpiStrongbranchInt (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
 
SCIP_RETCODE SCIPlpiStrongbranchesInt (SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
 
SCIP_Bool SCIPlpiWasSolved (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiGetSolFeasibility (SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
 
SCIP_Bool SCIPlpiExistsPrimalRay (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiHasPrimalRay (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsPrimalUnbounded (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsPrimalInfeasible (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsPrimalFeasible (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiExistsDualRay (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiHasDualRay (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsDualUnbounded (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsDualInfeasible (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsDualFeasible (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsOptimal (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsStable (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsObjlimExc (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsIterlimExc (SCIP_LPI *lpi)
 
SCIP_Bool SCIPlpiIsTimelimExc (SCIP_LPI *lpi)
 
int SCIPlpiGetInternalStatus (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiIgnoreInstability (SCIP_LPI *lpi, SCIP_Bool *success)
 
SCIP_RETCODE SCIPlpiGetObjval (SCIP_LPI *lpi, SCIP_Real *objval)
 
SCIP_RETCODE SCIPlpiGetSol (SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
 
SCIP_RETCODE SCIPlpiGetPrimalRay (SCIP_LPI *lpi, SCIP_Real *ray)
 
SCIP_RETCODE SCIPlpiGetDualfarkas (SCIP_LPI *lpi, SCIP_Real *dualfarkas)
 
SCIP_RETCODE SCIPlpiGetIterations (SCIP_LPI *lpi, int *iterations)
 
SCIP_RETCODE SCIPlpiGetRealSolQuality (SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
 
static SCIP_RETCODE handle_singular (SCIP_LPI *lpi, int *basis, MSKrescodee res)
 
static SCIP_RETCODE convertstat_mosek2scip (SCIP_LPI *lpi, SCIP_Bool iscon, MSKstakeye *sk, int n, int *stat)
 
static SCIP_RETCODE convertstat_mosek2scip_slack (SCIP_LPI *lpi, SCIP_Bool iscon, MSKstakeye *sk, int m, int *stat)
 
static void convertstat_scip2mosek (const int *stat, int n, MSKstakeye *resstat)
 
static void convertstat_scip2mosek_slack (const int *stat, int n, MSKstakeye *resstat)
 
SCIP_RETCODE SCIPlpiGetBase (SCIP_LPI *lpi, int *cstat, int *rstat)
 
SCIP_RETCODE SCIPlpiSetBase (SCIP_LPI *lpi, const int *cstat, const int *rstat)
 
SCIP_RETCODE SCIPlpiGetBasisInd (SCIP_LPI *lpi, int *bind)
 
SCIP_RETCODE SCIPlpiGetBInvRow (SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpiGetBInvCol (SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpiGetBInvARow (SCIP_LPI *lpi, int row, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpiGetBInvACol (SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
 
static SCIP_RETCODE lpistateCreate (SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
 
static void lpistateFree (SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
 
static SCIP_RETCODE checkState1 (SCIP_LPI *lpi, int n, MSKstakeye *sk, SCIP_Bool isrow)
 
static SCIP_RETCODE checkState (SCIP_LPI *lpi, int ncols, int nrows)
 
static SCIP_RETCODE lpistatePack (SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
 
static void lpistateUnpack (const SCIP_LPISTATE *lpistate, MSKstakeye *skx, MSKstakeye *skc)
 
SCIP_RETCODE SCIPlpiGetState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
 
SCIP_RETCODE SCIPlpiSetState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
 
SCIP_RETCODE SCIPlpiClearState (SCIP_LPI *lpi)
 
SCIP_RETCODE SCIPlpiFreeState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
 
SCIP_Bool SCIPlpiHasStateBasis (SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
 
SCIP_RETCODE SCIPlpiReadState (SCIP_LPI *lpi, const char *fname)
 
SCIP_RETCODE SCIPlpiWriteState (SCIP_LPI *lpi, const char *fname)
 
LP Pricing Norms Methods
SCIP_RETCODE SCIPlpiGetNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
 
SCIP_RETCODE SCIPlpiSetNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
 
SCIP_RETCODE SCIPlpiFreeNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
 

Variables

static MSKenv_t MosekEnv = NULL
 
static int numlp = 0
 
static int optimizecount = 0
 
static int nextlpid = 1
 
static char mskname [100]
 
static const char * paramname []
 

Macro Definition Documentation

◆ MSKCONST

#define MSKCONST   const

Definition at line 34 of file lpi_msk.c.

◆ scipmskobjsen

#define scipmskobjsen   MSKobjsensee

Definition at line 51 of file lpi_msk.c.

Referenced by SolveWSimplex().

◆ SENSE2MOSEK

#define SENSE2MOSEK (   objsen)    (((objsen)==SCIP_OBJSEN_MINIMIZE)?(MSK_OBJECTIVE_SENSE_MINIMIZE):(MSK_OBJECTIVE_SENSE_MAXIMIZE))

Definition at line 52 of file lpi_msk.c.

Referenced by SCIPlpiChgObjsen(), SCIPlpiCreate(), and SCIPlpiLoadColLP().

◆ MOSEK_CALL

#define MOSEK_CALL (   x)
Value:
do \
{ /*lint --e{641}*/ \
MSKrescodee _restat_; \
_restat_ = (x); \
if( (_restat_) != MSK_RES_OK && (_restat_ ) != MSK_RES_TRM_MAX_NUM_SETBACKS ) \
{ \
SCIPerrorMessage("LP Error: MOSEK returned %d.\n", (int)_restat_); \
return SCIP_LPERROR; \
} \
} \
while( FALSE )
#define FALSE
Definition: def.h:73
SCIP_VAR ** x
Definition: circlepacking.c:54

Definition at line 56 of file lpi_msk.c.

Referenced by checkState1(), convertstat_mosek2scip(), convertstat_mosek2scip_slack(), getASlice(), getbase(), getSolutionStatus(), handle_singular(), printstr(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiFree(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetDualfarkas(), SCIPlpiGetIntpar(), SCIPlpiGetNCols(), SCIPlpiGetNNonz(), SCIPlpiGetNRows(), SCIPlpiGetObj(), SCIPlpiGetObjsen(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealpar(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetState(), SCIPlpiLoadColLP(), SCIPlpiReadLP(), SCIPlpiReadState(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetIntpar(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStrongbranch(), SCIPlpiWriteLP(), SCIPlpiWriteState(), setbase(), and SolveWSimplex().

◆ SCIP_ABORT_FALSE

#define SCIP_ABORT_FALSE (   x)
Value:
do \
{ \
SCIP_RETCODE _restat_; \
if( (_restat_ = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("LP Error: MOSEK returned %d.\n", (int)_restat_); \
SCIPABORT(); \
return FALSE; \
} \
} \
while( FALSE )
#define FALSE
Definition: def.h:73
SCIP_VAR ** x
Definition: circlepacking.c:54

Definition at line 69 of file lpi_msk.c.

Referenced by SCIPlpiExistsDualRay(), SCIPlpiExistsPrimalRay(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiIsDualFeasible(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), and SCIPlpiIsPrimalUnbounded().

◆ IS_POSINF

#define IS_POSINF (   x)    ((x) >= MSK_INFINITY)

Definition at line 81 of file lpi_msk.c.

Referenced by generateMskBoundkeys(), SCIPlpiIsInfinity(), and SCIPlpiStrongbranch().

◆ IS_NEGINF

#define IS_NEGINF (   x)    ((x) <= -MSK_INFINITY)

Definition at line 82 of file lpi_msk.c.

Referenced by generateMskBoundkeys(), and SCIPlpiStrongbranch().

◆ DEBUG_PRINT_STAT

#define DEBUG_PRINT_STAT   0

Definition at line 94 of file lpi_msk.c.

◆ DEBUG_PARAM_SETTING

#define DEBUG_PARAM_SETTING   0

Definition at line 95 of file lpi_msk.c.

◆ DEBUG_CHECK_DATA

#define DEBUG_CHECK_DATA   0

Definition at line 96 of file lpi_msk.c.

◆ DEBUG_EASY_REPRODUCE

#define DEBUG_EASY_REPRODUCE   0

Definition at line 97 of file lpi_msk.c.

◆ DEBUG_DO_INTPNT_FEAS_CHECK

#define DEBUG_DO_INTPNT_FEAS_CHECK   0

Definition at line 98 of file lpi_msk.c.

◆ DEBUG_CHECK_STATE_TOL

#define DEBUG_CHECK_STATE_TOL   1e-5

Definition at line 99 of file lpi_msk.c.

Referenced by checkState1().

◆ SHOW_ERRORS

#define SHOW_ERRORS   0

Definition at line 100 of file lpi_msk.c.

◆ SHOW_RELATIVE_OPTIMAL_GAP

#define SHOW_RELATIVE_OPTIMAL_GAP   0

Definition at line 101 of file lpi_msk.c.

◆ ASSERT_ON_NUMERICAL_TROUBLES

#define ASSERT_ON_NUMERICAL_TROUBLES   0

Definition at line 102 of file lpi_msk.c.

◆ ASSERT_ON_WARNING

#define ASSERT_ON_WARNING   0

Definition at line 103 of file lpi_msk.c.

◆ FORCE_MOSEK_LOG

#define FORCE_MOSEK_LOG   0 /* note that changing this AND setting lpinfo will lead to asserts in lpCheckIntpar */

Definition at line 104 of file lpi_msk.c.

◆ FORCE_MOSEK_SUMMARY

#define FORCE_MOSEK_SUMMARY   0

Definition at line 105 of file lpi_msk.c.

◆ FORCE_NO_MAXITER

#define FORCE_NO_MAXITER   0

Definition at line 106 of file lpi_msk.c.

◆ SETBACK_LIMIT

#define SETBACK_LIMIT   250

Definition at line 107 of file lpi_msk.c.

Referenced by SCIPlpiCreate().

◆ STRONGBRANCH_PRICING

#define STRONGBRANCH_PRICING   MSK_SIM_SELECTION_SE

Definition at line 108 of file lpi_msk.c.

Referenced by SCIPlpiStrongbranch().

◆ SUPRESS_NAME_ERROR

#define SUPRESS_NAME_ERROR   1

Definition at line 109 of file lpi_msk.c.

◆ WRITE_DUAL

#define WRITE_DUAL   0

Definition at line 110 of file lpi_msk.c.

◆ WRITE_PRIMAL

#define WRITE_PRIMAL   0

Definition at line 111 of file lpi_msk.c.

◆ WRITE_INTPNT

#define WRITE_INTPNT   0

Definition at line 112 of file lpi_msk.c.

◆ DEGEN_LEVEL

#define DEGEN_LEVEL   MSK_SIM_DEGEN_FREE

Definition at line 116 of file lpi_msk.c.

Referenced by SCIPlpiCreate().

◆ ALWAYS_SOLVE_PRIMAL_FORM

#define ALWAYS_SOLVE_PRIMAL_FORM   1

Definition at line 117 of file lpi_msk.c.

◆ COLS_PER_PACKET

#define COLS_PER_PACKET   SCIP_DUALPACKETSIZE

Definition at line 170 of file lpi_msk.c.

Referenced by colpacketNum().

◆ ROWS_PER_PACKET

#define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE

Definition at line 172 of file lpi_msk.c.

Referenced by rowpacketNum().

Typedef Documentation

◆ MSKoptimizertype

typedef enum MSKoptimizertype_enum MSKoptimizertype

Definition at line 54 of file lpi_msk.c.

◆ COLPACKET

Definition at line 169 of file lpi_msk.c.

◆ ROWPACKET

Definition at line 171 of file lpi_msk.c.

Function Documentation

◆ MSK_getsolutionstatus()

static MSKrescodee MSK_getsolutionstatus ( MSKtask_t  task,
MSKsoltypee  whichsol,
MSKprostae *  prosta,
MSKsolstae *  solsta 
)
static

gives problem and solution status for a Mosek Task

With Mosek 7.0, the routine MSK_getsolutionstatus was replaced by MSK_getprosta and MSK_getsolsta.

Parameters
taskMosek Task
whichsolfor which type of solution a status is requested
prostabuffer to store problem status, or NULL if not needed
solstabuffer to store solution status, or NULL if not needed

Definition at line 195 of file lpi_msk.c.

References NULL.

Referenced by getSolutionStatus(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), and SolveWSimplex().

◆ colpacketNum()

static int colpacketNum ( int  ncols)
static

returns the number of packets needed to store column packet information

Parameters
ncolsnumber of columns to store

Definition at line 222 of file lpi_msk.c.

References COLS_PER_PACKET.

Referenced by lpistateCreate(), and lpistateFree().

◆ rowpacketNum()

static int rowpacketNum ( int  nrows)
static

returns the number of packets needed to store row packet information

Parameters
nrowsnumber of rows to store

Definition at line 231 of file lpi_msk.c.

References ROWS_PER_PACKET.

Referenced by lpistateCreate(), and lpistateFree().

◆ printstr()

static void MSKAPI printstr ( MSKuserhandle_t  handle,
const char *  str 
)
static

print string using message handler of SCIP

Parameters
handleerror handle
strstring that contains string on output

Definition at line 240 of file lpi_msk.c.

References BMSallocMemoryArray, BMSfreeMemoryArray, MOSEK_CALL, MosekEnv, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, SCIPmessagePrintInfo(), and SCIP_LPi::task.

Referenced by SCIPlpiCreate().

◆ ensureBkxMem()

static SCIP_RETCODE ensureBkxMem ( SCIP_LPI lpi,
int  ncols 
)
static

resizes bound keys array bkx to have at least ncols entries

Parameters
lpipointer to an LP interface structure
ncolsnumber of columns

Definition at line 377 of file lpi_msk.c.

References SCIP_LPi::bkx, SCIP_LPi::bkxsize, BMSreallocMemoryArray, MAX, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpiAddCols(), SCIPlpiChgBounds(), and SCIPlpiLoadColLP().

◆ ensureBkcMem()

static SCIP_RETCODE ensureBkcMem ( SCIP_LPI lpi,
int  nrows 
)
static

resizes bound keys array bkc to have at least nrows entries

Parameters
lpipointer to an LP interface structure
nrowsnumber of rows

Definition at line 396 of file lpi_msk.c.

References SCIP_LPi::bkc, SCIP_LPi::bkcsize, BMSreallocMemoryArray, MAX, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), and SCIPlpiLoadColLP().

◆ ensureAptreMem()

static SCIP_RETCODE ensureAptreMem ( SCIP_LPI lpi,
int  n 
)
static

resizes aptre array to have at least n entries

Parameters
lpipointer to an LP interface structure
nnumber of entries

Definition at line 415 of file lpi_msk.c.

References SCIP_LPi::aptre, SCIP_LPi::aptresize, BMSreallocMemoryArray, MAX, SCIP_ALLOC, and SCIP_OKAY.

Referenced by getASlice(), SCIPlpiAddCols(), SCIPlpiAddRows(), and SCIPlpiLoadColLP().

◆ invalidateSolution()

◆ generateMskBoundkeys()

static void generateMskBoundkeys ( int  n,
const double *  lb,
const double *  ub,
MSKboundkeye *  bk 
)
static

compute boundkeys to inform MOSEK about fixed/free/ranged/lower bounded/upper bounded variables or constraints

Parameters
narray size
lblower bounds of variables or left-hand sides of ranged rows
ubupper bounds of variables or right-hand sides of ranged rows
bkpointer to store boundkeys to inform MOSEK about status of var/row

Definition at line 445 of file lpi_msk.c.

References IS_NEGINF, IS_POSINF, and NULL.

Referenced by SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgSides(), and SCIPlpiLoadColLP().

◆ getEndptrs()

static SCIP_RETCODE getEndptrs ( int  n,
const int *  beg,
int  nnonz,
MSKint32t *  aptre 
)
static

get end pointers of arrays

Parameters
narray size
begarray of beginning indices
nnonznumber of nonzeros
aptrearray to store the result

Definition at line 496 of file lpi_msk.c.

References NULL, and SCIP_OKAY.

Referenced by SCIPlpiAddCols(), SCIPlpiAddRows(), and SCIPlpiLoadColLP().

◆ getIndicesRange()

static SCIP_RETCODE getIndicesRange ( int  first,
int  last,
int **  sub 
)
static

compute indices from range

Parameters
firstfirst index
lastlast index
subpointer to store the indices ranges

Definition at line 530 of file lpi_msk.c.

References BMSallocMemoryArray, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpiDelCols(), and SCIPlpiDelRows().

◆ getIndicesFromDense()

static SCIP_RETCODE getIndicesFromDense ( int *  dstat,
int  n,
int *  count,
int **  sub 
)
static

compute indices from dense array

Parameters
dstatarray
nsize of array
countarray of counts (sizes)
subpointer to store array of indices

Definition at line 552 of file lpi_msk.c.

References BMSallocMemoryArray, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpiDelColset(), and SCIPlpiDelRowset().

◆ scale_vec()

static void scale_vec ( int  len,
double *  vec,
double  s 
)
static

scale a vector

Parameters
lenlength of vector
vecvector to be scaled
sscaling factor

Definition at line 595 of file lpi_msk.c.

Referenced by SCIPlpiScaleCol(), and SCIPlpiScaleRow().

◆ scale_bound()

static void scale_bound ( MSKboundkeye *  bk,
double *  bl,
double *  bu,
double  s 
)
static

scale lower and upper bound

Parameters
bkpointer to store boundkeys to inform MOSEK about status of var/row
bllower bound
buupper bound
sscaling factor

Definition at line 610 of file lpi_msk.c.

References FALSE.

Referenced by SCIPlpiScaleCol(), and SCIPlpiScaleRow().

◆ ensureStateMem()

static SCIP_RETCODE ensureStateMem ( SCIP_LPI lpi,
int  ncols,
int  nrows 
)
static

resizes state arrays to have at least ncols/nrows entries

Parameters
lpipointer to an LP interface structure
ncolsnumber of columns
nrowsnumber of rows

Definition at line 653 of file lpi_msk.c.

References BMSreallocMemoryArray, MAX, SCIP_ALLOC, SCIP_OKAY, SCIP_LPi::skc, SCIP_LPi::skcsize, SCIP_LPi::skx, and SCIP_LPi::skxsize.

Referenced by getbase(), SCIPlpiSetBase(), and SCIPlpiSetState().

◆ getbase()

static SCIP_RETCODE getbase ( SCIP_LPI lpi,
int  ncols,
int  nrows 
)
static

get base and store in skc/skx arrays

Parameters
lpipointer to an LP interface structure
ncolsnumber of columns
nrowsnumber of rows

Definition at line 682 of file lpi_msk.c.

References ensureStateMem(), SCIP_LPi::lastsolvetype, SCIP_LPi::lpid, MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIP_LPi::skc, SCIP_LPi::skx, and SCIP_LPi::task.

Referenced by SCIPlpiGetBase(), SCIPlpiGetState(), SCIPlpiSetState(), and SCIPlpiStrongbranch().

◆ setbase()

static SCIP_RETCODE setbase ( SCIP_LPI lpi)
static

set base to the values given in skc/skx arrays

Parameters
lpipointer to an LP interface structure

Definition at line 701 of file lpi_msk.c.

References FALSE, SCIP_LPi::lastsolvetype, SCIP_LPi::lpid, MOSEK_CALL, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_LPi::skc, SCIP_LPi::skx, SCIP_LPi::solved, and SCIP_LPi::task.

Referenced by SCIPlpiSetBase(), SCIPlpiSetState(), and SCIPlpiStrongbranch().

◆ paramty2str()

Variable Documentation

◆ MosekEnv

MSKenv_t MosekEnv = NULL
static

Definition at line 85 of file lpi_msk.c.

Referenced by getASlice(), getSolutionStatus(), printstr(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiClearState(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiExistsDualRay(), SCIPlpiExistsPrimalRay(), SCIPlpiFree(), SCIPlpiFreeState(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetColNames(), SCIPlpiGetCols(), SCIPlpiGetDualfarkas(), SCIPlpiGetInternalStatus(), SCIPlpiGetIntpar(), SCIPlpiGetIterations(), SCIPlpiGetNCols(), SCIPlpiGetNNonz(), SCIPlpiGetNorms(), SCIPlpiGetNRows(), SCIPlpiGetObj(), SCIPlpiGetObjsen(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealpar(), SCIPlpiGetRealSolQuality(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetSolverPointer(), SCIPlpiGetState(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiHasStateBasis(), SCIPlpiIgnoreInstability(), SCIPlpiInfinity(), SCIPlpiIsDualFeasible(), SCIPlpiIsDualInfeasible(), SCIPlpiIsDualUnbounded(), SCIPlpiIsInfinity(), SCIPlpiIsIterlimExc(), SCIPlpiIsObjlimExc(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsPrimalUnbounded(), SCIPlpiIsStable(), SCIPlpiIsTimelimExc(), SCIPlpiLoadColLP(), SCIPlpiReadLP(), SCIPlpiReadState(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiSetIntpar(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStartStrongbranch(), SCIPlpiStrongbranch(), SCIPlpiWriteLP(), SCIPlpiWriteState(), and SolveWSimplex().

◆ numlp

int numlp = 0
static

Definition at line 86 of file lpi_msk.c.

Referenced by SCIPlpiCreate(), and SCIPlpiFree().

◆ optimizecount

◆ nextlpid

int nextlpid = 1
static

Definition at line 89 of file lpi_msk.c.

Referenced by SCIPlpiCreate().

◆ mskname

char mskname[100]
static

Definition at line 722 of file lpi_msk.c.

Referenced by SCIPlpiGetSolverName().

◆ paramname

const char* paramname[]
static
Initial value:
= {
"SCIP_LPPAR_FROMSCRATCH",
"SCIP_LPPAR_FASTMIP",
"SCIP_LPPAR_SCALING",
"SCIP_LPPAR_PRESOLVING",
"SCIP_LPPAR_PRICING",
"SCIP_LPPAR_LPINFO",
"SCIP_LPPAR_FEASTOL",
"SCIP_LPPAR_DUALFEASTOL",
"SCIP_LPPAR_BARRIERCONVTOL",
"SCIP_LPPAR_OBJLIM",
"SCIP_LPPAR_LPITLIM",
"SCIP_LPPAR_LPTILIM",
"SCIP_LPPAR_MARKOWITZ",
"SCIP_LPPAR_ROWREPSWITCH",
"SCIP_LPPAR_THREADS",
"SCIP_LPPAR_CONDITIONLIMIT",
"SCIP_LPPAR_TIMING",
"SCIP_LPPAR_RANDOMSEED",
"SCIP_LPPAR_POLISHING",
"SCIP_LPPAR_REFACTOR"
}

constant array containing the parameter names

Definition at line 4958 of file lpi_msk.c.

Referenced by addFixParamDialog(), addSetParamDialog(), alnsIncludeNeighborhood(), checkTransferBoolParam(), doBendersCreate(), doBenderscutCreate(), doBranchruleCreate(), doComprCreate(), doConcsolverTypeCreate(), doConflicthdlrCreate(), doConshdlrCreate(), doDispCreate(), doHeurCreate(), doNodeselCreate(), doPresolCreate(), doPricerCreate(), doPropCreate(), doRelaxCreate(), doSepaCreate(), doTableCreate(), emphasisParse(), paramSetBool(), paramSetChar(), paramSetInt(), paramSetLongint(), paramsetParse(), paramSetReal(), paramsetSetHeuristicsAggressive(), paramsetSetHeuristicsDefault(), paramsetSetHeuristicsFast(), paramsetSetHeuristicsOff(), paramsetSetPresolvingAggressive(), paramsetSetPresolvingDefault(), paramsetSetPresolvingFast(), paramsetSetPresolvingOff(), paramsetSetSeparatingAggressive(), paramsetSetSeparatingDefault(), paramsetSetSeparatingOff(), paramty2str(), SCIP_DECL_CONCSOLVERCREATEINST(), SCIPdivesetCreate(), SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), SCIPincludeBenderscutOpt(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), SCIPincludeNlpi(), SCIPincludeNonlinconsUpgrade(), SCIPincludeQuadconsUpgrade(), SCIPparamsetCopyParams(), SCIPparamsetSetEmphasis(), SCIPparamsetSetToDefault(), SCIPparamsetSetToSubscipsOff(), SCIPsetConshdlrPresol(), SCIPsetConshdlrProp(), SCIPsetConshdlrSepa(), and SCIPsetPropPresol().