42 #include "zimpl/bool.h" 43 #include "zimpl/ratlptypes.h" 44 #include "zimpl/mme.h" 46 #include "zimpl/numb.h" 47 #include "zimpl/bound.h" 48 #include "zimpl/mono.h" 49 #include "zimpl/term.h" 51 #include "zimpl/xlpglue.h" 52 #include "zimpl/zimpllib.h" 54 #define READER_NAME "zplreader" 55 #define READER_DESC "file reader for ZIMPL model files" 56 #define READER_EXTENSION "zpl" 63 #if (ZIMPL_VERSION >= 320) 102 readerdata->valid =
TRUE;
121 assert(readerdata !=
NULL);
122 assert(readerdata->retcode ==
SCIP_OKAY);
123 assert(!readerdata->readerror);
125 scip = readerdata->scip;
126 assert(scip !=
NULL);
128 readerdata->retcode = createProb(scip, readerdata, name);
131 return (Lps*) readerdata;
143 Bool xlp_conname_exists(
151 assert(readerdata !=
NULL);
210 assert(sciplhs == sciprhs);
213 SCIPwarningMessage(scip,
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
216 readerdata->readerror =
TRUE;
223 initial = readerdata->initialconss;
231 usercut = (flags & LP_FLAG_CON_SEPAR) != 0;
232 lazycut = (flags & LP_FLAG_CON_CHECK) != 0;
235 if( usercut && lazycut )
254 if( term_is_linear(term) )
257 if ( flags & LP_FLAG_CON_INDIC )
259 Bool lhsIndCons =
FALSE;
260 Bool rhsIndCons =
FALSE;
279 SCIPerrorMessage(
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
280 readerdata->readerror =
TRUE;
288 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
291 for( i = 0; i < term_get_elements(term); i++ )
295 const Mono* mono = term_get_element(term, i);
298 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
301 mfun = mono_get_function(mono);
302 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
304 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
309 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
310 assert(mono_is_linear(mono));
312 scipval = -numb_todbl(mono_get_coeff(mono));
324 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
327 for( i = 0; i < term_get_elements(term); i++ )
331 const Mono* mono = term_get_element(term, i);
334 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
337 mfun = mono_get_function(mono);
338 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
340 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
345 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
346 assert(mono_is_linear(mono));
348 scipval = numb_todbl(mono_get_coeff(mono));
359 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
362 for( i = 0; i < term_get_elements(term); i++ )
367 assert(!numb_equal(mono_get_coeff(term_get_element(term, i)), numb_zero()));
368 assert(mono_is_linear(term_get_element(term, i)));
370 scipvar = (
SCIP_VAR*)mono_get_var(term_get_element(term, i), 0);
371 scipval = numb_todbl(mono_get_coeff(term_get_element(term, i)));
379 else if( term_get_degree(term) == 2 )
399 for( i = 0; i < term_get_elements(term); ++i )
401 monom = term_get_element(term, i);
402 assert(!numb_equal(mono_get_coeff(monom), numb_zero()));
403 assert(mono_get_degree(monom) <= 2);
404 assert(mono_get_degree(monom) > 0);
405 if (mono_get_degree(monom) == 1)
407 linvars [nlinvars] = (
SCIP_VAR*)mono_get_var(monom, 0);
408 lincoefs[nlinvars] = numb_todbl(mono_get_coeff(monom));
413 assert(mono_get_degree(monom) == 2);
414 quadvar1 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 0);
415 quadvar2 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 1);
416 quadcoefs[nquadterms] = numb_todbl(mono_get_coeff(monom));
421 SCIP_CALL(
SCIPcreateConsQuadratic(scip, &cons, name, nlinvars, linvars, lincoefs, nquadterms, quadvar1, quadvar2, quadcoefs, sciplhs, sciprhs,
422 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows) );
444 int nsimplemonomials;
445 int simplemonomialssize;
449 int extramonomialssize;
465 simplemonomials =
NULL;
466 nsimplemonomials = 0;
467 simplemonomialssize = 0;
469 extramonomials =
NULL;
472 extramonomialssize = 0;
477 for( i = 0; i < term_get_elements(term); ++i )
479 monomial = term_get_element(term, i);
480 assert(monomial !=
NULL);
481 assert(!numb_equal(mono_get_coeff(monomial), numb_zero()));
482 assert(mono_get_degree(monomial) > 0);
484 if( mono_get_function(monomial) == MFUN_NONE )
492 if( simplemonomialssize == 0 )
497 else if( simplemonomialssize < nsimplemonomials + 1 )
502 assert(simplemonomials !=
NULL);
505 for( j = 0; j < mono_get_degree(monomial); ++j )
510 if( polyvarssize == 0 )
515 else if( polyvarssize < npolyvars + 1 )
520 assert(polyvars !=
NULL);
522 polyvars[npolyvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
524 varpos = npolyvars-1;
531 assert(polyvars !=
NULL);
532 assert(polyvars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
553 switch( mono_get_function(monomial) )
561 coef = 1.0 /
log(10.0);
566 #if ZIMPL_VERSION >= 330 588 if( numb_is_int(mono_get_coeff(monomial)) )
591 argint = numb_toint(mono_get_coeff(monomial));
596 argdbl = numb_todbl(mono_get_coeff(monomial));
601 argdbl = numb_todbl(mono_get_coeff(monomial));
607 SCIPerrorMessage(
"ZIMPL function %d invalid here.\n", mono_get_function(monomial));
610 #if ZIMPL_VERSION >= 330 616 SCIPerrorMessage(
"ZIMPL function %d not supported\n", mono_get_function(monomial));
623 if( extramonomialssize == 0 )
629 else if( extramonomialssize < nextramonomials + 1 )
635 assert(extracoefs !=
NULL);
636 assert(extramonomials !=
NULL);
637 extracoefs[nextramonomials] = coef;
641 for( j = 0; j < mono_get_degree(monomial); ++j )
651 else if( varssize < nvars + 1 )
656 assert(vars !=
NULL);
658 vars[nvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
667 assert(vars !=
NULL);
668 assert(vars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
703 assert(polyvars !=
NULL || npolyvars == 0);
705 nchildren = npolyvars + nextramonomials;
710 for( i = 0; i < npolyvars; ++i )
720 else if( varssize < nvars + 1 )
725 assert(vars !=
NULL);
727 vars[nvars] = polyvars[i];
736 assert(vars[varpos] == polyvars[i]);
744 assert(extracoefs !=
NULL || nextramonomials == 0);
745 assert(extramonomials !=
NULL || nextramonomials == 0);
750 for( i = 0; i < nextramonomials; ++i )
756 childidx = npolyvars + i;
769 SCIP_CALL(
SCIPcreateConsNonlinear(scip, &cons, name, 0,
NULL,
NULL, 1, &exprtree,
NULL, sciplhs, sciprhs,
770 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
797 Bool xlp_addcon_term(
812 assert(readerdata !=
NULL);
814 scip = readerdata->scip;
815 assert(scip !=
NULL);
817 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
820 readerdata->retcode = addConsTerm(scip, readerdata, name, type, lhs, rhs, flags, term, &created);
831 VarClass usevarclass,
834 const Numb* priority,
835 const Numb* startval,
847 switch( bound_get_type(lower) )
850 lb = (
SCIP_Real)numb_todbl(bound_get_value(lower));
855 case BOUND_MINUS_INFTY:
860 SCIPerrorMessage(
"invalid lower bound type <%d> in ZIMPL reader\n", bound_get_type(lower));
865 switch( bound_get_type(upper) )
868 ub = (
SCIP_Real)numb_todbl(bound_get_value(upper));
873 case BOUND_MINUS_INFTY:
878 SCIPerrorMessage(
"invalid upper bound type <%d> in ZIMPL reader\n", bound_get_type(upper));
883 switch( usevarclass )
895 SCIPwarningMessage(scip,
"invalid variable class <%d> in ZIMPL callback xlp_addvar()\n", usevarclass);
897 readerdata->readerror =
TRUE;
900 initial = !(readerdata->dynamiccols);
901 removable = readerdata->dynamiccols;
904 SCIP_CALL(
SCIPcreateVar(scip, &var, name, lb, ub, 0.0, vartype, initial, removable,
NULL,
NULL,
NULL,
NULL,
NULL) );
909 if( !numb_equal(priority, numb_unknown()) )
911 if( numb_is_int(priority) )
912 branchpriority = numb_toint(priority);
915 if( !readerdata->branchpriowarning )
918 "ZIMPL reader: fractional branching priorities in input - rounding down to integer values\n");
919 readerdata->branchpriowarning =
TRUE;
921 branchpriority = (int)numb_todbl(priority);
929 if( readerdata->valid )
932 if( numb_equal(startval, numb_unknown()) )
934 SCIPdebugMsg(scip,
"primal solution candidate contains an unknown value for variable <%s>(%g)\n",
936 readerdata->valid =
FALSE;
940 assert(readerdata->sol !=
NULL);
941 SCIPdebugMsg(scip,
"change solution solution <%p>: <%s> = <%g>\n",
950 (*zplvar) = (Var*)var;
962 VarClass usevarclass,
965 const Numb* priority,
974 assert(readerdata !=
NULL);
976 scip = readerdata->scip;
977 assert(scip !=
NULL);
981 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
984 readerdata->retcode = addVar(scip, readerdata, name, usevarclass, lower, upper, priority, startval, &zplvar);
1017 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1020 for( i = 0; i < term_get_elements(term); i++ )
1025 assert( mono_is_linear(term_get_element(term, i)) );
1027 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1028 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1042 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1044 for( i = 0; i < term_get_elements(term); i++ )
1049 assert( mono_is_linear(term_get_element(term, i)) );
1051 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1052 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1061 SCIPerrorMessage(
"invalid SOS type <%d> in ZIMPL callback xlp_addsos_term()\n", type);
1062 readerdata->readerror =
TRUE;
1070 Bool xlp_addsos_term(
1074 const Numb* priority,
1083 assert(readerdata !=
NULL);
1085 scip = readerdata->scip;
1086 assert(scip !=
NULL);
1088 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1091 readerdata->retcode = addSOS(scip, readerdata, name, type, term);
1097 const char* xlp_getvarname(
1107 assert(readerdata !=
NULL);
1109 scip = readerdata->scip;
1110 assert(scip !=
NULL);
1117 VarClass xlp_getclass(
1126 assert(readerdata !=
NULL);
1140 readerdata->readerror =
TRUE;
1148 Bound* xlp_getlower(
1158 BoundType boundtype;
1163 assert(readerdata !=
NULL);
1165 scip = readerdata->scip;
1166 assert(scip !=
NULL);
1169 assert(scipvar !=
NULL);
1177 boundtype = BOUND_MINUS_INFTY;
1179 boundtype = BOUND_INFTY;
1182 boundtype = BOUND_VALUE;
1186 numb = numb_new_ascii(s);
1190 bound = bound_new(boundtype, numb);
1199 Bound* xlp_getupper(
1209 BoundType boundtype;
1214 assert(readerdata !=
NULL);
1216 scip = readerdata->scip;
1217 assert(scip !=
NULL);
1220 assert(scipvar !=
NULL);
1228 boundtype = BOUND_MINUS_INFTY;
1230 boundtype = BOUND_INFTY;
1233 boundtype = BOUND_VALUE;
1235 numb = numb_new_ascii(s);
1239 bound = bound_new(boundtype, numb);
1267 assert(readerdata !=
NULL);
1269 scip = readerdata->scip;
1270 assert(scip !=
NULL);
1272 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1292 assert(readerdata !=
NULL);
1294 scip = readerdata->scip;
1295 assert(scip !=
NULL);
1297 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1301 assert(scipvar !=
NULL);
1302 scipval = numb_todbl(cost);
1315 assert(scip !=
NULL);
1316 assert(reader !=
NULL);
1357 if( compression !=
NULL )
1360 *compextension =
'\0';
1369 if( chdir(path) != 0 )
1375 filename = namewithoutpath;
1399 readerdata->scip = scip;
1400 readerdata->sol =
NULL;
1401 readerdata->valid =
FALSE;
1402 readerdata->branchpriowarning =
FALSE;
1403 readerdata->readerror =
FALSE;
1412 if( strcmp(paramstr,
"-") == 0 )
1415 if( !zpl_read(filename,
TRUE, (
void*)readerdata) )
1416 readerdata->readerror =
TRUE;
1423 return readerdata->retcode;
1429 char dummy[2] =
"x";
1435 len = (int) strlen(paramstr);
1449 while( p < len && paramstr[p] ==
' ' )
1453 while( p < len && paramstr[p] !=
' ' )
1455 switch( paramstr[p] )
1460 while( p < len && paramstr[p] !=
'"' )
1462 argv[argc][arglen] = paramstr[p];
1471 argv[argc][arglen] = paramstr[p];
1476 argv[argc][arglen] = paramstr[p];
1482 argv[argc][arglen] =
'\0';
1501 for( i = 1; i < argc; ++i )
1508 if( !zpl_read_with_args(argv, argc,
TRUE, (
void*)readerdata) )
1509 readerdata->readerror =
TRUE;
1512 for( i = argc - 1; i >= 1; --i )
1521 return readerdata->retcode;
1530 if( chdir(oldpath) != 0 )
1537 if( readerdata->valid )
1541 assert(readerdata->sol !=
NULL);
1557 if( readerdata->readerror )
1563 if( readerdata->sol !=
NULL )
1589 #if (ZIMPL_VERSION >= 320) 1599 assert(reader !=
NULL);
1606 "reading/zplreader/changedir",
"should the current directory be changed to that of the ZIMPL file before parsing?",
1609 "reading/zplreader/usestartsol",
"should ZIMPL starting solutions be forwarded to SCIP?",
1612 "reading/zplreader/parameters",
"additional parameter string passed to the ZIMPL parser (or - for no additional parameters)",
1615 (void)
SCIPsnprintf(extcodename,
SCIP_MAXSTRLEN,
"ZIMPL %d.%d.%d", ZIMPL_VERSION/100, (ZIMPL_VERSION%100)/10, ZIMPL_VERSION%10);
1618 SCIPwarningMessage(scip,
"SCIP does only support ZIMPL 3.2.0 and higher. Please update your ZIMPL version %d.%d.%d\n",
1619 ZIMPL_VERSION/100, (ZIMPL_VERSION%100)/10, ZIMPL_VERSION%10);
SCIP_RETCODE SCIPincludeReaderZpl(SCIP *scip)
SCIP_RETCODE SCIPgetStringParam(SCIP *scip, const char *name, char **value)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_RETCODE SCIPaddVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
SCIP_RETCODE SCIPexprCreateMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial, SCIP_Real coef, int nfactors, int *childidxs, SCIP_Real *exponents)
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
constraint handler for indicator constraints
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_VERBLEVEL SCIPgetVerbLevel(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPexprtreeSetVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPexprtreeCreate(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **tree, SCIP_EXPR *root, int nvars, int nparams, SCIP_Real *params)
#define SCIPfreeBufferArray(scip, ptr)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsQuadratic(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPexprAddMonomials(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Bool copymonomials)
enum SCIP_ExprOp SCIP_EXPROP
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
#define SCIPallocBuffer(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
const char * SCIPvarGetName(SCIP_VAR *var)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
constraint handler for quadratic constraints
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
SCIP_RETCODE SCIPexprCreatePolynomial(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
void SCIPexprMergeMonomialFactors(SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_Real eps)
#define SCIPallocBufferArray(scip, ptr, num)
struct SCIP_ReaderData SCIP_READERDATA
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
public data structures and miscellaneous methods
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
enum SCIP_Objsense SCIP_OBJSENSE
constraint handler for nonlinear constraints
SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPexprtreeFree(SCIP_EXPRTREE **tree)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
#define BMScopyMemoryArray(ptr, source, num)
SCIPInterval log(const SCIPInterval &x)
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Constraint handler for linear constraints in their most general form, .
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
#define SCIP_DECL_READERCOPY(x)
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
SCIP_RETCODE SCIPcreateConsIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
#define SCIPfreeBuffer(scip, ptr)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
constraint handler for SOS type 1 constraints
SCIP_RETCODE SCIPcreateConsNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_DECL_READERREAD(ReaderTSP::scip_read)
SCIP_RETCODE SCIPexprAddMonomialFactors(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL *monomial, int nfactors, int *childidxs, SCIP_Real *exponents)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
SCIP_RETCODE SCIPcreateConsSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
enum SCIP_Vartype SCIP_VARTYPE
constraint handler for SOS type 2 constraints
SCIP_RETCODE SCIPcreateConsSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
#define SCIPreallocBufferArray(scip, ptr, num)