61#pragma GCC diagnostic ignored "-Wshadow"
63#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
67#include "mp/nl-reader.h"
69#define READER_NAME "nlreader"
70#define READER_DESC "AMPL .nl file reader"
71#define READER_EXTENSION "nl"
75#define SCIP_CALL_THROW(x) \
78 SCIP_RETCODE throw_retcode; \
79 if( ((throw_retcode) = (x)) != SCIP_OKAY ) \
80 throw std::logic_error("Error <" + std::to_string((long long)throw_retcode) + "> in function call"); \
94 int amplopts[mp::MAX_AMPL_OPTIONS];
123 std::vector<SCIP_EXPR*> varexprs;
127 std::vector<std::vector<std::pair<SCIP_Real, SCIP_VAR*> > > nlconslin;
135 std::vector<SCIP_EXPR*> commonexprs;
143 std::vector<SCIP_EXPR*> exprstorelease;
152 std::map<int, std::vector<int> > sosvars;
153 std::vector<int> sosweights;
204 void LogicalExprToVarVal(
238 OnUnhandled(
"logical expression must be binary or constant");
265 probdata->filenamestublen =
extstart - filename;
267 probdata->filenamestublen =
strlen(filename);
268 assert(probdata->filenamestublen > 0);
270 memcpy(probdata->filenamestub, filename, probdata->filenamestublen);
271 probdata->filenamestub[probdata->filenamestublen] =
'\0';
274 const char* probname =
strrchr(probdata->filenamestub,
'/');
275 if( probname ==
NULL )
276 probname = probdata->filenamestub;
287 probdata->filenamestub[probdata->filenamestublen] =
'.';
288 probdata->filenamestub[probdata->filenamestublen+1] =
'c';
289 probdata->filenamestub[probdata->filenamestublen+2] =
'o';
290 probdata->filenamestub[probdata->filenamestublen+3] =
'l';
291 probdata->filenamestub[probdata->filenamestublen+4] =
'\0';
292 colfile =
new fmt::File(probdata->filenamestub, fmt::File::RDONLY);
294 probdata->filenamestub[probdata->filenamestublen+1] =
'r';
295 probdata->filenamestub[probdata->filenamestublen+3] =
'w';
296 rowfile =
new fmt::File(probdata->filenamestub, fmt::File::RDONLY);
298 catch(
const fmt::SystemError&
e )
303 probdata->filenamestub[probdata->filenamestublen] =
'\0';
316 assert(exprstorelease.empty());
326 const mp::NLHeader&
h
335 probdata->namplopts =
h.num_ampl_options;
341 if( colfile !=
NULL )
347 if( rowfile !=
NULL )
352 probdata->nvars =
h.num_vars;
356 nnlvars =
MAX(
h.num_nl_vars_in_cons,
h.num_nl_vars_in_objs);
361 for(
int i = 0;
i <
h.num_vars; ++
i )
365 if(
i <
h.num_nl_vars_in_both -
h.num_nl_integer_vars_in_both )
367 else if(
i <
h.num_nl_vars_in_both )
370 else if(
i <
h.num_nl_vars_in_cons -
h.num_nl_integer_vars_in_cons )
372 else if(
i <
h.num_nl_vars_in_cons )
375 else if(
i <
h.num_nl_vars_in_objs -
h.num_nl_integer_vars_in_objs )
377 else if(
i <
h.num_nl_vars_in_objs )
380 else if(
i <
h.num_vars -
h.num_linear_binary_vars -
h.num_linear_integer_vars )
382 else if(
i <
h.num_vars -
h.num_linear_integer_vars )
421 probdata->nconss =
h.num_algebraic_cons;
423 nlconslin.resize(
h.num_nl_cons);
429 for(
int i = 0;
i <
h.num_nl_cons; ++
i )
440 for(
int i =
h.num_nl_cons;
i <
h.num_algebraic_cons; ++
i )
447 if(
h.num_nl_cons == 0 &&
h.num_logical_cons == 0 &&
h.num_integer_vars() == 0 )
448 probdata->islp =
true;
451 commonexprs.resize(
h.num_common_exprs());
464 exprstorelease.push_back(expr);
493 case mp::expr::MINUS:
516 case mp::expr::LOG10:
544 exprstorelease.push_back(expr);
570 SCIP_Real coefs[2] = { 1.0, -1.0 };
585 case mp::expr::POW_CONST_BASE:
586 case mp::expr::POW_CONST_EXP:
631 exprstorelease.push_back(expr);
642 std::shared_ptr<std::vector<SCIP_EXPR*> >
v;
679 exprstorelease.push_back(expr);
761 amplph.commonexprs[index] = commonexpr;
762 amplph.exprstorelease.push_back(commonexpr);
777 if(
var_index < (
int)amplph.varexprs.size() )
800 assert(index < (
int)commonexprs.size());
812 if( commonexprs[index] !=
NULL )
820 else if( expr !=
NULL )
822 commonexprs[index] = expr;
871 if( index < (
int)nlconslin.size() )
901 if( initsol ==
NULL )
964 case mp::suf::Kind::CON:
965 if(
strncmp(name.data(),
"initial", name.size()) == 0 )
967 suffix = CONSINITIAL;
969 else if(
strncmp(name.data(),
"separate", name.size()) == 0 )
971 suffix = CONSSEPARATE;
973 else if(
strncmp(name.data(),
"enforce", name.size()) == 0 )
975 suffix = CONSENFORCE;
977 else if(
strncmp(name.data(),
"check", name.size()) == 0 )
981 else if(
strncmp(name.data(),
"propagate", name.size()) == 0 )
983 suffix = CONSPROPAGATE;
985 else if(
strncmp(name.data(),
"dynamic", name.size()) == 0 )
987 suffix = CONSDYNAMIC;
989 else if(
strncmp(name.data(),
"removable", name.size()) == 0 )
991 suffix = CONSREMOVABLE;
999 case mp::suf::Kind::CON_BIT:
1003 case mp::suf::Kind::VAR:
1005 if(
strncmp(name.data(),
"initial", name.size()) == 0 )
1007 suffix = VARINITIAL;
1009 else if(
strncmp(name.data(),
"removable", name.size()) == 0 )
1011 suffix = VARREMOVABLE;
1013 else if(
strncmp(name.data(),
"sosno", name.size()) == 0 )
1018 else if(
strncmp(name.data(),
"ref", name.size()) == 0 )
1022 amplph.sosweights.resize(amplph.probdata->nvars, 0);
1030 case mp::suf::Kind::VAR_BIT:
1034 case mp::suf::Kind::OBJ:
1038 case mp::suf::Kind::OBJ_BIT:
1042 case mp::suf::Kind::PROBLEM:
1046 case mp::suf::Kind::PROB_BIT:
1104 amplph.sosvars[(int)value].
push_back(index);
1109 amplph.sosweights[index] = (int)value;
1118 fmt::StringRef name,
1129 fmt::StringRef name,
1146 int constraintIndex;
1177 if( coefficient == 0.0 )
1180 if( constraintIndex < 0 )
1184 else if( constraintIndex < (
int)amplph.nlconslin.size() )
1186 amplph.nlconslin[constraintIndex].push_back(std::pair<SCIP_Real, SCIP_VAR*>(coefficient, amplph.probdata->vars[
variableIndex]));
1190 SCIP_CONS* lincons = amplph.probdata->conss[constraintIndex];
1214 int constraintIndex,
1231 exprstorelease.push_back(expr);
1245 LogicalExprToVarVal(
arg,
var, val);
1257 exprstorelease.push_back(expr);
1264 mp::expr::Kind
kind,
1288 exprstorelease.push_back(expr);
1296 exprstorelease.push_back(expr);
1321 std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1325 exprstorelease.push_back(expr);
1344 exprstorelease.push_back(expr);
1352 exprstorelease.push_back(expr);
1377 std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1381 exprstorelease.push_back(expr);
1402 exprstorelease.push_back(expr);
1408 std::swap(lhs, rhs);
1426 exprstorelease.push_back(expr);
1436 std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1440 exprstorelease.push_back(expr);
1465 mp::expr::Kind
kind,
1487 bool isne = (
kind == mp::expr::NE);
1491 exprstorelease.push_back(expr);
1497 std::swap(lhs, rhs);
1515 exprstorelease.push_back(expr);
1526 std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1530 exprstorelease.push_back(expr);
1562 if( objexpr !=
NULL )
1581 for(
size_t i = 0;
i < nlconslin.size(); ++
i )
1583 for(
size_t j = 0;
j < nlconslin[
i].size(); ++
j )
1590 for(
int i = 0;
i < probdata->nconss; ++
i )
1596 std::vector<SCIP_VAR*>
setvars;
1598 if( !sosvars.empty() )
1600 setvars.resize(probdata->nvars);
1601 probdata->islp =
false;
1603 if( !sosweights.empty() )
1605 for( std::map<
int, std::vector<int> >::iterator
sosit(sosvars.begin());
sosit != sosvars.end(); ++
sosit )
1613 if(
issos2 && sosweights.empty() )
1618 OnUnhandled(
"SOS2 requires variable .ref suffix");
1621 for(
size_t i = 0;
i <
sosit->second.size(); ++
i )
1628 OnUnhandled(
"Missing .ref value for SOS2 variable");
1629 if( !sosweights.empty() )
1650 if( initsol !=
NULL )
1667 if( initsol !=
NULL )
1673 while( !exprstorelease.empty() )
1676 exprstorelease.pop_back();
1680 while( !varexprs.empty() )
1683 varexprs.pop_back();
1701 assert((*probdata)->vars !=
NULL || (*probdata)->nvars == 0);
1702 assert((*probdata)->conss !=
NULL || (*probdata)->conss == 0);
1704 for(
i = 0;
i < (*probdata)->nconss; ++
i )
1710 for(
i = 0;
i < (*probdata)->nvars; ++
i )
1753 mp::ReadNLFile(filename,
handler);
1755 catch(
const mp::UnsupportedError&
e )
1757 SCIPerrorMessage(
"unsupported construct in AMPL .nl file %s: %s\n", filename,
e.what());
1763 catch(
const mp::Error&
e )
1772 catch(
const fmt::SystemError&
e )
1781 catch(
const std::bad_alloc&
e )
1790 catch(
const std::exception&
e )
1838 if( probdata ==
NULL )
1844 probdata->filenamestub[probdata->filenamestublen] =
'.';
1845 probdata->filenamestub[probdata->filenamestublen+1] =
's';
1846 probdata->filenamestub[probdata->filenamestublen+2] =
'o';
1847 probdata->filenamestub[probdata->filenamestublen+3] =
'l';
1848 probdata->filenamestub[probdata->filenamestublen+4] =
'\0';
1853 SCIPerrorMessage(
"could not open file <%s> for writing\n", probdata->filenamestub);
1854 probdata->filenamestub[probdata->filenamestublen] =
'\0';
1858 probdata->filenamestub[probdata->filenamestublen] =
'\0';
1865 for(
int i = 0;
i < probdata->namplopts; ++
i )
1877 for(
int c = 0;
c < probdata->nconss; ++
c )
1898 for(
int i = 0;
i < probdata->nvars; ++
i )
void AddTerm(int var_index, double coef)
receives notification of a term in the linear expression
LinearExprHandler(AMPLProblemHandler &lph_, int index, int num_linear_terms)
constructor
LinearPartHandler(AMPLProblemHandler &lph_)
void AddTerm(int variableIndex, double coefficient)
LinearPartHandler(AMPLProblemHandler &lph_, int constraintIndex_)
NumericArgHandler(int num_args)
constructor
void AddArg(SCIP_EXPR *term)
adds term to sum
std::shared_ptr< std::vector< SCIP_EXPR * > > v
void SetValue(int index, T value)
SuffixHandler(AMPLProblemHandler &lph_, fmt::StringRef name, mp::suf::Kind kind)
constructor
implementation of AMPL/MPs NLHandler that constructs a SCIP problem while a .nl file is read
void EndCommonExpr(int index, SCIP_EXPR *expr, int)
receive notification of the end of a common expression
LinearPartHandler LinearObjHandler
NumericArgHandler BeginSum(int num_args)
receive notification of the beginning of a summation
void OnAlgebraicCon(int constraintIndex, SCIP_EXPR *expr)
receive notification of an algebraic constraint expression
LinearPartHandler OnLinearObjExpr(int objectiveIndex, int)
receive notification of the linear part of an objective
LogicalExpr OnBinaryLogical(mp::expr::Kind kind, LogicalExpr lhs, LogicalExpr rhs)
receives notification of a binary logical expression <mp::expr::FIRST_BINARY_LOGICAL>
LogicalExpr OnNot(LogicalExpr arg)
receives notification of a logical not <mp::expr::NOT>
SCIP_EXPR * OnBinary(mp::expr::Kind kind, SCIP_EXPR *firstChild, SCIP_EXPR *secondChild)
receive notification of a binary expression
SCIP_EXPR * OnNumber(double value)
receive notification of a number in a nonlinear expression
LogicalExpr OnRelational(mp::expr::Kind kind, NumericExpr lhs, NumericExpr rhs)
SuffixHandler< int > IntSuffixHandler
LinearExprHandler BeginCommonExpr(int index, int num_linear_terms)
receive notification of the beginning of a common expression (defined variable)
AMPLProblemHandler(const AMPLProblemHandler &)=delete
LinearConHandler OnLinearConExpr(int constraintIndex, int)
receive notification of the linear part of a constraint
void OnInitialValue(int var_index, double value)
receive notification of the initial value for a variable
SCIP_EXPR * OnVariableRef(int variableIndex)
receive notification of a variable reference in a nonlinear expression
AMPLProblemHandler(SCIP *scip_, const char *filename)
ColumnSizeHandler OnColumnSizes()
receives notification of Jacobian column sizes
AMPLProblemHandler & operator=(const AMPLProblemHandler &)=delete
LinearPartHandler LinearConHandler
void OnVarBounds(int variableIndex, double variableLB, double variableUB)
receive notification of variable bounds
SCIP_EXPR * OnCommonExprRef(int expr_index)
receive notification of a common expression (defined variable) reference
void OnHeader(const mp::NLHeader &h)
void OnLogicalCon(int index, LogicalExpr expr)
receives notification of a logical constraint expression
DblSuffixHandler OnDblSuffix(fmt::StringRef name, mp::suf::Kind kind, int)
receive notification of a double suffix
void OnConBounds(int index, double lb, double ub)
receive notification of constraint sides
IntSuffixHandler OnIntSuffix(fmt::StringRef name, mp::suf::Kind kind, int)
receive notification of an integer suffix
LogicalExpr OnBool(bool value)
receives notification of a Boolean value <mp::expr::BOOL>
SCIP_EXPR * OnUnary(mp::expr::Kind kind, SCIP_EXPR *child)
receive notification of a unary expression
SCIP_EXPR * EndSum(NumericArgHandler handler)
receive notification of the end of a summation
void OnInitialDualValue(int, double)
receives notification of the initial value for a dual variable
SuffixHandler< SCIP_Real > DblSuffixHandler
void OnObj(int objectiveIndex, mp::obj::Type type, SCIP_EXPR *nonlinearExpression)
receive notification of an objective type and the nonlinear part of an objective expression
Constraint handler for AND constraints, .
Constraint handler for linear constraints in their most general form, .
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for "or" constraints, .
constraint handler for SOS type 1 constraints
constraint handler for SOS type 2 constraints
Constraint handler for XOR constraints, .
absolute expression handler
exponential expression handler
logarithm expression handler
power and signed power expression handlers
product expression handler
handler for sin expressions
constant value expression handler
variable expression handler
SCIP_Real SCIPgetDualsolLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddLinearVarNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsBasicXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPchgLhsNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPcreateConsBasicOr(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPchgRhsNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsBasicSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsBasicNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsBasicAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPchgExprNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_EXPR *expr)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPcreateConsBasicSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprProduct(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real coefficient, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprSin(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprCos(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprAbs(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPappendExprSumExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR *child, SCIP_Real childcoef)
SCIP_RETCODE SCIPcreateExprLog(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprExp(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprSum(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefficients, SCIP_Real constant, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprPow(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_Real exponent, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPhasPerformedPresolve(SCIP *scip)
SCIP_RETCODE SCIPprintStatus(SCIP *scip, FILE *file)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_PROBDATA * SCIPgetProbData(SCIP *scip)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_OBJSENSE SCIPgetObjsense(SCIP *scip)
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)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
SCIP_RETCODE SCIPsetConsDynamic(SCIP *scip, SCIP_CONS *cons, SCIP_Bool dynamic)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
#define SCIPallocClearMemory(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPvarSetInitial(SCIP_VAR *var, SCIP_Bool initial)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_RETCODE SCIPvarSetRemovable(SCIP_VAR *var, SCIP_Bool removable)
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPincludeReaderNl(SCIP *scip)
#define SCIP_CALL_THROW(x)
SCIP_RETCODE SCIPwriteSolutionNl(SCIP *scip)
struct SCIP_ProbData SCIP_PROBDATA
#define SCIP_DECL_PROBDELORIG(x)
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE