|
type definitions for specific NLP solver interfaces
- Author
- Stefan Vigerske
-
Thorsten Gellermann
Definition in file type_nlpi.h.
#include "scip/def.h"
#include "scip/type_message.h"
#include "blockmemshell/memory.h"
#include "nlpi/type_expr.h"
Go to the source code of this file.
|
#define | SCIP_DECL_NLPICOPY(x) SCIP_RETCODE x (BMS_BLKMEM* blkmem, SCIP_NLPI* sourcenlpi, SCIP_NLPI** targetnlpi) |
|
#define | SCIP_DECL_NLPIFREE(x) SCIP_RETCODE x (SCIP_NLPI* nlpi) |
|
#define | SCIP_DECL_NLPIGETSOLVERPOINTER(x) void* x (SCIP_NLPI* nlpi) |
|
#define | SCIP_DECL_NLPICREATEPROBLEM(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM** problem, const char* name) |
|
#define | SCIP_DECL_NLPIFREEPROBLEM(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM** problem) |
|
#define | SCIP_DECL_NLPIGETPROBLEMPOINTER(x) void* x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem) |
|
#define | SCIP_DECL_NLPIADDVARS(x) |
|
#define | SCIP_DECL_NLPIADDCONSTRAINTS(x) |
|
#define | SCIP_DECL_NLPISETOBJECTIVE(x) |
|
#define | SCIP_DECL_NLPICHGVARBOUNDS(x) |
|
#define | SCIP_DECL_NLPICHGCONSSIDES(x) |
|
#define | SCIP_DECL_NLPIDELVARSET(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, int* dstats) |
|
#define | SCIP_DECL_NLPIDELCONSSET(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, int* dstats) |
|
#define | SCIP_DECL_NLPICHGLINEARCOEFS(x) |
|
#define | SCIP_DECL_NLPICHGQUADCOEFS(x) |
|
#define | SCIP_DECL_NLPICHGEXPRTREE(x) |
|
#define | SCIP_DECL_NLPICHGNONLINCOEF(x) |
|
#define | SCIP_DECL_NLPICHGOBJCONSTANT(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_Real objconstant) |
|
#define | SCIP_DECL_NLPISETINITIALGUESS(x) |
|
#define | SCIP_DECL_NLPISOLVE(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem) |
|
#define | SCIP_DECL_NLPIGETSOLSTAT(x) SCIP_NLPSOLSTAT x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem) |
|
#define | SCIP_DECL_NLPIGETTERMSTAT(x) SCIP_NLPTERMSTAT x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem) |
|
#define | SCIP_DECL_NLPIGETSOLUTION(x) |
|
#define | SCIP_DECL_NLPIGETSTATISTICS(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPSTATISTICS* statistics) |
|
#define | SCIP_DECL_NLPIGETWARMSTARTSIZE(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, size_t* size) |
|
#define | SCIP_DECL_NLPIGETWARMSTARTMEMO(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, void* buffer) |
|
#define | SCIP_DECL_NLPISETWARMSTARTMEMO(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, void* buffer) |
|
|
#define | SCIP_DECL_NLPIGETINTPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, int* ival) |
|
#define | SCIP_DECL_NLPISETINTPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, int ival) |
|
#define | SCIP_DECL_NLPIGETREALPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, SCIP_Real* dval) |
|
#define | SCIP_DECL_NLPISETREALPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, SCIP_Real dval) |
|
#define | SCIP_DECL_NLPIGETSTRINGPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, const char** sval) |
|
#define | SCIP_DECL_NLPISETSTRINGPAR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_NLPIPROBLEM* problem, SCIP_NLPPARAM type, const char* sval) |
|
#define | SCIP_DECL_NLPISETMESSAGEHDLR(x) SCIP_RETCODE x (SCIP_NLPI* nlpi, SCIP_MESSAGEHDLR* messagehdlr) |
|
|
enum | SCIP_NlpParam {
SCIP_NLPPAR_FROMSCRATCH = 0,
SCIP_NLPPAR_VERBLEVEL = 1,
SCIP_NLPPAR_FEASTOL = 2,
SCIP_NLPPAR_RELOBJTOL = 3,
SCIP_NLPPAR_LOBJLIM = 4,
SCIP_NLPPAR_INFINITY = 5,
SCIP_NLPPAR_ITLIM = 6,
SCIP_NLPPAR_TILIM = 7,
SCIP_NLPPAR_OPTFILE = 8,
SCIP_NLPPAR_FASTFAIL = 9
} |
|
enum | SCIP_NlpSolStat {
SCIP_NLPSOLSTAT_GLOBOPT = 0,
SCIP_NLPSOLSTAT_LOCOPT = 1,
SCIP_NLPSOLSTAT_FEASIBLE = 2,
SCIP_NLPSOLSTAT_LOCINFEASIBLE = 3,
SCIP_NLPSOLSTAT_GLOBINFEASIBLE = 4,
SCIP_NLPSOLSTAT_UNBOUNDED = 5,
SCIP_NLPSOLSTAT_UNKNOWN = 6
} |
|
enum | SCIP_NlpTermStat {
SCIP_NLPTERMSTAT_OKAY = 0,
SCIP_NLPTERMSTAT_TILIM = 1,
SCIP_NLPTERMSTAT_ITLIM = 2,
SCIP_NLPTERMSTAT_LOBJLIM = 3,
SCIP_NLPTERMSTAT_UOBJLIM = 4,
SCIP_NLPTERMSTAT_NUMERR = 5,
SCIP_NLPTERMSTAT_EVALERR = 6,
SCIP_NLPTERMSTAT_MEMERR = 7,
SCIP_NLPTERMSTAT_LICERR = 8,
SCIP_NLPTERMSTAT_OTHER = 9
} |
|
NLP solver termination status copy method of NLP interface (called when SCIP copies plugins)
input:
- blkmem block memory of target SCIP
- sourcenlpi the NLP interface to copy
- targetnlpi buffer to store pointer to copy of NLP interface
Definition at line 94 of file type_nlpi.h.
destructor of NLP interface to free nlpi data
input:
- nlpi datastructure for solver interface
Definition at line 101 of file type_nlpi.h.
#define SCIP_DECL_NLPIGETSOLVERPOINTER |
( |
|
x | ) |
void* x (SCIP_NLPI* nlpi) |
gets pointer to solver-internal NLP solver
to do dirty stuff
input:
- nlpi datastructure for solver interface
return: void pointer to solver
Definition at line 112 of file type_nlpi.h.
creates a problem instance
input:
- nlpi datastructure for solver interface
- problem pointer to store the problem data
- name name of problem, can be NULL
Definition at line 121 of file type_nlpi.h.
free a problem instance
input:
- nlpi datastructure for solver interface
- problem pointer where problem data is stored
Definition at line 129 of file type_nlpi.h.
gets pointer to solver-internal problem instance
to do dirty stuff
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
return: void pointer to problem instance
Definition at line 141 of file type_nlpi.h.
#define SCIP_DECL_NLPIADDVARS |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
add variables
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- nvars number of variables
- lbs lower bounds of variables, can be NULL if -infinity
- ubs upper bounds of variables, can be NULL if +infinity
- varnames names of variables, can be NULL
Definition at line 153 of file type_nlpi.h.
#define SCIP_DECL_NLPIADDCONSTRAINTS |
( |
|
x | ) |
|
Value: const SCIP_Real* rhss, const int* nlininds, int* const* lininds, SCIP_Real* const* linvals, const int* nquadelems, \ struct SCIP_Nlpi SCIP_NLPI
struct SCIP_QuadElement SCIP_QUADELEM
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_ExprTree SCIP_EXPRTREE
add constraints quadratic coefficiens: row oriented matrix for each constraint
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- ncons number of added constraints
- lhss left hand sides of constraints, can be NULL if -infinity
- rhss right hand sides of constraints, can be NULL if +infinity
- nlininds number of linear coefficients for each constraint may be NULL in case of no linear part
- lininds indices of variables for linear coefficients for each constraint may be NULL in case of no linear part
- linvals values of linear coefficient for each constraint may be NULL in case of no linear part
- nquadelems number of quadratic elements for each constraint may be NULL in case of no quadratic part
- quadelems quadratic elements for each constraint may be NULL in case of no quadratic part
- exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp entry of array may be NULL in case of no expression tree may be NULL in case of no expression tree in any constraint
- exprtrees expression tree for nonquadratic part of constraints entry of array may be NULL in case of no nonquadratic part may be NULL in case of no nonquadratic part in any constraint
- names of constraints, may be NULL or entries may be NULL
Definition at line 183 of file type_nlpi.h.
#define SCIP_DECL_NLPISETOBJECTIVE |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_QuadElement SCIP_QUADELEM
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_ExprTree SCIP_EXPRTREE
sets or overwrites objective, a minimization problem is expected May change sparsity pattern.
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- nlins number of linear variables
- lininds variable indices may be NULL in case of no linear part
- linvals coefficient values may be NULL in case of no linear part
- nquadelems number of elements in matrix of quadratic part
- quadelems elements of quadratic part may be NULL in case of no quadratic part
- exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp may be NULL in case of no expression tree
- exprtree expression tree for nonquadratic part of objective function may be NULL in case of no nonquadratic part
- constant objective value offset
Definition at line 207 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGVARBOUNDS |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
change variable bounds
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- nvars number of variables to change bounds
- indices indices of variables to change bounds
- lbs new lower bounds
- ubs new upper bounds
Definition at line 221 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGCONSSIDES |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
change constraint sides
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- nconss number of constraints to change sides
- indices indices of constraints to change sides
- lhss new left hand sides
- rhss new right hand sides
Definition at line 234 of file type_nlpi.h.
delete a set of variables
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- dstats deletion status of vars; 1 if var should be deleted, 0 if not
output:
- dstats new position of var, -1 if var was deleted
Definition at line 247 of file type_nlpi.h.
delete a set of constraints
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- dstats deletion status of rows; 1 if row should be deleted, 0 if not
output:
- dstats new position of row, -1 if row was deleted
Definition at line 259 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGLINEARCOEFS |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
changes (or adds) linear coefficients in a constraint or objective
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- idx index of constraint or -1 for objective
- nvals number of values in linear constraint to change
- varidxs indices of variables which coefficient to change
- vals new values for coefficients
Definition at line 271 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGQUADCOEFS |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_QuadElement SCIP_QUADELEM
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
changes (or adds) coefficients in the quadratic part of a constraint or objective
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- idx index of constraint or -1 for objective
- nquadelems number of entries in quadratic matrix to change
- quadelems new elements in quadratic matrix (replacing already existing ones or adding new ones)
Definition at line 283 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGEXPRTREE |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_ExprTree SCIP_EXPRTREE
replaces the expression tree of a constraint or objective
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- idxcons index of constraint or -1 for objective
- exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp, or NULL
- exprtree new expression tree for constraint or objective, or NULL to only remove previous tree
Definition at line 295 of file type_nlpi.h.
#define SCIP_DECL_NLPICHGNONLINCOEF |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
change the value of one parameter in the nonlinear part
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- idxcons index of constraint or -1 for objective
- idxparam index of parameter
- value new value for nonlinear parameter
return: Error if parameter does not exist
Definition at line 309 of file type_nlpi.h.
change the constant offset in the objective
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- objconstant new value for objective constant
Definition at line 319 of file type_nlpi.h.
#define SCIP_DECL_NLPISETINITIALGUESS |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
sets initial guess for primal variables
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- primalvalues initial primal values for variables, or NULL to clear previous values
- consdualvalues initial dual values for constraints, or NULL to clear previous values
- varlbdualvalues initial dual values for variable lower bounds, or NULL to clear previous values
- varubdualvalues initial dual values for variable upper bounds, or NULL to clear previous values
Definition at line 331 of file type_nlpi.h.
tries to solve NLP
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
Definition at line 340 of file type_nlpi.h.
gives solution status
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
return: Solution Status
Definition at line 350 of file type_nlpi.h.
gives termination reason
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
return: Termination Status
Definition at line 360 of file type_nlpi.h.
#define SCIP_DECL_NLPIGETSOLUTION |
( |
|
x | ) |
|
Value:struct SCIP_Nlpi SCIP_NLPI
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
enum SCIP_Retcode SCIP_RETCODE
gives primal and dual solution values
solver can return NULL in dual values if not available but if solver provides dual values for one side of variable bounds, then it must also provide those for the other side
for a ranged constraint, the dual variable is positive if the right hand side is active and negative if the left hand side is active
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- primalvalues buffer to store pointer to array to primal values, or NULL if not needed
- consdualvalues buffer to store pointer to array to dual values of constraints, or NULL if not needed
- varlbdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed
- varubdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed
Definition at line 377 of file type_nlpi.h.
gives solve statistics
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- statistics pointer to store statistics
output:
- statistics solve statistics
Definition at line 390 of file type_nlpi.h.
gives required size of a buffer to store a warmstart object
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- size pointer to store required size for warmstart buffer
output:
- size required size for warmstart buffer
Definition at line 402 of file type_nlpi.h.
stores warmstart information in buffer
required size of buffer should have been obtained by SCIPnlpiGetWarmstartSize before
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- buffer memory to store warmstart information
output:
- buffer warmstart information in solver specific data structure
Definition at line 416 of file type_nlpi.h.
sets warmstart information in solver
write warmstart to buffer
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
- buffer warmstart information
Definition at line 427 of file type_nlpi.h.
gets integer parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance
- type parameter number
- ival pointer to store the parameter value
output:
Definition at line 443 of file type_nlpi.h.
sets integer parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance
- type parameter number
- ival parameter value
Definition at line 453 of file type_nlpi.h.
gets floating point parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance, can be NULL only if type == SCIP_NLPPAR_INFINITY
- type parameter number
- dval pointer to store the parameter value
output:
Definition at line 466 of file type_nlpi.h.
sets floating point parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance, can be NULL only if type == SCIP_NLPPAR_INFINITY
- type parameter number
- dval parameter value
Definition at line 476 of file type_nlpi.h.
gets string parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance
- type parameter number
- sval pointer to store the string value, the user must not modify the string
output:
Definition at line 489 of file type_nlpi.h.
sets string parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance
- type parameter number
- sval parameter value
Definition at line 499 of file type_nlpi.h.
sets message handler for message output
input:
- nlpi NLP interface structure
- messagehdlr SCIP message handler, or NULL to suppress all output
Definition at line 507 of file type_nlpi.h.
locally defined NLP solver interface data
Definition at line 38 of file type_nlpi.h.
locally defined NLP solver interface data for a specific problem instance
Definition at line 39 of file type_nlpi.h.
NLP solver parameter
Enumerator |
---|
SCIP_NLPPAR_FROMSCRATCH |
solver should start from scratch at next call?: 0 no, 1 yes (int)
|
SCIP_NLPPAR_VERBLEVEL |
verbosity level of output of NLP solver to the screen: 0 off, 1 normal, 2 debug, > 2 more debug (int)
|
SCIP_NLPPAR_FEASTOL |
feasibility tolerance for primal variables and slacks (real)
|
SCIP_NLPPAR_RELOBJTOL |
relative objective tolerance (real)
|
SCIP_NLPPAR_LOBJLIM |
lower objective limit (cutoff) (real)
|
SCIP_NLPPAR_INFINITY |
value for infinity used to decide unbounded sides, unbounded variable and constraint bounds, and upper objective limit (real)
|
SCIP_NLPPAR_ITLIM |
NLP iteration limit (int)
|
SCIP_NLPPAR_TILIM |
NLP time limit (real)
|
SCIP_NLPPAR_OPTFILE |
name of a solver specific option file (string)
|
SCIP_NLPPAR_FASTFAIL |
should the NLP solver stop early if convergence is slow?: 0 no, 1 yes (int)
|
Definition at line 43 of file type_nlpi.h.
NLP solution status
Enumerator |
---|
SCIP_NLPSOLSTAT_GLOBOPT |
solved to global optimality
|
SCIP_NLPSOLSTAT_LOCOPT |
solved to local optimality
|
SCIP_NLPSOLSTAT_FEASIBLE |
feasible solution found
|
SCIP_NLPSOLSTAT_LOCINFEASIBLE |
solution found is local infeasible
|
SCIP_NLPSOLSTAT_GLOBINFEASIBLE |
problem is proven infeasible
|
SCIP_NLPSOLSTAT_UNBOUNDED |
problem is unbounded
|
SCIP_NLPSOLSTAT_UNKNOWN |
unknown solution status (e.g., problem not solved yet)
|
Definition at line 59 of file type_nlpi.h.
NLP solution status NLP solver termination status
Enumerator |
---|
SCIP_NLPTERMSTAT_OKAY |
terminated successfully
|
SCIP_NLPTERMSTAT_TILIM |
time limit exceeded
|
SCIP_NLPTERMSTAT_ITLIM |
iteration limit exceeded
|
SCIP_NLPTERMSTAT_LOBJLIM |
lower objective limit reached
|
SCIP_NLPTERMSTAT_UOBJLIM |
upper objective limit (= infinity) reached
|
SCIP_NLPTERMSTAT_NUMERR |
stopped on numerical error
|
SCIP_NLPTERMSTAT_EVALERR |
stopped on function evaluation error
|
SCIP_NLPTERMSTAT_MEMERR |
memory exceeded
|
SCIP_NLPTERMSTAT_LICERR |
licence error
|
SCIP_NLPTERMSTAT_OTHER |
other error (= this should never happen)
|
Definition at line 72 of file type_nlpi.h.
|