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-2017 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 email to 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  );
216 
217 /** delete a set of constraints */
218 extern
220  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
221  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
222  int* dstats /**< deletion status of rows; 1 if row should be deleted, 0 if not; afterwards -1
223  * if row was deleted */
224  );
225 
226 /** changes or adds linear coefficients in a constraint or objective */
227 extern
229  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
230  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
231  const int idx, /**< index of constraint or -1 for objective */
232  int nvals, /**< number of values in linear constraint */
233  const int* varidxs, /**< indices of variable */
234  const SCIP_Real* vals /**< new values for coefficient */
235  );
236 
237 /** changes or adds coefficients in the quadratic part of a constraint or objective */
238 extern
240  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
241  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
242  int idx, /**< index of constraint or -1 for objective */
243  int nquadelems, /**< number of entries in quadratic constraint to change */
244  const SCIP_QUADELEM* quadelems /**< new elements in quadratic matrix (replacing already existing ones or adding new ones) */
245  );
246 
247 /** change the expression tree in the nonlinear part */
248 extern
250  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
251  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
252  int idxcons, /**< index of constraint or -1 for objective */
253  const int* exprvaridxs, /**< indices of variables in expression tree, maps variable indices in expression tree to indices in nlp, or NULL */
254  SCIP_EXPRTREE* exprtree /**< new expression tree, or NULL for no tree */
255  );
256 
257 /** change the value of one parameter in the nonlinear part */
258 extern
260  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
261  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
262  int idxcons, /**< index of constraint or -1 for objective */
263  int idxparam, /**< index of parameter */
264  SCIP_Real value /**< new value for nonlinear parameter */
265  );
266 
267 /** change the constant offset in the objective */
268 extern
270  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
271  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
272  SCIP_Real objconstant /**< new value for objective constant */
273  );
274 
275 /** sets initial guess for primal variables */
276 extern
278  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
279  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
280  SCIP_Real* primalvalues, /**< initial primal values for variables, or NULL to clear previous values */
281  SCIP_Real* consdualvalues, /**< initial dual values for constraints, or NULL to clear previous values */
282  SCIP_Real* varlbdualvalues, /**< initial dual values for variable lower bounds, or NULL to clear previous values */
283  SCIP_Real* varubdualvalues /**< initial dual values for variable upper bounds, or NULL to clear previous values */
284  );
285 
286 /** tries to solve NLP */
287 extern
289  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
290  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
291  );
292 
293 /** gives solution status
294  * @return solution status */
295 extern
297  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
298  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
299  );
300 
301 /** gives termination reason
302  * @return termination status */
303 extern
305  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
306  SCIP_NLPIPROBLEM* problem /**< pointer to problem data structure */
307  );
308 
309 /** gives primal and dual solution
310  * 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
311  */
312 extern
314  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
315  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
316  SCIP_Real** primalvalues, /**< buffer to store pointer to array to primal values, or NULL if not needed */
317  SCIP_Real** consdualvalues, /**< buffer to store pointer to array to dual values of constraints, or NULL if not needed */
318  SCIP_Real** varlbdualvalues, /**< buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed */
319  SCIP_Real** varubdualvalues /**< buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed */
320  );
321 
322 /** gives solve statistics */
323 extern
325  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
326  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
327  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
328  );
329 
330 /** gives required size of a buffer to store a warmstart object */
331 extern
333  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
334  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
335  size_t* size /**< pointer to store required size for warmstart buffer */
336  );
337 
338 /** stores warmstart information in buffer */
339 extern
341  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
342  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
343  void* buffer /**< memory to store warmstart information */
344  );
345 
346 /** sets warmstart information in solver */
347 extern
349  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
350  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
351  void* buffer /**< warmstart information */
352  );
353 
354 /**@name Parameter Methods */
355 /**@{ */
356 
357 /** gets integer parameter of NLP */
358 extern
360  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
361  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
362  SCIP_NLPPARAM type, /**< parameter number */
363  int* ival /**< pointer to store the parameter value */
364  );
365 
366 /** sets integer parameter of NLP */
367 extern
369  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
370  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
371  SCIP_NLPPARAM type, /**< parameter number */
372  int ival /**< parameter value */
373  );
374 
375 /** gets floating point parameter of NLP
376  * if problem is NULL and type == SCIP_NLPPAR_INFINITY, then gets solver-wide value for infinity */
377 extern
379  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
380  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure, can be NULL only if type == SCIP_NLPPAR_INFINITY */
381  SCIP_NLPPARAM type, /**< parameter number */
382  SCIP_Real* dval /**< pointer to store the parameter value */
383  );
384 
385 /** sets floating point parameter of NLP
386  * if problem is NULL and type == SCIP_NLPPAR_INFINITY, then sets solver-wide value for infinity */
387 extern
389  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
390  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure, can be NULL only if type == SCIP_NLPPAR_INFINITY */
391  SCIP_NLPPARAM type, /**< parameter number */
392  SCIP_Real dval /**< parameter value */
393  );
394 
395 /** gets string parameter of NLP */
396 extern
398  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
399  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
400  SCIP_NLPPARAM type, /**< parameter number */
401  const char** sval /**< pointer to store the parameter value, the user must not modify the string */
402  );
403 
404 /** sets string parameter of NLP */
405 extern
407  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
408  SCIP_NLPIPROBLEM* problem, /**< pointer to problem data structure */
409  SCIP_NLPPARAM type, /**< parameter number */
410  const char* sval /**< parameter value */
411  );
412 
413 /** sets message handler for message output */
414 extern
416  SCIP_NLPI* nlpi, /**< pointer to NLPI datastructure */
417  SCIP_MESSAGEHDLR* messagehdlr /**< pointer to message handler, or NULL to suppress all output */
418  );
419 
420 /** gets data of an NLPI */
422  SCIP_NLPI* nlpi /**< NLP interface structure */
423  );
424 
425 /** gets NLP solver name */
426 const char* SCIPnlpiGetName(
427  SCIP_NLPI* nlpi /**< NLP interface structure */
428  );
429 
430 /** gets NLP solver descriptions */
431 const char* SCIPnlpiGetDesc(
432  SCIP_NLPI* nlpi /**< NLP interface structure */
433  );
434 
435 /** gets NLP solver priority */
437  SCIP_NLPI* nlpi /**< NLP interface structure */
438  );
439 
440 /** sets NLP solver priority */
442  SCIP_NLPI* nlpi, /**< NLP interface structure */
443  int priority /**< new priority of NLPI */
444  );
445 
446 /** creates an NLP statistics structure */
448  SCIP_NLPSTATISTICS** statistics /**< pointer where to store NLP statistics structure */
449  );
450 
451 /** frees an NLP statistics structure */
453  SCIP_NLPSTATISTICS** statistics /**< pointer where to store NLP statistics structure */
454  );
455 
456 /** gets the number of iterations from an NLP statistics structure */
458  SCIP_NLPSTATISTICS* statistics /**< NLP statistics structure */
459  );
460 
461 /** gets the total time from an NLP statistics structure */
463  SCIP_NLPSTATISTICS* statistics /**< NLP statistics structure */
464  );
465 
466 /** sets the number of iterations in an NLP statistics structure */
468  SCIP_NLPSTATISTICS* statistics, /**< NLP statistics structure */
469  int niterations /**< number of iterations to store */
470  );
471 
472 /** sets the total time in an NLP statistics structure */
474  SCIP_NLPSTATISTICS* statistics, /**< NLP statistics structure */
475  SCIP_Real totaltime /**< solution time to store */
476  );
477 
478 /** @} */
479 
480 /** @} */
481 
482 #ifdef __cplusplus
483 }
484 #endif
485 
486 #endif /* __SCIP_NLPI_H__ */
SCIP_RETCODE SCIPnlpiSetWarmstartMemo(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, void *buffer)
Definition: nlpi.c:598
#define SCIP_DECL_NLPIGETSOLVERPOINTER(x)
Definition: type_nlpi.h:112
#define SCIP_DECL_NLPICHGNONLINCOEF(x)
Definition: type_nlpi.h:309
SCIP_RETCODE SCIPnlpiGetStatistics(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:553
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:85
SCIP_RETCODE SCIPnlpStatisticsCreate(SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:781
type definitions for miscellaneous datastructures
void * SCIPnlpiGetSolverPointer(SCIP_NLPI *nlpi)
Definition: nlpi.c:201
int SCIPnlpiGetPriority(SCIP_NLPI *nlpi)
Definition: nlpi.c:760
SCIP_Real SCIPnlpStatisticsGetTotalTime(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:820
SCIP_RETCODE SCIPnlpiSetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char *sval)
Definition: nlpi.c:701
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:360
#define SCIP_DECL_NLPISETINTPAR(x)
Definition: type_nlpi.h:453
#define SCIP_DECL_NLPIGETSTRINGPAR(x)
Definition: type_nlpi.h:489
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:377
SCIP_RETCODE SCIPnlpiDelVarSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats)
Definition: nlpi.c:361
const char * SCIPnlpiGetName(SCIP_NLPI *nlpi)
Definition: nlpi.c:740
#define SCIP_DECL_NLPICHGOBJCONSTANT(x)
Definition: type_nlpi.h:319
#define SCIP_DECL_NLPICHGQUADCOEFS(x)
Definition: type_nlpi.h:283
SCIP_RETCODE SCIPnlpiSetMessageHdlr(SCIP_NLPI *nlpi, SCIP_MESSAGEHDLR *messagehdlr)
Definition: nlpi.c:717
SCIP_RETCODE SCIPnlpiGetSolution(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real **primalvalues, SCIP_Real **consdualvalues, SCIP_Real **varlbdualvalues, SCIP_Real **varubdualvalues)
Definition: nlpi.c:535
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(SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:798
SCIP_RETCODE SCIPnlpiSolve(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:495
SCIP_RETCODE SCIPnlpiGetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char **sval)
Definition: nlpi.c:684
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:183
SCIP_DECL_NLPIGETPROBLEMPOINTER(nlpiGetProblemPointerIpopt)
Definition: nlpi_ipopt.cpp:671
SCIP_RETCODE SCIPnlpiFree(SCIP_NLPI **nlpi)
Definition: nlpi.c:181
#define SCIP_DECL_NLPIGETWARMSTARTSIZE(x)
Definition: type_nlpi.h:402
struct SCIP_NlpiData SCIP_NLPIDATA
Definition: type_nlpi.h:38
#define SCIP_DECL_NLPIGETINTPAR(x)
Definition: type_nlpi.h:443
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:69
#define SCIP_DECL_NLPICOPY(x)
Definition: type_nlpi.h:94
#define SCIP_DECL_NLPICHGVARBOUNDS(x)
Definition: type_nlpi.h:221
#define SCIP_DECL_NLPISETMESSAGEHDLR(x)
Definition: type_nlpi.h:507
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:477
#define SCIP_DECL_NLPIGETSTATISTICS(x)
Definition: type_nlpi.h:390
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:509
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:476
#define SCIP_DECL_NLPICHGCONSSIDES(x)
Definition: type_nlpi.h:234
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:633
void SCIPnlpStatisticsSetNIterations(SCIP_NLPSTATISTICS *statistics, int niterations)
Definition: nlpi.c:830
SCIP_NLPTERMSTAT SCIPnlpiGetTermstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:521
void SCIPnlpStatisticsSetTotalTime(SCIP_NLPSTATISTICS *statistics, SCIP_Real totaltime)
Definition: nlpi.c:840
SCIP_RETCODE SCIPnlpiChgNonlinCoef(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idxcons, int idxparam, SCIP_Real value)
Definition: nlpi.c:445
SCIP_RETCODE SCIPnlpiChgQuadCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idx, int nquadelems, const SCIP_QUADELEM *quadelems)
Definition: nlpi.c:411
SCIP_RETCODE SCIPnlpiGetWarmstartSize(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, size_t *size)
Definition: nlpi.c:568
void * SCIPnlpiGetProblemPointer(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:238
SCIP_NLPIDATA * SCIPnlpiGetData(SCIP_NLPI *nlpi)
Definition: nlpi.c:730
#define SCIP_DECL_NLPICHGEXPRTREE(x)
Definition: type_nlpi.h:295
SCIP_RETCODE SCIPnlpiChgExprtree(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idxcons, const int *exprvaridxs, SCIP_EXPRTREE *exprtree)
Definition: nlpi.c:428
void SCIPnlpiSetPriority(SCIP_NLPI *nlpi, int priority)
Definition: nlpi.c:770
#define SCIP_DECL_NLPIGETWARMSTARTMEMO(x)
Definition: type_nlpi.h:416
#define SCIP_DECL_NLPIFREE(x)
Definition: type_nlpi.h:101
#define SCIP_DECL_NLPISETINITIALGUESS(x)
Definition: type_nlpi.h:331
#define SCIP_Real
Definition: def.h:135
#define SCIP_DECL_NLPISETSTRINGPAR(x)
Definition: type_nlpi.h:499
#define SCIP_DECL_NLPICREATEPROBLEM(x)
Definition: type_nlpi.h:121
SCIP_RETCODE SCIPnlpiDelConsSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats)
Definition: nlpi.c:377
#define SCIP_DECL_NLPISOLVE(x)
Definition: type_nlpi.h:340
SCIP_RETCODE SCIPnlpiGetWarmstartMemo(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, void *buffer)
Definition: nlpi.c:583
#define SCIP_DECL_NLPIFREEPROBLEM(x)
Definition: type_nlpi.h:129
int SCIPnlpStatisticsGetNIterations(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:810
SCIP_RETCODE SCIPnlpiChgLinearCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, const int idx, int nvals, const int *varidxs, const SCIP_Real *vals)
Definition: nlpi.c:393
SCIP_RETCODE SCIPnlpiGetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int *ival)
Definition: nlpi.c:616
#define SCIP_DECL_NLPISETOBJECTIVE(x)
Definition: type_nlpi.h:207
#define SCIP_DECL_NLPIGETREALPAR(x)
Definition: type_nlpi.h:466
#define SCIP_DECL_NLPIGETSOLSTAT(x)
Definition: type_nlpi.h:350
#define SCIP_DECL_NLPISETWARMSTARTMEMO(x)
Definition: type_nlpi.h:427
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
SCIP_RETCODE SCIPnlpiGetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real *dval)
Definition: nlpi.c:650
SCIP_RETCODE SCIPnlpiChgObjConstant(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real objconstant)
Definition: nlpi.c:462
const char * SCIPnlpiGetDesc(SCIP_NLPI *nlpi)
Definition: nlpi.c:750
#define SCIP_DECL_NLPIDELCONSSET(x)
Definition: type_nlpi.h:259
#define SCIP_DECL_NLPICHGLINEARCOEFS(x)
Definition: type_nlpi.h:271
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:668
#define SCIP_DECL_NLPIADDVARS(x)
Definition: type_nlpi.h:153