16#ifndef MINOTAURIPOPTENGINE_H
17#define MINOTAURIPOPTENGINE_H
25 class IpoptApplication;
26 class IpoptFunInterface;
37 typedef Environment* EnvPtr;
38 typedef IpoptEngine* IpoptEnginePtr;
39 typedef Problem* ProblemPtr;
101 void write(std::ostream &out)
const;
112 class IpoptWarmStart;
113 typedef IpoptWarmStart* IpoptWarmStartPtr;
114 typedef const IpoptWarmStart* ConstIpoptWarmStartPtr;
143 void write(std::ostream &out)
const;
178 double lb,
double ub);
229 void removeCons(std::vector<ConstraintPtr> &delcons);
283 static const int maxIterLimit_ = 3000;
286 static const std::string me_;
288 Ipopt::IpoptApplication *myapp_;
343 void setOptionsForProb_();
Declare NLPEngine Class for solving nonlinear problems using a nonlinear solver.
Implement base class Solution.
Definition: IpoptEngineTnlp.h:20
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
Definition: Environment.h:28
Definition: Function.h:37
Definition: IpoptEngine.h:154
void addConstraint(ConstraintPtr c)
Add a new constraint to the engine.
Definition: IpoptEngine.cpp:304
void setOptionsForRepeatedSolve()
Set options to solve the NLP repeatedly, with few changes.
Definition: IpoptEngine.cpp:583
double getSolutionValue()
Get the solution value.
Definition: IpoptEngine.cpp:413
void changeConstraint(ConstraintPtr con, LinearFunctionPtr lf, double lb, double ub)
Change the linear function, and the bounds of a constraint.
Definition: IpoptEngine.cpp:324
WarmStartPtr getWarmStartCopy()
Definition: IpoptEngine.cpp:402
ConstWarmStartPtr getWarmStart()
Definition: IpoptEngine.cpp:397
void loadFromWarmStart(const WarmStartPtr ws)
Definition: IpoptEngine.cpp:455
IpoptEngine(EnvPtr env)
Default constructor.
Definition: IpoptEngine.cpp:228
void fillStats(std::vector< double > &)
Accumulate statistics from different threads in a common data.
Definition: IpoptEngine.cpp:783
void disableStrBrSetup()
Restore settings after strong branching.
Definition: IpoptEngine.cpp:360
void writeStats(std::ostream &out) const
Write statistics.
Definition: IpoptEngine.cpp:798
void setOptionsForSingleSolve()
Definition: IpoptEngine.cpp:614
int setDualObjLimit(double)
Set the dual objective limit.
Definition: IpoptEngine.h:238
void enableStrBrSetup()
Make settings for strong branching.
Definition: IpoptEngine.cpp:375
void changeObj(FunctionPtr f, double cb)
Change objective function.
Definition: IpoptEngine.cpp:335
void load(ProblemPtr problem)
Load the problem into IPOPT. We create the TNLP interface to IPOPT.
Definition: IpoptEngine.cpp:423
EngineStatus getStatus()
Get the status of the last solve command.
Definition: IpoptEngine.cpp:418
void setIterationLimit(int limit)
Definition: IpoptEngine.cpp:559
void clear()
Clear the loaded problem, if any, from the engine.
Definition: IpoptEngine.cpp:340
void resetIterationLimit()
Reset the iteration limit to maximum possible.
Definition: IpoptEngine.cpp:554
void negateObj()
Negate the objective function. Min f is changed to Min -f.
Definition: IpoptEngine.cpp:479
EngineStatus solve()
Definition: IpoptEngine.cpp:628
~IpoptEngine()
Destroy.
Definition: IpoptEngine.cpp:274
void changeBound(ConstraintPtr cons, BoundType lu, double new_val)
Change a bound of a constraint.
Definition: IpoptEngine.cpp:309
std::string getName() const
Get the name.
Definition: IpoptEngine.cpp:384
EnginePtr emptyCopy()
Return an empty IpoptEngine pointer.
Definition: IpoptEngine.cpp:370
ConstSolutionPtr getSolution()
Get the solution obtained after solving the problem.
Definition: IpoptEngine.cpp:389
void removeCons(std::vector< ConstraintPtr > &delcons)
Delete constraints from the engine.
Definition: IpoptEngine.cpp:549
Definition: IpoptEngine.h:61
~IpoptSolution()
Destroy.
Definition: IpoptEngine.cpp:105
void setDualOfVars(const double *)
Copy values of dual variables of variables.
Definition: IpoptEngine.h:95
IpoptSolution()
Default constructor.
Definition: IpoptEngine.cpp:49
void write(std::ostream &out) const
Write to an output.
Definition: IpoptEngine.cpp:138
const double * getUpperDualOfVars() const
Definition: IpoptEngine.h:92
IpoptSolution(const double *x, ProblemPtr problem)
Construct a solution for a problem from an array of doubles.
const double * getLowerDualOfVars() const
Definition: IpoptEngine.h:86
Class for saving and using Warm-start information in Ipopt.
Definition: IpoptEngine.h:117
void write(std::ostream &out) const
Write to an output stream.
Definition: IpoptEngine.cpp:219
IpoptSolPtr getPoint()
Return the soluton that can be used as starting point.
Definition: IpoptEngine.cpp:199
void setPoint(IpoptSolPtr sol)
Definition: IpoptEngine.cpp:214
IpoptWarmStart()
Default constructor.
Definition: IpoptEngine.cpp:178
~IpoptWarmStart()
Destroy.
Definition: IpoptEngine.cpp:192
bool hasInfo()
Definition: IpoptEngine.cpp:204
The base class linear function is of the form c'x.
Definition: LinearFunction.h:31
Definition: NLPEngine.h:37
Base class for nonlinear functions.
Definition: NonlinearFunction.h:31
Definition: Solution.h:30
Definition: Variable.h:31
Definition: WarmStart.h:45
Definition: ActiveNodeStore.h:20
BoundType
Different types of variable-bounds.
Definition: Types.h:131
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
EngineStatus
Different status that an external engine may report.
Definition: Types.h:176
Definition: IpoptEngine.h:42
double ptime
Sum of time taken in all calls to presolve.
Definition: IpoptEngine.h:47
UInt opt
No. of calls to Ipopt's Optimize.
Definition: IpoptEngine.h:44
UInt reopt
No. of calls to Ipopt's ReOptimize.
Definition: IpoptEngine.h:45
UInt calls
Total number of calls to solve.
Definition: IpoptEngine.h:43
UInt strIters
Number of iterations in strong branching alone.
Definition: IpoptEngine.h:49
UInt iters
Sum of number of iterations in all calls.
Definition: IpoptEngine.h:46
double strTime
time taken in strong branching alone.
Definition: IpoptEngine.h:50
double time
Sum of time taken in all calls to solve.
Definition: IpoptEngine.h:51
UInt strCalls
Calls to solve while strong branching.
Definition: IpoptEngine.h:48