47 #include "zimpl/bool.h" 48 #include "zimpl/ratlptypes.h" 49 #include "zimpl/mme.h" 51 #include "zimpl/numb.h" 52 #include "zimpl/bound.h" 53 #include "zimpl/mono.h" 54 #include "zimpl/term.h" 56 #include "zimpl/xlpglue.h" 57 #include "zimpl/zimpllib.h" 63 #define READER_NAME "zplreader" 64 #define READER_DESC "file reader for ZIMPL model files" 65 #define READER_EXTENSION "zpl" 72 #if (ZIMPL_VERSION >= 320) 111 readerdata->valid =
TRUE;
130 assert(readerdata != NULL);
131 assert(readerdata->retcode ==
SCIP_OKAY);
132 assert(!readerdata->readerror);
134 scip = readerdata->scip;
135 assert(scip != NULL);
137 readerdata->retcode = createProb(scip, readerdata, name);
140 return (Lps*) readerdata;
152 bool xlp_conname_exists(
160 assert(readerdata != NULL);
219 assert(sciplhs == sciprhs);
222 SCIPwarningMessage(scip,
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
225 readerdata->readerror =
TRUE;
232 initial = readerdata->initialconss;
240 usercut = (flags & LP_FLAG_CON_SEPAR) != 0;
241 lazycut = (flags & LP_FLAG_CON_CHECK) != 0;
244 if( usercut && lazycut )
263 if( term_is_linear(term) )
266 if ( flags & LP_FLAG_CON_INDIC )
268 bool lhsIndCons =
FALSE;
269 bool rhsIndCons =
FALSE;
288 SCIPerrorMessage(
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
289 readerdata->readerror =
TRUE;
297 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
300 for( i = 0; i < term_get_elements(term); i++ )
304 const Mono* mono = term_get_element(term, i);
307 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
310 mfun = mono_get_function(mono);
311 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
313 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
318 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
319 assert(mono_is_linear(mono));
321 scipval = -numb_todbl(mono_get_coeff(mono));
333 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
336 for( i = 0; i < term_get_elements(term); i++ )
340 const Mono* mono = term_get_element(term, i);
343 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
346 mfun = mono_get_function(mono);
347 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
349 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
354 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
355 assert(mono_is_linear(mono));
357 scipval = numb_todbl(mono_get_coeff(mono));
368 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
371 for( i = 0; i < term_get_elements(term); i++ )
376 assert(!numb_equal(mono_get_coeff(term_get_element(term, i)), numb_zero()));
377 assert(mono_is_linear(term_get_element(term, i)));
379 scipvar = (
SCIP_VAR*)mono_get_var(term_get_element(term, i), 0);
380 scipval = numb_todbl(mono_get_coeff(term_get_element(term, i)));
388 else if( term_get_degree(term) == 2 )
408 for( i = 0; i < term_get_elements(term); ++i )
410 monom = term_get_element(term, i);
411 assert(!numb_equal(mono_get_coeff(monom), numb_zero()));
412 assert(mono_get_degree(monom) <= 2);
413 assert(mono_get_degree(monom) > 0);
414 if (mono_get_degree(monom) == 1)
416 linvars [nlinvars] = (
SCIP_VAR*)mono_get_var(monom, 0);
417 lincoefs[nlinvars] = numb_todbl(mono_get_coeff(monom));
422 assert(mono_get_degree(monom) == 2);
423 quadvar1 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 0);
424 quadvar2 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 1);
425 quadcoefs[nquadterms] = numb_todbl(mono_get_coeff(monom));
430 SCIP_CALL(
SCIPcreateConsQuadratic(scip, &cons, name, nlinvars, linvars, lincoefs, nquadterms, quadvar1, quadvar2, quadcoefs, sciplhs, sciprhs,
431 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows) );
453 int nsimplemonomials;
454 int simplemonomialssize;
458 int extramonomialssize;
474 simplemonomials = NULL;
475 nsimplemonomials = 0;
476 simplemonomialssize = 0;
478 extramonomials = NULL;
481 extramonomialssize = 0;
486 for( i = 0; i < term_get_elements(term); ++i )
488 monomial = term_get_element(term, i);
489 assert(monomial != NULL);
490 assert(!numb_equal(mono_get_coeff(monomial), numb_zero()));
491 assert(mono_get_degree(monomial) > 0);
493 if( mono_get_function(monomial) == MFUN_NONE )
501 if( simplemonomialssize == 0 )
506 else if( simplemonomialssize < nsimplemonomials + 1 )
511 assert(simplemonomials != NULL);
514 for( j = 0; j < mono_get_degree(monomial); ++j )
519 if( polyvarssize == 0 )
524 else if( polyvarssize < npolyvars + 1 )
529 assert(polyvars != NULL);
531 polyvars[npolyvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
533 varpos = npolyvars-1;
540 assert(polyvars != NULL);
541 assert(polyvars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
562 switch( mono_get_function(monomial) )
570 coef = 1.0 /
log(10.0);
575 #if ZIMPL_VERSION >= 330 597 if( numb_is_int(mono_get_coeff(monomial)) )
600 argint = numb_toint(mono_get_coeff(monomial));
605 argdbl = numb_todbl(mono_get_coeff(monomial));
610 argdbl = numb_todbl(mono_get_coeff(monomial));
616 SCIPerrorMessage(
"ZIMPL function %d invalid here.\n", mono_get_function(monomial));
619 #if ZIMPL_VERSION >= 330 625 SCIPerrorMessage(
"ZIMPL function %d not supported\n", mono_get_function(monomial));
632 if( extramonomialssize == 0 )
638 else if( extramonomialssize < nextramonomials + 1 )
644 assert(extracoefs != NULL);
645 assert(extramonomials != NULL);
646 extracoefs[nextramonomials] = coef;
650 for( j = 0; j < mono_get_degree(monomial); ++j )
660 else if( varssize < nvars + 1 )
665 assert(vars != NULL);
667 vars[nvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
676 assert(vars != NULL);
677 assert(vars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
712 assert(polyvars != NULL || npolyvars == 0);
714 nchildren = npolyvars + nextramonomials;
719 for( i = 0; i < npolyvars; ++i )
729 else if( varssize < nvars + 1 )
734 assert(vars != NULL);
736 vars[nvars] = polyvars[i];
745 assert(vars[varpos] == polyvars[i]);
753 assert(extracoefs != NULL || nextramonomials == 0);
754 assert(extramonomials != NULL || nextramonomials == 0);
759 for( i = 0; i < nextramonomials; ++i )
765 childidx = npolyvars + i;
778 SCIP_CALL(
SCIPcreateConsNonlinear(scip, &cons, name, 0, NULL, NULL, 1, &exprtree, NULL, sciplhs, sciprhs,
779 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
806 bool xlp_addcon_term(
821 assert(readerdata != NULL);
823 scip = readerdata->scip;
824 assert(scip != NULL);
826 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
829 readerdata->retcode = addConsTerm(scip, readerdata, name, type, lhs, rhs, flags, term, &created);
840 VarClass usevarclass,
843 const Numb* priority,
844 const Numb* startval,
856 switch( bound_get_type(lower) )
859 lb = (
SCIP_Real)numb_todbl(bound_get_value(lower));
864 case BOUND_MINUS_INFTY:
869 SCIPerrorMessage(
"invalid lower bound type <%d> in ZIMPL reader\n", bound_get_type(lower));
874 switch( bound_get_type(upper) )
877 ub = (
SCIP_Real)numb_todbl(bound_get_value(upper));
882 case BOUND_MINUS_INFTY:
887 SCIPerrorMessage(
"invalid upper bound type <%d> in ZIMPL reader\n", bound_get_type(upper));
892 switch( usevarclass )
904 SCIPwarningMessage(scip,
"invalid variable class <%d> in ZIMPL callback xlp_addvar()\n", usevarclass);
906 readerdata->readerror =
TRUE;
909 initial = !(readerdata->dynamiccols);
910 removable = readerdata->dynamiccols;
913 SCIP_CALL(
SCIPcreateVar(scip, &var, name, lb, ub, 0.0, vartype, initial, removable, NULL, NULL, NULL, NULL, NULL) );
918 if( !numb_equal(priority, numb_unknown()) )
920 if( numb_is_int(priority) )
921 branchpriority = numb_toint(priority);
924 if( !readerdata->branchpriowarning )
927 "ZIMPL reader: fractional branching priorities in input - rounding down to integer values\n");
928 readerdata->branchpriowarning =
TRUE;
930 branchpriority = (int)numb_todbl(priority);
938 if( readerdata->valid )
941 if( numb_equal(startval, numb_unknown()) )
943 SCIPdebugMsg(scip,
"primal solution candidate contains an unknown value for variable <%s>(%g)\n",
945 readerdata->valid =
FALSE;
949 assert(readerdata->sol != NULL);
950 SCIPdebugMsg(scip,
"change solution solution <%p>: <%s> = <%g>\n",
959 (*zplvar) = (Var*)var;
971 VarClass usevarclass,
974 const Numb* priority,
983 assert(readerdata != NULL);
985 scip = readerdata->scip;
986 assert(scip != NULL);
990 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
993 readerdata->retcode = addVar(scip, readerdata, name, usevarclass, lower, upper, priority, startval, &zplvar);
1026 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1029 for( i = 0; i < term_get_elements(term); i++ )
1034 assert( mono_is_linear(term_get_element(term, i)) );
1036 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1037 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1051 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1053 for( i = 0; i < term_get_elements(term); i++ )
1058 assert( mono_is_linear(term_get_element(term, i)) );
1060 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1061 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1070 SCIPerrorMessage(
"invalid SOS type <%d> in ZIMPL callback xlp_addsos_term()\n", type);
1071 readerdata->readerror =
TRUE;
1079 int xlp_addsos_term(
1083 const Numb* priority,
1092 assert(readerdata != NULL);
1094 scip = readerdata->scip;
1095 assert(scip != NULL);
1097 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1100 readerdata->retcode = addSOS(scip, readerdata, name, type, term);
1106 const char* xlp_getvarname(
1116 assert(readerdata != NULL);
1118 scip = readerdata->scip;
1119 assert(scip != NULL);
1126 VarClass xlp_getclass(
1135 assert(readerdata != NULL);
1149 readerdata->readerror =
TRUE;
1157 Bound* xlp_getlower(
1167 BoundType boundtype;
1172 assert(readerdata != NULL);
1174 scip = readerdata->scip;
1175 assert(scip != NULL);
1178 assert(scipvar != NULL);
1186 boundtype = BOUND_MINUS_INFTY;
1188 boundtype = BOUND_INFTY;
1191 boundtype = BOUND_VALUE;
1195 numb = numb_new_ascii(s);
1199 bound = bound_new(boundtype, numb);
1208 Bound* xlp_getupper(
1218 BoundType boundtype;
1223 assert(readerdata != NULL);
1225 scip = readerdata->scip;
1226 assert(scip != NULL);
1229 assert(scipvar != NULL);
1237 boundtype = BOUND_MINUS_INFTY;
1239 boundtype = BOUND_INFTY;
1242 boundtype = BOUND_VALUE;
1244 numb = numb_new_ascii(s);
1248 bound = bound_new(boundtype, numb);
1276 assert(readerdata != NULL);
1278 scip = readerdata->scip;
1279 assert(scip != NULL);
1281 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1297 assert(data != NULL);
1298 assert(name != NULL);
1300 xlp_objname(data, name);
1301 xlp_setdir(data, minimize);
1320 assert(readerdata != NULL);
1322 scip = readerdata->scip;
1323 assert(scip != NULL);
1325 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1329 assert(scipvar != NULL);
1330 scipval = numb_todbl(cost);
1343 assert(scip != NULL);
1344 assert(reader != NULL);
1385 if( compression != NULL )
1388 *compextension =
'\0';
1397 if( chdir(path) != 0 )
1403 filename = namewithoutpath;
1427 readerdata->scip = scip;
1428 readerdata->sol = NULL;
1429 readerdata->valid =
FALSE;
1430 readerdata->branchpriowarning =
FALSE;
1431 readerdata->readerror =
FALSE;
1440 if( strcmp(paramstr,
"-") == 0 )
1443 if( !zpl_read(filename,
TRUE, (
void*)readerdata) )
1444 readerdata->readerror =
TRUE;
1451 return readerdata->retcode;
1457 char dummy[2] =
"x";
1463 len = (int) strlen(paramstr);
1477 while( p < len && paramstr[p] ==
' ' )
1481 while( p < len && paramstr[p] !=
' ' )
1483 switch( paramstr[p] )
1488 while( p < len && paramstr[p] !=
'"' )
1490 argv[argc][arglen] = paramstr[p];
1499 argv[argc][arglen] = paramstr[p];
1504 argv[argc][arglen] = paramstr[p];
1510 argv[argc][arglen] =
'\0';
1529 for( i = 1; i < argc; ++i )
1536 if( !zpl_read_with_args(argv, argc,
TRUE, (
void*)readerdata) )
1537 readerdata->readerror =
TRUE;
1540 for( i = argc - 1; i >= 1; --i )
1549 return readerdata->retcode;
1558 if( chdir(oldpath) != 0 )
1565 if( readerdata->valid )
1569 assert(readerdata->sol != NULL);
1585 if( readerdata->readerror )
1591 if( readerdata->sol != NULL )
1617 #if (ZIMPL_VERSION >= 320) 1627 assert(reader != NULL);
1634 "reading/zplreader/changedir",
"should the current directory be changed to that of the ZIMPL file before parsing?",
1637 "reading/zplreader/usestartsol",
"should ZIMPL starting solutions be forwarded to SCIP?",
1640 "reading/zplreader/parameters",
"additional parameter string passed to the ZIMPL parser (or - for no additional parameters)",
1641 NULL,
FALSE,
"-", NULL, NULL) );
1643 (void)
SCIPsnprintf(extcodename,
SCIP_MAXSTRLEN,
"ZIMPL %d.%d.%d", ZIMPL_VERSION/100, (ZIMPL_VERSION%100)/10, ZIMPL_VERSION%10);
1646 SCIPwarningMessage(scip,
"SCIP does only support ZIMPL 3.2.0 and higher. Please update your ZIMPL version %d.%d.%d\n",
1647 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)