Scippy

    SCIP

    Solving Constraint Integer Programs

    type_nlpi.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file type_nlpi.h
    26 * @ingroup TYPEDEFINITIONS
    27 * @brief type definitions for NLP solver interfaces
    28 * @author Stefan Vigerske
    29 * @author Thorsten Gellermann
    30 */
    31
    32/** @defgroup DEFPLUGINS_NLPI Default NLP solver interfaces
    33 * @ingroup DEFPLUGINS
    34 * @brief implementation files (.c/.cpp files) of the default NLP solver interfaces of SCIP
    35 */
    36
    37/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    38
    39#ifndef __SCIP_TYPE_NLPI_H__
    40#define __SCIP_TYPE_NLPI_H__
    41
    42#include "scip/def.h"
    43#include "scip/type_scip.h"
    44#include "scip/type_expr.h"
    45#include "scip/type_nlp.h"
    46
    47#ifdef __cplusplus
    48extern "C" {
    49#endif
    50
    51typedef struct SCIP_Nlpi SCIP_NLPI; /**< NLP solver interface */
    52typedef struct SCIP_NlpiData SCIP_NLPIDATA; /**< locally defined NLP solver interface data */
    53typedef struct SCIP_NlpiProblem SCIP_NLPIPROBLEM; /**< locally defined NLP solver interface data for a specific problem instance */
    54
    55/** NLP solver fast-fail levels */
    57{
    58 SCIP_NLPPARAM_FASTFAIL_OFF = 0, /**< never stop if progress is still possible */
    59 SCIP_NLPPARAM_FASTFAIL_CONSERVATIVE = 1, /**< stop if it seems unlikely that an improving point can be found */
    60 SCIP_NLPPARAM_FASTFAIL_AGGRESSIVE = 2 /**< stop if convergence rate is low */
    61};
    62/** NLP solver fast-fail levels */
    64
    65/** parameters for NLP solve */
    67{
    68 SCIP_Real lobjlimit; /**< lower objective limit (cutoff) */
    69 SCIP_Real feastol; /**< feasibility tolerance (maximal allowed absolute violation of constraints and variable bounds) */
    70 SCIP_Real opttol; /**< optimality tolerance (maximal allowed absolute violation of optimality conditions) */
    71 SCIP_Real solvertol; /**< solver-specific tolerance on accuracy, e.g., maximal violation of feasibility and optimality in scaled problem (0.0: use solver default) */
    72 SCIP_Real timelimit; /**< time limit in seconds: use SCIP_REAL_MAX to use remaining time available for SCIP solve (limits/time - currenttime) */
    73 int iterlimit; /**< iteration limit */
    74 unsigned short verblevel; /**< verbosity level of output of NLP solver to the screen: 0 off, 1 normal, 2 debug, > 2 more debug */
    75 SCIP_NLPPARAM_FASTFAIL fastfail; /**< whether the NLP solver should stop early if convergence is slow */
    76 SCIP_Bool expectinfeas; /**< whether to expect an infeasible problem */
    77 SCIP_Bool warmstart; /**< whether to try to use solution of previous solve as starting point (if available) */
    78 const char* caller; /**< name of file from which NLP is solved (it's fine to set this to NULL) */
    79};
    80/** parameters for NLP solve */
    82
    83/** default verbosity level in NLP parameters */
    84#if defined(SCIP_DEBUG) || defined(SCIP_MOREDEBUG) || defined(SCIP_EVENMOREDEBUG)
    85#define SCIP_NLPPARAM_DEFAULT_VERBLEVEL 1
    86#else
    87#define SCIP_NLPPARAM_DEFAULT_VERBLEVEL 0
    88#endif
    89
    90#if !defined(_MSC_VER) || _MSC_VER >= 1800
    91/** default values for parameters
    92 *
    93 * Typical use for this define is the initialization of a SCIP_NLPPARAM struct, e.g.,
    94 *
    95 * SCIP_NLPPARAM nlpparam = { SCIP_NLPPARAM_DEFAULT(scip); } //lint !e446
    96 *
    97 * or
    98 *
    99 * SCIP_NLPPARAM nlpparam;
    100 * nlpparam = (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip); } //lint !e446
    101 */
    102#define SCIP_NLPPARAM_DEFAULT_INITS(scip) \
    103 .lobjlimit = SCIP_REAL_MIN, \
    104 .feastol = SCIPfeastol(scip), \
    105 .opttol = SCIPdualfeastol(scip), \
    106 .solvertol = 0.0, \
    107 .timelimit = SCIP_REAL_MAX, \
    108 .iterlimit = INT_MAX, \
    109 .verblevel = SCIP_NLPPARAM_DEFAULT_VERBLEVEL, \
    110 .fastfail = SCIP_NLPPARAM_FASTFAIL_CONSERVATIVE, \
    111 .expectinfeas= FALSE, \
    112 .warmstart = FALSE, \
    113 .caller = __FILE__
    114
    115/** default values for parameters
    116 *
    117 * Typical use for this define is the initialization of a SCIP_NLPPARAM struct, e.g.,
    118 *
    119 * SCIP_NLPPARAM nlpparam = SCIP_NLPPARAM_DEFAULT(scip); //lint !e446
    120 *
    121 * or
    122 *
    123 * SCIP_NLPPARAM nlpparam;
    124 * nlpparam = SCIP_NLPPARAM_DEFAULT(scip); //lint !e446
    125 */
    126#define SCIP_NLPPARAM_DEFAULT(scip) (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT_INITS(scip) }
    127
    128#else
    129/** default NLP parameters with static initialization; required for SCIPsolveNlpi macro with ancient MSVC */
    130static const SCIP_NLPPARAM SCIP_NLPPARAM_DEFAULT_STATIC = {
    132};
    133#define SCIP_NLPPARAM_DEFAULT(scip) SCIP_NLPPARAM_DEFAULT_STATIC
    134#endif
    135
    136/** macro to help printing values of SCIP_NLPPARAM struct
    137 *
    138 * Typical use for this define is something like
    139 *
    140 * SCIPdebugMsg(scip, "calling NLP solver with parameters " SCIP_NLPPARAM_PRINT(param));
    141 */
    142#define SCIP_NLPPARAM_PRINT(param) \
    143 "lobjlimit = %g, " \
    144 "feastol = %g, " \
    145 "opttol = %g, " \
    146 "solvertol = %g, " \
    147 "timelimit = %g, " \
    148 "iterlimit = %d, " \
    149 "verblevel = %hd, " \
    150 "fastfail = %d, " \
    151 "expectinfeas = %d, " \
    152 "warmstart = %d, " \
    153 "called by %s\n", \
    154 (param).lobjlimit, (param).feastol, (param).opttol, (param).solvertol, (param).timelimit, (param).iterlimit, \
    155 (param).verblevel, (param).fastfail, (param).expectinfeas, (param).warmstart, (param).caller != NULL ? (param).caller : "unknown"
    156
    157/** NLP solution status */
    159{
    160 SCIP_NLPSOLSTAT_GLOBOPT = 0, /**< solved to global optimality */
    161 SCIP_NLPSOLSTAT_LOCOPT = 1, /**< solved to local optimality */
    162 SCIP_NLPSOLSTAT_FEASIBLE = 2, /**< feasible solution found */
    163 SCIP_NLPSOLSTAT_LOCINFEASIBLE = 3, /**< solution found is local infeasible */
    164 SCIP_NLPSOLSTAT_GLOBINFEASIBLE = 4, /**< problem is proven infeasible */
    165 SCIP_NLPSOLSTAT_UNBOUNDED = 5, /**< problem is unbounded */
    166 SCIP_NLPSOLSTAT_UNKNOWN = 6 /**< unknown solution status (e.g., problem not solved yet) */
    168typedef enum SCIP_NlpSolStat SCIP_NLPSOLSTAT; /**< NLP solution status */
    169
    170/** NLP solver termination status */
    172{
    173 SCIP_NLPTERMSTAT_OKAY = 0, /**< terminated successfully */
    174 SCIP_NLPTERMSTAT_TIMELIMIT = 1, /**< time limit exceeded */
    175 SCIP_NLPTERMSTAT_ITERLIMIT = 2, /**< iteration limit exceeded */
    176 SCIP_NLPTERMSTAT_LOBJLIMIT = 3, /**< lower objective limit reached */
    177 SCIP_NLPTERMSTAT_INTERRUPT = 4, /**< SCIP has been asked to stop (SCIPinterruptSolve() called) */
    178 SCIP_NLPTERMSTAT_NUMERICERROR = 5, /**< stopped on numerical error */
    179 SCIP_NLPTERMSTAT_EVALERROR = 6, /**< stopped on function evaluation error */
    180 SCIP_NLPTERMSTAT_OUTOFMEMORY = 7, /**< memory exceeded */
    181 SCIP_NLPTERMSTAT_LICENSEERROR = 8, /**< problems with license of NLP solver */
    182 SCIP_NLPTERMSTAT_OTHER = 9 /**< other error (= this should never happen) */
    184typedef enum SCIP_NlpTermStat SCIP_NLPTERMSTAT; /**< NLP solver termination status */
    185
    186/** Statistics from an NLP solve */
    188{
    189 int niterations; /**< number of iterations the NLP solver spend in the last solve command */
    190 SCIP_Real totaltime; /**< total time in CPU sections the NLP solver spend in the last solve command */
    191 SCIP_Real evaltime; /**< time spend in evaluation of functions and their derivatives (only measured if timing/nlpieval = TRUE) */
    192
    193 SCIP_Real consviol; /**< maximal absolute constraint violation in current solution, or SCIP_INVALID if not available */
    194 SCIP_Real boundviol; /**< maximal absolute variable bound violation in current solution, or SCIP_INVALID if not available */
    195};
    196typedef struct SCIP_NlpStatistics SCIP_NLPSTATISTICS; /**< NLP solve statistics */
    197
    198/** copy method of NLP interface (called when SCIP copies plugins)
    199 *
    200 * Implementation of this callback is optional.
    201 *
    202 * \param[in] scip target SCIP where to include copy of NLPI
    203 * \param[in] sourcenlpi the NLP interface to copy
    204 */
    205#define SCIP_DECL_NLPICOPY(x) SCIP_RETCODE x (\
    206 SCIP* scip, \
    207 SCIP_NLPI* sourcenlpi)
    208
    209/** frees the data of the NLP interface
    210 *
    211 * \param[in] scip SCIP data structure
    212 * \param[in] nlpi datastructure for solver interface
    213 * \param[in] nlpidata NLPI data to free
    214 */
    215#define SCIP_DECL_NLPIFREE(x) SCIP_RETCODE x (\
    216 SCIP* scip, \
    217 SCIP_NLPI* nlpi, \
    218 SCIP_NLPIDATA** nlpidata)
    219
    220/** gets pointer to solver-internal NLP solver
    221 *
    222 * Implementation of this callback is optional.
    223 *
    224 * Depending on the solver interface, a solver pointer may exist for every NLP problem instance.
    225 * For this case, a nlpiproblem can be passed in as well.
    226 *
    227 * \param[in] scip SCIP data structure
    228 * \param[in] nlpi datastructure for solver interface
    229 * \param[in] problem datastructure for problem instance, or NULL
    230 *
    231 * \return void pointer to solver
    232 */
    233#define SCIP_DECL_NLPIGETSOLVERPOINTER(x) void* x (\
    234 SCIP* scip, \
    235 SCIP_NLPI* nlpi, \
    236 SCIP_NLPIPROBLEM* problem)
    237
    238/** creates a problem instance
    239 *
    240 * \param[in] scip SCIP data structure
    241 * \param[in] nlpi datastructure for solver interface
    242 * \param[out] problem pointer to store the problem data
    243 * \param[in] name name of problem, can be NULL
    244 */
    245#define SCIP_DECL_NLPICREATEPROBLEM(x) SCIP_RETCODE x (\
    246 SCIP* scip, \
    247 SCIP_NLPI* nlpi, \
    248 SCIP_NLPIPROBLEM** problem, \
    249 const char* name)
    250
    251/** free a problem instance
    252 *
    253 * \param[in] scip SCIP data structure
    254 * \param[in] nlpi datastructure for solver interface
    255 * \param[in] problem pointer where problem data is stored
    256 */
    257#define SCIP_DECL_NLPIFREEPROBLEM(x) SCIP_RETCODE x (\
    258 SCIP* scip, \
    259 SCIP_NLPI* nlpi, \
    260 SCIP_NLPIPROBLEM** problem)
    261
    262/** gets pointer to solver-internal problem instance
    263 *
    264 * Implementation of this callback is optional.
    265 *
    266 * \param[in] scip SCIP data structure
    267 * \param[in] nlpi datastructure for solver interface
    268 * \param[in] problem datastructure for problem instance
    269 *
    270 * \return void pointer to problem instance
    271 */
    272#define SCIP_DECL_NLPIGETPROBLEMPOINTER(x) void* x (\
    273 SCIP* scip, \
    274 SCIP_NLPI* nlpi, \
    275 SCIP_NLPIPROBLEM* problem)
    276
    277/** adds variables
    278 *
    279 * \param[in] scip SCIP data structure
    280 * \param[in] nlpi datastructure for solver interface
    281 * \param[in] problem datastructure for problem instance
    282 * \param[in] nvars number of variables
    283 * \param[in] lbs lower bounds of variables, can be NULL if -infinity
    284 * \param[in] ubs upper bounds of variables, can be NULL if +infinity
    285 * \param[in] varnames names of variables, can be NULL
    286 */
    287#define SCIP_DECL_NLPIADDVARS(x) SCIP_RETCODE x (\
    288 SCIP* scip, \
    289 SCIP_NLPI* nlpi, \
    290 SCIP_NLPIPROBLEM* problem, \
    291 int nvars, \
    292 const SCIP_Real* lbs, \
    293 const SCIP_Real* ubs, \
    294 const char** varnames)
    295
    296/** add constraints
    297 *
    298 * \param[in] scip SCIP data structure
    299 * \param[in] nlpi datastructure for solver interface
    300 * \param[in] problem datastructure for problem instance
    301 * \param[in] ncons number of added constraints
    302 * \param[in] lhss left hand sides of constraints, can be NULL if -infinity
    303 * \param[in] rhss right hand sides of constraints, can be NULL if +infinity
    304 * \param[in] nlininds number of linear coefficients for each constraint; may be NULL in case of no linear part
    305 * \param[in] lininds indices of variables for linear coefficients for each constraint; may be NULL in case of no linear part
    306 * \param[in] linvals values of linear coefficient for each constraint; may be NULL in case of no linear part
    307 * \param[in] exprs expressions for nonlinear part of constraints; may be NULL or entries may be NULL when no nonlinear parts
    308 * \param[in] names names of constraints; may be NULL or entries may be NULL
    309 */
    310#define SCIP_DECL_NLPIADDCONSTRAINTS(x) SCIP_RETCODE x (\
    311 SCIP* scip, \
    312 SCIP_NLPI* nlpi, \
    313 SCIP_NLPIPROBLEM* problem, \
    314 int nconss, \
    315 const SCIP_Real* lhss, \
    316 const SCIP_Real* rhss, \
    317 const int* nlininds, \
    318 int* const* lininds, \
    319 SCIP_Real* const* linvals, \
    320 SCIP_EXPR** exprs, \
    321 const char** names)
    322
    323/** sets or overwrites objective, a minimization problem is expected
    324 *
    325 * \param[in] scip SCIP data structure
    326 * \param[in] nlpi datastructure for solver interface
    327 * \param[in] problem datastructure for problem instance
    328 * \param[in] nlins number of linear variables
    329 * \param[in] lininds variable indices; may be NULL in case of no linear part
    330 * \param[in] linvals coefficient values; may be NULL in case of no linear part
    331 * \param[in] expr expression for nonlinear part of objective function; may be NULL in case of no nonlinear part
    332 * \param[in] constant objective value offset
    333 */
    334#define SCIP_DECL_NLPISETOBJECTIVE(x) SCIP_RETCODE x (\
    335 SCIP* scip, \
    336 SCIP_NLPI* nlpi, \
    337 SCIP_NLPIPROBLEM* problem, \
    338 int nlins, \
    339 const int* lininds, \
    340 const SCIP_Real* linvals, \
    341 SCIP_EXPR* expr, \
    342 const SCIP_Real constant)
    343
    344/** change variable bounds
    345 *
    346 * \param[in] scip SCIP data structure
    347 * \param[in] nlpi datastructure for solver interface
    348 * \param[in] problem datastructure for problem instance
    349 * \param[in] nvars number of variables to change bounds
    350 * \param[in] indices indices of variables to change bounds
    351 * \param[in] lbs new lower bounds
    352 * \param[in] ubs new upper bounds
    353 */
    354#define SCIP_DECL_NLPICHGVARBOUNDS(x) SCIP_RETCODE x (\
    355 SCIP* scip, \
    356 SCIP_NLPI* nlpi, \
    357 SCIP_NLPIPROBLEM* problem, \
    358 const int nvars, \
    359 const int* indices, \
    360 const SCIP_Real* lbs, \
    361 const SCIP_Real* ubs)
    362
    363/** change constraint sides
    364 *
    365 * \param[in] scip SCIP data structure
    366 * \param[in] nlpi datastructure for solver interface
    367 * \param[in] problem datastructure for problem instance
    368 * \param[in] nconss number of constraints to change sides
    369 * \param[in] indices indices of constraints to change sides
    370 * \param[in] lhss new left hand sides (NULL means minus infinity)
    371 * \param[in] rhss new right hand sides (NULL means infinity)
    372 */
    373#define SCIP_DECL_NLPICHGCONSSIDES(x) SCIP_RETCODE x (\
    374 SCIP* scip, \
    375 SCIP_NLPI* nlpi, \
    376 SCIP_NLPIPROBLEM* problem, \
    377 int nconss, \
    378 const int* indices, \
    379 const SCIP_Real* lhss, \
    380 const SCIP_Real* rhss)
    381
    382/** delete a set of variables
    383 *
    384 * \param[in] scip SCIP data structure
    385 * \param[in] nlpi datastructure for solver interface
    386 * \param[in] problem datastructure for problem instance
    387 * \param[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
    388 * \param[in] dstatssize size of the dstats array
    389 */
    390#define SCIP_DECL_NLPIDELVARSET(x) SCIP_RETCODE x (\
    391 SCIP* scip, \
    392 SCIP_NLPI* nlpi, \
    393 SCIP_NLPIPROBLEM* problem, \
    394 int* dstats, \
    395 int dstatssize)
    396
    397/** delete a set of constraints
    398 *
    399 * \param[in] scip SCIP data structure
    400 * \param[in] nlpi datastructure for solver interface
    401 * \param[in] problem datastructure for problem instance
    402 * \param[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
    403 * \param[in] dstatssize size of the dstats array
    404 */
    405#define SCIP_DECL_NLPIDELCONSSET(x) SCIP_RETCODE x (\
    406 SCIP* scip, \
    407 SCIP_NLPI* nlpi, \
    408 SCIP_NLPIPROBLEM* problem, \
    409 int* dstats, \
    410 int dstatssize)
    411
    412/** changes (or adds) linear coefficients in a constraint or objective
    413 *
    414 * \param[in] scip SCIP data structure
    415 * \param[in] nlpi datastructure for solver interface
    416 * \param[in] problem datastructure for problem instance
    417 * \param[in] idx index of constraint or -1 for objective
    418 * \param[in] nvals number of values in linear constraint to change
    419 * \param[in] varidxs indices of variables which coefficient to change
    420 * \param[in] vals new values for coefficients
    421 */
    422#define SCIP_DECL_NLPICHGLINEARCOEFS(x) SCIP_RETCODE x (\
    423 SCIP* scip, \
    424 SCIP_NLPI* nlpi, \
    425 SCIP_NLPIPROBLEM* problem, \
    426 int idx, \
    427 int nvals, \
    428 const int* varidxs, \
    429 const SCIP_Real* vals)
    430
    431/** replaces the expression of a constraint or objective
    432 *
    433 * \param[in] scip SCIP data structure
    434 * \param[in] nlpi datastructure for solver interface
    435 * \param[in] problem datastructure for problem instance
    436 * \param[in] idxcons index of constraint or -1 for objective
    437 * \param[in] expr new expression for constraint or objective, or NULL to only remove previous tree
    438 */
    439#define SCIP_DECL_NLPICHGEXPR(x) SCIP_RETCODE x (\
    440 SCIP* scip, \
    441 SCIP_NLPI* nlpi, \
    442 SCIP_NLPIPROBLEM* problem, \
    443 int idxcons, \
    444 SCIP_EXPR* expr)
    445
    446/** changes the constant offset in the objective
    447 *
    448 * \param[in] scip SCIP data structure
    449 * \param[in] nlpi datastructure for solver interface
    450 * \param[in] problem datastructure for problem instance
    451 * \param[in] objconstant new value for objective constant
    452 */
    453#define SCIP_DECL_NLPICHGOBJCONSTANT(x) SCIP_RETCODE x (\
    454 SCIP* scip, \
    455 SCIP_NLPI* nlpi, \
    456 SCIP_NLPIPROBLEM* problem, \
    457 SCIP_Real objconstant)
    458
    459/** sets initial guess
    460 *
    461 * Implementation of this callback is optional.
    462 *
    463 * \param[in] scip SCIP data structure
    464 * \param[in] nlpi datastructure for solver interface
    465 * \param[in] problem datastructure for problem instance
    466 * \param[in] primalvalues initial primal values for variables, or NULL to clear previous values
    467 * \param[in] consdualvalues initial dual values for constraints, or NULL to clear previous values
    468 * \param[in] varlbdualvalues initial dual values for variable lower bounds, or NULL to clear previous values
    469 * \param[in] varubdualvalues initial dual values for variable upper bounds, or NULL to clear previous values
    470 */
    471#define SCIP_DECL_NLPISETINITIALGUESS(x) SCIP_RETCODE x (\
    472 SCIP* scip, \
    473 SCIP_NLPI* nlpi, \
    474 SCIP_NLPIPROBLEM* problem, \
    475 SCIP_Real* primalvalues, \
    476 SCIP_Real* consdualvalues, \
    477 SCIP_Real* varlbdualvalues, \
    478 SCIP_Real* varubdualvalues)
    479
    480/** tries to solve NLP
    481 *
    482 * \param[in] scip SCIP data structure
    483 * \param[in] nlpi datastructure for solver interface
    484 * \param[in] problem datastructure for problem instance
    485 * \param[in] param parameters (e.g., working limits) to use
    486 */
    487#define SCIP_DECL_NLPISOLVE(x) SCIP_RETCODE x (\
    488 SCIP* scip, \
    489 SCIP_NLPI* nlpi, \
    490 SCIP_NLPIPROBLEM* problem, \
    491 SCIP_NLPPARAM param)
    492
    493/** gives solution status
    494 *
    495 * \param[in] scip SCIP data structure
    496 * \param[in] nlpi datastructure for solver interface
    497 * \param[in] problem datastructure for problem instance
    498 *
    499 * \return Solution Status
    500 */
    501#define SCIP_DECL_NLPIGETSOLSTAT(x) SCIP_NLPSOLSTAT x (\
    502 SCIP* scip, \
    503 SCIP_NLPI* nlpi, \
    504 SCIP_NLPIPROBLEM* problem)
    505
    506/** gives termination reason
    507 *
    508 * \param[in] scip SCIP data structure
    509 * \param[in] nlpi datastructure for solver interface
    510 * \param[in] problem datastructure for problem instance
    511 *
    512 * \return Termination Status
    513 */
    514#define SCIP_DECL_NLPIGETTERMSTAT(x) SCIP_NLPTERMSTAT x (\
    515 SCIP* scip, \
    516 SCIP_NLPI* nlpi, \
    517 SCIP_NLPIPROBLEM* problem)
    518
    519/** gives primal and dual solution values
    520 *
    521 * Solver can return NULL in dual values if not available,
    522 * but if solver provides dual values for one side of variable bounds, then it must also provide those for the other side.
    523 *
    524 * 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.
    525 *
    526 * \param[in] scip SCIP data structure
    527 * \param[in] nlpi datastructure for solver interface
    528 * \param[in] problem datastructure for problem instance
    529 * \param[out] primalvalues buffer to store pointer to array to primal values, or NULL if not needed
    530 * \param[out] consdualvalues buffer to store pointer to array to dual values of constraints, or NULL if not needed
    531 * \param[out] varlbdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed
    532 * \param[out] varubdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed
    533 * \param[out] objval pointer to store the objective value, or NULL if not needed
    534 */
    535#define SCIP_DECL_NLPIGETSOLUTION(x) SCIP_RETCODE x (\
    536 SCIP* scip, \
    537 SCIP_NLPI* nlpi, \
    538 SCIP_NLPIPROBLEM* problem, \
    539 SCIP_Real** primalvalues, \
    540 SCIP_Real** consdualvalues, \
    541 SCIP_Real** varlbdualvalues, \
    542 SCIP_Real** varubdualvalues, \
    543 SCIP_Real* objval)
    544
    545/** gives solve statistics
    546 *
    547 * \param[in] scip SCIP data structure
    548 * \param[in] nlpi datastructure for solver interface
    549 * \param[in] problem datastructure for problem instance
    550 * \param[out] statistics buffer where to store statistics
    551 */
    552#define SCIP_DECL_NLPIGETSTATISTICS(x) SCIP_RETCODE x (\
    553 SCIP* scip, \
    554 SCIP_NLPI* nlpi, \
    555 SCIP_NLPIPROBLEM* problem, \
    556 SCIP_NLPSTATISTICS* statistics)
    557
    558#ifdef __cplusplus
    559}
    560#endif
    561
    562#endif /*__SCIP_TYPE_NLPI_H__ */
    common defines and data types used in all packages of SCIP
    #define SCIP_REAL_MAX
    Definition: def.h:158
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    #define FALSE
    Definition: def.h:94
    #define SCIP_DEFAULT_DUALFEASTOL
    Definition: def.h:169
    #define SCIP_REAL_MIN
    Definition: def.h:159
    #define SCIP_DEFAULT_FEASTOL
    Definition: def.h:166
    SCIP_Real timelimit
    Definition: type_nlpi.h:72
    SCIP_Real feastol
    Definition: type_nlpi.h:69
    SCIP_Bool expectinfeas
    Definition: type_nlpi.h:76
    SCIP_Bool warmstart
    Definition: type_nlpi.h:77
    SCIP_Real opttol
    Definition: type_nlpi.h:70
    SCIP_Real solvertol
    Definition: type_nlpi.h:71
    const char * caller
    Definition: type_nlpi.h:78
    SCIP_NLPPARAM_FASTFAIL fastfail
    Definition: type_nlpi.h:75
    SCIP_Real lobjlimit
    Definition: type_nlpi.h:68
    unsigned short verblevel
    Definition: type_nlpi.h:74
    SCIP_Real totaltime
    Definition: type_nlpi.h:190
    SCIP_Real boundviol
    Definition: type_nlpi.h:194
    SCIP_Real consviol
    Definition: type_nlpi.h:193
    SCIP_Real evaltime
    Definition: type_nlpi.h:191
    type and macro definitions related to algebraic expressions
    type definitions for NLP management
    SCIP_NlpParam_FastFail
    Definition: type_nlpi.h:57
    @ SCIP_NLPPARAM_FASTFAIL_CONSERVATIVE
    Definition: type_nlpi.h:59
    @ SCIP_NLPPARAM_FASTFAIL_OFF
    Definition: type_nlpi.h:58
    @ SCIP_NLPPARAM_FASTFAIL_AGGRESSIVE
    Definition: type_nlpi.h:60
    enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
    Definition: type_nlpi.h:168
    SCIP_NlpTermStat
    Definition: type_nlpi.h:172
    @ SCIP_NLPTERMSTAT_OKAY
    Definition: type_nlpi.h:173
    @ SCIP_NLPTERMSTAT_TIMELIMIT
    Definition: type_nlpi.h:174
    @ SCIP_NLPTERMSTAT_NUMERICERROR
    Definition: type_nlpi.h:178
    @ SCIP_NLPTERMSTAT_OTHER
    Definition: type_nlpi.h:182
    @ SCIP_NLPTERMSTAT_EVALERROR
    Definition: type_nlpi.h:179
    @ SCIP_NLPTERMSTAT_LICENSEERROR
    Definition: type_nlpi.h:181
    @ SCIP_NLPTERMSTAT_LOBJLIMIT
    Definition: type_nlpi.h:176
    @ SCIP_NLPTERMSTAT_ITERLIMIT
    Definition: type_nlpi.h:175
    @ SCIP_NLPTERMSTAT_OUTOFMEMORY
    Definition: type_nlpi.h:180
    @ SCIP_NLPTERMSTAT_INTERRUPT
    Definition: type_nlpi.h:177
    #define SCIP_NLPPARAM_DEFAULT_VERBLEVEL
    Definition: type_nlpi.h:87
    SCIP_NlpSolStat
    Definition: type_nlpi.h:159
    @ SCIP_NLPSOLSTAT_UNBOUNDED
    Definition: type_nlpi.h:165
    @ SCIP_NLPSOLSTAT_GLOBINFEASIBLE
    Definition: type_nlpi.h:164
    @ SCIP_NLPSOLSTAT_LOCINFEASIBLE
    Definition: type_nlpi.h:163
    @ SCIP_NLPSOLSTAT_FEASIBLE
    Definition: type_nlpi.h:162
    @ SCIP_NLPSOLSTAT_LOCOPT
    Definition: type_nlpi.h:161
    @ SCIP_NLPSOLSTAT_GLOBOPT
    Definition: type_nlpi.h:160
    @ SCIP_NLPSOLSTAT_UNKNOWN
    Definition: type_nlpi.h:166
    enum SCIP_NlpParam_FastFail SCIP_NLPPARAM_FASTFAIL
    Definition: type_nlpi.h:63
    enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
    Definition: type_nlpi.h:184
    struct SCIP_NlpiData SCIP_NLPIDATA
    Definition: type_nlpi.h:52
    type definitions for SCIP's main datastructure