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