46 #include "zimpl/bool.h" 47 #include "zimpl/ratlptypes.h" 48 #include "zimpl/mme.h" 50 #include "zimpl/numb.h" 51 #include "zimpl/bound.h" 52 #include "zimpl/mono.h" 53 #include "zimpl/term.h" 55 #include "zimpl/xlpglue.h" 56 #include "zimpl/zimpllib.h" 62 #define READER_NAME "zplreader" 63 #define READER_DESC "file reader for ZIMPL model files" 64 #define READER_EXTENSION "zpl" 71 #if (ZIMPL_VERSION >= 320) 110 readerdata->valid =
TRUE;
129 assert(readerdata != NULL);
130 assert(readerdata->retcode ==
SCIP_OKAY);
131 assert(!readerdata->readerror);
133 scip = readerdata->scip;
134 assert(scip != NULL);
136 readerdata->retcode = createProb(scip, readerdata, name);
139 return (Lps*) readerdata;
151 Bool xlp_conname_exists(
159 assert(readerdata != NULL);
218 assert(sciplhs == sciprhs);
221 SCIPwarningMessage(scip,
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
224 readerdata->readerror =
TRUE;
231 initial = readerdata->initialconss;
239 usercut = (flags & LP_FLAG_CON_SEPAR) != 0;
240 lazycut = (flags & LP_FLAG_CON_CHECK) != 0;
243 if( usercut && lazycut )
262 if( term_is_linear(term) )
265 if ( flags & LP_FLAG_CON_INDIC )
267 Bool lhsIndCons =
FALSE;
268 Bool rhsIndCons =
FALSE;
287 SCIPerrorMessage(
"invalid constraint type <%d> in ZIMPL callback xlp_addcon()\n", type);
288 readerdata->readerror =
TRUE;
296 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
299 for( i = 0; i < term_get_elements(term); i++ )
303 const Mono* mono = term_get_element(term, i);
306 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
309 mfun = mono_get_function(mono);
310 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
312 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
317 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
318 assert(mono_is_linear(mono));
320 scipval = -numb_todbl(mono_get_coeff(mono));
332 initial, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
335 for( i = 0; i < term_get_elements(term); i++ )
339 const Mono* mono = term_get_element(term, i);
342 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
345 mfun = mono_get_function(mono);
346 if (mfun == MFUN_TRUE || mfun == MFUN_FALSE)
348 scipvar = (
SCIP_VAR*)mono_get_var(mono, 0);
353 assert(!numb_equal(mono_get_coeff(mono), numb_zero()));
354 assert(mono_is_linear(mono));
356 scipval = numb_todbl(mono_get_coeff(mono));
367 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
370 for( i = 0; i < term_get_elements(term); i++ )
375 assert(!numb_equal(mono_get_coeff(term_get_element(term, i)), numb_zero()));
376 assert(mono_is_linear(term_get_element(term, i)));
378 scipvar = (
SCIP_VAR*)mono_get_var(term_get_element(term, i), 0);
379 scipval = numb_todbl(mono_get_coeff(term_get_element(term, i)));
387 else if( term_get_degree(term) == 2 )
407 for( i = 0; i < term_get_elements(term); ++i )
409 monom = term_get_element(term, i);
410 assert(!numb_equal(mono_get_coeff(monom), numb_zero()));
411 assert(mono_get_degree(monom) <= 2);
412 assert(mono_get_degree(monom) > 0);
413 if (mono_get_degree(monom) == 1)
415 linvars [nlinvars] = (
SCIP_VAR*)mono_get_var(monom, 0);
416 lincoefs[nlinvars] = numb_todbl(mono_get_coeff(monom));
421 assert(mono_get_degree(monom) == 2);
422 quadvar1 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 0);
423 quadvar2 [nquadterms] = (
SCIP_VAR*)mono_get_var(monom, 1);
424 quadcoefs[nquadterms] = numb_todbl(mono_get_coeff(monom));
429 SCIP_CALL(
SCIPcreateConsQuadratic(scip, &cons, name, nlinvars, linvars, lincoefs, nquadterms, quadvar1, quadvar2, quadcoefs, sciplhs, sciprhs,
430 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows) );
452 int nsimplemonomials;
453 int simplemonomialssize;
457 int extramonomialssize;
473 simplemonomials = NULL;
474 nsimplemonomials = 0;
475 simplemonomialssize = 0;
477 extramonomials = NULL;
480 extramonomialssize = 0;
485 for( i = 0; i < term_get_elements(term); ++i )
487 monomial = term_get_element(term, i);
488 assert(monomial != NULL);
489 assert(!numb_equal(mono_get_coeff(monomial), numb_zero()));
490 assert(mono_get_degree(monomial) > 0);
492 if( mono_get_function(monomial) == MFUN_NONE )
500 if( simplemonomialssize == 0 )
505 else if( simplemonomialssize < nsimplemonomials + 1 )
510 assert(simplemonomials != NULL);
513 for( j = 0; j < mono_get_degree(monomial); ++j )
518 if( polyvarssize == 0 )
523 else if( polyvarssize < npolyvars + 1 )
528 assert(polyvars != NULL);
530 polyvars[npolyvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
532 varpos = npolyvars-1;
539 assert(polyvars != NULL);
540 assert(polyvars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
561 switch( mono_get_function(monomial) )
569 coef = 1.0 /
log(10.0);
574 #if ZIMPL_VERSION >= 330 596 if( numb_is_int(mono_get_coeff(monomial)) )
599 argint = numb_toint(mono_get_coeff(monomial));
604 argdbl = numb_todbl(mono_get_coeff(monomial));
609 argdbl = numb_todbl(mono_get_coeff(monomial));
615 SCIPerrorMessage(
"ZIMPL function %d invalid here.\n", mono_get_function(monomial));
618 #if ZIMPL_VERSION >= 330 624 SCIPerrorMessage(
"ZIMPL function %d not supported\n", mono_get_function(monomial));
631 if( extramonomialssize == 0 )
637 else if( extramonomialssize < nextramonomials + 1 )
643 assert(extracoefs != NULL);
644 assert(extramonomials != NULL);
645 extracoefs[nextramonomials] = coef;
649 for( j = 0; j < mono_get_degree(monomial); ++j )
659 else if( varssize < nvars + 1 )
664 assert(vars != NULL);
666 vars[nvars] = (
SCIP_VAR*)mono_get_var(monomial, j);
675 assert(vars != NULL);
676 assert(vars[varpos] == (
SCIP_VAR*)mono_get_var(monomial, j));
711 assert(polyvars != NULL || npolyvars == 0);
713 nchildren = npolyvars + nextramonomials;
718 for( i = 0; i < npolyvars; ++i )
728 else if( varssize < nvars + 1 )
733 assert(vars != NULL);
735 vars[nvars] = polyvars[i];
744 assert(vars[varpos] == polyvars[i]);
752 assert(extracoefs != NULL || nextramonomials == 0);
753 assert(extramonomials != NULL || nextramonomials == 0);
758 for( i = 0; i < nextramonomials; ++i )
764 childidx = npolyvars + i;
777 SCIP_CALL(
SCIPcreateConsNonlinear(scip, &cons, name, 0, NULL, NULL, 1, &exprtree, NULL, sciplhs, sciprhs,
778 initial, separate, enforce, check, propagate, local, modifiable, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
805 Bool xlp_addcon_term(
820 assert(readerdata != NULL);
822 scip = readerdata->scip;
823 assert(scip != NULL);
825 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
828 readerdata->retcode = addConsTerm(scip, readerdata, name, type, lhs, rhs, flags, term, &created);
839 VarClass usevarclass,
842 const Numb* priority,
843 const Numb* startval,
855 switch( bound_get_type(lower) )
858 lb = (
SCIP_Real)numb_todbl(bound_get_value(lower));
863 case BOUND_MINUS_INFTY:
868 SCIPerrorMessage(
"invalid lower bound type <%d> in ZIMPL reader\n", bound_get_type(lower));
873 switch( bound_get_type(upper) )
876 ub = (
SCIP_Real)numb_todbl(bound_get_value(upper));
881 case BOUND_MINUS_INFTY:
886 SCIPerrorMessage(
"invalid upper bound type <%d> in ZIMPL reader\n", bound_get_type(upper));
891 switch( usevarclass )
903 SCIPwarningMessage(scip,
"invalid variable class <%d> in ZIMPL callback xlp_addvar()\n", usevarclass);
905 readerdata->readerror =
TRUE;
908 initial = !(readerdata->dynamiccols);
909 removable = readerdata->dynamiccols;
912 SCIP_CALL(
SCIPcreateVar(scip, &var, name, lb, ub, 0.0, vartype, initial, removable, NULL, NULL, NULL, NULL, NULL) );
917 if( !numb_equal(priority, numb_unknown()) )
919 if( numb_is_int(priority) )
920 branchpriority = numb_toint(priority);
923 if( !readerdata->branchpriowarning )
926 "ZIMPL reader: fractional branching priorities in input - rounding down to integer values\n");
927 readerdata->branchpriowarning =
TRUE;
929 branchpriority = (int)numb_todbl(priority);
937 if( readerdata->valid )
940 if( numb_equal(startval, numb_unknown()) )
942 SCIPdebugMsg(scip,
"primal solution candidate contains an unknown value for variable <%s>(%g)\n",
944 readerdata->valid =
FALSE;
948 assert(readerdata->sol != NULL);
949 SCIPdebugMsg(scip,
"change solution solution <%p>: <%s> = <%g>\n",
958 (*zplvar) = (Var*)var;
970 VarClass usevarclass,
973 const Numb* priority,
982 assert(readerdata != NULL);
984 scip = readerdata->scip;
985 assert(scip != NULL);
989 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
992 readerdata->retcode = addVar(scip, readerdata, name, usevarclass, lower, upper, priority, startval, &zplvar);
1025 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1028 for( i = 0; i < term_get_elements(term); i++ )
1033 assert( mono_is_linear(term_get_element(term, i)) );
1035 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1036 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1050 readerdata->initialconss, separate, enforce, check, propagate, local, readerdata->dynamicconss, readerdata->dynamicrows,
FALSE) );
1052 for( i = 0; i < term_get_elements(term); i++ )
1057 assert( mono_is_linear(term_get_element(term, i)) );
1059 var = (
SCIP_VAR*) mono_get_var(term_get_element(term, i), 0);
1060 weight = numb_todbl(mono_get_coeff(term_get_element(term, i)));
1069 SCIPerrorMessage(
"invalid SOS type <%d> in ZIMPL callback xlp_addsos_term()\n", type);
1070 readerdata->readerror =
TRUE;
1078 Bool xlp_addsos_term(
1082 const Numb* priority,
1091 assert(readerdata != NULL);
1093 scip = readerdata->scip;
1094 assert(scip != NULL);
1096 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1099 readerdata->retcode = addSOS(scip, readerdata, name, type, term);
1105 const char* xlp_getvarname(
1115 assert(readerdata != NULL);
1117 scip = readerdata->scip;
1118 assert(scip != NULL);
1125 VarClass xlp_getclass(
1134 assert(readerdata != NULL);
1148 readerdata->readerror =
TRUE;
1156 Bound* xlp_getlower(
1166 BoundType boundtype;
1171 assert(readerdata != NULL);
1173 scip = readerdata->scip;
1174 assert(scip != NULL);
1177 assert(scipvar != NULL);
1185 boundtype = BOUND_MINUS_INFTY;
1187 boundtype = BOUND_INFTY;
1190 boundtype = BOUND_VALUE;
1194 numb = numb_new_ascii(s);
1198 bound = bound_new(boundtype, numb);
1207 Bound* xlp_getupper(
1217 BoundType boundtype;
1222 assert(readerdata != NULL);
1224 scip = readerdata->scip;
1225 assert(scip != NULL);
1228 assert(scipvar != NULL);
1236 boundtype = BOUND_MINUS_INFTY;
1238 boundtype = BOUND_INFTY;
1241 boundtype = BOUND_VALUE;
1243 numb = numb_new_ascii(s);
1247 bound = bound_new(boundtype, numb);
1275 assert(readerdata != NULL);
1277 scip = readerdata->scip;
1278 assert(scip != NULL);
1280 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1300 assert(readerdata != NULL);
1302 scip = readerdata->scip;
1303 assert(scip != NULL);
1305 if( readerdata->retcode !=
SCIP_OKAY || readerdata->readerror )
1309 assert(scipvar != NULL);
1310 scipval = numb_todbl(cost);
1323 assert(scip != NULL);
1324 assert(reader != NULL);
1365 if( compression != NULL )
1368 *compextension =
'\0';
1377 if( chdir(path) != 0 )
1383 filename = namewithoutpath;
1407 readerdata->scip = scip;
1408 readerdata->sol = NULL;
1409 readerdata->valid =
FALSE;
1410 readerdata->branchpriowarning =
FALSE;
1411 readerdata->readerror =
FALSE;
1420 if( strcmp(paramstr,
"-") == 0 )
1423 if( !zpl_read(filename,
TRUE, (
void*)readerdata) )
1424 readerdata->readerror =
TRUE;
1431 return readerdata->retcode;
1437 char dummy[2] =
"x";
1443 len = (int) strlen(paramstr);
1457 while( p < len && paramstr[p] ==
' ' )
1461 while( p < len && paramstr[p] !=
' ' )
1463 switch( paramstr[p] )
1468 while( p < len && paramstr[p] !=
'"' )
1470 argv[argc][arglen] = paramstr[p];
1479 argv[argc][arglen] = paramstr[p];
1484 argv[argc][arglen] = paramstr[p];
1490 argv[argc][arglen] =
'\0';
1509 for( i = 1; i < argc; ++i )
1516 if( !zpl_read_with_args(argv, argc,
TRUE, (
void*)readerdata) )
1517 readerdata->readerror =
TRUE;
1520 for( i = argc - 1; i >= 1; --i )
1529 return readerdata->retcode;
1538 if( chdir(oldpath) != 0 )
1545 if( readerdata->valid )
1549 assert(readerdata->sol != NULL);
1565 if( readerdata->readerror )
1571 if( readerdata->sol != NULL )
1597 #if (ZIMPL_VERSION >= 320) 1607 assert(reader != NULL);
1614 "reading/zplreader/changedir",
"should the current directory be changed to that of the ZIMPL file before parsing?",
1617 "reading/zplreader/usestartsol",
"should ZIMPL starting solutions be forwarded to SCIP?",
1620 "reading/zplreader/parameters",
"additional parameter string passed to the ZIMPL parser (or - for no additional parameters)",
1621 NULL,
FALSE,
"-", NULL, NULL) );
1623 (void)
SCIPsnprintf(extcodename,
SCIP_MAXSTRLEN,
"ZIMPL %d.%d.%d", ZIMPL_VERSION/100, (ZIMPL_VERSION%100)/10, ZIMPL_VERSION%10);
1626 SCIPwarningMessage(scip,
"SCIP does only support ZIMPL 3.2.0 and higher. Please update your ZIMPL version %d.%d.%d\n",
1627 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)