Using the MathProgBase Interface
The MathProgBase interface is recommended for optimizing nonsmooth objects and problems that can't be easily represented in JuMP. A EAGO model object should be first created from as solver
f(x) = (x[1]-5)^2 + (x[2]-3)^2
g(x) = [x[1] - x[2]]
m1 = MathProgBase.NonlinearModel(EAGO_NLPSolver())
MathProgBase.loadproblem!(m1, 2, 1, [0.0, 0.0], [10.0, 10.0],
[0.0], [1.0], :Min, f, g)
MathProgBase.optimize!(m1)
EAGO Model Object
EAGO.EAGO_NLP_Model
— Type.EAGO_NLP_Model
The model type to interface with JuMP and MathProgBase. This has fields:
BnBModel::BnBModel
: which stores information from the Branch and Bound Problem.Opts::EAGO_Inner_NLP
: storage for various problem descriptorsd
: The storage for an AbstractNLPEvaluatorstatus::Symbol
: descriptor for model status (e.g. :optimal)
EAGO.EAGO_Inner_NLP
— Type.EAGO_Inner_NLP
This is the inner storage object for the model interface to JuMP and MathProgBase. Effectively empty when initialized. It has the following fields:
gL::Vector{Float64}
: Lower constraint boundsgU::Vector{Float64}
: Upper constraint boundsgexp::Int64
: Expression for constraintsgL_loc::Vector{Int64}
: Index at which constraints have finite lower boundsgU_loc::Vector{Int64}
: Index at which constraints have finite upper boundsnumVar::Int64
: Number of variables in full problem.numConstr::Int64
: Number of constraints in full problem.vartypes::Vector{Symbol}
: Type of variable array (currently not used)sense::Symbol
: Minimization (:Min) or maximization (:Max)obj::Expr
: Expression for objective provide by AbstractNLPEvaluatorconstrs::Vector{Expr}
: Expressions for constraints provide by AbstractNLPEvaluatorDAG_tlist::TapeList
: Tape list for DAG propagation on constraintsf::Function
: Objective functiong::Function
: Constraint functionsolver::EAGO_NLPSolver
: Solve storage object
Setup API for MathProgBase Interface
MathProgBase.SolverInterface.optimize!
— Method.MathProgBase.optimize!(s::EAGO_NLP_Model)
Optimizes the s::EAGO_NLP_Model
. May print console outputs depending on settings and other solution information is accessible via start solver interface functions.
Access and Manipulation functions for MathProgBase Interface
Standard MathProgBase access functions (e.g. MathProgBase.getsolution) are extended by EAGO.