|
Go to the documentation of this file.
24 #define MSKCONST const
28 #include "scip/bitencode.h"
32 #if defined(_WIN32) || defined(_WIN64)
33 #define snprintf _snprintf
36 #define scipmskobjsen MSKobjsensee
37 #define SENSE2MOSEK(objsen) (((objsen)==SCIP_OBJSEN_MINIMIZE)?(MSK_OBJECTIVE_SENSE_MINIMIZE):(MSK_OBJECTIVE_SENSE_MAXIMIZE))
39 #define MOSEK_CALL(x) do \
41 MSKrescodee _restat_; \
43 if( (_restat_) != MSK_RES_OK && (_restat_ ) != MSK_RES_TRM_MAX_NUM_SETBACKS ) \
45 SCIPerrorMessage("LP Error: MOSEK returned %d.\n", (int)_restat_); \
46 return SCIP_LPERROR; \
52 #define SCIP_ABORT_FALSE(x) do \
55 if( (_restat_ = (x)) != SCIP_OKAY ) \
57 SCIPerrorMessage("LP Error: MOSEK returned %d.\n", (int)_restat_); \
64 #define IS_POSINF(x) ((x) >= SCIP_DEFAULT_INFINITY)
65 #define IS_NEGINF(x) ((x) <= -SCIP_DEFAULT_INFINITY)
67 static MSKenv_t MosekEnv = NULL;
70 static int optimizecount = 0;
71 static int nextlpid = 1;
72 static int numstrongbranchmaxiterup = 0;
73 static int numstrongbranchmaxiterdo = 0;
74 static int numprimalmaxiter = 0;
75 static int numdualmaxiter = 0;
76 static int numstrongbranchobjup = 0;
77 static int numstrongbranchobjdo = 0;
78 static int numprimalobj = 0;
79 static int numdualobj = 0;
81 #define DEBUG_PARAM_SETTING 0
82 #define DEBUG_PRINT_STAT 0
83 #define DEBUG_CHECK_DATA 0
84 #define DEBUG_EASY_REPRODUCE 0
85 #define DEBUG_DO_INTPNT_FEAS_CHECK 0
86 #define DEBUG_CHECK_STATE_TOL 1e-5
88 #define ASSERT_ON_NUMERICAL_TROUBLES 0
89 #define ASSERT_ON_WARNING 0
90 #define FORCE_MOSEK_LOG 0
91 #define FORCE_MOSEK_SUMMARY 0
92 #define FORCE_NO_MAXITER 0
93 #define FORCE_SILENCE 1
94 #define SETBACK_LIMIT 250
95 #define SCIP_CONTROLS_PRICING 1
96 #define SCIP_CONTROLS_TOLERANCES 1
97 #define STRONGBRANCH_PRICING MSK_SIM_SELECTION_SE
98 #define SUPRESS_NAME_ERROR 1
100 #define WRITE_PRIMAL 0
101 #define WRITE_INTPNT 0
102 #define WRITE_ABOVE 0
103 #define DEGEN_LEVEL MSK_SIM_DEGEN_FREE
104 #define ALWAYS_SOLVE_PRIMAL 1
106 #if MSK_VERSION_MAJOR >= 7
113 MSKrescodee MSK_getsolutionstatus(
115 MSKsoltypee whichsol,
122 MOSEK_CALL( MSK_getprosta(task, whichsol, prosta) );
126 MOSEK_CALL( MSK_getsolsta(task, whichsol, solsta) );
138 MSKrescodee termcode;
150 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE
152 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
184 void MSKAPI printstr(
189 #if SUPRESS_NAME_ERROR && !FORCE_SILENCE
191 snprintf(errstr,32, "MOSEK Error %d",MSK_RES_ERR_DUP_NAME);
192 if (0 == strncmp(errstr,str,strlen(errstr)))
199 #if DEBUG_CHECK_DATA > 0
203 const char* functionname
219 MOSEK_CALL( MSK_solutiondef(lpi->task, MSK_SOL_BAS, &gotbasicsol) );
221 MOSEK_CALL( MSK_getnumvar(lpi->task,&numvar) );
222 MOSEK_CALL( MSK_getnumcon(lpi->task,&numcon) );
225 SCIP_ALLOC( BMSallocMemoryArray( &tbkc, numcon) );
226 SCIP_ALLOC( BMSallocMemoryArray( &tskc, numcon) );
227 SCIP_ALLOC( BMSallocMemoryArray( &tblc, numcon) );
228 SCIP_ALLOC( BMSallocMemoryArray( &tbuc, numcon) );
230 SCIP_ALLOC( BMSallocMemoryArray( &tbkx, numvar) );
231 SCIP_ALLOC( BMSallocMemoryArray( &tskx, numvar) );
232 SCIP_ALLOC( BMSallocMemoryArray( &tblx, numvar) );
233 SCIP_ALLOC( BMSallocMemoryArray( &tbux, numvar) );
242 for( i = 0; i < numvar; i++ )
244 MOSEK_CALL( MSK_getbound(lpi->task,MSK_ACC_VAR,i,&tbkx[i],&tblx[i],&tbux[i]) );
247 for( i = 0; i < numcon; i++ )
249 MOSEK_CALL( MSK_getbound(lpi->task,MSK_ACC_CON,i,&tbkc[i],&tblc[i],&tbuc[i]) );
252 for( i = 0; i < numcon; ++i )
256 if( ( tskc[i] == MSK_SK_FIX && tbkc[i] != MSK_BK_FX ) ||
257 ( tskc[i] == MSK_SK_LOW && !(tbkc[i] == MSK_BK_FX || tbkc[i] == MSK_BK_LO || tbkc[i] == MSK_BK_RA ) ) ||
258 ( tskc[i] == MSK_SK_UPR && !(tbkc[i] == MSK_BK_FX || tbkc[i] == MSK_BK_UP || tbkc[i] == MSK_BK_RA ) ) )
260 SCIPerrorMessage( "STATUS KEY ERROR i %d bkc %d skc %d %s\n", i, tbkc[i], tskc[i], functionname);
264 if( tbkc[i] == MSK_BK_LO || tbkc[i] == MSK_BK_FX || tbkc[i] == MSK_BK_RA )
272 if( tbkc[i] == MSK_BK_UP || tbkc[i] == MSK_BK_FX || tbkc[i] == MSK_BK_RA )
281 for( i = 0; i < numvar; ++i )
283 if( tbkx[i] == MSK_BK_LO || tbkx[i] == MSK_BK_FX || tbkx[i] == MSK_BK_RA )
291 if( tbkx[i] == MSK_BK_UP || tbkx[i] == MSK_BK_FX || tbkx[i] == MSK_BK_RA )
301 BMSfreeMemoryArray(&tbkc);
302 BMSfreeMemoryArray(&tskc);
303 BMSfreeMemoryArray(&tblc);
304 BMSfreeMemoryArray(&tbuc);
305 BMSfreeMemoryArray(&tbkx);
306 BMSfreeMemoryArray(&tskx);
307 BMSfreeMemoryArray(&tblx);
308 BMSfreeMemoryArray(&tbux);
320 void generateMskBounds(
334 assert(msklb != NULL);
335 assert(mskub != NULL);
337 for( i = 0; i < n; i++ )
343 msklb[i] = -MSK_INFINITY;
346 mskub[i] = MSK_INFINITY;
360 mskub[i] = MSK_INFINITY;
363 else if (lb[i] == ub[i])
365 assert(lb[i]-ub[i]==0);
366 assert(ub[i]-lb[i]==0);
371 assert(lb[i] < ub[i]);
389 assert(beg != NULL || nnonz == 0);
400 for(i = 0; i < n-1; i++)
402 (*aptre)[i] = beg[i+1];
403 assert((*aptre)[i] >= beg[i]);
406 (*aptre)[n-1] = nnonz;
407 assert((*aptre)[n-1] >= beg[n-1]);
411 for( i = 0; i < n; i++ )
428 assert(first <= last);
430 SCIP_ALLOC( BMSallocMemoryArray( sub, (last-first+1)) );
432 for( i = first; i <= last; i++ )
452 assert(dstat != NULL);
455 for( i = 0; i < n; i++ )
465 SCIP_ALLOC( BMSallocMemoryArray( sub, (*count)) );
471 for( i = 0; i < n; i++ )
490 for( i = 0; i < len; i++ )
508 if (s < 0) *bk = MSK_BK_UP;
512 if (s < 0) *bk = MSK_BK_LO;
542 if (lpi->skxsize < ncols)
545 newsize = MAX(2*lpi->skxsize, ncols);
547 SCIP_ALLOC( BMSreallocMemoryArray( &(lpi->skx), newsize) );
548 lpi->skxsize = newsize;
551 if (lpi->skcsize < nrows)
554 newsize = MAX(2*lpi->skcsize, nrows);
556 SCIP_ALLOC( BMSreallocMemoryArray( &(lpi->skc), newsize) );
557 lpi->skcsize = newsize;
572 SCIP_CALL( ensureStateMem(lpi,ncols,nrows) );
598 static char mskname[100];
608 sprintf(mskname, "MOSEK %.2f", ( SCIP_Real)MSK_VERSION_MAJOR);
617 return "Linear Programming Solver developed by MOSEK Optimization Software (www.mosek.com)";
625 return ( void*) lpi->task;
651 #if MSK_VERSION_MAJOR < 7
656 MOSEK_CALL( MSK_linkfunctoenvstream(MosekEnv, MSK_STREAM_LOG, NULL, printstr) );
664 MOSEK_CALL( MSK_makeemptytask(MosekEnv, &((*lpi)->task)) );
666 MOSEK_CALL( MSK_linkfunctotaskstream((*lpi)->task, MSK_STREAM_LOG, NULL, printstr) );
670 MOSEK_CALL( MSK_putintparam((*lpi)->task, MSK_IPAR_OPTIMIZER, MSK_OPTIMIZER_FREE_SIMPLEX) );
672 MOSEK_CALL( MSK_putintparam((*lpi)->task, MSK_IPAR_SIM_SWITCH_OPTIMIZER, MSK_ON) );
674 MOSEK_CALL( MSK_putintparam((*lpi)->task, MSK_IPAR_SIM_HOTSTART, MSK_SIM_HOTSTART_STATUS_KEYS) );
675 MOSEK_CALL( MSK_puttaskname((*lpi)->task, ( char*) name) );
677 (*lpi)->termcode = MSK_RES_OK;
678 (*lpi)->itercount = 0;
680 (*lpi)->lpid = nextlpid++;
685 (*lpi)->messagehdlr = messagehdlr;
696 assert(*lpi != NULL);
703 BMSfreeMemoryArrayNull(&(*lpi)->skx);
704 BMSfreeMemoryArrayNull(&(*lpi)->skc);
751 assert(MosekEnv != NULL);
753 assert(lpi->task != NULL);
764 #if DEBUG_CHECK_DATA > 0
765 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiLoadColLP") );
770 SCIP_ALLOC( BMSallocMemoryArray( &bkc, nrows) );
771 SCIP_ALLOC( BMSallocMemoryArray( &blc, nrows) );
772 SCIP_ALLOC( BMSallocMemoryArray( &buc, nrows) );
774 generateMskBounds(nrows, lhs, rhs, bkc, blc, buc);
779 SCIP_ALLOC( BMSallocMemoryArray( &bkx, ncols) );
780 SCIP_ALLOC( BMSallocMemoryArray( &blx, ncols) );
781 SCIP_ALLOC( BMSallocMemoryArray( &bux, ncols) );
783 generateMskBounds(ncols, lb, ub, bkx, blx, bux);
785 SCIP_CALL( getEndptrs(ncols, beg, nnonz, &aptre) );
788 MOSEK_CALL( MSK_inputdata(lpi->task, nrows, ncols, nrows, ncols, obj, 0.0, beg, aptre, ind, val,
789 bkc, blc, buc, bkx, blx, bux) );
796 BMSfreeMemoryArray(&aptre);
797 BMSfreeMemoryArray(&bux);
798 BMSfreeMemoryArray(&blx);
799 BMSfreeMemoryArray(&bkx);
804 BMSfreeMemoryArray(&buc);
805 BMSfreeMemoryArray(&blc);
806 BMSfreeMemoryArray(&bkc);
809 #if DEBUG_CHECK_DATA > 0
810 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiLoadColLP") );
830 #if MSK_VERSION_MAJOR < 7
839 assert(MosekEnv != NULL);
841 assert(lpi->task != NULL);
845 #if DEBUG_CHECK_DATA > 0
846 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiAddCols") );
852 SCIP_ALLOC( BMSallocMemoryArray(&bkx, ncols) );
853 SCIP_ALLOC( BMSallocMemoryArray(&blx, ncols) );
854 SCIP_ALLOC( BMSallocMemoryArray(&bux, ncols) );
855 generateMskBounds(ncols, lb, ub, bkx, blx, bux);
857 MOSEK_CALL( MSK_getnumvar(lpi->task, &oldcols) );
859 #if MSK_VERSION_MAJOR < 7
860 SCIP_CALL( getEndptrs(ncols, beg, nnonz, &aptre) );
867 MOSEK_CALL( MSK_appendvars(lpi->task, ncols, obj, aptrb, aptre, ind, val, bkx, blx, bux) );
869 BMSfreeMemoryArray(&aptre);
872 MOSEK_CALL( MSK_appendvars(lpi->task, ncols) );
873 MOSEK_CALL( MSK_putcslice(lpi->task, oldcols, oldcols+ncols, obj) );
874 MOSEK_CALL( MSK_putvarboundslice(lpi->task, oldcols, oldcols+ncols, bkx, blx, bux) );
878 SCIP_CALL( getEndptrs(ncols, beg, nnonz, &aptre) );
879 MOSEK_CALL( MSK_putacolslice(lpi->task, oldcols, oldcols+ncols, beg, aptre, ind, val) );
880 BMSfreeMemoryArray(&aptre);
884 BMSfreeMemoryArray(&bux);
885 BMSfreeMemoryArray(&blx);
886 BMSfreeMemoryArray(&bkx);
888 #if DEBUG_CHECK_DATA > 0
889 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiAddCols") );
904 assert(MosekEnv != NULL);
906 assert(lpi->task != NULL);
910 #if DEBUG_CHECK_DATA > 0
911 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelCols") );
914 SCIP_CALL( getIndicesRange(firstcol, lastcol, &sub) );
917 #if MSK_VERSION_MAJOR < 7
918 MOSEK_CALL( MSK_remove(lpi->task,MSK_ACC_VAR, lastcol-firstcol+1, sub) );
920 MOSEK_CALL( MSK_removevars(lpi->task, lastcol-firstcol+1, sub) );
923 BMSfreeMemoryArray(&sub);
925 #if DEBUG_CHECK_DATA > 0
926 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelCols") );
946 assert(MosekEnv != NULL);
948 assert(lpi->task != NULL);
952 #if DEBUG_CHECK_DATA > 0
953 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelColset") );
956 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
959 SCIP_CALL( getIndicesFromDense(dstat, ncols, &count, &sub) );
962 for( i = 0; i < ncols; i++)
978 #if MSK_VERSION_MAJOR < 7
979 MOSEK_CALL( MSK_remove(lpi->task, MSK_ACC_VAR, count, sub) );
981 MOSEK_CALL( MSK_removevars(lpi->task, count, sub) );
983 BMSfreeMemoryArray(&sub);
986 #if DEBUG_CHECK_DATA > 0
987 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelColset") );
1006 #if MSK_VERSION_MAJOR < 7
1015 assert(MosekEnv != NULL);
1016 assert(lpi != NULL);
1017 assert(lpi->task != NULL);
1021 #if DEBUG_CHECK_DATA > 0
1022 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiAddRows") );
1028 SCIP_ALLOC( BMSallocMemoryArray(&bkc, nrows) );
1029 SCIP_ALLOC( BMSallocMemoryArray(&blc, nrows) );
1030 SCIP_ALLOC( BMSallocMemoryArray(&buc, nrows) );
1032 generateMskBounds(nrows, lhs, rhs, bkc, blc, buc);
1034 MOSEK_CALL( MSK_getnumcon(lpi->task, &oldrows) );
1036 #if MSK_VERSION_MAJOR < 7
1037 SCIP_CALL( getEndptrs(nrows, beg, nnonz, &aptre) );
1044 MOSEK_CALL( MSK_appendcons(lpi->task, nrows, aptrb, aptre, ind, val, bkc, blc, buc) );
1046 BMSfreeMemoryArray(&aptre);
1049 MOSEK_CALL( MSK_appendcons(lpi->task, nrows) );
1050 MOSEK_CALL( MSK_putconboundslice(lpi->task, oldrows, oldrows+nrows, bkc, blc, buc) );
1054 SCIP_CALL( getEndptrs(nrows, beg, nnonz, &aptre) );
1055 MOSEK_CALL( MSK_putarowslice(lpi->task, oldrows, oldrows+nrows, beg, aptre, ind, val) );
1056 BMSfreeMemoryArray(&aptre);
1060 BMSfreeMemoryArray(&buc);
1061 BMSfreeMemoryArray(&blc);
1062 BMSfreeMemoryArray(&bkc);
1064 #if DEBUG_CHECK_DATA > 0
1065 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiAddRows") );
1080 assert(MosekEnv != NULL);
1081 assert(lpi != NULL);
1082 assert(lpi->task != NULL);
1086 #if DEBUG_CHECK_DATA > 0
1087 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelRows") );
1090 SCIP_CALL( getIndicesRange(firstrow, lastrow, &sub) );
1094 #if MSK_VERSION_MAJOR < 7
1095 MOSEK_CALL( MSK_remove(lpi->task, MSK_ACC_CON, lastrow-firstrow+1, sub) );
1097 MOSEK_CALL( MSK_removecons(lpi->task, lastrow-firstrow+1, sub) );
1100 BMSfreeMemoryArray(&sub);
1102 #if DEBUG_CHECK_DATA > 0
1103 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelRows") );
1123 assert(MosekEnv != NULL);
1124 assert(lpi != NULL);
1125 assert(lpi->task != NULL);
1129 #if DEBUG_CHECK_DATA > 0
1130 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelRowset") );
1133 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
1136 SCIP_CALL( getIndicesFromDense(dstat, nrows, &count, &sub) );
1139 for( i = 0; i < nrows; i++ )
1155 #if MSK_VERSION_MAJOR < 7
1156 MOSEK_CALL( MSK_remove(lpi->task, MSK_ACC_CON, count, sub) );
1158 MOSEK_CALL( MSK_removecons(lpi->task, count, sub) );
1160 BMSfreeMemoryArray(&sub);
1163 #if DEBUG_CHECK_DATA > 0
1164 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiDelRowset end") );
1178 assert(MosekEnv != NULL);
1179 assert(lpi != NULL);
1180 assert(lpi->task != NULL);
1184 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
1185 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
1206 assert(MosekEnv != NULL);
1207 assert(lpi != NULL);
1208 assert(lpi->task != NULL);
1212 #if DEBUG_CHECK_DATA > 0
1213 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgBounds") );
1219 SCIP_ALLOC( BMSallocMemoryArray(&bkx, ncols) );
1220 SCIP_ALLOC( BMSallocMemoryArray(&blx, ncols) );
1221 SCIP_ALLOC( BMSallocMemoryArray(&bux, ncols) );
1223 generateMskBounds(ncols, lb, ub, bkx, blx, bux);
1224 MOSEK_CALL( MSK_putboundlist(lpi->task, MSK_ACC_VAR, ncols, ind, bkx, blx, bux) );
1226 BMSfreeMemoryArray(&bux);
1227 BMSfreeMemoryArray(&blx);
1228 BMSfreeMemoryArray(&bkx);
1230 #if DEBUG_CHECK_DATA > 0
1231 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgBounds") );
1250 assert(MosekEnv != NULL);
1251 assert(lpi != NULL);
1252 assert(lpi->task != NULL);
1256 #if DEBUG_CHECK_DATA > 0
1257 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgSides") );
1263 SCIP_ALLOC( BMSallocMemoryArray(&bkc, nrows) );
1264 SCIP_ALLOC( BMSallocMemoryArray(&blc, nrows) );
1265 SCIP_ALLOC( BMSallocMemoryArray(&buc, nrows) );
1267 generateMskBounds(nrows, lhs, rhs, bkc, blc, buc);
1268 MOSEK_CALL( MSK_putboundlist(lpi->task, MSK_ACC_CON, nrows, ind, bkc, blc, buc) );
1270 BMSfreeMemoryArray(&buc);
1271 BMSfreeMemoryArray(&blc);
1272 BMSfreeMemoryArray(&bkc);
1274 #if DEBUG_CHECK_DATA > 0
1275 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgSides") );
1289 assert(MosekEnv != NULL);
1290 assert(lpi != NULL);
1291 assert(lpi->task != NULL);
1295 #if DEBUG_CHECK_DATA > 0
1296 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgCoef") );
1299 MOSEK_CALL( MSK_putaij(lpi->task, row, col, newval) );
1301 #if DEBUG_CHECK_DATA > 0
1302 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgCoef") );
1314 assert(MosekEnv != NULL);
1315 assert(lpi != NULL);
1316 assert(lpi->task != NULL);
1333 assert(MosekEnv != NULL);
1334 assert(lpi != NULL);
1335 assert(lpi->task != NULL);
1339 #if DEBUG_CHECK_DATA > 0
1340 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgObj") );
1343 MOSEK_CALL( MSK_putclist(lpi->task, ncols, ind, obj) );
1345 #if DEBUG_CHECK_DATA > 0
1346 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiChgObj") );
1366 assert(MosekEnv != NULL);
1367 assert(lpi != NULL);
1368 assert(lpi->task != NULL);
1372 #if DEBUG_CHECK_DATA > 0
1373 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiScaleRow") );
1376 assert(scaleval != 0);
1378 #if MSK_VERSION_MAJOR < 7
1379 MOSEK_CALL( MSK_getavecnumnz(lpi->task, MSK_ACC_CON, row, &nnonz) );
1381 MOSEK_CALL( MSK_getarownumnz(lpi->task, row, &nnonz) );
1386 SCIP_ALLOC( BMSallocMemoryArray(&sub, nnonz) );
1387 SCIP_ALLOC( BMSallocMemoryArray(&val, nnonz) );
1389 #if MSK_VERSION_MAJOR < 7
1390 MOSEK_CALL( MSK_getavec(lpi->task, MSK_ACC_CON, row, &nnonz, sub, val) );
1391 scale_vec(nnonz, val, scaleval);
1392 MOSEK_CALL( MSK_putavec(lpi->task, MSK_ACC_CON, row, nnonz, sub, val) );
1394 MOSEK_CALL( MSK_getarow(lpi->task, row, &nnonz, sub, val) );
1395 scale_vec(nnonz, val, scaleval);
1396 MOSEK_CALL( MSK_putarow(lpi->task, row, nnonz, sub, val) );
1399 BMSfreeMemoryArray(&val);
1400 BMSfreeMemoryArray(&sub);
1403 MOSEK_CALL( MSK_getbound(lpi->task, MSK_ACC_CON, row, &bkc, &blc, &buc) );
1404 scale_bound(&bkc, &blc, &buc, scaleval);
1405 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_CON, row, bkc, blc, buc) );
1407 #if DEBUG_CHECK_DATA > 0
1408 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiScaleRow") );
1429 assert(MosekEnv != NULL);
1430 assert(lpi != NULL);
1431 assert(lpi->task != NULL);
1435 #if DEBUG_CHECK_DATA > 0
1436 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiScaleCol") );
1439 assert(scaleval != 0);
1440 #if MSK_VERSION_MAJOR < 7
1441 MOSEK_CALL( MSK_getavecnumnz(lpi->task, MSK_ACC_VAR, col, &nnonz) );
1443 MOSEK_CALL( MSK_getacolnumnz(lpi->task, col, &nnonz) );
1448 SCIP_ALLOC( BMSallocMemoryArray(&sub, nnonz) );
1449 SCIP_ALLOC( BMSallocMemoryArray(&val, nnonz) );
1451 #if MSK_VERSION_MAJOR < 7
1452 MOSEK_CALL( MSK_getavec(lpi->task, MSK_ACC_VAR, col, &nnonz, sub, val) );
1453 scale_vec(nnonz, val, scaleval);
1454 MOSEK_CALL( MSK_putavec(lpi->task, MSK_ACC_VAR, col, nnonz, sub, val) );
1456 MOSEK_CALL( MSK_getacol(lpi->task, col, &nnonz, sub, val) );
1457 scale_vec(nnonz, val, scaleval);
1458 MOSEK_CALL( MSK_putacol(lpi->task, col, nnonz, sub, val) );
1461 BMSfreeMemoryArray(&val);
1462 BMSfreeMemoryArray(&sub);
1465 MOSEK_CALL( MSK_getbound(lpi->task, MSK_ACC_VAR, col, &bkx, &blx, &bux) );
1466 scale_bound(&bkx, &blx, &bux, 1.0/scaleval);
1467 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_VAR, col, bkx, blx, bux) );
1469 MOSEK_CALL( MSK_getcslice(lpi->task, col, col+1, &c) );
1470 MOSEK_CALL( MSK_putcj(lpi->task, col, c*scaleval) );
1472 #if DEBUG_CHECK_DATA > 0
1473 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiScaleCol") );
1491 assert(MosekEnv != NULL);
1492 assert(lpi != NULL);
1493 assert(lpi->task != NULL);
1497 MOSEK_CALL( MSK_getnumcon(lpi->task, nrows) );
1508 assert(MosekEnv != NULL);
1509 assert(lpi != NULL);
1510 assert(lpi->task != NULL);
1514 MOSEK_CALL( MSK_getnumvar(lpi->task, ncols) );
1525 assert(MosekEnv != NULL);
1526 assert(lpi != NULL);
1527 assert(lpi->task != NULL);
1531 MOSEK_CALL( MSK_getnumanz(lpi->task, nnonz) );
1550 assert(MosekEnv != NULL);
1551 assert(lpi != NULL);
1552 assert(lpi->task != NULL);
1553 assert(first <= last);
1557 #if DEBUG_CHECK_DATA > 0
1558 SCIP_CALL( scip_checkdata(lpi, "getASlice") );
1565 assert(beg != NULL);
1566 assert(ind != NULL);
1567 assert(val != NULL);
1569 SCIP_ALLOC( BMSallocMemoryArray(&aptre, last - first + 1) );
1571 MOSEK_CALL( MSK_getaslicenumnz(lpi->task, iscon, first, last+1,nnonz) );
1573 MOSEK_CALL( MSK_getaslice(lpi->task, iscon, first, last+1, *nnonz, &surplus, beg, aptre, ind, val) );
1575 assert(surplus == 0);
1577 BMSfreeMemoryArray(&aptre);
1580 #if DEBUG_CHECK_DATA > 0
1581 SCIP_CALL( scip_checkdata(lpi, "getASlice") );
1603 assert(MosekEnv != NULL);
1604 assert(lpi != NULL);
1605 assert(lpi->task != NULL);
1610 SCIP_CALL( getASlice(lpi, MSK_ACC_VAR, firstcol, lastcol, nnonz, beg, ind, val) );
1631 assert(MosekEnv != NULL);
1632 assert(lpi != NULL);
1633 assert(lpi->task != NULL);
1637 #if DEBUG_CHECK_DATA > 0
1638 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetRows") );
1643 SCIP_CALL( getASlice(lpi, MSK_ACC_CON, firstrow, lastrow, nnonz, beg, ind, val) );
1645 #if DEBUG_CHECK_DATA > 0
1646 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetRows") );
1659 int namestoragesize,
1674 int namestoragesize,
1700 assert(MosekEnv != NULL);
1701 assert(lpi != NULL);
1702 assert(lpi->task != NULL);
1706 MOSEK_CALL( MSK_getcslice(lpi->task, firstcol, lastcol+1, vals) );
1720 assert(MosekEnv != NULL);
1721 assert(lpi != NULL);
1722 assert(lpi->task != NULL);
1726 #if DEBUG_CHECK_DATA > 0
1727 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetBounds") );
1730 MOSEK_CALL( MSK_getboundslice(lpi->task, MSK_ACC_VAR, firstcol, lastcol+1, NULL, lbs, ubs) );
1744 assert(MosekEnv != NULL);
1745 assert(lpi != NULL);
1746 assert(lpi->task != NULL);
1750 #if DEBUG_CHECK_DATA > 0
1751 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetSides") );
1754 MOSEK_CALL( MSK_getboundslice(lpi->task, MSK_ACC_CON, firstrow, lastrow+1, NULL, lhss, rhss) );
1756 #if DEBUG_CHECK_DATA > 0
1757 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetSides") );
1771 assert(MosekEnv != NULL);
1772 assert(lpi != NULL);
1773 assert(lpi->task != NULL);
1777 #if DEBUG_CHECK_DATA > 0
1778 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetCoef") );
1781 MOSEK_CALL( MSK_getaij(lpi->task, row, col, val) );
1783 #if DEBUG_CHECK_DATA > 0
1784 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiGetCoef") );
1803 assert(lpi != NULL);
1804 assert(lpi->task != NULL);
1806 MOSEK_CALL( MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, prosta, solsta) );
1813 MSKrescodee filterTRMrescode(
1815 MSKrescodee* termcode,
1819 if ( res == MSK_RES_TRM_MAX_ITERATIONS || res == MSK_RES_TRM_MAX_TIME
1820 || res == MSK_RES_TRM_OBJECTIVE_RANGE || res == MSK_RES_TRM_STALL
1822 || res == MSK_RES_TRM_MAX_NUM_SETBACKS
1823 || res == MSK_RES_TRM_NUMERICAL_PROBLEM
1828 if (res == MSK_RES_TRM_MAX_NUM_SETBACKS || res == MSK_RES_TRM_NUMERICAL_PROBLEM)
1832 #if ASSERT_ON_WARNING
1841 *termcode = MSK_RES_OK;
1851 int itercount_primal;
1860 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_PRESOLVE_USE, &presolve) );
1861 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, &maxiter) );
1863 #if DEBUG_EASY_REPRODUCE
1864 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_AUTO_SORT_A_BEFORE_OPT, MSK_ON) );
1865 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_OFF) );
1867 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
1870 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_AUTO_UPDATE_SOL_INFO, MSK_OFF) );
1876 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_ON) );
1877 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG_SIM_FREQ, 1) );
1881 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_OFF) );
1885 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_OFF) );
1889 MOSEK_CALL( MSK_solutiondef(lpi->task, MSK_SOL_BAS, &gotbasicsol) );
1893 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_PRESOLVE_USE, MSK_PRESOLVE_MODE_OFF) );
1897 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_PRESOLVE_USE, MSK_PRESOLVE_MODE_ON) );
1900 #if ALWAYS_SOLVE_PRIMAL > 0
1901 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_SOLVE_FORM, MSK_SOLVE_PRIMAL) );
1904 #if DEBUG_CHECK_DATA > 0
1905 SCIP_CALL( scip_checkdata(lpi, "SolveWSimplex") );
1908 assert(MosekEnv != NULL);
1909 assert(lpi != NULL);
1910 assert(lpi->task != NULL);
1912 if( gotbasicsol && maxiter < 20000 )
1915 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_PRIMAL_RESTRICT_SELECTION, 0) );
1920 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, 2000000000) );
1924 #if DEBUG_CHECK_DATA > 0
1925 SCIP_CALL( scip_checkdata(lpi, "Begin optimize with simplex") );
1928 #if FORCE_MOSEK_SUMMARY > 1
1931 MOSEK_CALL( MSK_solutionsummary(lpi->task,MSK_STREAM_LOG) );
1936 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, 100) );
1937 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG_SIM_FREQ, 100) );
1938 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG_SIM, 100) );
1941 MOSEK_CALL( filterTRMrescode(lpi->messagehdlr, &lpi->termcode, MSK_optimize(lpi->task)) );
1943 if( lpi->termcode == MSK_RES_TRM_MAX_NUM_SETBACKS )
1945 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_SCALING, MSK_SCALING_AGGRESSIVE) );
1947 MOSEK_CALL( filterTRMrescode(lpi->messagehdlr, &lpi->termcode, MSK_optimize(lpi->task)) );
1950 #if FORCE_MOSEK_SUMMARY
1953 MOSEK_CALL( MSK_solutionsummary(lpi->task,MSK_STREAM_LOG) );
1957 #if DEBUG_CHECK_DATA > 0
1958 SCIP_CALL( scip_checkdata(lpi, "End optimize with simplex") );
1961 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_PRESOLVE_USE, presolve) );
1962 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, maxiter) );
1964 MOSEK_CALL( MSK_getintinf(lpi->task, MSK_IINF_SIM_PRIMAL_ITER, &itercount_primal) );
1965 MOSEK_CALL( MSK_getintinf(lpi->task, MSK_IINF_SIM_DUAL_ITER, &itercount_dual) );
1967 lpi->itercount = itercount_primal + itercount_dual;
1969 MOSEK_CALL( MSK_getprimalobj(lpi->task, MSK_SOL_BAS, &pobj) );
1970 MOSEK_CALL( MSK_getdualobj(lpi->task, MSK_SOL_BAS, &dobj) );
1971 MOSEK_CALL( MSK_getsolutionstatus(lpi->task, MSK_SOL_BAS, &prosta, &solsta) );
1973 #if DEBUG_PRINT_STAT
1974 SCIPdebugMessage( "maxiter = %d, termcode = %d, prosta = %d, solsta = %d, objval = %g : %g, iter = %d+%d\n",
1975 maxiter, lpi->termcode, prosta, solsta, pobj, dobj, itercount_primal, itercount_dual);
1979 "objval = %g : %g, iter = %d+%d\n",
1980 maxiter,lpi->termcode,prosta,solsta,
1981 pobj,dobj,itercount_primal,itercount_dual);
1986 case MSK_SOL_STA_OPTIMAL:
1987 case MSK_SOL_STA_PRIM_AND_DUAL_FEAS:
1988 case MSK_SOL_STA_PRIM_FEAS:
1989 case MSK_SOL_STA_DUAL_FEAS:
1990 case MSK_SOL_STA_PRIM_INFEAS_CER:
1991 case MSK_SOL_STA_DUAL_INFEAS_CER:
1992 case MSK_SOL_STA_UNKNOWN:
1994 case MSK_SOL_STA_NEAR_OPTIMAL:
1995 case MSK_SOL_STA_NEAR_PRIM_FEAS:
1996 case MSK_SOL_STA_NEAR_DUAL_FEAS:
1997 case MSK_SOL_STA_NEAR_PRIM_AND_DUAL_FEAS:
1998 case MSK_SOL_STA_NEAR_PRIM_INFEAS_CER:
1999 case MSK_SOL_STA_NEAR_DUAL_INFEAS_CER:
2002 if (lpi->termcode == MSK_RES_OK)
2003 lpi->termcode = MSK_RES_TRM_NUMERICAL_PROBLEM;
2005 #if ASSERT_ON_WARNING
2009 case MSK_SOL_STA_INTEGER_OPTIMAL:
2010 case MSK_SOL_STA_NEAR_INTEGER_OPTIMAL:
2012 #if SHOW_ERRORS && !FORCE_SILENCE
2013 SCIPerrorMessage( "Simplex[%d] returned solsta = %d\n", optimizecount, solsta);
2016 #if ASSERT_ON_WARNING
2025 case MSK_PRO_STA_PRIM_AND_DUAL_FEAS:
2026 case MSK_PRO_STA_PRIM_FEAS:
2027 case MSK_PRO_STA_DUAL_FEAS:
2028 case MSK_PRO_STA_PRIM_AND_DUAL_INFEAS:
2029 case MSK_PRO_STA_PRIM_INFEAS:
2030 case MSK_PRO_STA_DUAL_INFEAS:
2031 case MSK_PRO_STA_UNKNOWN:
2033 case MSK_PRO_STA_NEAR_PRIM_AND_DUAL_FEAS:
2034 case MSK_PRO_STA_NEAR_PRIM_FEAS:
2035 case MSK_PRO_STA_NEAR_DUAL_FEAS:
2036 case MSK_PRO_STA_ILL_POSED:
2037 case MSK_PRO_STA_PRIM_INFEAS_OR_UNBOUNDED:
2040 if (lpi->termcode == MSK_RES_OK)
2041 lpi->termcode = MSK_RES_TRM_NUMERICAL_PROBLEM;
2043 #if ASSERT_ON_WARNING
2048 #if SHOW_ERRORS && !FORCE_SILENCE
2049 SCIPerrorMessage( "Simplex[%d] returned prosta = %d\n", optimizecount, prosta);
2052 #if ASSERT_ON_WARNING
2059 if( solsta == MSK_SOL_STA_OPTIMAL && fabs(dobj)+fabs(dobj) > 1.0e-6 && fabs(pobj-dobj)>0.0001*(fabs(pobj)+fabs(dobj)))
2061 SCIPerrorMessage( "Simplex[%d] returned optimal solution with different objvals %g != %g reldiff %.2g%%\n",
2062 optimizecount, pobj, dobj, 100*fabs(pobj-dobj)/ MAX(fabs(pobj),fabs(dobj)));
2065 if (lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE)
2067 if(solsta != MSK_SOL_STA_DUAL_FEAS && solsta != MSK_SOL_STA_OPTIMAL && solsta != MSK_SOL_STA_PRIM_AND_DUAL_FEAS)
2069 SCIPerrorMessage( "[%d] Terminated on objective range without dual feasible solsta.\n", optimizecount);
2078 MOSEK_CALL( MSK_getobjsense(lpi->task, &objsen) );
2080 if (objsen == MSK_OBJECTIVE_SENSE_MINIMIZE)
2082 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_UPPER_OBJ_CUT, &bound) );
2084 if (1.0e-6*(fabs(bound)+fabs(dobj)) < bound-dobj)
2087 optimizecount, dobj, bound);
2094 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_LOWER_OBJ_CUT, &bound) );
2096 if (1.0e-6*(fabs(bound)+fabs(dobj)) < dobj-bound)
2099 optimizecount, dobj, bound);
2107 if (maxiter >= 2000000000)
2109 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, maxiter) );
2111 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2113 SCIPmessagePrintWarning(lpi->messagehdlr, "Simplex[%d] failed to terminate in 10000 iterations, switching to interior point\n",
2120 #if DEBUG_DO_INTPNT_FEAS_CHECK
2121 if (solsta == MSK_SOL_STA_PRIM_INFEAS_CER || solsta == MSK_SOL_STA_DUAL_INFEAS_CER)
2127 MOSEK_CALL(MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, &prosta, &solsta));
2129 if (solsta == MSK_SOL_STA_PRIM_INFEAS_CER || solsta == MSK_SOL_STA_DUAL_INFEAS_CER)
2135 SCIPdebugPrintf( "wrong [%d] prosta = %d, solsta = %d\n",optimizecount,prosta,solsta);
2141 #if DEBUG_PRINT_STAT > 0
2142 SCIPdebugMessage( "Max iter stat : Count %d branchup = %d branchlo = %d primal %d dual %d\n",
2143 optimizecount, numstrongbranchmaxiterup, numstrongbranchmaxiterdo, numprimalmaxiter, numdualmaxiter);
2144 SCIPdebugMessage( "Objcut iter stat : Count %d branchup = %d branchlo = %d primal %d dual %d\n",
2145 optimizecount, numstrongbranchobjup, numstrongbranchobjdo, numprimalobj, numdualobj);
2148 #if DEBUG_CHECK_DATA > 0
2149 SCIP_CALL( scip_checkdata(lpi, "SolveWSimplex") );
2162 SCIPdebugMessage( "Calling SCIPlpiSolvePrimal[%d] (%d) ",optimizecount,lpi->lpid);
2164 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
2166 #if DEBUG_CHECK_DATA > 0
2167 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiSolvePrimal") );
2170 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_OPTIMIZER, MSK_OPTIMIZER_PRIMAL_SIMPLEX) );
2172 #if WRITE_PRIMAL > 0
2176 snprintf(fname,40, "primal_%d.lp",optimizecount);
2179 MSK_writedata(lpi->task,fname);
2185 if ( lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE )
2189 MOSEK_CALL( MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, NULL, &solsta) );
2192 if( solsta != MSK_SOL_STA_PRIM_FEAS )
2198 if (lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE)
2201 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2204 #if DEBUG_CHECK_DATA > 0
2205 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiSolvePrimal") );
2218 SCIPdebugMessage( "Calling SCIPlpiSolveDual[%d] (%d)\n",optimizecount,lpi->lpid);
2221 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_INTEGER, MSK_ON) );
2222 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
2223 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_OPTIMIZER, MSK_OPTIMIZER_DUAL_SIMPLEX) );
2229 snprintf(fname,40, "dual_%d.lp",optimizecount);
2231 MSK_writedata(lpi->task,fname);
2236 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_ON) );
2237 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG_SIM_FREQ, 1) );
2242 if ( lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE )
2246 MOSEK_CALL( MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, NULL, &solsta) );
2248 if( solsta != MSK_SOL_STA_DUAL_FEAS )
2254 if (lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE)
2257 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2269 assert(MosekEnv != NULL);
2270 assert(lpi != NULL);
2271 assert(lpi->task != NULL);
2278 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_ON) );
2282 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_OFF) );
2286 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, MSK_OFF) );
2291 SCIPdebugMessage( "Calling SCIPlpiSolveBarrier[%d] (%d) ",optimizecount,lpi->lpid);
2293 #if DEBUG_CHECK_DATA > 0
2294 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiSolveBarrier") );
2297 MOSEK_CALL( MSK_putintparam(lpi->task,MSK_IPAR_INTPNT_BASIS, crossover ? MSK_BI_ALWAYS : MSK_BI_NEVER) );
2298 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_OPTIMIZER, MSK_OPTIMIZER_INTPNT) );
2301 #if WRITE_INTPNT > 0
2305 snprintf(fname,40, "intpnt_%d.lp",optimizecount);
2308 MSK_writedata(lpi->task,fname);
2312 MOSEK_CALL( filterTRMrescode(lpi->messagehdlr, &lpi->termcode, MSK_optimize(lpi->task)) );
2314 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2317 MOSEK_CALL( MSK_getintinf(lpi->task, MSK_IINF_INTPNT_ITER, &lpi->itercount) );
2324 MOSEK_CALL( MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, &prosta, &solsta) );
2326 lpi->termcode, prosta, solsta, lpi->itercount);
2330 #if DEBUG_CHECK_DATA > 0
2331 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiSolveBarrier") );
2371 MSKobjsensee objsen;
2387 #if DEBUG_CHECK_DATA > 0
2388 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiStrongbranch") );
2391 assert(MosekEnv != NULL);
2392 assert(lpi != NULL);
2393 assert(lpi->task != NULL);
2395 if (lpi->termcode != MSK_RES_OK)
2400 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
2401 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
2403 SCIP_CALL( getbase(lpi, ncols, nrows) );
2405 MOSEK_CALL( MSK_getobjsense(lpi->task, &objsen) );
2406 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, &olditerlim) );
2407 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_DUAL_SELECTION, &oldselection) );
2408 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_HOTSTART, &oldhotstart) );
2410 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, itlim) );
2413 if (objsen == MSK_OBJECTIVE_SENSE_MINIMIZE)
2415 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_UPPER_OBJ_CUT, &bound) );
2419 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_LOWER_OBJ_CUT, &bound) );
2422 MOSEK_CALL( MSK_getbound(lpi->task, MSK_ACC_VAR, col, &bkx, &blx, &bux) );
2426 newub = EPSCEIL(psol-1.0, 1e-06);
2428 if (newub < blx - 0.5)
2439 else if ( EPSEQ(blx,newub,1.0e-6))
2447 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_VAR, col, newbk, blx, newub) );
2451 *iter += lpi->itercount;
2484 MOSEK_CALL( MSK_getdualobj(lpi->task, MSK_SOL_BAS, down) );
2488 if (lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE)
2489 ++numstrongbranchobjup;
2491 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2492 ++numstrongbranchmaxiterup;
2496 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_VAR, col, bkx, blx, bux) );
2500 if (newlb > bux + 0.5)
2511 else if ( EPSEQ(bux,newlb,1.0e-6))
2519 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_VAR, col, newbk, newlb, bux) );
2522 *iter += lpi->itercount;
2553 MOSEK_CALL( MSK_getdualobj(lpi->task, MSK_SOL_BAS, up) );
2557 if (lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE)
2558 ++numstrongbranchobjdo;
2560 if (lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS)
2561 ++numstrongbranchmaxiterdo;
2564 MOSEK_CALL( MSK_putbound(lpi->task, MSK_ACC_VAR, col, bkx, blx, bux) );
2565 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, olditerlim) );
2566 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_DUAL_SELECTION, oldselection) );
2567 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART, oldhotstart) );
2571 lpi->termcode = MSK_RES_OK;
2574 #if DEBUG_CHECK_DATA > 0
2575 SCIP_CALL( scip_checkdata(lpi, "SCIPlpiStrongbranch") );
2599 SCIP_CALL( SCIPlpiStrongbranch(lpi, col, psol, itlim, down, up, downvalid, upvalid, iter) );
2622 assert( iter != NULL );
2623 assert( cols != NULL );
2624 assert( psols != NULL );
2625 assert( down != NULL );
2626 assert( up != NULL );
2627 assert( downvalid != NULL );
2628 assert( upvalid != NULL );
2629 assert( down != NULL );
2634 for (j = 0; j < ncols; ++j)
2637 SCIP_CALL( SCIPlpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) );
2658 SCIP_CALL( SCIPlpiStrongbranch(lpi, col, psol, itlim, down, up, downvalid, upvalid, iter) );
2681 assert( iter != NULL );
2682 assert( cols != NULL );
2683 assert( psols != NULL );
2684 assert( down != NULL );
2685 assert( up != NULL );
2686 assert( downvalid != NULL );
2687 assert( upvalid != NULL );
2688 assert( down != NULL );
2693 for (j = 0; j < ncols; ++j)
2696 SCIP_CALL( SCIPlpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) );
2715 assert(MosekEnv != NULL);
2716 assert(lpi != NULL);
2717 assert(lpi->task != NULL);
2723 return (solsta == MSK_SOL_STA_OPTIMAL);
2737 assert(MosekEnv != NULL);
2738 assert(lpi != NULL);
2739 assert(lpi->task != NULL);
2746 MOSEK_CALL( MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, NULL, &solsta) );
2750 case MSK_SOL_STA_OPTIMAL:
2751 case MSK_SOL_STA_PRIM_AND_DUAL_FEAS:
2755 case MSK_SOL_STA_PRIM_FEAS:
2758 case MSK_SOL_STA_DUAL_FEAS:
2761 case MSK_SOL_STA_UNKNOWN:
2762 case MSK_SOL_STA_NEAR_OPTIMAL:
2763 case MSK_SOL_STA_NEAR_PRIM_FEAS:
2764 case MSK_SOL_STA_NEAR_DUAL_FEAS:
2765 case MSK_SOL_STA_NEAR_PRIM_AND_DUAL_FEAS:
2766 case MSK_SOL_STA_PRIM_INFEAS_CER:
2767 case MSK_SOL_STA_DUAL_INFEAS_CER:
2768 case MSK_SOL_STA_NEAR_PRIM_INFEAS_CER:
2769 case MSK_SOL_STA_NEAR_DUAL_INFEAS_CER:
2770 case MSK_SOL_STA_INTEGER_OPTIMAL:
2771 case MSK_SOL_STA_NEAR_INTEGER_OPTIMAL:
2777 if( primalfeasible != NULL )
2778 *primalfeasible = pfeas;
2780 if( dualfeasible != NULL )
2781 *dualfeasible = dfeas;
2796 assert(MosekEnv != NULL);
2797 assert(lpi != NULL);
2798 assert(lpi->task != NULL);
2804 return ( solsta == MSK_SOL_STA_DUAL_INFEAS_CER
2805 || prosta == MSK_PRO_STA_DUAL_INFEAS
2806 || prosta == MSK_PRO_STA_PRIM_AND_DUAL_INFEAS);
2818 assert(MosekEnv != NULL);
2819 assert(lpi != NULL);
2820 assert(lpi->task != NULL);
2826 return (solsta == MSK_SOL_STA_DUAL_INFEAS_CER);
2852 assert(MosekEnv != NULL);
2853 assert(lpi != NULL);
2854 assert(lpi->task != NULL);
2860 return (prosta == MSK_PRO_STA_PRIM_FEAS || prosta == MSK_PRO_STA_PRIM_AND_DUAL_FEAS);
2873 assert(MosekEnv != NULL);
2874 assert(lpi != NULL);
2875 assert(lpi->task != NULL);
2881 return ( solsta == MSK_SOL_STA_PRIM_INFEAS_CER
2882 || prosta == MSK_PRO_STA_PRIM_INFEAS
2883 || prosta == MSK_PRO_STA_PRIM_AND_DUAL_INFEAS);
2895 assert(MosekEnv != NULL);
2896 assert(lpi != NULL);
2897 assert(lpi->task != NULL);
2903 return (solsta == MSK_SOL_STA_PRIM_INFEAS_CER);
2929 assert(MosekEnv != NULL);
2930 assert(lpi != NULL);
2931 assert(lpi->task != NULL);
2937 return (prosta == MSK_PRO_STA_DUAL_FEAS || prosta == MSK_PRO_STA_PRIM_AND_DUAL_FEAS);
2948 assert(MosekEnv != NULL);
2949 assert(lpi != NULL);
2950 assert(lpi->task != NULL);
2956 return (solsta == MSK_SOL_STA_OPTIMAL);
2964 assert(MosekEnv != NULL);
2965 assert(lpi != NULL);
2966 assert(lpi->task != NULL);
2968 return ( lpi->termcode == MSK_RES_OK
2969 || lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS
2970 || lpi->termcode == MSK_RES_TRM_MAX_TIME
2971 || lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE);
2979 assert(MosekEnv != NULL);
2980 assert(lpi != NULL);
2981 assert(lpi->task != NULL);
2983 return lpi->termcode == MSK_RES_TRM_OBJECTIVE_RANGE;
2991 assert(MosekEnv != NULL);
2992 assert(lpi != NULL);
2993 assert(lpi->task != NULL);
2995 return lpi->termcode == MSK_RES_TRM_MAX_ITERATIONS;
3003 assert(MosekEnv != NULL);
3004 assert(lpi != NULL);
3005 assert(lpi->task != NULL);
3007 return lpi->termcode == MSK_RES_TRM_MAX_TIME;
3018 assert(MosekEnv != NULL);
3019 assert(lpi != NULL);
3020 assert(lpi->task != NULL);
3024 retcode = getSolutionStatus(lpi, NULL, &solsta);
3037 assert(MosekEnv != NULL);
3038 assert(lpi != NULL);
3039 assert(lpi->task != NULL);
3054 assert(MosekEnv != NULL);
3055 assert(lpi != NULL);
3056 assert(lpi->task != NULL);
3060 MOSEK_CALL( MSK_getprimalobj(lpi->task, MSK_SOL_BAS, objval) );
3081 assert(MosekEnv != NULL);
3082 assert(lpi != NULL);
3083 assert(lpi->task != NULL);
3092 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
3093 SCIP_ALLOC( BMSallocMemoryArray( &sux, ncols) );
3101 for( i = 0; i < ncols; i++ )
3103 assert(sux != NULL);
3104 redcost[i] -= sux[i];
3108 BMSfreeMemoryArray(&sux);
3119 assert(MosekEnv != NULL);
3120 assert(lpi != NULL);
3121 assert(lpi->task != NULL);
3137 assert(MosekEnv != NULL);
3138 assert(lpi != NULL);
3139 assert(lpi->task != NULL);
3143 MOSEK_CALL( MSK_getsolution(lpi->task, MSK_SOL_BAS, NULL, NULL, NULL, NULL, NULL, NULL, NULL, dualfarkas,
3157 assert(MosekEnv != NULL);
3158 assert(lpi != NULL);
3159 assert(lpi->task != NULL);
3161 *iterations = lpi->itercount;
3177 assert(lpi != NULL);
3178 assert(quality != NULL);
3193 if (res == MSK_RES_ERR_BASIS_SINGULAR)
3197 MOSEK_CALL( MSK_initbasissolve(lpi->task, basis) );
3224 for( i = 0; i < n; i++ )
3282 for( i = 0; i < n; i++ )
3323 void convertstat_scip2mosek(
3330 for( i = 0; i < n; i++ )
3335 resstat[i] = MSK_SK_LOW;
3338 resstat[i] = MSK_SK_BAS;
3341 resstat[i] = MSK_SK_UPR;
3344 resstat[i] = MSK_SK_SUPBAS;
3354 void convertstat_scip2mosek_slack(
3363 for( i = 0; i < n; i++ )
3368 resstat[i] = MSK_SK_UPR;
3371 resstat[i] = MSK_SK_BAS;
3374 resstat[i] = MSK_SK_LOW;
3377 resstat[i] = MSK_SK_SUPBAS;
3397 assert(MosekEnv != NULL);
3398 assert(lpi != NULL);
3399 assert(lpi->task != NULL);
3401 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
3402 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3404 SCIP_CALL( getbase(lpi, ncols, nrows) );
3408 SCIP_CALL( convertstat_mosek2scip(lpi, MSK_ACC_VAR, lpi->skx, ncols, cstat) );
3413 SCIP_CALL( convertstat_mosek2scip_slack(lpi, MSK_ACC_CON, lpi->skc, nrows, rstat) );
3431 assert(MosekEnv != NULL);
3432 assert(lpi != NULL);
3433 assert(lpi->task != NULL);
3435 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
3436 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3438 SCIP_CALL( ensureStateMem(lpi, ncols, nrows) );
3440 convertstat_scip2mosek(cstat, ncols, lpi->skx);
3441 convertstat_scip2mosek_slack(rstat, nrows, lpi->skc);
3458 assert(MosekEnv != NULL);
3459 assert(lpi != NULL);
3460 assert(lpi->task != NULL);
3464 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3467 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_OFF) );
3470 SCIP_CALL( handle_singular(lpi,bind,MSK_initbasissolve(lpi->task, bind)) );
3473 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
3476 for (i = 0; i < nrows; i++ )
3478 if (bind[i] < nrows)
3479 bind[i] = -1 - bind[i];
3481 bind[i] = bind[i] - nrows;
3513 assert(MosekEnv != NULL);
3514 assert(lpi != NULL);
3515 assert(lpi->task != NULL);
3517 MOSEK_CALL( MSK_getnumcon(lpi->task,&nrows) );
3518 MOSEK_CALL( MSK_putnaintparam(lpi->task, MSK_IPAR_BASIS_SOLVE_USE_PLUS_ONE_, MSK_OFF) );
3521 if ( ninds != NULL && inds != NULL )
3523 for (i = 0; i < nrows; ++i)
3530 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 0, ninds, inds, coef) );
3531 assert( *ninds <= nrows );
3538 SCIP_ALLOC( BMSallocMemoryArray(&sub, nrows) );
3540 for (i = 0; i < nrows; ++i)
3547 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 0, &numnz, sub, coef) );
3548 assert( numnz <= nrows );
3550 BMSfreeMemoryArray(&sub);
3552 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
3578 assert(MosekEnv != NULL);
3579 assert(lpi != NULL);
3580 assert(lpi->task != NULL);
3584 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3585 MOSEK_CALL( MSK_putnaintparam(lpi->task, MSK_IPAR_BASIS_SOLVE_USE_PLUS_ONE_, MSK_ON) );
3588 if ( ninds != NULL && inds != NULL )
3590 for (i = 0; i < nrows; ++i)
3597 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 1, ninds, inds, coef) );
3598 assert( *ninds <= nrows );
3605 SCIP_ALLOC( BMSallocMemoryArray( &sub, nrows) );
3607 for (i = 0; i < nrows; ++i)
3614 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 1, &numnz, sub, coef) );
3616 BMSfreeMemoryArray(&sub);
3618 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
3653 assert(MosekEnv != NULL);
3654 assert(lpi != NULL);
3655 assert(lpi->task != NULL);
3661 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3662 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
3664 SCIP_ALLOC( BMSallocMemoryArray(&csub, nrows) );
3665 SCIP_ALLOC( BMSallocMemoryArray(&cval, nrows) );
3667 if( binvrow == NULL )
3672 SCIP_ALLOC( BMSallocMemoryArray(&binv, nrows) );
3679 for (i = 0; i < ncols; ++i)
3683 #if MSK_VERSION_MAJOR < 7
3684 MOSEK_CALL( MSK_getavec(lpi->task, MSK_ACC_VAR, i, &numnz, csub, cval) );
3686 MOSEK_CALL( MSK_getacol(lpi->task, i, &numnz, csub, cval) );
3690 for (k = 0; k < numnz; ++k)
3691 coef[i] += binv[csub[k]] * cval[k];
3694 if ( ninds != NULL )
3698 BMSfreeMemoryArray(&cval);
3699 BMSfreeMemoryArray(&csub);
3703 BMSfreeMemoryArray(&binv);
3727 assert(MosekEnv != NULL);
3728 assert(lpi != NULL);
3729 assert(lpi->task != NULL);
3731 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3732 #if MSK_VERSION_MAJOR < 7
3733 MOSEK_CALL( MSK_getavecnumnz(lpi->task, MSK_ACC_VAR, c, &numnz) );
3735 MOSEK_CALL( MSK_getacolnumnz(lpi->task, c, &numnz) );
3737 SCIP_ALLOC( BMSallocMemoryArray( &val, numnz+1) );
3740 if ( ninds != NULL && inds != NULL )
3742 for (i = 0; i < nrows; ++i)
3745 #if MSK_VERSION_MAJOR < 7
3746 MOSEK_CALL( MSK_getavec(lpi->task, MSK_ACC_VAR, c, &numnz, inds, val) );
3748 MOSEK_CALL( MSK_getacol(lpi->task, c, &numnz, inds, val) );
3751 for (i = 0; i < numnz; ++i)
3752 coef[inds[i]] = val[i];
3754 MOSEK_CALL( MSK_putnaintparam(lpi->task, MSK_IPAR_BASIS_SOLVE_USE_PLUS_ONE_, MSK_OFF) );
3755 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 0, ninds, inds, coef) );
3760 SCIP_ALLOC( BMSallocMemoryArray( &sub, nrows) );
3762 for (i = 0; i < nrows; ++i)
3765 #if MSK_VERSION_MAJOR < 7
3766 MOSEK_CALL( MSK_getavec(lpi->task, MSK_ACC_VAR, c, &numnz, sub, val) );
3768 MOSEK_CALL( MSK_getacol(lpi->task, c, &numnz, sub, val) );
3771 for (i = 0; i < numnz; ++i)
3772 coef[sub[i]] = val[i];
3774 MOSEK_CALL( MSK_putnaintparam(lpi->task, MSK_IPAR_BASIS_SOLVE_USE_PLUS_ONE_, MSK_OFF) );
3775 MOSEK_CALL( MSK_solvewithbasis(lpi->task, 0, &numnz, sub, coef) );
3777 BMSfreeMemoryArray(&sub);
3780 BMSfreeMemoryArray(&val);
3781 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART_LU, MSK_ON) );
3800 assert(lpistate != NULL);
3801 assert(blkmem != NULL);
3805 SCIP_ALLOC( BMSallocBlockMemory(blkmem, lpistate) );
3806 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->skx, colpacketNum(ncols)) );
3807 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->skc, rowpacketNum(nrows)) );
3811 lpistate[0]->solsta = MSK_SOL_STA_UNKNOWN;
3812 lpistate[0]->num = -1;
3813 lpistate[0]->ncols = ncols;
3814 lpistate[0]->nrows = nrows;
3827 assert(blkmem != NULL);
3828 assert(lpistate != NULL);
3829 assert(*lpistate != NULL);
3831 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->skx, colpacketNum((*lpistate)->ncols));
3832 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->skc, rowpacketNum((*lpistate)->nrows));
3833 BMSfreeBlockMemory(blkmem, lpistate);
3843 MSKaccmodee accmode,
3850 for( i = 0; i < n; i++ )
3862 SCIPdebugMessage( "STATE[%d]: %c[%d] = bas, sl%c = %g, su%c = %g\n", optimizecount, xc, i, xc, sl, xc, su);
3875 SCIPdebugMessage( "STATE[%d]: %c[%d] = unknown status <%d>\n", optimizecount, xc, i, sk[i]);
3891 SCIP_CALL( checkState1(lpi, ncols, lpi->skx, MSK_ACC_VAR, 'x') );
3892 SCIP_CALL( checkState1(lpi, nrows, lpi->skc, MSK_ACC_CON, 'c') );
3905 int *skxi = ( int *) lpi->skx;
3906 int *skci = ( int *) lpi->skc;
3908 assert( sizeof( int) == sizeof(MSKstakeye));
3910 SCIP_CALL( convertstat_mosek2scip(lpi, MSK_ACC_VAR, lpi->skx, lpistate->ncols, skxi) );
3911 SCIP_CALL( convertstat_mosek2scip_slack(lpi, MSK_ACC_CON, lpi->skc, lpistate->nrows, skci) );
3913 SCIPencodeDualBit(skxi, lpistate->skx, lpistate->ncols);
3914 SCIPencodeDualBit(skci, lpistate->skc, lpistate->nrows);
3921 void lpistateUnpack(
3927 assert( sizeof( int) == sizeof(MSKstakeye));
3929 SCIPdecodeDualBit(lpistate->skx, ( int*) skx, lpistate->ncols);
3930 SCIPdecodeDualBit(lpistate->skc, ( int*) skc, lpistate->nrows);
3932 convertstat_scip2mosek(( int*) skx, lpistate->ncols, skx);
3933 convertstat_scip2mosek_slack(( int*) skc, lpistate->nrows, skc);
3949 assert(MosekEnv != NULL);
3950 assert(lpi != NULL);
3951 assert(lpi->task != NULL);
3952 assert(lpistate != NULL);
3956 MOSEK_CALL( MSK_solutiondef(lpi->task, MSK_SOL_BAS, &gotbasicsol) );
3961 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
3962 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
3965 SCIP_CALL( lpistateCreate(lpistate, blkmem, ncols, nrows) );
3967 lpistate[0]->num = optimizecount;
3969 MOSEK_CALL(MSK_getsolutionstatus ( lpi->task, MSK_SOL_BAS, NULL, &lpistate[0]->solsta));
3971 SCIP_CALL( getbase(lpi, ncols, nrows) );
3974 SCIP_CALL( checkState(lpi, ncols, nrows) );
3977 SCIP_CALL( lpistatePack(lpi, lpistate[0]) );
4001 assert(MosekEnv != NULL);
4002 assert(lpi != NULL);
4003 assert(lpi->task != NULL);
4005 if (lpistate == NULL)
4011 if (lpistate->nrows == 0 || lpistate->ncols == 0)
4014 MOSEK_CALL( MSK_getnumcon(lpi->task, &nrows) );
4015 MOSEK_CALL( MSK_getnumvar(lpi->task, &ncols) );
4016 assert(lpistate->nrows <= nrows);
4017 assert(lpistate->ncols <= ncols);
4019 SCIP_CALL( ensureStateMem(lpi, ncols, nrows) );
4020 SCIP_CALL( getbase(lpi, ncols, nrows) );
4022 lpistateUnpack(lpistate, lpi->skx, lpi->skc);
4025 for (i = lpistate->ncols; i < ncols; ++i)
4029 MOSEK_CALL( MSK_getboundslice(lpi->task, MSK_ACC_VAR, i, i, NULL, &lb, &ub) );
4034 lpi->skx[i] = MSK_SK_SUPBAS;
4036 lpi->skx[i] = MSK_SK_UPR;
4039 lpi->skx[i] = MSK_SK_LOW;
4041 for (i = lpistate->nrows; i < nrows; ++i)
4042 lpi->skc[i] = MSK_SK_BAS;
4047 SCIPdebugMessage( "Store from state into task iter : %d with solsta : %d\n", lpistate->num, lpistate->solsta);
4057 assert(lpi != NULL);
4072 assert(MosekEnv != NULL);
4073 assert(lpi != NULL);
4074 assert(lpi->task != NULL);
4078 if( *lpistate != NULL )
4080 lpistateFree(lpistate, blkmem);
4092 assert(MosekEnv != NULL);
4093 assert(lpi != NULL);
4094 assert(lpi->task != NULL);
4098 return ( lpistate != NULL && lpistate->num >= 0);
4107 assert(MosekEnv != NULL);
4108 assert(lpi != NULL);
4109 assert(lpi->task != NULL);
4113 MOSEK_CALL( MSK_readsolution(lpi->task, MSK_SOL_BAS, fname) );
4126 assert(MosekEnv != NULL);
4127 assert(lpi != NULL);
4128 assert(lpi->task != NULL);
4131 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_WRITE_SOL_HEAD, MSK_ON) );
4132 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_WRITE_SOL_VARIABLES, MSK_ON) );
4133 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_WRITE_SOL_CONSTRAINTS, MSK_ON) );
4135 MOSEK_CALL( MSK_writesolution(lpi->task, MSK_SOL_BAS, fname) );
4159 assert(lpinorms != NULL);
4175 assert(lpinorms == NULL);
4188 assert(lpinorms == NULL);
4201 static const char* paramname[] = {
4202 "SCIP_LPPAR_FROMSCRATCH",
4203 "SCIP_LPPAR_FASTMIP",
4204 "SCIP_LPPAR_SCALING",
4205 "SCIP_LPPAR_PRESOLVING",
4206 "SCIP_LPPAR_PRICING",
4207 "SCIP_LPPAR_LPINFO",
4208 "SCIP_LPPAR_FEASTOL",
4209 "SCIP_LPPAR_DUALFEASTOL",
4210 "SCIP_LPPAR_BARRIERCONVTOL",
4211 "SCIP_LPPAR_LOBJLIM",
4212 "SCIP_LPPAR_UOBJLIM",
4213 "SCIP_LPPAR_LPITLIM",
4214 "SCIP_LPPAR_LPTILIM",
4215 "SCIP_LPPAR_MARKOWITZ",
4216 "SCIP_LPPAR_ROWREPSWITCH",
4218 "SCIP_LPPAR_THREADS"
4223 const char* paramty2str(
4245 return paramname[type];
4257 assert(MosekEnv != NULL);
4258 assert(lpi != NULL);
4259 assert(lpi->task != NULL);
4264 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_HOTSTART, ival) );
4265 *ival = (*ival == MSK_SIM_HOTSTART_NONE);
4270 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_SCALING, ival) );
4271 *ival = (*ival != MSK_SCALING_NONE);
4274 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_PRESOLVE_USE, ival) );
4275 *ival = (*ival != MSK_PRESOLVE_MODE_OFF);
4278 *ival = lpi->pricing;
4281 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_LOG, ival) );
4282 *ival = (*ival == MSK_ON);
4285 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, ival) );
4303 #if SCIP_CONTROLS_PRICING
4305 static int pricing[7] = {
4306 MSK_SIM_SELECTION_SE,
4307 MSK_SIM_SELECTION_SE,
4308 MSK_SIM_SELECTION_FULL,
4309 MSK_SIM_SELECTION_PARTIAL,
4310 MSK_SIM_SELECTION_SE,
4311 MSK_SIM_SELECTION_ASE,
4312 MSK_SIM_SELECTION_DEVEX,
4316 SCIPdebugMessage( "Calling SCIPlpiSetIntpar (%d) Parameter=<%s> Value=<%d>\n", lpi->lpid, paramty2str(type), ival);
4326 SCIPdebugMessage( "Calling SCIPlpiSetIntpar (%d) %s = %d\n",lpi->lpid,paramty2str(type),ival);
4328 assert(MosekEnv != NULL);
4329 assert(lpi != NULL);
4330 assert(lpi->task != NULL);
4335 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_HOTSTART,
4336 ival ? MSK_SIM_HOTSTART_NONE : MSK_SIM_HOTSTART_STATUS_KEYS ) );
4341 scaling = (ival ? MSK_SCALING_FREE : MSK_SCALING_NONE);
4342 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_SCALING, scaling) );
4343 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_INTPNT_SCALING, scaling) );
4346 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_PRESOLVE_USE,
4347 ival ? MSK_PRESOLVE_MODE_FREE : MSK_PRESOLVE_MODE_OFF) );
4387 #if SCIP_CONTROLS_PRICING
4388 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_PRIMAL_SELECTION, pricing[ival]) );
4390 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_DUAL_SELECTION, pricing[ival]) );
4395 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_DUAL_RESTRICT_SELECTION, 0) );
4397 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_PRIMAL_RESTRICT_SELECTION, 0) );
4400 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_PRIMAL_SELECTION, MSK_SIM_SELECTION_FREE) );
4402 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_DUAL_SELECTION, MSK_SIM_SELECTION_FREE) );
4410 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_LOG, ival ? MSK_ON : MSK_OFF) );
4414 #if DEBUG_PARAM_SETTING
4421 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_SIM_MAX_ITERATIONS, ival) );
4439 assert(MosekEnv != NULL);
4440 assert(lpi != NULL);
4441 assert(lpi->task != NULL);
4445 #if SCIP_CONTROLS_TOLERANCES
4447 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_BASIS_TOL_X, dval) );
4450 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_BASIS_TOL_S, dval) );
4453 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_INTPNT_TOL_REL_GAP, dval) );
4457 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_LOWER_OBJ_CUT, dval) );
4460 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_UPPER_OBJ_CUT, dval) );
4463 MOSEK_CALL( MSK_getdouparam(lpi->task, MSK_DPAR_OPTIMIZER_MAX_TIME, dval) );
4480 SCIPdebugMessage( "setting real parameter %s to %g\n", paramty2str(type), dval);
4482 assert(MosekEnv != NULL);
4483 assert(lpi != NULL);
4484 assert(lpi->task != NULL);
4490 #if SCIP_CONTROLS_TOLERANCES
4495 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_BASIS_TOL_X, dval) );
4502 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_BASIS_TOL_S, dval) );
4505 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_INTPNT_TOL_REL_GAP, dval) );
4509 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_LOWER_OBJ_CUT, dval) );
4512 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_UPPER_OBJ_CUT, dval) );
4515 MOSEK_CALL( MSK_putdouparam(lpi->task, MSK_DPAR_OPTIMIZER_MAX_TIME, dval) );
4536 assert(MosekEnv != NULL);
4537 assert(lpi != NULL);
4538 assert(lpi->task != NULL);
4540 return MSK_INFINITY;
4549 assert(MosekEnv != NULL);
4550 assert(lpi != NULL);
4551 assert(lpi->task != NULL);
4570 SCIPdebugMessage( "Calling SCIPlpiReadLP (%d), filename <%s>\n",lpi->lpid, fname);
4572 assert(MosekEnv != NULL);
4573 assert(lpi != NULL);
4574 assert(lpi->task != NULL);
4576 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_READ_DATA_FORMAT, &olddataformat) );
4577 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_READ_DATA_FORMAT, MSK_DATA_FORMAT_LP) );
4578 MOSEK_CALL( MSK_readdata(lpi->task, fname) );
4579 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_READ_DATA_FORMAT, olddataformat) );
4592 SCIPdebugMessage( "Calling SCIPlpiReadLP (%d), filename <%s>\n",lpi->lpid, fname);
4594 assert(MosekEnv != NULL);
4595 assert(lpi != NULL);
4596 assert(lpi->task != NULL);
4598 MOSEK_CALL( MSK_getintparam(lpi->task, MSK_IPAR_WRITE_DATA_FORMAT, &olddataformat) );
4599 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_WRITE_DATA_FORMAT, MSK_DATA_FORMAT_LP) );
4600 MOSEK_CALL( MSK_writedata(lpi->task, fname) );
4601 MOSEK_CALL( MSK_putintparam(lpi->task, MSK_IPAR_WRITE_DATA_FORMAT, olddataformat) );
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 SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
#define ASSERT_ON_NUMERICAL_TROUBLES
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
unsigned int SCIP_DUALPACKET
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
const char * SCIPlpiGetSolverName(void)
enum SCIP_ObjSen SCIP_OBJSEN
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int row, SCIP_Real *coef, int *inds, int *ninds)
interface methods for specific LP solvers
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, int *ind, SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
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 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 SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
enum SCIP_LPParam SCIP_LPPARAM
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int row, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
enum SCIP_Pricing SCIP_PRICING
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
SCIP_DUALPACKET COLPACKET
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_DUALPACKET COLPACKET
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
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 SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
struct SCIP_LPiState SCIP_LPISTATE
#define DEBUG_CHECK_STATE_TOL
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
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 SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
#define SCIP_ABORT_FALSE(x)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
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_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
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 SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real 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 SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
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 SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
#define STRONGBRANCH_PRICING
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
#define SENSE2MOSEK(objsen)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE *lpistate)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
const char * SCIPlpiGetSolverDesc(void)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS *lpinorms)
|