Backend with a Model Manager.
Just for checking compilation.
Implementation of value presolver.
Value presolver: namespace mp::pre.
Wrappers implementing a HashStreamer interface.
Support for .nl/.sol/console I/O requiring a (Basic)Solver.
Namespace mp.
Generate ModelManagerWithPB<mp::Problem>
Generate ModelManagerWithPB<mp::Problem>, header file.
This is an abstract interface to a Model Manager which provides model IO, solution handling and suffixes, etc.
Redefinition of smooth nonlinear functions via piecewise-linear approximation.
Convert quadratic indicators for MIP.
Redefinition for MIP of (cond) ==> (constr1) [ else (constr2) ].
Converter-independent linear approximation routines.
Implementation of flat model info.
Public interface for flat model info.
Bounds and type computation for various expressions.
A template algebraic expression: Body (variable_terms) + constant_term.
Propagate flat constraints from result (result bounds & context) “down”, i.e., to the arguments.
Preprocess flat constraints before adding.
Static general constraints.
Functional flat constraints.
Evaluations and violations of (mainly functional) constraints.
Static algebraic constraints.
The mp namespace.
Backends using ValuePresolver should derive from here.
For most evaluators, it’s enough to supply a simple vector x. For some, it needs to be an object with extra API.
Possible tasks:
Simplify constraints.
Replace a functional constraint by a different one, via returning its result variable from another (see, e.g., conditional inequalities, pow).
Narrow domain of the result variable, so that reformulations can be tight (variable bounds, integrality.)
Possible design for future: A. Standardize fail procedure for infeasibility (which should be optional, by default we might leave it to solver?) B. Make prepro code reentrable for presolve. C. Consider existing result bounds. Example:
max(x, y) <= 5;
Separates compiling NLHandler from Converter
Separate compiling NLHandler from Converter to improve compilation speed
Include this in a separate .cc
HashStreamer can
Compute hash for a given array in 1 go;
”Accumulate” new values / arrays to an intermediate “hash state”.
Various implementations are possible, one is typedef’d as HashStreamer.
Typedefs
-
using Env = BasicSolver
Typedef Env to access solver options, output handler, etc.
-
typedef BasicExpr<expr::FIRST_EXPR, expr::LAST_EXPR> Expr
Typedef Expr.
-
typedef BasicExpr<expr::FIRST_NUMERIC, expr::LAST_NUMERIC> NumericExpr
A numeric expression.
-
typedef BasicExpr<expr::FIRST_LOGICAL, expr::LAST_LOGICAL> LogicalExpr
A logical expression.
-
typedef BasicUnaryExpr<NumericExpr, expr::FIRST_UNARY, expr::LAST_UNARY> UnaryExpr
A unary numeric expression.
Examples: -x, sin(x), where x is a variable.
-
typedef BasicBinaryExpr<NumericExpr, expr::FIRST_BINARY, expr::LAST_BINARY> BinaryExpr
A binary numeric expression.
Examples: x / y, atan2(x, y), where x and y are variables.
-
typedef BasicIfExpr<NumericExpr, expr::IF> IfExpr
An if-then-else expression.
Example: if x != 0 then y else z, where x, y and z are variables.
-
typedef BasicIteratedExpr<NumericExpr, expr::FIRST_ITERATED, expr::LAST_ITERATED> IteratedExpr
A numeric iterated expression such as min, max, sum or numberof.
Examples: min{i in I} x[i], sum{i in I} x[i], numberof 42 in ({i in I} x[i]), where I is a set and x is a variable.
-
typedef BasicIteratedExpr<Expr, expr::NUMBEROF_SYM> SymbolicNumberOfExpr
A symbolic numberof expression.
Example: numberof (if x then ‘a’ else ‘b’) in (‘a’, ‘b’, ‘c’), where x is a variable.
-
typedef BasicIteratedExpr<LogicalExpr, expr::COUNT> CountExpr
A count expression.
Example: count{i in I} (x[i] >= 0), where I is a set and x is a variable.
-
typedef BasicUnaryExpr<LogicalExpr, expr::NOT> NotExpr
A logical NOT expression.
Example: not a, where a is a logical expression.
-
typedef BasicBinaryExpr<LogicalExpr, expr::FIRST_BINARY_LOGICAL, expr::LAST_BINARY_LOGICAL> BinaryLogicalExpr
A binary logical expression.
Examples: a || b, a && b, where a and b are logical expressions.
-
typedef BasicBinaryExpr<NumericExpr, expr::FIRST_RELATIONAL, expr::LAST_RELATIONAL> RelationalExpr
A relational expression.
Examples: x < y, x != y, where x and y are variables.
-
typedef BasicIfExpr<LogicalExpr, expr::IMPLICATION> ImplicationExpr
An implication expression.
Example: a ==> b else c, where a, b and c are logical expressions.
-
typedef BasicIteratedExpr<LogicalExpr, expr::FIRST_ITERATED_LOGICAL, expr::LAST_ITERATED_LOGICAL> IteratedLogicalExpr
An iterated logical expression.
Example: exists{i in I} x[i] >= 0, where I is a set and x is a variable.
-
typedef BasicIteratedExpr<NumericExpr, expr::FIRST_PAIRWISE, expr::LAST_PAIRWISE> PairwiseExpr
A pairwise expression (alldiff or !alldiff).
Example: alldiff{i in I} x[i], where I is a set and x is a variable.
-
typedef BasicIfExpr<Expr, expr::IFSYM> SymbolicIfExpr
A symbolic if-then-else expression.
Example: if x != 0 then ‘a’ else 0, where x is a variable.
-
typedef BasicExprFactory<std::allocator<char>> ExprFactory
-
using LinConRange = AlgebraicConstraint<LinTerms, AlgConRange>
Linear range constraint.
-
template<int sens>
using LinConRhs = AlgebraicConstraint<LinTerms, AlgConRhs<sens>>
Convenience typedef.
-
using LinConLT = LinConRhs<-2>
Linear constraint c’x < d.
-
using LinConLE = LinConRhs<-1>
Linear constraint c’x <= d.
-
using LinConEQ = LinConRhs<0>
Linear constraint c’x == d.
-
using LinConGE = LinConRhs<1>
Linear constraint c’x >= d.
-
using LinConGT = LinConRhs<2>
Linear constraint c’x > d.
-
using QuadConRange = AlgebraicConstraint<QuadAndLinTerms, AlgConRange>
Quadratic range constraint.
-
template<int sens>
using QuadConRhs = AlgebraicConstraint<QuadAndLinTerms, AlgConRhs<sens>>
Convenience typedef.
-
using QuadConLT = QuadConRhs<-2>
Quadratic constraint c’x+x’Qx < d.
-
using QuadConLE = QuadConRhs<-1>
Quadratic constraint c’x+x’Qx <= d.
-
using QuadConEQ = QuadConRhs<0>
Quadratic constraint c’x+x`Qx == d.
-
using QuadConGE = QuadConRhs<1>
Quadratic constraint c’x+x`Qx >= d.
-
using QuadConGT = QuadConRhs<2>
Quadratic constraint c’x+x`Qx > d.
-
using VarArray1 = std::array<int, 1>
Possible argument arrays for CustomFunctionalConstraint.
Fixed argument array of 1 element
-
using VarArray2 = std::array<int, 2>
Fixed argument array of 2 elements.
-
using VarArray3 = std::array<int, 3>
Fixed argument array of 3 elements.
-
template<int N>
using VarArrayN = std::array<int, N>
Fixed argument array of N elements.
-
using VarArray = std::vector<int>
Variable-size argument array.
-
template<class Num, size_t N>
using ParamArrayN = std::array<Num, N>
Possible parameter arrays.
Fixed parameter array of N elements
-
using ParamArray0 = ParamArrayN<int, 0>
Empty parameter array.
-
using DblParamArray1 = ParamArrayN<double, 1>
Fixed parameter array of 1 double.
-
using DblParamArray2 = ParamArrayN<double, 2>
Fixed parameter array of 2 double.
-
using DblParamArray3 = ParamArrayN<double, 3>
Fixed parameter array of 3 double.
-
using DblParamArray = std::vector<double>
Variable-length parameter array.
-
using CondLinConLT = CondLinLTConstraint
-
using CondLinConLE = CondLinLEConstraint
-
using CondLinConEQ = CondLinEQConstraint
-
using CondLinConGE = CondLinGEConstraint
-
using CondLinConGT = CondLinGTConstraint
-
using CondQuadConLT = CondQuadLTConstraint
-
using CondQuadConLE = CondQuadLEConstraint
-
using CondQuadConEQ = CondQuadEQConstraint
-
using CondQuadConGE = CondQuadGEConstraint
-
using CondQuadConGT = CondQuadGTConstraint
-
using LinExpression = ExprWrapper<LinearFunctionalConstraint>
Typedef LinExpression.
-
using QuadExpression = ExprWrapper<QuadraticFunctionalConstraint>
Typedef LinExpression.
-
using IndicatorConstraintLinLE = IndicatorConstraint<LinConLE>
Typedef indicator<LinConLE>
-
using IndicatorConstraintLinEQ = IndicatorConstraint<LinConEQ>
Typedef indicator<LinConEQ>
-
using IndicatorConstraintLinGE = IndicatorConstraint<LinConGE>
Typedef indicator<LinConGE>
-
using IndicatorConstraintQuadLE = IndicatorConstraint<QuadConLE>
Typedef indicator<QuadConLE>
-
using IndicatorConstraintQuadEQ = IndicatorConstraint<QuadConEQ>
Typedef indicator<QuadConEQ>
-
using IndicatorConstraintQuadGE = IndicatorConstraint<QuadConGE>
Typedef indicator<QuadConGE>
-
using SOS1Constraint = SOS_1or2_Constraint<1>
Typedef SOS1Constraint.
-
using SOS2Constraint = SOS_1or2_Constraint<2>
Typedef SOS2Constraint.
-
using ComplementarityLinear = ComplementarityConstraint<AffineExpr>
Typedef ComplementarityLinRange.
-
using ComplementarityQuadratic = ComplementarityConstraint<QuadraticExpr>
Typedef ComplementarityQuadRange.
-
template<int Nkinds>
using ViolSummArray = std::array<ViolSummary, Nkinds>
Array of violation summaries.
For different kinds, e.g., original / aux vars.
-
using VarsRecomputeFn = std::function<double(int i, const VarInfoRecomp &x)>
Function prototype to recompute variable at index i.
-
using VarVecStatic = std::vector<double>
Static var vector.
-
using VarInfoRecompTypedef = VarInfoImpl<VarVecRecomp>
VarInfoRecompTypedef.
-
using VarInfoStatic = VarInfoImpl<VarVecStatic>
VarInfoStatic.
-
using AbstractConstraintLocation = ConstraintLocationHelper<BasicConstraintKeeper>
Without constraint type.
-
template<class Constraint>
using ConstraintMap = std::unordered_map<std::reference_wrapper<const Constraint>, int>
Subexpression map.
Indexes constraint location
-
using AffineExpr = AlgebraicExpression<LinTerms>
Typedef AffineExpr.
-
using JSONW = MiniJSONWriter<fmt::MemoryWriter>
Specialize our JSON writer.
-
using QuadraticExpr = AlgebraicExpression<QuadAndLinTerms>
Typedef QuadraticExpr.
-
using PreprocessInfoStd = PreprocessInfo<int>
Typical preprocess info.
-
using P_ZZI_Encoding = std::shared_ptr<ZZI_Encoding>
Obtain an object of ZII_Encoding.
-
template<class MC>
using ComplCvtLin_MIP = ComplementarityConverter_MIP<MC, ComplementarityLinear>
Typedef linear compl cvt.
-
template<class MC>
using ComplCvtQuad_MIP = ComplementarityConverter_MIP<MC, ComplementarityQuadratic>
Typedef quadratic compl cvt.
-
template<class MC>
using CondLinEQConverter_MIP = CondEQConverter_MIP<MC, LinTerms>
Specialize for linear constraint.
-
template<class MC>
using CondQuadEQConverter_MIP = CondEQConverter_MIP<MC, QuadAndLinTerms>
Specialize for quadratic constraint.
-
template<class MC>
using CondLinLEConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, LinConLE>
Specialize for linear constraint.
-
template<class MC>
using CondQuadLEConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, QuadConLE>
Specialize for quadratic constraint.
-
template<class MC>
using CondLinGEConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, LinConGE>
Specialize for linear constraint.
-
template<class MC>
using CondQuadGEConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, QuadConGE>
Specialize for quadratic constraint.
-
template<class MC>
using CondLinLTConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, LinConLT>
Specialize for linear constraint.
-
template<class MC>
using CondQuadLTConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, QuadConLT>
Specialize for quadratic constraint.
-
template<class MC>
using CondLinGTConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, LinConGT>
Specialize for linear constraint.
-
template<class MC>
using CondQuadGTConverter_MIP = Cond_LE_LT_GT_GE_Converter_MIP<MC, QuadConGT>
Specialize for quadratic constraint.
-
template<class MC>
using IndicatorQuadLEConverter_MIP = IndicatorQuadConverter_MIP<MC, -1>
Typedef IndicatorQuadLEConverter_MIP.
-
template<class MC>
using IndicatorQuadEQConverter_MIP = IndicatorQuadConverter_MIP<MC, 0>
Typedef IndicatorQuadEQConverter_MIP.
-
template<class MC>
using IndicatorQuadGEConverter_MIP = IndicatorQuadConverter_MIP<MC, 1>
Typedef IndicatorQuadGEConverter_MIP.
-
template<class MC>
using FuncConConverter_MIP_Exp = FuncConConverter_MIP<MC, ExpConstraint>
Typedef FuncConConverter_MIP_Exp.
-
template<class MC>
using FuncConConverter_MIP_Log = FuncConConverter_MIP<MC, LogConstraint>
Typedef FuncConConverter_MIP_Log.
-
template<class MC>
using FuncConConverter_MIP_LogA = FuncConConverter_MIP<MC, LogAConstraint>
Typedef FuncConConverter_MIP_LogA.
-
template<class MC>
using FuncConConverter_MIP_ExpA = FuncConConverter_MIP<MC, ExpAConstraint>
Typedef FuncConConverter_MIP_ExpA.
-
template<class MC>
using FuncConConverter_MIP_Sin = FuncConConverter_MIP<MC, SinConstraint>
Typedef FuncConConverter_MIP_Sin.
-
template<class MC>
using FuncConConverter_MIP_Cos = FuncConConverter_MIP<MC, CosConstraint>
Typedef FuncConConverter_MIP_Cos.
-
template<class MC>
using FuncConConverter_MIP_Tan = FuncConConverter_MIP<MC, TanConstraint>
Typedef FuncConConverter_MIP_Tan.
-
template<class MC>
using FuncConConverter_MIP_Asin = FuncConConverter_MIP<MC, AsinConstraint>
Typedef FuncConConverter_MIP_ASin.
-
template<class MC>
using FuncConConverter_MIP_Acos = FuncConConverter_MIP<MC, AcosConstraint>
Typedef FuncConConverter_MIP_ACos.
-
template<class MC>
using FuncConConverter_MIP_Atan = FuncConConverter_MIP<MC, AtanConstraint>
Typedef FuncConConverter_MIP_ATan.
-
template<class MC>
using FuncConConverter_MIP_Sinh = FuncConConverter_MIP<MC, SinhConstraint>
Typedef FuncConConverter_MIP_Sinh.
-
template<class MC>
using FuncConConverter_MIP_Cosh = FuncConConverter_MIP<MC, CoshConstraint>
Typedef FuncConConverter_MIP_Cosh.
-
template<class MC>
using FuncConConverter_MIP_Tanh = FuncConConverter_MIP<MC, TanhConstraint>
Typedef FuncConConverter_MIP_Tanh.
-
template<class MC>
using FuncConConverter_MIP_Asinh = FuncConConverter_MIP<MC, AsinhConstraint>
Typedef FuncConConverter_MIP_ASinh.
-
template<class MC>
using FuncConConverter_MIP_Acosh = FuncConConverter_MIP<MC, AcoshConstraint>
Typedef FuncConConverter_MIP_ACosh.
-
template<class MC>
using FuncConConverter_MIP_Atanh = FuncConConverter_MIP<MC, AtanhConstraint>
Typedef FuncConConverter_MIP_ATanh.
-
template<class ModelConverter>
using MinConverter_MIP = MinOrMaxConverter_MIP<ModelConverter, -1>
Typedef of MinConverter.
-
template<class ModelConverter>
using MaxConverter_MIP = MinOrMaxConverter_MIP<ModelConverter, 1>
Typedef of MaxConverter.
-
template<class MC>
using MulCvtLE_MIP = QCConverter_MIP<MC, -1>
Typedef MulCvt<QuadConLE>
-
template<class MC>
using MulCvtEQ_MIP = QCConverter_MIP<MC, 0>
Typedef MulCvt<QuadConEQ>
-
template<class MC>
using MulCvtGE_MIP = QCConverter_MIP<MC, 1>
Typedef MulCvt<QuadConGE>
-
template<class MC>
using RangeLinearConstraintConverter = RangeConstraintConverter<MC, LinTerms>
Typedef RangeLinearConstraintConverter.
-
template<class MC>
using RangeQuadraticConstraintConverter = RangeConstraintConverter<MC, QuadAndLinTerms>
Typedef RangeQuadraticConstraintConverter.
-
using ModelMgrWithStdPB = ModelManagerWithProblemBuilder<BasicConverter<mp::Problem>>
-
typedef BasicProblem<> Problem
A BasicProblem<> with default parameters.
-
typedef bool (*InterruptHandler)(void*)
Interrupt handler.
Returns true if the solver was interrupted, false if it is not running.
-
template<class Solver, class Writer = SolFileWriter>
using SolutionWriter = SolutionWriterImpl<Solver, typename Solver::ProblemBuilder, Writer>
Convenience typedef for APIs using SolverImpl<> or similar.
-
typedef std::auto_ptr<Solver> SolverPtr
-
using SuffixTable = std::string
Suffix table is a newline-separated string.
-
typedef BasicSuffix<int> IntSuffix
-
typedef BasicSuffix<double> DoubleSuffix
-
typedef BasicMutSuffix<int> MutIntSuffix
-
typedef BasicMutSuffix<double> MutDoubleSuffix
-
typedef BasicSuffixSet<std::allocator<char>> SuffixSet
Typedef SuffixSet.
-
template<class T>
using ModelSuffixDef = SuffixDef<T>
Description of a suffix that can exist for several itme types (vars, cons, objs, problem).
The kind parameter should be a bitwise OR of suf::Kind::…_BIT’s.
-
using HashStreamer = HashStreamerCombine
Selecting one particular implementation as HashStreamer.
-
using WriteNLResult = std::pair<NLW2_WriteNLResultCode, std::string>
Typedef WriteNLResult: result code and error message.
-
template<class Element>
using SparseVecReader = VecReader<std::pair<int, Element>>
Typedef SparseVecReader.
-
using NLSOL_C_Impl = mp::NLSolver
Typedef our specialization of NLSOL.
Enums
-
enum class IISStatus
.iis suffix values
Values:
-
enumerator non
-
enumerator low
-
enumerator fix
-
enumerator upp
-
enumerator mem
-
enumerator pmem
-
enumerator plow
-
enumerator pupp
-
enumerator bug
-
enum class BasicStatus
Basic status values (suffix .sstatus)
Values:
-
enumerator none
-
enumerator bas
-
enumerator sup
-
enumerator low
-
enumerator upp
-
enumerator equ
-
enumerator btw
-
enum class ConstraintAcceptanceLevel
Level of acceptance of a constraint by a backend.
Values:
-
enumerator NotAccepted
-
enumerator AcceptedButNotRecommended
-
enumerator Recommended
-
enum class ExpressionAcceptanceLevel
Level of acceptance of an expression by a backend.
Values:
-
enumerator NotAccepted
-
enumerator AcceptedButNotRecommended
-
enumerator Recommended
-
enum ConstraintGroup
Constraint groups.
This is used to access constraint attributes (basis status, duals, …) Convenient, when the solver accesses constraint attributes in groups. For example, Gurobi 9.5 has linear, quadratic, SOS, and general
-
Todo:
Keep consistent with congroup_names
Values:
-
enumerator CG_Default
-
enumerator CG_All
-
enumerator CG_Algebraic
-
enumerator CG_Linear
-
enumerator CG_Quadratic
-
enumerator CG_Conic
-
enumerator CG_General
-
enumerator CG_Piecewiselinear
-
enumerator CG_SOS
-
enumerator CG_SOS1
-
enumerator CG_SOS2
-
enumerator CG_Logical
-
enumerator CG_END_
-
enum [anonymous]
Values:
-
enumerator MAX_AMPL_OPTIONS
Maximum number of options reserved for AMPL use in NL and SOL formats.
-
enum [anonymous]
Values:
-
enumerator VBTOL_OPTION_INDEX
internal constant
-
enumerator USE_VBTOL_FLAG
internal constant
-
enum [anonymous]
Flags for ReadNLFile and ReadNLString.
Values:
-
enumerator READ_BOUNDS_FIRST
Read variable bounds before anything else.
-
enum [anonymous]
Values:
-
enumerator BUFFER_SIZE
-
enum [anonymous]
Values:
-
enumerator MAX_AMPL_OPTIONS
Maximum number of options reserved for AMPL use in NL and SOL formats.
-
enum [anonymous]
Values:
-
enumerator VBTOL_OPTION_INDEX
internal constant
-
enumerator USE_VBTOL_FLAG
internal constant
Functions
-
template<typename T>
inline ArrayRef<T> MakeArrayRef(const T *data, std::size_t size) noexcept
-
template<class Vec>
inline auto data_or_null(const Vec &v) -> decltype(v.data())
std::vector::data() might not return nullptr when empty
-
inline int RunBackendApp(char **argv, std::function<std::unique_ptr<mp::BasicBackend>()> be_creator, BasicBackend::Callbacks callbacks = {})
Create and run a backend.
- Parameters
argv – command-line arguments, null-terminated vector
be_creator – backend factory
callbacks – special callbacks
- Returns
application exit value
-
template<class ProblemBuilder>
EasyModeler<ProblemBuilder> MakeEasyModeler(ProblemBuilder &bld)
-
inline UnsupportedError MakeUnsupportedError(fmt::CStringRef format_str, fmt::ArgList args)
Makes UnsupportedError with prefix “unsupported: “.
Use via macro MP_UNSUPPORTED
-
template<typename ExprType>
inline ExprType Cast(Expr e)
Casts an expression to type ExprType which must be a valid expression type.
Returns a null expression if e is not convertible to ExprType.
-
void format(fmt::BasicFormatter<char> &f, const char*&, NumericExpr e)
-
inline bool IsZero(NumericExpr e)
Returns true iff e is a zero constant.
-
bool Equal(Expr e1, Expr e2)
Recursively compares two expressions and returns true if they are equal.
-
void WriteModelItem(fmt::MemoryWriter &wrt, const LinTerms <, const std::vector<std::string> &vnam)
-
void WriteModelItem(fmt::MemoryWriter &wrt, const QuadTerms &qt, const std::vector<std::string> &vnam)
-
void WriteModelItem(fmt::MemoryWriter &wrt, const QuadAndLinTerms &qlt, const std::vector<std::string> &vnam)
-
template<class Writer, class Body>
inline void WriteModelItem(Writer &wrt, const AlgebraicConstraint<Body, AlgConRange> &algc, const std::vector<std::string> &vnam)
Write RangeCon without name.
-
template<class Writer, class Body, int kind>
inline void WriteModelItem(Writer &wrt, const AlgebraicConstraint<Body, AlgConRhs<kind>> &algc, const std::vector<std::string> &vnam)
Write RhsCon without name.
-
template<class Body, class RhsOrRange>
inline void WriteJSON(JSONW jw, const AlgebraicConstraint<Body, RhsOrRange> &algc)
Write an algebraic constraint.
-
inline void WriteJSON(JSONW jw, const AlgConRange &acr)
Write alg con range.
-
template<int kind>
inline void WriteJSON(JSONW jw, const AlgConRhs<kind> &acrhs)
Write alg con rhs.
-
template<class Writer, class Vec, typename T = std::decay_t<decltype(*begin(std::declval<Vec>()))>>
inline void WriteModelItem(Writer &wrt, const Vec &v, const std::vector<std::string> &vnam)
Write flat expr/obj/con variables: vector/array.
-
template<class Writer, class Vec, typename T = std::decay_t<decltype(*begin(std::declval<Vec>()))>>
void WriteModelItemParameters(Writer &wrt, const Vec &v)
Write flat expr/obj/con parameters: vector/array.
-
template<class Writer, class A, class P, class N, class I>
inline void WriteModelItem(Writer &wrt, const CustomFunctionalConstraint<A, P, N, I> &cfc, const std::vector<std::string> &vnam)
Specialize WriteModelItem() for CustomFuncCon<>
-
template<class Writer, class Con>
inline void WriteFlatCon(Writer &wrt, const Con &c, const std::vector<std::string> &vnam)
Very general template to write any flat constraint with name.
-
template<class JW, class A, class P, class N, class I>
inline void WriteJSON(JW jw, const CustomFunctionalConstraint<A, P, N, I> &cfc)
Write a CustomFunctionalConstraint<>
-
template<class Con, class VarVec>
double ComputeValue(const Con&, const VarVec&)
Dummy template: compute result of functional constraint.
Should be implemented for proper functional specializations, but has no sense for conic constraints, for example.
-
template<class Args, class Params, class NumOrLogic, class Id, class VarVec>
Violation ComputeViolation(const CustomFunctionalConstraint<Args, Params, NumOrLogic, Id> &c, const VarVec &x)
Compute violation of functional constraint.
Can only be used for proper functional constraints, should be redefined for cones.
-
template<class Writer, class Con>
inline void WriteModelItem(Writer &wrt, const ConditionalConstraint<Con> &condc, const std::vector<std::string> &vnam)
Write ConditionalCon without name.
-
template<class Writer>
void WriteVar(Writer &pr, const char *name, double lb, double ub, var::Type ty)
Write a readable variable definition.
-
template<class JW, class Con>
inline void WriteJSON(JW jw, const ConditionalConstraint<Con> &condc)
Write a CondCon.
-
template<class VarVec>
double ComputeValue(const MaxConstraint &con, const VarVec &x)
Compute result of the max constraint.
-
template<class VarVec>
double ComputeValue(const MinConstraint &con, const VarVec &x)
Compute result of the min constraint.
-
template<class VarVec>
double ComputeValue(const AbsConstraint &con, const VarVec &x)
Compute result of the abs constraint.
-
template<class VarVec>
double ComputeValue(const AndConstraint &con, const VarVec &x)
Compute result of the and constraint.
-
template<class VarVec>
double ComputeValue(const OrConstraint &con, const VarVec &x)
Compute result of the or constraint.
-
template<class VarVec>
double ComputeValue(const NotConstraint &con, const VarVec &x)
Compute result of the not constraint.
-
template<class VarVec>
double ComputeValue(const DivConstraint &con, const VarVec &x)
Compute result of the div constraint.
-
template<class VarVec>
double ComputeValue(const IfThenConstraint &con, const VarVec &x)
Compute result of the IfThen constraint.
-
template<class VarVec>
double ComputeValue(const ImplicationConstraint &con, const VarVec &x)
Compute result of the Implication constraint.
-
template<class VarVec>
double ComputeValue(const AllDiffConstraint &con, const VarVec &x)
Compute result of the AllDiff constraint.
-
template<class VarInfo>
double ComputeValue(const NumberofConstConstraint &con, const VarInfo &x)
Compute result of the NumberofConst constraint.
-
template<class VarVec>
double ComputeValue(const NumberofVarConstraint &con, const VarVec &x)
Compute result of the NumberofVar constraint.
-
template<class VarVec>
double ComputeValue(const CountConstraint &con, const VarVec &x)
Compute result of the count constraint.
-
template<class VarVec>
double ComputeValue(const ExpConstraint &con, const VarVec &x)
Compute result of the exp constraint.
-
template<class VarVec>
double ComputeValue(const ExpAConstraint &con, const VarVec &x)
Compute result of the expA constraint.
-
template<class VarVec>
double ComputeValue(const LogConstraint &con, const VarVec &x)
Compute result of the log constraint.
-
template<class VarVec>
double ComputeValue(const LogAConstraint &con, const VarVec &x)
Compute result of the logA constraint.
-
template<class VarVec>
double ComputeValue(const PowConstraint &con, const VarVec &x)
Compute result of the pow constraint.
-
template<class VarVec>
double ComputeValue(const SinConstraint &con, const VarVec &x)
Compute result of the sin constraint.
-
template<class VarVec>
double ComputeValue(const CosConstraint &con, const VarVec &x)
Compute result of the cos constraint.
-
template<class VarVec>
double ComputeValue(const TanConstraint &con, const VarVec &x)
Compute result of the tan constraint.
-
template<class VarVec>
double ComputeValue(const AsinConstraint &con, const VarVec &x)
Compute result of the asin constraint.
-
template<class VarVec>
double ComputeValue(const AcosConstraint &con, const VarVec &x)
Compute result of the acos constraint.
-
template<class VarVec>
double ComputeValue(const AtanConstraint &con, const VarVec &x)
Compute result of the atan constraint.
-
template<class VarVec>
double ComputeValue(const SinhConstraint &con, const VarVec &x)
Compute result of the sinh constraint.
-
template<class VarVec>
double ComputeValue(const CoshConstraint &con, const VarVec &x)
Compute result of the cosh constraint.
-
template<class VarVec>
double ComputeValue(const TanhConstraint &con, const VarVec &x)
Compute result of the tanh constraint.
-
template<class VarVec>
double ComputeValue(const AsinhConstraint &con, const VarVec &x)
Compute result of the asinh constraint.
-
template<class VarVec>
double ComputeValue(const AcoshConstraint &con, const VarVec &x)
Compute result of the acosh constraint.
-
template<class VarVec>
double ComputeValue(const AtanhConstraint &con, const VarVec &x)
Compute result of the atanh constraint.
-
template<class VarVec>
double ComputeValue(const LinearFunctionalConstraint &con, const VarVec &x)
Compute result of the LinearFuncCon constraint.
-
template<class VarVec>
double ComputeValue(const QuadraticFunctionalConstraint &con, const VarVec &x)
Compute result of the QuadrFuncCon constraint.
-
template<class Con, class VarVec>
double ComputeValue(const ConditionalConstraint<Con> &con, const VarVec &x)
Compute result of a conditional constraint.
Just return bool(viol(subcon) <= 0). This is not used to compute violation.
-
template<class VarVec>
Violation ComputeViolation(const QuadraticConeConstraint &con, const VarVec &x)
Compute violation of the QuadraticCone constraint.
-
template<class VarVec>
Violation ComputeViolation(const RotatedQuadraticConeConstraint &con, const VarVec &x)
Compute violation of the RotatedQuadraticCone constraint.
-
template<class VarVec>
Violation ComputeViolation(const ExponentialConeConstraint &con, const VarVec &x)
Compute violation of the ExponentialCone constraint.
-
template<class VarVec>
double ComputeValue(const PLConstraint &con, const VarVec &x)
Compute result of the PL constraint.
-
DEF_NUMERIC_FUNC_CONSTR (Max, VarArray, "r = max(v1, v2, ..., vn)")
-
DEF_NUMERIC_FUNC_CONSTR (Min, VarArray, "r = min(v1, v2, ..., vn)")
-
DEF_NUMERIC_FUNC_CONSTR (Abs, VarArray1, "r = abs(v)")
-
DEF_LOGICAL_FUNC_CONSTR (And, VarArray, "r = forall({vi})")
-
DEF_LOGICAL_FUNC_CONSTR (Or, VarArray, "r = exists({vi})")
-
DEF_LOGICAL_FUNC_CONSTR (Not, VarArray1, "r = !v")
-
DEF_NUMERIC_FUNC_CONSTR (Div, VarArray2, "r = v1 / v2 and v2!=0")
DivConstraint and DivExpression.
-
DEF_NUMERIC_FUNC_CONSTR (IfThen, VarArrayN< 3 >, "Expr-valued: if (cond) then (expr1) else (expr2)")
-
DEF_LOGICAL_FUNC_CONSTR (Implication, VarArrayN< 3 >, "Logic-valued: if (cond) then (con1) else (con2)")
-
DEF_LOGICAL_FUNC_CONSTR (AllDiff, VarArray, "alldiff({})")
-
DEF_NUMERIC_FUNC_CONSTR_WITH_PRM (NumberofConst, VarArray, DblParamArray1, "numberof_const(k, {x0...xn})")
-
DEF_NUMERIC_FUNC_CONSTR (NumberofVar, VarArray, "numberof_var(x0, {x1...xn})")
-
DEF_NUMERIC_FUNC_CONSTR (Count, VarArray, "count({x0...xn})")
-
DEF_NUMERIC_FUNC_CONSTR (Exp, VarArray1, "r = exp(v)")
-
DEF_NUMERIC_FUNC_CONSTR_WITH_PRM (ExpA, VarArray1, DblParamArray1, "r = a**v")
-
DEF_NUMERIC_FUNC_CONSTR (Log, VarArray1, "r = log(v)")
-
DEF_NUMERIC_FUNC_CONSTR_WITH_PRM (LogA, VarArray1, DblParamArray1, "r = log(v)/log(a)")
-
DEF_NUMERIC_FUNC_CONSTR_WITH_PRM (Pow, VarArray1, DblParamArray1, "r = v ** a")
-
DEF_NUMERIC_FUNC_CONSTR (Sin, VarArray1, "r = sin(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Cos, VarArray1, "r = cos(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Tan, VarArray1, "r = tan(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Asin, VarArray1, "r = asin(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Acos, VarArray1, "r = acos(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Atan, VarArray1, "r = atan(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Sinh, VarArray1, "r = sinh(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Cosh, VarArray1, "r = cosh(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Tanh, VarArray1, "r = tanh(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Asinh, VarArray1, "r = asinh(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Acosh, VarArray1, "r = acosh(v)")
-
DEF_NUMERIC_FUNC_CONSTR (Atanh, VarArray1, "r = atanh(v)")
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondLinLT, LinConLT)
Not using: var1 != var2.
Represented by Not { Eq0Constraint… }
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondLinLE, LinConLE)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondLinEQ, LinConEQ)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondLinGE, LinConGE)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondLinGT, LinConGT)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondQuadLT, QuadConLT)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondQuadLE, QuadConLE)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondQuadEQ, QuadConEQ)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondQuadGE, QuadConGE)
-
DEF_CONDITIONAL_CONSTRAINT_WRAPPER(CondQuadGT, QuadConGT)
-
template<class Writer>
inline void WriteModelItem(Writer &wrt, const LinearFunctionalConstraint &lfc, const std::vector<std::string> &vnam)
Write LFC without name.
-
inline void WriteJSON(JSONW jw, const LinearFunctionalConstraint &lfc)
Write a LinFuncCon.
-
template<class Writer>
inline void WriteModelItem(Writer &wrt, const QuadraticFunctionalConstraint &qfc, const std::vector<std::string> &vnam)
Write LFC without name.
-
inline void WriteJSON(JSONW jw, const QuadraticFunctionalConstraint &qfc)
Write a QuadrFuncCon.
-
DEF_NUMERIC_FUNC_CONSTR_WITH_PRM (PL, VarArray1, PLConParams, "r = piecewise_linear(x)")
Define PLConstraint.
-
template<class Writer>
void WriteModelItemParameters(Writer &wrt, const PLConParams &plp)
Write flat expr/obj/con parameters: PLConParams.
-
inline void WriteJSON(JSONW jw, const PLConParams &plp)
Write PLConParams.
-
template<class Writer, class Con>
inline void WriteModelItem(Writer &wrt, const IndicatorConstraint<Con> &ic, const std::vector<std::string> &vnam)
Write indicator without name.
-
template<class Con>
inline void WriteJSON(JSONW jw, const IndicatorConstraint<Con> &ic)
Export indicator constraint.
-
DEF_STATIC_CONSTR (UnaryEncoding, VarArray1, "Unary encoding of an integer bounded variable")
Unary encoding.
Currently a dummy constraint just to build the reformulation graph.
-
template<class Writer, int type>
inline void WriteModelItem(Writer &wrt, const SOS_1or2_Constraint<type> &sos, const std::vector<std::string> &vnam)
Write SOS without name.
-
template<int type>
inline void WriteJSON(JSONW jw, const SOS_1or2_Constraint<type> &sos)
Export a SOS1, SOS2 constraint.
-
template<class Writer, class Expr>
inline void WriteModelItem(Writer &wrt, const ComplementarityConstraint<Expr> &cc, const std::vector<std::string> &vnam)
Write ComplCon without name.
-
template<class Expr>
inline void WriteJSON(JSONW jw, const ComplementarityConstraint<Expr> &cc)
Write a ComplementarityCon.
-
DEF_STATIC_CONSTR_WITH_PRM (QuadraticCone, VarArray, DblParamArray, "Quadratic cone p1*x1 >= sqrt((p2*x2)^2 + ...))," " with factors p1..pn")
Quadratic cone.
-
DEF_STATIC_CONSTR_WITH_PRM (RotatedQuadraticCone, VarArray, DblParamArray, "Rotated quadratic cone " "2 * p1*x1*p2*x2 >= (p3*x3)^2 + ...)," " x1, x2 >= 0 or x1, x2 <= 0, with factors p1..pn")
Rotated quadratic cone.
-
DEF_STATIC_CONSTR_WITH_PRM (ExponentialCone, VarArray3, DblParamArray3, "Exponential cone ax >= by exp(cz / (by))," " where ax, by >= 0, with factors a,b,c")
Exponential cone.
-
DEF_STATIC_CONSTR_WITH_PRM (PowerCone, VarArray, DblParamArray, "Power cone with factors")
Power cone.
-
DEF_STATIC_CONSTR_WITH_PRM (GeometricCone, VarArray, DblParamArray, "Geometric with factors")
Geometric cone.
-
template<class Args, class Params, class NumOrLogic, class Id>
inline bool operator==(std::reference_wrapper<const CustomFunctionalConstraint<Args, Params, NumOrLogic, Id>> c1, std::reference_wrapper<const CustomFunctionalConstraint<Args, Params, NumOrLogic, Id>> c2)
Subexpression maps for an expression require operator==(refwrap<expr>, refwrap<expr>).
The below one is for CustomFunctionalConstraint<>
-
template<class Con>
inline bool operator==(std::reference_wrapper<const ConditionalConstraint<Con>> c1, std::reference_wrapper<const ConditionalConstraint<Con>> c2)
operator==(refwrap<ConditionalConstraint<> >)
-
inline bool operator==(std::reference_wrapper<const LinearFunctionalConstraint> c1, std::reference_wrapper<const LinearFunctionalConstraint> c2)
operator==(LFC)
-
inline bool operator==(std::reference_wrapper<const QuadraticFunctionalConstraint> c1, std::reference_wrapper<const QuadraticFunctionalConstraint> c2)
operator==(QFC)
-
template<class Converter, class Constraint, class Converter2>
FCC<Converter, Constraint> MakeFuncConstrConverter(Converter2 &cvt, Constraint &&fc)
-
template<>
void WriteJSON(JSONW jw, const LinTerms &qt)
Specialize.
-
template<class Writer, class Terms>
inline void WriteModelItem(Writer &wrt, const AlgebraicExpression<Terms> &ale, const std::vector<std::string> &vnam)
Write algebraic expr.
-
template<class Writer, class Obj>
void WriteJSON(Writer w, const Obj &o)
Very general template to write a JSON-like representation of anything.
-
template<class Terms>
inline void WriteJSON(JSONW jw, const AlgebraicExpression<Terms> &ale)
Write an AlgebraicExpression.
-
template<>
void WriteJSON(JSONW jw, const QuadTerms &qt)
Specialize.
-
template<>
void WriteJSON(JSONW jw, const QuadAndLinTerms &qt)
Specialize.
-
inline AffineExpr MoveOutAffineExpr(QuadraticExpr &&qe)
Extract (move out) affine expr.
-
const char *ConGroupName(int cg)
Constraint group names.
-
Todo:
Keep consistent with the ConstraintGroups enum.
-
template<class ModelAPI, template<typename, typename, typename> class FlatConverter, class Backend>
std::unique_ptr<BasicModelManager> CreateModelMgrWithFlatConverter(Backend &gc, Env &e, pre::BasicValuePresolver *&pPre)
A template to create a ModelManager with a FlatConverter for a specific solver.
Currently is uses mp::Problem as intermediate storage of the NL model.
- Template Parameters
Backend – the Backend class
ModelAPI – the ModelAPI class to be created and used by the ModelManager
FlatConverter – the FlatConverter to be used
- Parameters
-
-
std::unique_ptr<FlatModelInfo> CreateFlatModelInfo()
FlatModelInfo factory.
-
void WriteModelItem(fmt::MemoryWriter &wrt, const QuadraticObjective &obj, const std::vector<std::string> &vnam)
Write objective.
-
template<class VarVec>
double ComputeValue(const QuadraticObjective &obj, const VarVec &x)
Compute value of an objective.
-
template<class Num>
bool is_integer(Num n)
Short check for integrality.
-
inline LinTerms ToLinTerms(const LinearExpr &e)
Convert mp::LinearExpr to LinTerms.
-
template<typename ExprTypes, typename LinearExpr, typename NumericExpr, typename Namer>
void WriteExpr(fmt::Writer &w, const LinearExpr &linear, NumericExpr nonlinear, Namer)
Write algebraic expression (linear + non-linear.)
-
template<typename ExprTypes, typename LogicalExpr, class VN>
void WriteExpr(fmt::Writer &w, LogicalExpr expr, VN)
Write logical expression.
-
template<class ExprTypes, class AlgCon, class VN>
void WriteAlgCon(fmt::Writer &w, const AlgCon &con, VN)
Write algebraic constraint.
-
P_ZZI_Encoding MakeZZIEncoding()
-
std::vector<double> GetExtendedColumn(ZZI_Encoding&, int r, int k, int v0, int v1)
Obtain column k of the encoding matrix C^r prepended by 0 and postpended by line v1-1 if v1-1 == 2^r.
-
template<class FuncCon>
void PLApproximate(const FuncCon &con, PLApproxParams &laPrm)
Do the approximation by calling the function-specific approximator.
- Parameters
laPrm – in-out parameter
-
std::pair<std::string, std::string> GetWarningKeyAndText(const char *conName, double tol)
A function to add warning about PL approximation.
-
std::unique_ptr<BasicModelManager> CreateModelManagerWithStdBuilder(std::unique_ptr<BasicConverter<mp::Problem>> pcvt)
Declare a ModelManager factory.
Writes NLHeader in the NL format.
-
template<typename Handler>
void ReadNLString(NLStringRef str, Handler &handler, fmt::CStringRef name, int flags)
Reads an optimization problem in the NL format from the string str
and sends notifications of the problem components to the handler object.
See mp::ReadNLFile()
for description of handler and flags.
Both str and name can be C strings or std::string
objects.
The name argument is used as the name of the input when reporting errors.
-
template<typename Handler>
inline void ReadNLFile(fmt::CStringRef filename, Handler &handler, int flags)
Reads an optimization problem in the NL format from the file filename
and sends notifications of the problem components to the handler object.
The handler class can be one of the following
The filename argument can be a C string or an std::string
object.
flags can be either 0, which is the default, to read all constructs in
the order they appear in the input, or mp::READ_BOUNDS_FIRST
to read
variable bounds after the NL header and before other constructs such as
nonlinear expressions.
Example:
// Count the number of variable references in all nonlinear expressions.
struct VarCounter : mp::NullNLHandler<int> {
int num_vars;
VarCounter() : num_vars(0) {}
Reference OnVariableRef(int) {
++num_vars;
return Reference();
}
};
VarCounter counter;
mp::ReadNLFile("test.nl", counter);
fmt::print("The number of variable references is {}.", counter.num_vars);
-
char ParseOptions(char **&args, OptionList &options)
Parses command-line options until the first argument that doesn’t start with ‘-’.
Returns the option that terminated parsing or 0 if parsing continued till the end.
-
path GetExecutablePath()
-
template<typename T>
inline MakeUnsigned<T>::Type SafeAbs(T value)
-
template<typename T>
inline SafeInt<T> operator+(SafeInt<T> a, SafeInt<T> b)
-
template<typename T1, typename T2>
inline SafeInt<T1> operator+(SafeInt<T1> a, T2 b)
-
template<typename T1, typename T2>
inline SafeInt<T2> operator+(T1 a, SafeInt<T2> b)
-
template<typename T>
inline SafeInt<T> operator-(SafeInt<T> a, SafeInt<T> b)
-
template<typename T1, typename T2>
inline SafeInt<T1> operator-(SafeInt<T1> a, T2 b)
-
template<typename T1, typename T2>
inline SafeInt<T2> operator-(T1 a, SafeInt<T2> b)
-
template<typename T>
inline SafeInt<T> operator*(SafeInt<T> a, SafeInt<T> b)
-
template<typename T1, typename T2>
inline SafeInt<T1> operator*(SafeInt<T1> a, T2 b)
-
template<typename T1, typename T2>
inline SafeInt<T2> operator*(T1 a, SafeInt<T2> b)
-
template<typename Solution>
void WriteSolFile(fmt::CStringRef filename, const Solution &sol)
Writes a solution to a .sol file.
-
inline SolverPtr move(SolverPtr p)
-
template<typename SuffixType>
inline SuffixType Cast(Suffix s)
“inline” is used here instead of the definition to suppress bogus C4396 warnings in MSVC.
Casts a suffix to type SuffixType which must be a valid suffix type.
Returns a null suffix if s is not convertible to SuffixType.
-
template<typename SuffixType>
inline SuffixType Cast(MutSuffix s)
-
double GetTimeAndReset(std::chrono::steady_clock::time_point &t)
-
std::unique_ptr<BasicFileAppender> MakeFileAppender()
FileAppender maker.
-
template<class F>
F round_to_digits(F value, int digits)
https://stackoverflow.com/questions/13094224/a-c-routine-to-round-a-float-to-n-significant-digits
-
std::vector<std::string> split_string(const char*)
Split string.
-
template<class Str>
inline std::vector<std::string> split_string(const Str &str)
Split string.
-
template<class NLFeeder>
inline WriteNLResult WriteNLFile(const std::string &namebase, NLFeeder &nlf, NLUtils &utl)
Write NL file and any necessary auxiliary files.
- Parameters
namebase – name without extension, to be augmented by .nl, .col, …etc.
- Returns
Write status. Note that warnings are reported via utl.
-
template<class Value>
StringFileWriter &operator<<(StringFileWriter &wrt, Value s)
operator<< (StringFileWriter&, Value)
-
template<class SOLHandler>
inline std::pair<NLW2_SOLReadResultCode, std::string> ReadSOLFile(const std::string &name, SOLHandler &solh, NLUtils &utl, int *p_internal_rv = nullptr)
Read SOL file.
-
inline int decstring(const char *buf, double *val)
Parse double.
-
inline NLW2_SOLReadResultCode Read(FILE *f, int binary, double &v, std::string &err)
Read a double from text or binary file.
-
template<class El>
inline NLW2_SOLReadResultCode Read(FILE *f, int binary, std::pair<int, El> &v, std::string &err)
Read a pair<int, El> from text or binary file.
-
inline int Lget(char **sp, int *Lp)
Parse int.
Variables
-
static constexpr char gl_1__short[] =
"%c%d"
-
static constexpr char gl_2a[] =
" %d %d %d %d %d"
-
static constexpr char gl_1a [] = "\t# problem %s" EOL
-
static constexpr char gl_2 [] = "\t# vars, algcons, objs, ranges, eqns%s" EOL
-
static constexpr char gl_3 [] = " %d %d\t# nonlinear cons, objs" EOL
-
static constexpr char gl_3c [] = "\t# nonlinear cons, objs; compl: lin, nonlin, range, nzlb%s" EOL
-
static constexpr char gl_4 [] = "\t# network cons: nonlinear, linear" EOL
-
static constexpr char gl_4r [] = " %d\t# network cons: nonlinear, linear; stages" EOL
-
static constexpr char gl_5 [] = " %d %d %d\t# nonlinear vars in cons, objs, both" EOL
-
static constexpr char gl_6 [] = " %d %d\t# linear network vars; funcs" EOL
-
static constexpr char gl_6x [] = " %d %d %d %d\t# linear network vars; funcs; arith, flags" EOL
-
static constexpr char gl_6y [] = " %d %d %d %d %d\t# linear network vars; funcs; arith, flags; randcalls" EOL
-
static constexpr char gl_7 [] = " %d %d %d %d %d\t# discrete vars: binary, integer, nonlinear (b,c,o)" EOL
-
static constexpr char gl_8 [] = " %zd %zd\t# nonzeros in Jacobian, gradients" EOL
-
static constexpr char gl_9 [] = " %d %d\t# max name lengths: cons/objs, vars" EOL
-
static constexpr char gl_10 [] = "\t# common exprs: b,c,o,c1,o1%s" EOL