+ std::to_string((long long)throw_retcode) + "> in function call"); \
94 intamplopts[mp::MAX_AMPL_OPTIONS];
123std::vector<SCIP_EXPR*> varexprs;
127std::vector<std::vector<std::pair<SCIP_Real, SCIP_VAR*> > > nlconslin;
135std::vector<SCIP_EXPR*> commonexprs;
143std::vector<SCIP_EXPR*> exprstorelease;
152std::map<int, std::vector<int> > sosvars;
153std::vector<int> sosweights;
165 const char*& namesbegin,
166 const char* namesend,
170 if( namesbegin ==
NULL)
176 while( namesbegin != namesend )
185 if( *namesbegin ==
'\n')
191*(name++) = *(namesbegin++);
204 voidLogicalExprToVarVal(
210assert(expr !=
NULL);
238OnUnhandled(
"logical expression must be binary or constant");
247 const char* filename
258assert(filename !=
NULL);
263 const char* extstart = strrchr(
const_cast<char*
>(filename),
'.');
264 if( extstart !=
NULL)
265probdata->filenamestublen = extstart - filename;
267probdata->filenamestublen = strlen(filename);
268assert(probdata->filenamestublen > 0);
270memcpy(probdata->filenamestub, filename, probdata->filenamestublen);
271probdata->filenamestub[probdata->filenamestublen] =
'\0';
274 const char* probname = strrchr(probdata->filenamestub,
'/');
275 if( probname ==
NULL)
276probname = probdata->filenamestub;
287probdata->filenamestub[probdata->filenamestublen] =
'.';
288probdata->filenamestub[probdata->filenamestublen+1] =
'c';
289probdata->filenamestub[probdata->filenamestublen+2] =
'o';
290probdata->filenamestub[probdata->filenamestublen+3] =
'l';
291probdata->filenamestub[probdata->filenamestublen+4] =
'\0';
292colfile =
newfmt::File(probdata->filenamestub, fmt::File::RDONLY);
294probdata->filenamestub[probdata->filenamestublen+1] =
'r';
295probdata->filenamestub[probdata->filenamestublen+3] =
'w';
296rowfile =
newfmt::File(probdata->filenamestub, fmt::File::RDONLY);
298 catch(
constfmt::SystemError& e )
303probdata->filenamestub[probdata->filenamestublen] =
'\0';
315assert(varexprs.empty());
316assert(exprstorelease.empty());
326 constmp::NLHeader&
h 332assert(probdata->vars ==
NULL);
333assert(probdata->conss ==
NULL);
335probdata->namplopts =
h.num_ampl_options;
340mp::MemoryMappedFile<> mapped_colfile;
341 if( colfile !=
NULL)
342mapped_colfile.map(*colfile,
"colfile");
343 const char* varnamesbegin = mapped_colfile.start();
344 const char* varnamesend = mapped_colfile.start() + mapped_colfile.size();
346mp::MemoryMappedFile<> mapped_rowfile;
347 if( rowfile !=
NULL)
348mapped_rowfile.map(*rowfile,
"rowfile");
349 const char* consnamesbegin = mapped_rowfile.start();
350 const char* consnamesend = mapped_rowfile.start() + mapped_rowfile.size();
352probdata->nvars =
h.num_vars;
356nnlvars =
MAX(
h.num_nl_vars_in_cons,
h.num_nl_vars_in_objs);
357varexprs.resize(nnlvars);
361 for(
inti = 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 )
387 if( !nextName(varnamesbegin, varnamesend, name) )
421probdata->nconss =
h.num_algebraic_cons;
423nlconslin.resize(
h.num_nl_cons);
429 for(
inti = 0; i <
h.num_nl_cons; ++i )
432 if( !nextName(consnamesbegin, consnamesend, name) )
440 for(
inti =
h.num_nl_cons; i <
h.num_algebraic_cons; ++i )
442 if( !nextName(consnamesbegin, consnamesend, name) )
447 if(
h.num_nl_cons == 0 &&
h.num_logical_cons == 0 &&
h.num_integer_vars() == 0 )
448probdata->islp =
true;
451commonexprs.resize(
h.num_common_exprs());
464exprstorelease.push_back(expr);
474assert(variableIndex >= 0);
475assert(variableIndex < (
int)varexprs.size());
476assert(varexprs[variableIndex] !=
NULL);
478 returnvarexprs[variableIndex];
489assert(child !=
NULL);
493 casemp::expr::MINUS:
516 casemp::expr::LOG10:
539OnUnhandled(mp::expr::str(kind));
544exprstorelease.push_back(expr);
557 SCIP_EXPR* children[2] = { firstChild, secondChild };
559assert(firstChild !=
NULL);
560assert(secondChild !=
NULL);
585 casemp::expr::POW_CONST_BASE:
586 casemp::expr::POW_CONST_EXP:
626OnUnhandled(mp::expr::str(kind));
631exprstorelease.push_back(expr);
642std::shared_ptr<std::vector<SCIP_EXPR*> >
v;
650 v->reserve(num_args);
679exprstorelease.push_back(expr);
690 if( objectiveIndex >= 1 )
691OnUnhandled(
"multiple objective functions");
695assert(objexpr ==
NULL);
709objexpr = nonlinearExpression;
758 if( num_linear_terms > 0 )
761amplph.commonexprs[index] = commonexpr;
762amplph.exprstorelease.push_back(commonexpr);
772assert(commonexpr !=
NULL);
777 if( var_index < (
int)amplph.varexprs.size() )
784assert(var_index < amplph.probdata->nvars);
800assert(index < (
int)commonexprs.size());
812 if( commonexprs[index] !=
NULL)
820 else if( expr !=
NULL)
822commonexprs[index] = expr;
831assert(expr_index >= 0);
832assert(expr_index < (
int)commonexprs.size());
833assert(commonexprs[expr_index] !=
NULL);
834 returncommonexprs[expr_index];
844assert(variableIndex >= 0);
845assert(variableIndex < probdata->nvars);
868assert(index < probdata->nconss);
871 if( index < (
int)nlconslin.size() )
901 if( initsol ==
NULL)
922 returnColumnSizeHandler();
964 casemp::suf::Kind::CON:
965 if( strncmp(name.data(),
"initial", name.size()) == 0 )
967suffix = CONSINITIAL;
969 else if( strncmp(name.data(),
"separate", name.size()) == 0 )
971suffix = CONSSEPARATE;
973 else if( strncmp(name.data(),
"enforce", name.size()) == 0 )
975suffix = CONSENFORCE;
977 else if( strncmp(name.data(),
"check", name.size()) == 0 )
981 else if( strncmp(name.data(),
"propagate", name.size()) == 0 )
983suffix = CONSPROPAGATE;
985 else if( strncmp(name.data(),
"dynamic", name.size()) == 0 )
987suffix = CONSDYNAMIC;
989 else if( strncmp(name.data(),
"removable", name.size()) == 0 )
991suffix = CONSREMOVABLE;
999 casemp::suf::Kind::CON_BIT:
1003 casemp::suf::Kind::VAR:
1005 if( strncmp(name.data(),
"initial", name.size()) == 0 )
1007suffix = VARINITIAL;
1009 else if( strncmp(name.data(),
"removable", name.size()) == 0 )
1011suffix = VARREMOVABLE;
1013 else if( strncmp(name.data(),
"sosno", name.size()) == 0 )
1018 else if( strncmp(name.data(),
"ref", name.size()) == 0 )
1022amplph.sosweights.resize(amplph.probdata->nvars, 0);
1030 casemp::suf::Kind::VAR_BIT:
1034 casemp::suf::Kind::OBJ:
1038 casemp::suf::Kind::OBJ_BIT:
1046 casemp::suf::Kind::PROB_BIT:
1093assert(index < amplph.probdata->nvars);
1098assert(index < amplph.probdata->nvars);
1104amplph.sosvars[(int)value].push_back(index);
1109amplph.sosweights[index] = (int)value;
1118fmt::StringRef name,
1129fmt::StringRef name,
1146 intconstraintIndex;
1152 intconstraintIndex_
1155constraintIndex(constraintIndex_)
1157assert(constraintIndex_ >= 0);
1158assert(constraintIndex_ < amplph.probdata->nconss);
1174assert(variableIndex >= 0);
1175assert(variableIndex < amplph.probdata->nvars);
1177 if( coefficient == 0.0 )
1180 if( constraintIndex < 0 )
1184 else if( constraintIndex < (
int)amplph.nlconslin.size() )
1186amplph.nlconslin[constraintIndex].push_back(std::pair<SCIP_Real, SCIP_VAR*>(coefficient, amplph.probdata->vars[variableIndex]));
1190 SCIP_CONS* lincons = amplph.probdata->conss[constraintIndex];
1204 if( objectiveIndex >= 1 )
1205OnUnhandled(
"multiple objective functions");
1214 intconstraintIndex,
1231exprstorelease.push_back(expr);
1245LogicalExprToVarVal(arg, var, val);
1257exprstorelease.push_back(expr);
1264mp::expr::Kind kind,
1275assert(lhs !=
NULL);
1276assert(rhs !=
NULL);
1278LogicalExprToVarVal(lhs, lhsvar, lhsval);
1279LogicalExprToVarVal(rhs, rhsvar, rhsval);
1285 if( lhsvar ==
NULL&& rhsvar ==
NULL)
1288exprstorelease.push_back(expr);
1292 if( (lhsvar ==
NULL&& lhsval != 0.0) || (rhsvar ==
NULL&& rhsval != 0.0) )
1296exprstorelease.push_back(expr);
1300 if( lhsvar ==
NULL)
1303assert(lhsval == 0.0);
1308 if( rhsvar ==
NULL)
1311assert(rhsval == 0.0);
1321std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1325exprstorelease.push_back(expr);
1341 if( lhsvar ==
NULL&& rhsvar ==
NULL)
1344exprstorelease.push_back(expr);
1348 if( (lhsvar ==
NULL&& lhsval == 0.0) || (rhsvar ==
NULL&& rhsval == 0.0) )
1352exprstorelease.push_back(expr);
1356 if( lhsvar ==
NULL)
1359assert(lhsval != 0.0);
1364 if( rhsvar ==
NULL)
1367assert(rhsval != 0.0);
1377std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1381exprstorelease.push_back(expr);
1399 if( lhsvar ==
NULL&& rhsvar ==
NULL)
1402exprstorelease.push_back(expr);
1406 if( lhsvar ==
NULL)
1408std::swap(lhs, rhs);
1409std::swap(lhsval, rhsval);
1410std::swap(lhsvar, rhsvar);
1412assert(lhsvar !=
NULL);
1414 if( rhsvar ==
NULL)
1418 if( rhsval ==
TRUE)
1426exprstorelease.push_back(expr);
1436std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1440exprstorelease.push_back(expr);
1455OnUnhandled(mp::expr::str(kind));
1465mp::expr::Kind kind,
1476assert(lhs !=
NULL);
1477assert(rhs !=
NULL);
1479LogicalExprToVarVal(lhs, lhsvar, lhsval);
1480LogicalExprToVarVal(rhs, rhsvar, rhsval);
1487 boolisne = (kind == mp::expr::NE);
1488 if( lhsvar ==
NULL&& rhsvar ==
NULL)
1491exprstorelease.push_back(expr);
1495 if( lhsvar ==
NULL)
1497std::swap(lhs, rhs);
1498std::swap(lhsval, rhsval);
1499std::swap(lhsvar, rhsvar);
1501assert(lhsvar !=
NULL);
1503 if( rhsvar ==
NULL)
1515exprstorelease.push_back(expr);
1526std::string name = std::string(
"_logic") + std::to_string((
long long)logiccount++);
1530exprstorelease.push_back(expr);
1545OnUnhandled(mp::expr::str(kind));
1562 if( objexpr !=
NULL)
1576 if( initsol !=
NULL)
1586 SCIPwarningMessage(
scip,
"Objective function could not be evaluated in initial point. Domain error.");
1595 for(
size_ti = 0; i < nlconslin.size(); ++i )
1597 for(
size_tj = 0; j < nlconslin[i].size(); ++j )
1604 for(
inti = 0; i < probdata->nconss; ++i )
1610std::vector<SCIP_VAR*> setvars;
1611std::vector<SCIP_Real> setweights;
1612 if( !sosvars.empty() )
1614setvars.resize(probdata->nvars);
1615probdata->islp =
false;
1617 if( !sosweights.empty() )
1618setweights.resize(probdata->nvars);
1619 for( std::map<
int, std::vector<int> >::iterator sosit(sosvars.begin()); sosit != sosvars.end(); ++sosit )
1621assert(sosit->first != 0);
1622assert(!sosit->second.empty());
1625 boolissos2 = sosit->first < 0;
1627 if( issos2 && sosweights.empty() )
1632OnUnhandled(
"SOS2 requires variable .ref suffix");
1635 for(
size_ti = 0; i < sosit->second.size(); ++i )
1637 intvaridx = sosit->second[i];
1638setvars[i] = probdata->vars[varidx];
1640 if( issos2 && sosweights[varidx] == 0 )
1642OnUnhandled(
"Missing .ref value for SOS2 variable");
1643 if( !sosweights.empty() )
1644setweights[i] = (
SCIP_Real)sosweights[varidx];
1651(void)
SCIPsnprintf(name, 20,
"sos1_%d", sosit->first);
1656(void)
SCIPsnprintf(name, 20,
"sos2_%d", -sosit->first);
1664 if( initsol !=
NULL)
1681 if( initsol !=
NULL)
1687 while( !exprstorelease.empty() )
1690exprstorelease.pop_back();
1694 while( !varexprs.empty() )
1697varexprs.pop_back();
1715assert((*probdata)->vars !=
NULL|| (*probdata)->nvars == 0);
1716assert((*probdata)->conss !=
NULL|| (*probdata)->conss == 0);
1718 for( i = 0; i < (*probdata)->nconss; ++i )
1724 for( i = 0; i < (*probdata)->nvars; ++i )
1757assert(reader !=
NULL);
1758assert(filename !=
NULL);
1759assert(result !=
NULL);
1767mp::ReadNLFile(filename, handler);
1769 catch(
constmp::UnsupportedError& e )
1771 SCIPerrorMessage(
"unsupported construct in AMPL .nl file %s: %s\n", filename, e.what());
1777 catch(
constmp::Error& e )
1786 catch(
constfmt::SystemError& e )
1795 catch(
conststd::bad_alloc& e )
1804 catch(
conststd::exception& e )
1828assert(reader !=
NULL);
1852 if( probdata ==
NULL)
1854 SCIPerrorMessage(
"No AMPL nl file read. Cannot write AMPL solution.\n");
1858probdata->filenamestub[probdata->filenamestublen] =
'.';
1859probdata->filenamestub[probdata->filenamestublen+1] =
's';
1860probdata->filenamestub[probdata->filenamestublen+2] =
'o';
1861probdata->filenamestub[probdata->filenamestublen+3] =
'l';
1862probdata->filenamestub[probdata->filenamestublen+4] =
'\0';
1864FILE* solfile = fopen(probdata->filenamestub,
"w");
1865 if( solfile ==
NULL)
1867 SCIPerrorMessage(
"could not open file <%s> for writing\n", probdata->filenamestub);
1868probdata->filenamestub[probdata->filenamestublen] =
'\0';
1872probdata->filenamestub[probdata->filenamestublen] =
'\0';
1879 for(
inti = 0; i < probdata->namplopts; ++i )
1885 SCIPinfoMessage(
scip, solfile,
"%d\n%d\n", probdata->nconss, havedual ? probdata->nconss : 0);
1886 SCIPinfoMessage(
scip, solfile,
"%d\n%d\n", probdata->nvars, haveprimal ? probdata->nvars : 0);
1891 for(
intc = 0; c < probdata->nconss; ++c )
1900 if( transcons ==
NULL)
1912 for(
inti = 0; i < probdata->nvars; ++i )
1918 intsolve_result_num = mp::sol::FAILURE;
1926solve_result_num = mp::sol::LIMIT_FEAS_INTERRUPT;
1928solve_result_num = mp::sol::LIMIT_NO_FEAS_INTERRUPT;
1934solve_result_num = mp::sol::LIMIT_FEAS_NODES;
1936solve_result_num = mp::sol::LIMIT_NO_FEAS_NODES;
1940solve_result_num = mp::sol::LIMIT_FEAS_TIME;
1942solve_result_num = mp::sol::LIMIT_NO_FEAS_TIME;
1946solve_result_num = mp::sol::LIMIT_FEAS_SOFTMEM;
1948solve_result_num = mp::sol::LIMIT_NO_FEAS_SOFTMEM;
1953solve_result_num = mp::sol::LIMIT_FEAS_WORK;
1955solve_result_num = mp::sol::LIMIT_NO_FEAS_WORK;
1958solve_result_num = mp::sol::LIMIT_FEAS_BESTOBJ;
1962solve_result_num = mp::sol::LIMIT_FEAS_BESTBND;
1964solve_result_num = mp::sol::LIMIT_NO_FEAS_BESTBND;
1968solve_result_num = mp::sol::LIMIT_FEAS_NUMSOLS;
1970solve_result_num = mp::sol::LIMIT_NO_FEAS;
1976solve_result_num = mp::sol::LIMIT_FEAS;
1978solve_result_num = mp::sol::LIMIT_NO_FEAS;
1981solve_result_num = mp::sol::SOLVED;
1984solve_result_num = mp::sol::INFEASIBLE;
1988solve_result_num = mp::sol::UNBOUNDED_FEAS;
1990solve_result_num = mp::sol::UNBOUNDED_NO_FEAS;
1993solve_result_num = mp::sol::LIMIT_INF_UNB;
1998 if( fclose(solfile) != 0 )
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,...)
void SCIPwarningMessage(SCIP *scip, 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_RETCODE SCIPevalExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag)
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_Real SCIPexprGetEvalValue(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 SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
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,...)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPincludeReaderNl(SCIP *scip)
static SCIP_DECL_PROBDELORIG(probdataDelOrigNl)
#define SCIP_CALL_THROW(x)
SCIP_RETCODE SCIPwriteSolutionNl(SCIP *scip)
static SCIP_DECL_READERCOPY(readerCopyNl)
static SCIP_DECL_READERREAD(readerReadNl)
struct SCIP_ProbData SCIP_PROBDATA
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_PRIMALLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4