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 |
Macros | |
#define | SCIP_NLPPARAM_DEFAULT_VERBLEVEL 0 |
#define | SCIP_NLPPARAM_DEFAULT_INITS(scip) |
#define | SCIP_NLPPARAM_DEFAULT(scip) |
#define | SCIP_NLPPARAM_PRINT(param) |
#define | SCIP_DECL_NLPICOPY(x) |
#define | SCIP_DECL_NLPIFREE(x) |
#define | SCIP_DECL_NLPIGETSOLVERPOINTER(x) |
#define | SCIP_DECL_NLPICREATEPROBLEM(x) |
#define | SCIP_DECL_NLPIFREEPROBLEM(x) |
#define | SCIP_DECL_NLPIGETPROBLEMPOINTER(x) |
#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) |
#define | SCIP_DECL_NLPIDELCONSSET(x) |
#define | SCIP_DECL_NLPICHGLINEARCOEFS(x) |
#define | SCIP_DECL_NLPICHGEXPR(x) |
#define | SCIP_DECL_NLPICHGOBJCONSTANT(x) |
#define | SCIP_DECL_NLPISETINITIALGUESS(x) |
#define | SCIP_DECL_NLPISOLVE(x) |
#define | SCIP_DECL_NLPIGETSOLSTAT(x) |
#define | SCIP_DECL_NLPIGETTERMSTAT(x) |
#define | SCIP_DECL_NLPIGETSOLUTION(x) |
#define | SCIP_DECL_NLPIGETSTATISTICS(x) |
#define SCIP_NLPPARAM_DEFAULT_VERBLEVEL 0 |
default verbosity level in NLP parameters
Definition at line 87 of file type_nlpi.h.
#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.
#define SCIP_NLPPARAM_DEFAULT | ( | 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().
#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_NLPISOLVE(), and SCIP_DECL_NLPISOLVE().
#define SCIP_DECL_NLPICOPY | ( | x | ) |
copy method of NLP interface (called when SCIP copies plugins)
Implementation of this callback is optional.
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIFREE | ( | x | ) |
frees the data of the NLP interface
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#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.
[in] | scip | SCIP data structure |
[in] | nlpi | datastructure for solver interface |
[in] | problem | datastructure for problem instance, or NULL |
Definition at line 243 of file type_nlpi.h.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICREATEPROBLEM | ( | x | ) |
creates a problem instance
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIFREEPROBLEM | ( | x | ) |
free a problem instance
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIGETPROBLEMPOINTER | ( | x | ) |
gets pointer to solver-internal problem instance
Implementation of this callback is optional.
[in] | scip | SCIP data structure |
[in] | nlpi | datastructure for solver interface |
[in] | problem | datastructure for problem instance |
Definition at line 282 of file type_nlpi.h.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIADDVARS | ( | x | ) |
adds variables
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIADDCONSTRAINTS | ( | x | ) |
add constraints
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPISETOBJECTIVE | ( | x | ) |
sets or overwrites objective, a minimization problem is expected
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICHGVARBOUNDS | ( | x | ) |
change variable bounds
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICHGCONSSIDES | ( | x | ) |
change constraint sides
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIDELVARSET | ( | x | ) |
delete a set of variables
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIDELCONSSET | ( | x | ) |
delete a set of constraints
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICHGLINEARCOEFS | ( | x | ) |
changes (or adds) linear coefficients in a constraint or objective
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICHGEXPR | ( | x | ) |
replaces the expression of a constraint or objective
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPICHGOBJCONSTANT | ( | x | ) |
changes the constant offset in the objective
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPISETINITIALGUESS | ( | x | ) |
sets initial guess
Implementation of this callback is optional.
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPISOLVE | ( | x | ) |
tries to solve NLP
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIGETSOLSTAT | ( | x | ) |
gives solution status
[in] | scip | SCIP data structure |
[in] | nlpi | datastructure for solver interface |
[in] | problem | datastructure for problem instance |
Definition at line 511 of file type_nlpi.h.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIGETTERMSTAT | ( | x | ) |
gives termination reason
[in] | scip | SCIP data structure |
[in] | nlpi | datastructure for solver interface |
[in] | problem | datastructure for problem instance |
Definition at line 524 of file type_nlpi.h.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#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.
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
#define SCIP_DECL_NLPIGETSTATISTICS | ( | x | ) |
gives solve statistics
[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.
Referenced by SCIPincludeNlpi(), and SCIPnlpiCreate().
NLP solver interface
Definition at line 51 of file type_nlpi.h.
typedef struct SCIP_NlpiData SCIP_NLPIDATA |
locally defined NLP solver interface data
Definition at line 52 of file type_nlpi.h.
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.
typedef enum SCIP_NlpParam_FastFail SCIP_NLPPARAM_FASTFAIL |
NLP solver fast-fail levels
Definition at line 63 of file type_nlpi.h.
typedef struct SCIP_NlpParam SCIP_NLPPARAM |
parameters for NLP solve
Definition at line 81 of file type_nlpi.h.
typedef enum SCIP_NlpSolStat SCIP_NLPSOLSTAT |
NLP solution status
Definition at line 168 of file type_nlpi.h.
typedef enum SCIP_NlpTermStat SCIP_NLPTERMSTAT |
NLP solver termination status
Definition at line 194 of file type_nlpi.h.
typedef struct SCIP_NlpStatistics SCIP_NLPSTATISTICS |
NLP solve statistics
Definition at line 206 of file type_nlpi.h.
NLP solver fast-fail levels
Definition at line 56 of file type_nlpi.h.
enum SCIP_NlpSolStat |
NLP solution status
Definition at line 158 of file type_nlpi.h.
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.