Detailed Description
type definitions for NLP solver interfaces
Definition in file type_nlpi.h.
#include "scip/def.h"
#include "scip/type_scip.h"
#include "scip/type_expr.h"
#include "scip/type_nlp.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_NlpParam |
struct | SCIP_NlpStatistics |
Typedefs | |
typedef struct SCIP_Nlpi | SCIP_NLPI |
typedef struct SCIP_NlpiData | SCIP_NLPIDATA |
typedef struct SCIP_NlpiProblem | SCIP_NLPIPROBLEM |
typedef enum SCIP_NlpParam_FastFail | SCIP_NLPPARAM_FASTFAIL |
typedef struct SCIP_NlpParam | SCIP_NLPPARAM |
typedef enum SCIP_NlpSolStat | SCIP_NLPSOLSTAT |
typedef enum SCIP_NlpTermStat | SCIP_NLPTERMSTAT |
typedef struct SCIP_NlpStatistics | SCIP_NLPSTATISTICS |
Enumerations | |
enum | SCIP_NlpParam_FastFail { SCIP_NLPPARAM_FASTFAIL_OFF = 0, SCIP_NLPPARAM_FASTFAIL_CONSERVATIVE = 1, SCIP_NLPPARAM_FASTFAIL_AGGRESSIVE = 2 } |
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_TIMELIMIT = 1, SCIP_NLPTERMSTAT_ITERLIMIT = 2, SCIP_NLPTERMSTAT_LOBJLIMIT = 3, SCIP_NLPTERMSTAT_INTERRUPT = 4, SCIP_NLPTERMSTAT_NUMERICERROR = 5, SCIP_NLPTERMSTAT_EVALERROR = 6, SCIP_NLPTERMSTAT_OUTOFMEMORY = 7, SCIP_NLPTERMSTAT_LICENSEERROR = 8, SCIP_NLPTERMSTAT_OTHER = 9 } |
Macro Definition Documentation
◆ SCIP_NLPPARAM_DEFAULT_VERBLEVEL
#define SCIP_NLPPARAM_DEFAULT_VERBLEVEL 0 |
default verbosity level in NLP parameters
Definition at line 87 of file type_nlpi.h.
◆ SCIP_NLPPARAM_DEFAULT_INITS
#define SCIP_NLPPARAM_DEFAULT_INITS | ( | scip | ) |
default values for parameters
Typical use for this define is the initialization of a SCIP_NLPPARAM struct, e.g.,
SCIP_NLPPARAM nlpparam = { SCIP_NLPPARAM_DEFAULT(scip); } //lint !e446
or
SCIP_NLPPARAM nlpparam; nlpparam = (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip); } //lint !e446
Definition at line 102 of file type_nlpi.h.
◆ SCIP_NLPPARAM_DEFAULT
#define SCIP_NLPPARAM_DEFAULT | ( | scip | ) | (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT_INITS(scip) } |
default values for parameters
Typical use for this define is the initialization of a SCIP_NLPPARAM struct, e.g.,
SCIP_NLPPARAM nlpparam = SCIP_NLPPARAM_DEFAULT(scip); //lint !e446
or
SCIP_NLPPARAM nlpparam; nlpparam = SCIP_NLPPARAM_DEFAULT(scip); //lint !e446
Definition at line 126 of file type_nlpi.h.
Referenced by applyNlobbt(), doBendersCreate(), heurExec(), and SCIP_DECL_RELAXEXEC().
◆ SCIP_NLPPARAM_PRINT
#define SCIP_NLPPARAM_PRINT | ( | param | ) |
macro to help printing values of SCIP_NLPPARAM struct
Typical use for this define is something like
SCIPdebugMsg(scip, "calling NLP solver with parameters " SCIP_NLPPARAM_PRINT(param));
Definition at line 142 of file type_nlpi.h.
Referenced by SCIP_DECL_NLPISOLVE().
◆ SCIP_DECL_NLPICOPY
#define SCIP_DECL_NLPICOPY | ( | x | ) |
copy method of NLP interface (called when SCIP copies plugins)
Implementation of this callback is optional.
- Parameters
-
[in] scip target SCIP where to include copy of NLPI [in] sourcenlpi the NLP interface to copy
Definition at line 215 of file type_nlpi.h.
◆ SCIP_DECL_NLPIFREE
#define SCIP_DECL_NLPIFREE | ( | x | ) |
frees the data of the NLP interface
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] nlpidata NLPI data to free
Definition at line 225 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETSOLVERPOINTER
#define SCIP_DECL_NLPIGETSOLVERPOINTER | ( | x | ) |
gets pointer to solver-internal NLP solver
Implementation of this callback is optional.
Depending on the solver interface, a solver pointer may exist for every NLP problem instance. For this case, a nlpiproblem can be passed in as well.
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance, or NULL
- Returns
- void pointer to solver
Definition at line 243 of file type_nlpi.h.
◆ SCIP_DECL_NLPICREATEPROBLEM
#define SCIP_DECL_NLPICREATEPROBLEM | ( | x | ) |
creates a problem instance
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [out] problem pointer to store the problem data [in] name name of problem, can be NULL
Definition at line 255 of file type_nlpi.h.
◆ SCIP_DECL_NLPIFREEPROBLEM
#define SCIP_DECL_NLPIFREEPROBLEM | ( | x | ) |
free a problem instance
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem pointer where problem data is stored
Definition at line 267 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETPROBLEMPOINTER
#define SCIP_DECL_NLPIGETPROBLEMPOINTER | ( | x | ) |
gets pointer to solver-internal problem instance
Implementation of this callback is optional.
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance
- Returns
- void pointer to problem instance
Definition at line 282 of file type_nlpi.h.
◆ SCIP_DECL_NLPIADDVARS
#define SCIP_DECL_NLPIADDVARS | ( | x | ) |
adds variables
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] nvars number of variables [in] lbs lower bounds of variables, can be NULL if -infinity [in] ubs upper bounds of variables, can be NULL if +infinity [in] varnames names of variables, can be NULL
Definition at line 297 of file type_nlpi.h.
◆ SCIP_DECL_NLPIADDCONSTRAINTS
#define SCIP_DECL_NLPIADDCONSTRAINTS | ( | x | ) |
add constraints
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] ncons number of added constraints [in] lhss left hand sides of constraints, can be NULL if -infinity [in] rhss right hand sides of constraints, can be NULL if +infinity [in] nlininds number of linear coefficients for each constraint; may be NULL in case of no linear part [in] lininds indices of variables for linear coefficients for each constraint; may be NULL in case of no linear part [in] linvals values of linear coefficient for each constraint; may be NULL in case of no linear part [in] exprs expressions for nonlinear part of constraints; may be NULL or entries may be NULL when no nonlinear parts [in] names names of constraints; may be NULL or entries may be NULL
Definition at line 320 of file type_nlpi.h.
◆ SCIP_DECL_NLPISETOBJECTIVE
#define SCIP_DECL_NLPISETOBJECTIVE | ( | x | ) |
sets or overwrites objective, a minimization problem is expected
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] nlins number of linear variables [in] lininds variable indices; may be NULL in case of no linear part [in] linvals coefficient values; may be NULL in case of no linear part [in] expr expression for nonlinear part of objective function; may be NULL in case of no nonlinear part [in] constant objective value offset
Definition at line 344 of file type_nlpi.h.
◆ SCIP_DECL_NLPICHGVARBOUNDS
#define SCIP_DECL_NLPICHGVARBOUNDS | ( | x | ) |
change variable bounds
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] nvars number of variables to change bounds [in] indices indices of variables to change bounds [in] lbs new lower bounds [in] ubs new upper bounds
Definition at line 364 of file type_nlpi.h.
◆ SCIP_DECL_NLPICHGCONSSIDES
#define SCIP_DECL_NLPICHGCONSSIDES | ( | x | ) |
change constraint sides
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] nconss number of constraints to change sides [in] indices indices of constraints to change sides [in] lhss new left hand sides [in] rhss new right hand sides
Definition at line 383 of file type_nlpi.h.
◆ SCIP_DECL_NLPIDELVARSET
#define SCIP_DECL_NLPIDELVARSET | ( | x | ) |
delete a set of variables
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in,out] dstats deletion status of vars on input (1 if var should be deleted, 0 if not); new position of var on output, -1 if var was deleted [in] dstatssize size of the dstats array
Definition at line 400 of file type_nlpi.h.
◆ SCIP_DECL_NLPIDELCONSSET
#define SCIP_DECL_NLPIDELCONSSET | ( | x | ) |
delete a set of constraints
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in,out] dstats deletion status of constraints on input (1 if constraint should be deleted, 0 if not); new position of constraint on output, -1 if constraint was deleted [in] dstatssize size of the dstats array
Definition at line 415 of file type_nlpi.h.
◆ SCIP_DECL_NLPICHGLINEARCOEFS
#define SCIP_DECL_NLPICHGLINEARCOEFS | ( | x | ) |
changes (or adds) linear coefficients in a constraint or objective
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] idx index of constraint or -1 for objective [in] nvals number of values in linear constraint to change [in] varidxs indices of variables which coefficient to change [in] vals new values for coefficients
Definition at line 432 of file type_nlpi.h.
◆ SCIP_DECL_NLPICHGEXPR
#define SCIP_DECL_NLPICHGEXPR | ( | x | ) |
replaces the expression of a constraint or objective
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] idxcons index of constraint or -1 for objective [in] expr new expression for constraint or objective, or NULL to only remove previous tree
Definition at line 449 of file type_nlpi.h.
◆ SCIP_DECL_NLPICHGOBJCONSTANT
#define SCIP_DECL_NLPICHGOBJCONSTANT | ( | x | ) |
changes the constant offset in the objective
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] objconstant new value for objective constant
Definition at line 463 of file type_nlpi.h.
◆ SCIP_DECL_NLPISETINITIALGUESS
#define SCIP_DECL_NLPISETINITIALGUESS | ( | x | ) |
sets initial guess
Implementation of this callback is optional.
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] primalvalues initial primal values for variables, or NULL to clear previous values [in] consdualvalues initial dual values for constraints, or NULL to clear previous values [in] varlbdualvalues initial dual values for variable lower bounds, or NULL to clear previous values [in] varubdualvalues initial dual values for variable upper bounds, or NULL to clear previous values
Definition at line 481 of file type_nlpi.h.
◆ SCIP_DECL_NLPISOLVE
#define SCIP_DECL_NLPISOLVE | ( | x | ) |
tries to solve NLP
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [in] param parameters (e.g., working limits) to use
Definition at line 497 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETSOLSTAT
#define SCIP_DECL_NLPIGETSOLSTAT | ( | x | ) |
gives solution status
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance
- Returns
- Solution Status
Definition at line 511 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETTERMSTAT
#define SCIP_DECL_NLPIGETTERMSTAT | ( | x | ) |
gives termination reason
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance
- Returns
- Termination Status
Definition at line 524 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETSOLUTION
#define SCIP_DECL_NLPIGETSOLUTION | ( | x | ) |
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.
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [out] primalvalues buffer to store pointer to array to primal values, or NULL if not needed [out] consdualvalues buffer to store pointer to array to dual values of constraints, or NULL if not needed [out] varlbdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed [out] varubdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed [out] objval pointer to store the objective value, or NULL if not needed
Definition at line 545 of file type_nlpi.h.
◆ SCIP_DECL_NLPIGETSTATISTICS
#define SCIP_DECL_NLPIGETSTATISTICS | ( | x | ) |
gives solve statistics
- Parameters
-
[in] scip SCIP data structure [in] nlpi datastructure for solver interface [in] problem datastructure for problem instance [out] statistics buffer where to store statistics
Definition at line 562 of file type_nlpi.h.
Typedef Documentation
◆ SCIP_NLPI
NLP solver interface
Definition at line 51 of file type_nlpi.h.
◆ SCIP_NLPIDATA
typedef struct SCIP_NlpiData SCIP_NLPIDATA |
locally defined NLP solver interface data
Definition at line 52 of file type_nlpi.h.
◆ SCIP_NLPIPROBLEM
typedef struct SCIP_NlpiProblem SCIP_NLPIPROBLEM |
locally defined NLP solver interface data for a specific problem instance
Definition at line 53 of file type_nlpi.h.
◆ SCIP_NLPPARAM_FASTFAIL
typedef enum SCIP_NlpParam_FastFail SCIP_NLPPARAM_FASTFAIL |
NLP solver fast-fail levels
Definition at line 63 of file type_nlpi.h.
◆ SCIP_NLPPARAM
typedef struct SCIP_NlpParam SCIP_NLPPARAM |
parameters for NLP solve
Definition at line 81 of file type_nlpi.h.
◆ SCIP_NLPSOLSTAT
typedef enum SCIP_NlpSolStat SCIP_NLPSOLSTAT |
NLP solution status
Definition at line 168 of file type_nlpi.h.
◆ SCIP_NLPTERMSTAT
typedef enum SCIP_NlpTermStat SCIP_NLPTERMSTAT |
NLP solver termination status
Definition at line 194 of file type_nlpi.h.
◆ SCIP_NLPSTATISTICS
typedef struct SCIP_NlpStatistics SCIP_NLPSTATISTICS |
NLP solve statistics
Definition at line 206 of file type_nlpi.h.
Enumeration Type Documentation
◆ SCIP_NlpParam_FastFail
NLP solver fast-fail levels
Definition at line 56 of file type_nlpi.h.
◆ SCIP_NlpSolStat
enum SCIP_NlpSolStat |
NLP solution status
Definition at line 158 of file type_nlpi.h.
◆ SCIP_NlpTermStat
enum SCIP_NlpTermStat |
NLP solver termination status
Enumerator | |
---|---|
SCIP_NLPTERMSTAT_OKAY | terminated successfully |
SCIP_NLPTERMSTAT_TIMELIMIT | time limit exceeded |
SCIP_NLPTERMSTAT_ITERLIMIT | iteration limit exceeded |
SCIP_NLPTERMSTAT_LOBJLIMIT | lower objective limit reached |
SCIP_NLPTERMSTAT_INTERRUPT | SCIP has been asked to stop (SCIPinterruptSolve() called) |
SCIP_NLPTERMSTAT_NUMERICERROR | stopped on numerical error |
SCIP_NLPTERMSTAT_EVALERROR | stopped on function evaluation error |
SCIP_NLPTERMSTAT_OUTOFMEMORY | memory exceeded |
SCIP_NLPTERMSTAT_LICENSEERROR | problems with license of NLP solver |
SCIP_NLPTERMSTAT_OTHER | other error (= this should never happen) |
Definition at line 171 of file type_nlpi.h.