Scippy

SCIP

Solving Constraint Integer Programs

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-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file nlpi.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for NLPI solver interfaces
19  * @author Stefan Vigerske
20  * @author Thorsten Gellermann
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_NLPI_H__
26 #define __SCIP_NLPI_H__
27 
28 #include "nlpi/type_nlpi.h"
29 #include "scip/type_misc.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /**@addtogroup NLPIS
36  *
37  * @{
38  */
39 
40 /** compares two NLPIs w.r.t. their priority */
41 SCIP_DECL_SORTPTRCOMP(SCIPnlpiComp);
42 
43 /** creates an NLP solver interface */
44 extern
46  SCIP_NLPI** nlpi, /**< pointer to NLP interface data structure */
47  const char* name, /**< name of NLP interface */
48  const char* description, /**< description of NLP interface */
49  int priority, /**< priority of NLP interface */
50  SCIP_DECL_NLPICOPY ((*nlpicopy)), /**< copying an NLPI */
51  SCIP_DECL_NLPIFREE ((*nlpifree)), /**< free NLPI user data */
52  SCIP_DECL_NLPIGETSOLVERPOINTER ((*nlpigetsolverpointer)), /**< get solver pointer */
53  SCIP_DECL_NLPICREATEPROBLEM ((*nlpicreateproblem)), /**< create a new problem instance */
54  SCIP_DECL_NLPIFREEPROBLEM ((*nlpifreeproblem)), /**< free a problem instance */
55  SCIP_DECL_NLPIGETPROBLEMPOINTER ((*nlpigetproblempointer)), /**< get problem pointer */
56  SCIP_DECL_NLPIADDVARS ((*nlpiaddvars)), /**< add variables */
57  SCIP_DECL_NLPIADDCONSTRAINTS ((*nlpiaddconstraints)), /**< add constraints */
58  SCIP_DECL_NLPISETOBJECTIVE ((*nlpisetobjective)), /**< set objective */
59  SCIP_DECL_NLPICHGVARBOUNDS ((*nlpichgvarbounds)), /**< change variable bounds */
60  SCIP_DECL_NLPICHGCONSSIDES ((*nlpichgconssides)), /**< change constraint sides */
61  SCIP_DECL_NLPIDELVARSET ((*nlpidelvarset)), /**< delete a set of constraints */
62  SCIP_DECL_NLPIDELCONSSET ((*nlpidelconsset)), /**< delete a set of constraints */
63  SCIP_DECL_NLPICHGLINEARCOEFS ((*nlpichglinearcoefs)), /**< change coefficients in linear part of a constraint or objective */
64  SCIP_DECL_NLPICHGQUADCOEFS ((*nlpichgquadcoefs)), /**< change coefficients in quadratic part of a constraint or objective */
65  SCIP_DECL_NLPICHGEXPRTREE ((*nlpichgexprtree)), /**< change nonlinear expression a constraint or objective */
66  SCIP_DECL_NLPICHGNONLINCOEF ((*nlpichgnonlincoef)), /**< change one parameter in nonlinear expressions of a constraint or objective */
67  SCIP_DECL_NLPICHGOBJCONSTANT ((*nlpichgobjconstant)), /**< change the constant offset in the objective */
68  SCIP_DECL_NLPISETINITIALGUESS ((*nlpisetinitialguess)), /**< set initial guess for primal variables */
69  SCIP_DECL_NLPISOLVE ((*nlpisolve)), /**< solve NLP */
70  SCIP_DECL_NLPIGETSOLSTAT ((*nlpigetsolstat)), /**< get solution status */
71  SCIP_DECL_NLPIGETTERMSTAT ((*nlpigettermstat)), /**< get termination status */
72  SCIP_DECL_NLPIGETSOLUTION ((*nlpigetsolution)), /**< get solution */
73  SCIP_DECL_NLPIGETSTATISTICS ((*nlpigetstatistics)), /**< get solve statistics */
74  SCIP_DECL_NLPIGETWARMSTARTSIZE ((*nlpigetwarmstartsize)), /**< get size for warmstart object buffer */
75  SCIP_DECL_NLPIGETWARMSTARTMEMO ((*nlpigetwarmstartmemo)), /**< get warmstart object */
76  SCIP_DECL_NLPISETWARMSTARTMEMO ((*nlpisetwarmstartmemo)), /**< set warmstart object */
77  SCIP_DECL_NLPIGETINTPAR ((*nlpigetintpar)), /**< get value of integer parameter */
78  SCIP_DECL_NLPISETINTPAR ((*nlpisetintpar)), /**< set value of integer parameter */
79  SCIP_DECL_NLPIGETREALPAR ((*nlpigetrealpar)), /**< get value of floating point parameter */
80  SCIP_DECL_NLPISETREALPAR ((*nlpisetrealpar)), /**< set value of floating point parameter */
81  SCIP_DECL_NLPIGETSTRINGPAR ((*nlpigetstringpar)), /**< get value of string parameter */
82  SCIP_DECL_NLPISETSTRINGPAR ((*nlpisetstringpar)), /**< set value of string parameter */
83  SCIP_DECL_NLPISETMESSAGEHDLR ((*nlpisetmessagehdlr)), /**< set message handler */
84  SCIP_NLPIDATA* nlpidata /**< NLP interface local data */
85  );
86 
87 /** copies an NLPI */
88 extern
90  BMS_BLKMEM* blkmem, /**< block memory in target SCIP */
91  SCIP_NLPI* sourcenlpi, /**< pointer to NLPI data structure to copy */
92  SCIP_NLPI** targetnlpi /**< buffer to store pointer to copied NLPI data structure */
93  );
94 
95 /** frees NLPI user data */
96 extern
98  SCIP_NLPI** nlpi /**< pointer to NLPI data structure */
99  );
100 
101 /** gets pointer for NLP solver
102  * @return void pointer to solver
103  */
104 extern
106  SCIP_NLPI* nlpi /**< pointer to NLPI datastructure */
107  );
108 
109 /** creates a problem instance */
110 extern
112  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
113  SCIP_NLPIPROBLEM** problem, /**< pointer to store problem data */
114  const char* name /**< name of problem, can be NULL */
115  );
116 
117 /** frees a problem instance */
118 extern
120  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
121  SCIP_NLPIPROBLEM** problem /**< pointer where problem data is stored */
122  );
123 
124 /** gets pointer to solver-internal problem instance
125  * @return void pointer to problem instance
126  */
127 extern
129  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
130  SCIP_NLPIPROBLEM* problem /**< pointer where problem data is stored */
131  );
132 
133 /** add variables to nlpi */
134 extern
136  SCIP_NLPI* nlpi, /**< pointer to NLPI data structure */
137  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
138  int nvars, /**< number of variables */
139  const SCIP_Real* lbs, /**< lower bounds of variables, can be NULL if -infinity */
140  const SCIP_Real* ubs, /**< upper bounds of variables, can be NULL if +infinity */
141  const char** varnames /**< varnames names of variables, can be NULL */
142  );
143 
144 /** add constraints to nlpi */
145 extern
147  SCIP_NLPI* nlpi, /**< pointer to NLPI data structure */
148  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
149  int nconss, /**< number of added constraints */
150  const SCIP_Real* lhss, /**< left hand sides of constraints, can be NULL if -infinity */
151  const SCIP_Real* rhss, /**< right hand sides of constraints, can be NULL if +infinity */
152  const int* nlininds, /**< number of linear coefficients for each constraint, may be NULL in case of no linear part */
153  int* const* lininds, /**< indices of variables for linear coefficients for each constraint, may be NULL in case of no linear part */
154  SCIP_Real* const* linvals, /**< values of linear coefficient for each constraint, may be NULL in case of no linear part */
155  const int* nquadelems, /**< number of elements in matrix of quadratic part for each constraint,
156  * may be NULL in case of no quadratic part in any constraint */
157  SCIP_QUADELEM* const* quadelems, /**< quadratic elements specifying quadratic part for each constraint, entry of array may be NULL in case of no quadratic part,
158  * may be NULL in case of no quadratic part in any constraint */
159  int* const* exprvaridxs, /**< indices of variables in expression tree, maps variable indices in expression
160  * tree to indices in nlp, entry of array may be NULL in case of no expression
161  * tree, may be NULL in case of no expression tree in any constraint */
162  SCIP_EXPRTREE* const* exprtrees, /**< exprtrees expression tree for nonquadratic part of constraints, entry of
163  * array may be NULL in case of no nonquadratic part, may be NULL in case of no
164  * nonquadratic part in any constraint */
165  const char** names /**< names of constraints, may be NULL or entries may be NULL */
166  );
167 
168 
169 /** sets or overwrites objective, a minimization problem is expected */
170 extern
172  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
173  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
174  int nlins, /**< number of linear variables */
175  const int* lininds, /**< variable indices, may be NULL in case of no linear part */
176  const SCIP_Real* linvals, /**< coefficient values, may be NULL in case of no linear part */
177  int nquadelems, /**< number of entries in matrix of quadratic part */
178  const SCIP_QUADELEM* quadelems, /**< entries in matrix of quadratic part, may be NULL in case of no quadratic part */
179  const int* exprvaridxs, /**< indices of variables in expression tree, maps variable indices in expression
180  * tree to indices in nlp, may be NULL in case of no expression tree */
181  const SCIP_EXPRTREE* exprtree, /**< expression tree for nonquadratic part of objective function, may be NULL in
182  * case of no nonquadratic part */
183  const SCIP_Real constant /**< objective value offset*/
184  );
185 
186 /** change variable bounds */
187 extern
189  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
190  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
191  int nvars, /**< number of variables to change bounds */
192  const int* indices, /**< indices of variables to change bounds */
193  const SCIP_Real* lbs, /**< new lower bounds */
194  const SCIP_Real* ubs /**< new upper bounds */
195  );
196 
197 /** change constraint sides */
198 extern
200  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
201  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
202  int nconss, /**< number of constraints to change sides */
203  const int* indices, /**< indices of constraints to change sides */
204  const SCIP_Real* lhss, /**< new left hand sides */
205  const SCIP_Real* rhss /**< new right hand sides */
206  );
207 
208 /** delete a set of variables */
209 extern
211  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
212  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
213  int* dstats, /**< deletion status of vars; 1 if var should be deleted, 0 if not; afterwards -1
214  * if var was deleted */
215  int dstatssize /**< size of the dstats array */
216  );
217 
218 /** delete a set of constraints */
219 extern
221  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
222  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
223  int* dstats, /**< deletion status of rows; 1 if row should be deleted, 0 if not; afterwards -1
224  * if row was deleted */
225  int dstatssize /**< size of the dstats array */
226  );
227 
228 /** changes or adds linear coefficients in a constraint or objective */
229 extern
231  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
232  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
233  const int idx, /**< index of constraint or -1 for objective */
234  int nvals, /**< number of values in linear constraint */
235  const int* varidxs, /**< indices of variable */
236  const SCIP_Real* vals /**< new values for coefficient */
237  );
238 
239 /** changes or adds coefficients in the quadratic part of a constraint or objective */
240 extern
242  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
243  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
244  int idx, /**< index of constraint or -1 for objective */
245  int nquadelems, /**< number of entries in quadratic constraint to change */
246  const SCIP_QUADELEM* quadelems /**< new elements in quadratic matrix (replacing already existing ones or adding new ones) */
247  );
248 
249 /** change the expression tree in the nonlinear part */
250 extern
252  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
253  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
254  int idxcons, /**< index of constraint or -1 for objective */
255  const int* exprvaridxs, /**< indices of variables in expression tree, maps variable indices in expression tree to indices in nlp, or NULL */
256  const SCIP_EXPRTREE* exprtree /**< new expression tree, or NULL for no tree */
257  );
258 
259 /** change the value of one parameter in the nonlinear part */
260 extern
262  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
263  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
264  int idxcons, /**< index of constraint or -1 for objective */
265  int idxparam, /**< index of parameter */
266  SCIP_Real value /**< new value for nonlinear parameter */
267  );
268 
269 /** change the constant offset in the objective */
270 extern
272  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
273  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
274  SCIP_Real objconstant /**< new value for objective constant */
275  );
276 
277 /** sets initial guess for primal variables */
278 extern
280  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
281  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
282  SCIP_Real* primalvalues, /**< initial primal values for variables, or NULL to clear previous values */
283  SCIP_Real* consdualvalues, /**< initial dual values for constraints, or NULL to clear previous values */
284  SCIP_Real* varlbdualvalues, /**< initial dual values for variable lower bounds, or NULL to clear previous values */
285  SCIP_Real* varubdualvalues /**< initial dual values for variable upper bounds, or NULL to clear previous values */
286  );
287 
288 /** tries to solve NLP */
289 extern
291  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
292  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
293  );
294 
295 /** gives solution status
296  * @return solution status */
297 extern
299  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
300  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
301  );
302 
303 /** gives termination reason
304  * @return termination status */
305 extern
307  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
308  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
309  );
310 
311 /** gives primal and dual solution
312  * 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
313  */
314 extern
316  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
317  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
318  SCIP_Real** primalvalues, /**< buffer to store pointer to array to primal values, or NULL if not needed */
319  SCIP_Real** consdualvalues, /**< buffer to store pointer to array to dual values of constraints, or NULL if not needed */
320  SCIP_Real** varlbdualvalues, /**< buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed */
321  SCIP_Real** varubdualvalues, /**< buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed */
322  SCIP_Real* objval /**< buffer to store the objective value, or NULL if not needed */
323  );
324 
325 /** gives solve statistics */
326 extern
328  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
329  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
330  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
331  );
332 
333 /** gives required size of a buffer to store a warmstart object */
334 extern
336  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
337  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
338  size_t* size /**< pointer to store required size for warmstart buffer */
339  );
340 
341 /** stores warmstart information in buffer */
342 extern
344  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
345  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
346  void* buffer /**< memory to store warmstart information */
347  );
348 
349 /** sets warmstart information in solver */
350 extern
352  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
353  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
354  void* buffer /**< warmstart information */
355  );
356 
357 /**@name Parameter Methods */
358 /**@{ */
359 
360 /** gets integer parameter of NLP */
361 extern
363  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
364  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
365  SCIP_NLPPARAM type, /**< parameter number */
366  int* ival /**< pointer to store the parameter value */
367  );
368 
369 /** sets integer parameter of NLP */
370 extern
372  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
373  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
374  SCIP_NLPPARAM type, /**< parameter number */
375  int ival /**< parameter value */
376  );
377 
378 /** gets floating point parameter of NLP
379  * if problem is NULL and type == SCIP_NLPPAR_INFINITY, then gets solver-wide value for infinity */
380 extern
382  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
383  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure, can be NULL only if type == SCIP_NLPPAR_INFINITY */
384  SCIP_NLPPARAM type, /**< parameter number */
385  SCIP_Real* dval /**< pointer to store the parameter value */
386  );
387 
388 /** sets floating point parameter of NLP
389  * if problem is NULL and type == SCIP_NLPPAR_INFINITY, then sets solver-wide value for infinity */
390 extern
392  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
393  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure, can be NULL only if type == SCIP_NLPPAR_INFINITY */
394  SCIP_NLPPARAM type, /**< parameter number */
395  SCIP_Real dval /**< parameter value */
396  );
397 
398 /** gets string parameter of NLP */
399 extern
401  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
402  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
403  SCIP_NLPPARAM type, /**< parameter number */
404  const char** sval /**< pointer to store the parameter value, the user must not modify the string */
405  );
406 
407 /** sets string parameter of NLP */
408 extern
410  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
411  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
412  SCIP_NLPPARAM type, /**< parameter number */
413  const char* sval /**< parameter value */
414  );
415 
416 /** sets message handler for message output */
417 extern
419  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
420  SCIP_MESSAGEHDLR* messagehdlr /**< pointer to message handler, or NULL to suppress all output */
421  );
422 
423 /** gets data of an NLPI */
425  SCIP_NLPI* nlpi /**< NLP interface structure */
426  );
427 
428 /** gets NLP solver name */
429 const char* SCIPnlpiGetName(
430  SCIP_NLPI* nlpi /**< NLP interface structure */
431  );
432 
433 /** gets NLP solver descriptions */
434 const char* SCIPnlpiGetDesc(
435  SCIP_NLPI* nlpi /**< NLP interface structure */
436  );
437 
438 /** gets NLP solver priority */
440  SCIP_NLPI* nlpi /**< NLP interface structure */
441  );
442 
443 /** sets NLP solver priority */
445  SCIP_NLPI* nlpi, /**< NLP interface structure */
446  int priority /**< new priority of NLPI */
447  );
448 
449 /** creates an NLP statistics structure */
451  BMS_BLKMEM* blkmem, /**< block memory */
452  SCIP_NLPSTATISTICS** statistics /**< pointer where to store NLP statistics structure */
453  );
454 
455 /** frees an NLP statistics structure */
457  BMS_BLKMEM* blkmem, /**< block memory */
458  SCIP_NLPSTATISTICS** statistics /**< pointer where to store NLP statistics structure */
459  );
460 
461 /** gets the number of iterations from an NLP statistics structure */
463  SCIP_NLPSTATISTICS* statistics /**< NLP statistics structure */
464  );
465 
466 /** gets the total time from an NLP statistics structure */
468  SCIP_NLPSTATISTICS* statistics /**< NLP statistics structure */
469  );
470 
471 /** sets the number of iterations in an NLP statistics structure */
473  SCIP_NLPSTATISTICS* statistics, /**< NLP statistics structure */
474  int niterations /**< number of iterations to store */
475  );
476 
477 /** sets the total time in an NLP statistics structure */
479  SCIP_NLPSTATISTICS* statistics, /**< NLP statistics structure */
480  SCIP_Real totaltime /**< solution time to store */
481  );
482 
483 /** @} */
484 
485 /** @} */
486 
487 #ifdef __cplusplus
488 }
489 #endif
490 
491 #endif /* __SCIP_NLPI_H__ */
SCIP_RETCODE SCIPnlpiSetWarmstartMemo(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, void *buffer)
Definition: nlpi.c:601
#define SCIP_DECL_NLPIGETSOLVERPOINTER(x)
Definition: type_nlpi.h:111
#define SCIP_DECL_NLPICHGNONLINCOEF(x)
Definition: type_nlpi.h:310
SCIP_RETCODE SCIPnlpiGetStatistics(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:556
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:84
type definitions for miscellaneous datastructures
void * SCIPnlpiGetSolverPointer(SCIP_NLPI *nlpi)
Definition: nlpi.c:201
int SCIPnlpiGetPriority(SCIP_NLPI *nlpi)
Definition: nlpi.c:763
SCIP_Real SCIPnlpStatisticsGetTotalTime(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:826
SCIP_RETCODE SCIPnlpiSetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char *sval)
Definition: nlpi.c:704
SCIP_RETCODE SCIPnlpiCreateProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem, const char *name)
Definition: nlpi.c:211
#define SCIP_DECL_NLPIGETTERMSTAT(x)
Definition: type_nlpi.h:361
SCIP_RETCODE SCIPnlpiGetSolution(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real **primalvalues, SCIP_Real **consdualvalues, SCIP_Real **varlbdualvalues, SCIP_Real **varubdualvalues, SCIP_Real *objval)
Definition: nlpi.c:537
SCIP_RETCODE SCIPnlpiDelVarSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats, int dstatssize)
Definition: nlpi.c:361
#define SCIP_DECL_NLPISETINTPAR(x)
Definition: type_nlpi.h:455
#define SCIP_DECL_NLPIGETSTRINGPAR(x)
Definition: type_nlpi.h:491
SCIP_RETCODE SCIPnlpiAddConstraints(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nconss, const SCIP_Real *lhss, const SCIP_Real *rhss, const int *nlininds, int *const *lininds, SCIP_Real *const *linvals, const int *nquadelems, SCIP_QUADELEM *const *quadelems, int *const *exprvaridxs, SCIP_EXPRTREE *const *exprtrees, const char **names)
Definition: nlpi.c:268
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_DECL_NLPIGETSOLUTION(x)
Definition: type_nlpi.h:379
const char * SCIPnlpiGetName(SCIP_NLPI *nlpi)
Definition: nlpi.c:743
#define SCIP_DECL_NLPICHGOBJCONSTANT(x)
Definition: type_nlpi.h:320
#define SCIP_DECL_NLPICHGQUADCOEFS(x)
Definition: type_nlpi.h:284
SCIP_RETCODE SCIPnlpiSetMessageHdlr(SCIP_NLPI *nlpi, SCIP_MESSAGEHDLR *messagehdlr)
Definition: nlpi.c:720
SCIP_RETCODE SCIPnlpiChgVarBounds(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nvars, const int *indices, const SCIP_Real *lbs, const SCIP_Real *ubs)
Definition: nlpi.c:325
enum SCIP_NlpParam SCIP_NLPPARAM
Definition: type_nlpi.h:56
void SCIPnlpStatisticsFree(BMS_BLKMEM *blkmem, SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:801
#define SCIP_DECL_NLPIGETPROBLEMPOINTER(x)
Definition: type_nlpi.h:140
SCIP_RETCODE SCIPnlpiSolve(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:497
SCIP_RETCODE SCIPnlpiGetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char **sval)
Definition: nlpi.c:687
SCIP_RETCODE SCIPnlpiAddVars(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nvars, const SCIP_Real *lbs, const SCIP_Real *ubs, const char **varnames)
Definition: nlpi.c:250
#define SCIP_DECL_NLPIADDCONSTRAINTS(x)
Definition: type_nlpi.h:182
SCIP_RETCODE SCIPnlpiFree(SCIP_NLPI **nlpi)
Definition: nlpi.c:181
#define SCIP_DECL_NLPIGETWARMSTARTSIZE(x)
Definition: type_nlpi.h:404
struct SCIP_NlpiData SCIP_NLPIDATA
Definition: type_nlpi.h:38
#define SCIP_DECL_NLPIGETINTPAR(x)
Definition: type_nlpi.h:445
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:69
#define SCIP_DECL_NLPICOPY(x)
Definition: type_nlpi.h:93
#define SCIP_DECL_NLPICHGVARBOUNDS(x)
Definition: type_nlpi.h:220
#define SCIP_DECL_NLPISETMESSAGEHDLR(x)
Definition: type_nlpi.h:509
SCIP_RETCODE SCIPnlpiChgConsSides(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nconss, const int *indices, const SCIP_Real *lhss, const SCIP_Real *rhss)
Definition: nlpi.c:343
SCIP_RETCODE SCIPnlpiSetInitialGuess(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real *primalvalues, SCIP_Real *consdualvalues, SCIP_Real *varlbdualvalues, SCIP_Real *varubdualvalues)
Definition: nlpi.c:479
#define SCIP_DECL_NLPIGETSTATISTICS(x)
Definition: type_nlpi.h:392
SCIP_DECL_SORTPTRCOMP(SCIPnlpiComp)
Definition: nlpi.c:34
#define SCIP_DECL_NLPIDELVARSET(x)
Definition: type_nlpi.h:247
SCIP_NLPSOLSTAT SCIPnlpiGetSolstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:511
SCIP_RETCODE SCIPnlpiSetObjective(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nlins, const int *lininds, const SCIP_Real *linvals, int nquadelems, const SCIP_QUADELEM *quadelems, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree, const SCIP_Real constant)
Definition: nlpi.c:300
#define SCIP_DECL_NLPISETREALPAR(x)
Definition: type_nlpi.h:478
SCIP_RETCODE SCIPnlpiDelConsSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats, int dstatssize)
Definition: nlpi.c:378
#define SCIP_DECL_NLPICHGCONSSIDES(x)
Definition: type_nlpi.h:233
SCIP_RETCODE SCIPnlpiFreeProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem)
Definition: nlpi.c:224
SCIP_RETCODE SCIPnlpiCreate(SCIP_NLPI **nlpi, const char *name, const char *description, int priority, SCIP_DECL_NLPICOPY((*nlpicopy)), SCIP_DECL_NLPIFREE((*nlpifree)), SCIP_DECL_NLPIGETSOLVERPOINTER((*nlpigetsolverpointer)), SCIP_DECL_NLPICREATEPROBLEM((*nlpicreateproblem)), SCIP_DECL_NLPIFREEPROBLEM((*nlpifreeproblem)), SCIP_DECL_NLPIGETPROBLEMPOINTER((*nlpigetproblempointer)), SCIP_DECL_NLPIADDVARS((*nlpiaddvars)), SCIP_DECL_NLPIADDCONSTRAINTS((*nlpiaddconstraints)), SCIP_DECL_NLPISETOBJECTIVE((*nlpisetobjective)), SCIP_DECL_NLPICHGVARBOUNDS((*nlpichgvarbounds)), SCIP_DECL_NLPICHGCONSSIDES((*nlpichgconssides)), SCIP_DECL_NLPIDELVARSET((*nlpidelvarset)), SCIP_DECL_NLPIDELCONSSET((*nlpidelconsset)), SCIP_DECL_NLPICHGLINEARCOEFS((*nlpichglinearcoefs)), SCIP_DECL_NLPICHGQUADCOEFS((*nlpichgquadcoefs)), SCIP_DECL_NLPICHGEXPRTREE((*nlpichgexprtree)), SCIP_DECL_NLPICHGNONLINCOEF((*nlpichgnonlincoef)), SCIP_DECL_NLPICHGOBJCONSTANT((*nlpichgobjconstant)), SCIP_DECL_NLPISETINITIALGUESS((*nlpisetinitialguess)), SCIP_DECL_NLPISOLVE((*nlpisolve)), SCIP_DECL_NLPIGETSOLSTAT((*nlpigetsolstat)), SCIP_DECL_NLPIGETTERMSTAT((*nlpigettermstat)), SCIP_DECL_NLPIGETSOLUTION((*nlpigetsolution)), SCIP_DECL_NLPIGETSTATISTICS((*nlpigetstatistics)), SCIP_DECL_NLPIGETWARMSTARTSIZE((*nlpigetwarmstartsize)), SCIP_DECL_NLPIGETWARMSTARTMEMO((*nlpigetwarmstartmemo)), SCIP_DECL_NLPISETWARMSTARTMEMO((*nlpisetwarmstartmemo)), SCIP_DECL_NLPIGETINTPAR((*nlpigetintpar)), SCIP_DECL_NLPISETINTPAR((*nlpisetintpar)), SCIP_DECL_NLPIGETREALPAR((*nlpigetrealpar)), SCIP_DECL_NLPISETREALPAR((*nlpisetrealpar)), SCIP_DECL_NLPIGETSTRINGPAR((*nlpigetstringpar)), SCIP_DECL_NLPISETSTRINGPAR((*nlpisetstringpar)), SCIP_DECL_NLPISETMESSAGEHDLR((*nlpisetmessagehdlr)), SCIP_NLPIDATA *nlpidata)
Definition: nlpi.c:40
SCIP_RETCODE SCIPnlpiCopy(BMS_BLKMEM *blkmem, SCIP_NLPI *sourcenlpi, SCIP_NLPI **targetnlpi)
Definition: nlpi.c:165
SCIP_RETCODE SCIPnlpiSetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int ival)
Definition: nlpi.c:636
void SCIPnlpStatisticsSetNIterations(SCIP_NLPSTATISTICS *statistics, int niterations)
Definition: nlpi.c:836
SCIP_NLPTERMSTAT SCIPnlpiGetTermstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:523
void SCIPnlpStatisticsSetTotalTime(SCIP_NLPSTATISTICS *statistics, SCIP_Real totaltime)
Definition: nlpi.c:846
SCIP_RETCODE SCIPnlpiChgNonlinCoef(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idxcons, int idxparam, SCIP_Real value)
Definition: nlpi.c:447
SCIP_RETCODE SCIPnlpiChgQuadCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idx, int nquadelems, const SCIP_QUADELEM *quadelems)
Definition: nlpi.c:413
SCIP_RETCODE SCIPnlpiGetWarmstartSize(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, size_t *size)
Definition: nlpi.c:571
void * SCIPnlpiGetProblemPointer(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:238
SCIP_NLPIDATA * SCIPnlpiGetData(SCIP_NLPI *nlpi)
Definition: nlpi.c:733
#define SCIP_DECL_NLPICHGEXPRTREE(x)
Definition: type_nlpi.h:296
SCIP_RETCODE SCIPnlpStatisticsCreate(BMS_BLKMEM *blkmem, SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:784
void SCIPnlpiSetPriority(SCIP_NLPI *nlpi, int priority)
Definition: nlpi.c:773
#define SCIP_DECL_NLPIGETWARMSTARTMEMO(x)
Definition: type_nlpi.h:418
#define SCIP_DECL_NLPIFREE(x)
Definition: type_nlpi.h:100
#define SCIP_DECL_NLPISETINITIALGUESS(x)
Definition: type_nlpi.h:332
#define SCIP_Real
Definition: def.h:157
#define SCIP_DECL_NLPISETSTRINGPAR(x)
Definition: type_nlpi.h:501
#define SCIP_DECL_NLPICREATEPROBLEM(x)
Definition: type_nlpi.h:120
#define SCIP_DECL_NLPISOLVE(x)
Definition: type_nlpi.h:341
SCIP_RETCODE SCIPnlpiGetWarmstartMemo(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, void *buffer)
Definition: nlpi.c:586
#define SCIP_DECL_NLPIFREEPROBLEM(x)
Definition: type_nlpi.h:128
int SCIPnlpStatisticsGetNIterations(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:816
SCIP_RETCODE SCIPnlpiChgLinearCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, const int idx, int nvals, const int *varidxs, const SCIP_Real *vals)
Definition: nlpi.c:395
SCIP_RETCODE SCIPnlpiChgExprtree(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idxcons, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree)
Definition: nlpi.c:430
SCIP_RETCODE SCIPnlpiGetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int *ival)
Definition: nlpi.c:619
#define SCIP_DECL_NLPISETOBJECTIVE(x)
Definition: type_nlpi.h:206
#define SCIP_DECL_NLPIGETREALPAR(x)
Definition: type_nlpi.h:468
#define SCIP_DECL_NLPIGETSOLSTAT(x)
Definition: type_nlpi.h:351
#define SCIP_DECL_NLPISETWARMSTARTMEMO(x)
Definition: type_nlpi.h:429
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:426
SCIP_RETCODE SCIPnlpiGetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real *dval)
Definition: nlpi.c:653
SCIP_RETCODE SCIPnlpiChgObjConstant(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real objconstant)
Definition: nlpi.c:464
const char * SCIPnlpiGetDesc(SCIP_NLPI *nlpi)
Definition: nlpi.c:753
#define SCIP_DECL_NLPIDELCONSSET(x)
Definition: type_nlpi.h:260
#define SCIP_DECL_NLPICHGLINEARCOEFS(x)
Definition: type_nlpi.h:272
type definitions for specific NLP solver interfaces
SCIP_RETCODE SCIPnlpiSetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real dval)
Definition: nlpi.c:671
#define SCIP_DECL_NLPIADDVARS(x)
Definition: type_nlpi.h:152