Scippy

SCIP

Solving Constraint Integer Programs

nlp.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 nlp.h
17  * @brief internal methods for NLP management
18  * @author Thorsten Gellermann
19  * @author Stefan Vigerske
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_NLP_H__
25 #define __SCIP_NLP_H__
26 
27 
28 #include <stdio.h>
29 
30 #include "scip/def.h"
31 #include "blockmemshell/memory.h"
32 #include "scip/type_set.h"
33 #include "scip/type_stat.h"
34 #include "scip/type_misc.h"
35 #include "scip/type_lp.h"
36 #include "scip/type_var.h"
37 #include "scip/type_prob.h"
38 #include "scip/type_sol.h"
39 #include "scip/type_primal.h"
40 #include "scip/pub_nlp.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /**@name Expressions and Expression tree methods */
47 /**@{ */
48 
49 /** removes fixed variables from an expression tree, so that at exit all variables are active */
50 extern
52  SCIP_EXPRTREE* tree, /**< expression tree */
53  SCIP_SET* set, /**< global SCIP settings */
54  SCIP_Bool* changed, /**< buffer to store whether the tree was changed, i.e., whether there was a fixed variable */
55  int* varpos, /**< array of length at least tree->nvars to store new indices of previously existing variables in expression tree, or -1 if variable was removed; set to NULL if not of interest */
56  int* newvarsstart /**< buffer to store index in tree->vars array where new variables begin, or NULL if not of interest */
57  );
58 
59 /**@} */
60 
61 /**@name Nonlinear row methods */
62 /**@{ */
63 
64 /** create a new nonlinear row
65  * the new row is already captured
66  */
67 extern
69  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
70  BMS_BLKMEM* blkmem, /**< block memory */
71  SCIP_SET* set, /**< global SCIP settings */
72  const char* name, /**< name of nonlinear row */
73  SCIP_Real constant, /**< constant */
74  int nlinvars, /**< number of linear variables */
75  SCIP_VAR** linvars, /**< linear variables, or NULL if nlinvars == 0 */
76  SCIP_Real* lincoefs, /**< linear coefficients, or NULL if nlinvars == 0 */
77  int nquadvars, /**< number variables in quadratic terms */
78  SCIP_VAR** quadvars, /**< variables in quadratic terms, or NULL if nquadvars == 0 */
79  int nquadelems, /**< number of entries in quadratic term matrix */
80  SCIP_QUADELEM* quadelems, /**< elements of quadratic term matrix, or NULL if nquadelems == 0 */
81  SCIP_EXPRTREE* exprtree, /**< expression tree, or NULL */
82  SCIP_Real lhs, /**< left hand side */
83  SCIP_Real rhs /**< right hand side */
84  );
85 
86 /** create a nonlinear row that is a copy of a given row
87  * the new row is already captured
88  */
89 extern
91  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
92  BMS_BLKMEM* blkmem, /**< block memory */
93  SCIP_SET* set, /**< global SCIP settings */
94  SCIP_NLROW* sourcenlrow /**< nonlinear row to copy */
95  );
96 
97 /** create a new nonlinear row from a linear row
98  * the new row is already captured
99  */
100 extern
102  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
103  BMS_BLKMEM* blkmem, /**< block memory */
104  SCIP_SET* set, /**< global SCIP settings */
105  SCIP_ROW* row /**< the linear row to copy */
106  );
107 
108 /** frees a nonlinear row */
109 extern
111  SCIP_NLROW** nlrow, /**< pointer to NLP row */
112  BMS_BLKMEM* blkmem /**< block memory */
113  );
114 
115 /** output nonlinear row to file stream */
116 extern
118  SCIP_NLROW* nlrow, /**< NLP row */
119  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
120  FILE* file /**< output file (or NULL for standard output) */
121  );
122 
123 /** increases usage counter of NLP nonlinear row */
124 extern
125 void SCIPnlrowCapture(
126  SCIP_NLROW* nlrow /**< nonlinear row to capture */
127  );
128 
129 /** decreases usage counter of NLP nonlinear row */
130 extern
132  SCIP_NLROW** nlrow, /**< nonlinear row to free */
133  BMS_BLKMEM* blkmem, /**< block memory */
134  SCIP_SET* set /**< global SCIP settings */
135  );
136 
137 /** ensures, that linear coefficient array of nonlinear row can store at least num entries */
138 extern
140  SCIP_NLROW* nlrow, /**< NLP row */
141  BMS_BLKMEM* blkmem, /**< block memory */
142  SCIP_SET* set, /**< global SCIP settings */
143  int num /**< minimum number of entries to store */
144  );
145 
146 /** adds a previously non existing linear coefficient to an NLP nonlinear row */
147 extern
149  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
150  BMS_BLKMEM* blkmem, /**< block memory */
151  SCIP_SET* set, /**< global SCIP settings */
152  SCIP_STAT* stat, /**< problem statistics data */
153  SCIP_NLP* nlp, /**< current NLP data */
154  SCIP_VAR* var, /**< variable */
155  SCIP_Real val /**< value of coefficient */
156  );
157 
158 /** deletes linear coefficient from nonlinear row */
159 extern
161  SCIP_NLROW* nlrow, /**< nonlinear row to be changed */
162  SCIP_SET* set, /**< global SCIP settings */
163  SCIP_STAT* stat, /**< problem statistics data */
164  SCIP_NLP* nlp, /**< current NLP data */
165  SCIP_VAR* var /**< coefficient to be deleted */
166  );
167 
168 /** changes or adds a linear coefficient to a nonlinear row */
169 extern
171  SCIP_NLROW* nlrow, /**< nonlinear row */
172  BMS_BLKMEM* blkmem, /**< block memory */
173  SCIP_SET* set, /**< global SCIP settings */
174  SCIP_STAT* stat, /**< problem statistics data */
175  SCIP_NLP* nlp, /**< current NLP data */
176  SCIP_VAR* var, /**< variable */
177  SCIP_Real coef /**< new value of coefficient */
178  );
179 
180 /** ensures, that quadratic variables array of nonlinear row can store at least num entries */
181 extern
183  SCIP_NLROW* nlrow, /**< NLP row */
184  BMS_BLKMEM* blkmem, /**< block memory */
185  SCIP_SET* set, /**< global SCIP settings */
186  int num /**< minimum number of entries to store */
187  );
188 
189 /** adds variable to quadvars array of row */
190 extern
192  SCIP_NLROW* nlrow, /**< nonlinear row */
193  BMS_BLKMEM* blkmem, /**< block memory */
194  SCIP_SET* set, /**< global SCIP settings */
195  SCIP_VAR* var /**< variable to search for */
196  );
197 
198 /** ensures, that quadratic elements array of nonlinear row can store at least num entries */
199 extern
201  SCIP_NLROW* nlrow, /**< NLP row */
202  BMS_BLKMEM* blkmem, /**< block memory */
203  SCIP_SET* set, /**< global SCIP settings */
204  int num /**< minimum number of entries to store */
205  );
206 
207 /** adds a previously non existing quadratic element to an NLP nonlinear row */
208 extern
210  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
211  BMS_BLKMEM* blkmem, /**< block memory */
212  SCIP_SET* set, /**< global SCIP settings */
213  SCIP_STAT* stat, /**< problem statistics data */
214  SCIP_NLP* nlp, /**< current NLP data */
215  SCIP_QUADELEM elem /**< quadratic element to add */
216  );
217 
218 /** deletes quadratic element from nonlinear row */
219 extern
221  SCIP_NLROW* nlrow, /**< nonlinear row to be changed */
222  SCIP_SET* set, /**< global SCIP settings */
223  SCIP_STAT* stat, /**< problem statistics data */
224  SCIP_NLP* nlp, /**< current NLP data */
225  int idx1, /**< index of first variable in element */
226  int idx2 /**< index of second variable in element */
227  );
228 
229 /** changes or adds a quadratic element to a nonlinear row */
230 extern
232  SCIP_NLROW* nlrow, /**< nonlinear row */
233  BMS_BLKMEM* blkmem, /**< block memory */
234  SCIP_SET* set, /**< global SCIP settings */
235  SCIP_STAT* stat, /**< problem statistics data */
236  SCIP_NLP* nlp, /**< current NLP data */
237  SCIP_QUADELEM elem /**< new quadratic element */
238  );
239 
240 /** replaces or deletes an expression tree in nonlinear row */
241 extern
243  SCIP_NLROW* nlrow, /**< nonlinear row */
244  BMS_BLKMEM* blkmem, /**< block memory */
245  SCIP_SET* set, /**< global SCIP settings */
246  SCIP_STAT* stat, /**< problem statistics data */
247  SCIP_NLP* nlp, /**< current NLP data */
248  SCIP_EXPRTREE* exprtree /**< new expression tree, or NULL to delete current one */
249  );
250 
251 /** changes a parameter in an expression of a nonlinear row */
252 extern
254  SCIP_NLROW* nlrow, /**< nonlinear row */
255  BMS_BLKMEM* blkmem, /**< block memory */
256  SCIP_SET* set, /**< global SCIP settings */
257  SCIP_STAT* stat, /**< problem statistics data */
258  SCIP_NLP* nlp, /**< current NLP data */
259  int paramidx, /**< index of parameter in expression tree's parameter array */
260  SCIP_Real paramval /**< new value of parameter */
261  );
262 
263 /** changes all parameters in an expression of a nonlinear row */
264 extern
266  SCIP_NLROW* nlrow, /**< nonlinear row */
267  BMS_BLKMEM* blkmem, /**< block memory */
268  SCIP_SET* set, /**< global SCIP settings */
269  SCIP_STAT* stat, /**< problem statistics data */
270  SCIP_NLP* nlp, /**< current NLP data */
271  SCIP_Real* paramvals /**< new values of parameters */
272  );
273 
274 /** changes constant of nonlinear row */
275 extern
277  SCIP_NLROW* nlrow, /**< nonlinear row */
278  SCIP_SET* set, /**< global SCIP settings */
279  SCIP_STAT* stat, /**< problem statistics data */
280  SCIP_NLP* nlp, /**< current NLP data */
281  SCIP_Real constant /**< new constant */
282  );
283 
284 /** changes left hand side of nonlinear row */
285 extern
287  SCIP_NLROW* nlrow, /**< nonlinear row */
288  SCIP_SET* set, /**< global SCIP settings */
289  SCIP_STAT* stat, /**< problem statistics data */
290  SCIP_NLP* nlp, /**< current NLP data */
291  SCIP_Real lhs /**< new left hand side */
292  );
293 
294 /** changes right hand side of nonlinear row */
295 extern
297  SCIP_NLROW* nlrow, /**< nonlinear row */
298  SCIP_SET* set, /**< global SCIP settings */
299  SCIP_STAT* stat, /**< problem statistics data */
300  SCIP_NLP* nlp, /**< current NLP data */
301  SCIP_Real rhs /**< new right hand side */
302  );
303 
304 /** removes (or substitutes) all fixed, negated, aggregated, multi-aggregated variables from the linear, quadratic, and nonquadratic terms of a nonlinear row */
305 extern
307  SCIP_NLROW* nlrow, /**< nonlinear row */
308  BMS_BLKMEM* blkmem, /**< block memory */
309  SCIP_SET* set, /**< global SCIP settings */
310  SCIP_STAT* stat, /**< problem statistics data */
311  SCIP_NLP* nlp /**< current NLP data */
312  );
313 
314 /** recalculates the current activity of a nonlinear row in the current NLP solution */
315 extern
317  SCIP_NLROW* nlrow, /**< nonlinear row */
318  SCIP_SET* set, /**< global SCIP settings */
319  SCIP_STAT* stat, /**< problem statistics */
320  SCIP_NLP* nlp /**< current NLP data */
321  );
322 
323 /** gives the activity of a nonlinear row in the current NLP solution */
324 extern
326  SCIP_NLROW* nlrow, /**< nonlinear row */
327  SCIP_SET* set, /**< global SCIP settings */
328  SCIP_STAT* stat, /**< problem statistics */
329  SCIP_NLP* nlp, /**< current NLP data */
330  SCIP_Real* activity /**< buffer to store activity value */
331  );
332 
333 /** gives the feasibility of a nonlinear row in the current NLP solution: negative value means infeasibility */
334 extern
336  SCIP_NLROW* nlrow, /**< nonlinear row */
337  SCIP_SET* set, /**< global SCIP settings */
338  SCIP_STAT* stat, /**< problem statistics */
339  SCIP_NLP* nlp, /**< current NLP data */
340  SCIP_Real* feasibility /**< buffer to store feasibility value */
341  );
342 
343 /** calculates the current pseudo activity of a nonlinear row */
344 extern
346  SCIP_NLROW* nlrow, /**< nonlinear row */
347  SCIP_SET* set, /**< global SCIP settings */
348  SCIP_STAT* stat /**< problem statistics */
349  );
350 
351 /** returns the pseudo activity of a nonlinear row in the current pseudo solution */
352 extern
354  SCIP_NLROW* nlrow, /**< nonlinear row */
355  SCIP_SET* set, /**< global SCIP settings */
356  SCIP_STAT* stat, /**< problem statistics */
357  SCIP_Real* pseudoactivity /**< buffer to store pseudo activity value */
358  );
359 
360 /** returns the pseudo feasibility of a nonlinear row in the current pseudo solution: negative value means infeasibility */
361 extern
363  SCIP_NLROW* nlrow, /**< nonlinear row */
364  SCIP_SET* set, /**< global SCIP settings */
365  SCIP_STAT* stat, /**< problem statistics */
366  SCIP_Real* pseudofeasibility /**< buffer to store pseudo feasibility value */
367  );
368 
369 /** returns the activity of a nonlinear row for a given solution */
370 extern
372  SCIP_NLROW* nlrow, /**< nonlinear row */
373  SCIP_SET* set, /**< global SCIP settings */
374  SCIP_STAT* stat, /**< problem statistics data */
375  SCIP_SOL* sol, /**< primal CIP solution */
376  SCIP_Real* activity /**< buffer to store activity value */
377  );
378 
379 /** returns the feasibility of a nonlinear row for the given solution */
380 extern
382  SCIP_NLROW* nlrow, /**< nonlinear row */
383  SCIP_SET* set, /**< global SCIP settings */
384  SCIP_STAT* stat, /**< problem statistics data */
385  SCIP_SOL* sol, /**< primal CIP solution */
386  SCIP_Real* feasibility /**< buffer to store feasibility value */
387  );
388 
389 /** returns the minimal activity of a nonlinear row w.r.t. the variables' bounds */
390 extern
392  SCIP_NLROW* nlrow, /**< nonlinear row */
393  SCIP_SET* set, /**< global SCIP settings */
394  SCIP_STAT* stat, /**< problem statistics data */
395  SCIP_Real* minactivity, /**< buffer to store minimal activity, or NULL */
396  SCIP_Real* maxactivity /**< buffer to store maximal activity, or NULL */
397  );
398 
399 /** returns whether the nonlinear row is redundant w.r.t. the variables' bounds */
400 extern
402  SCIP_NLROW* nlrow, /**< nonlinear row */
403  SCIP_SET* set, /**< global SCIP settings */
404  SCIP_STAT* stat, /**< problem statistics data */
405  SCIP_Bool* isredundant /**< buffer to store whether row is redundant */
406  );
407 
408 /**@} */
409 
410 /**@name NLP methods */
411 /**@{ */
412 
413 /** includes event handler that is used by NLP */
415  SCIP_SET* set, /**< global SCIP settings */
416  BMS_BLKMEM* blkmem /**< block memory */
417  );
418 
419 /** construct a new empty NLP */
421  SCIP_NLP** nlp, /**< NLP handler, call by reference */
422  BMS_BLKMEM* blkmem, /**< block memory */
423  SCIP_SET* set, /**< global SCIP settings */
424  SCIP_STAT* stat, /**< problem statistics */
425  const char* name, /**< problem name */
426  int nvars_estimate /**< an estimate on the number of variables that may be added to the NLP later */
427  );
428 
429 /** frees NLP data object */
430 extern
432  SCIP_NLP** nlp, /**< pointer to NLP data object */
433  BMS_BLKMEM* blkmem, /**< block memory */
434  SCIP_SET* set, /**< global SCIP settings */
435  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
436  SCIP_LP* lp /**< SCIP LP, needed for releasing variables */
437  );
438 
439 /** resets the NLP to the empty NLP by removing all variables and rows from NLP,
440  * releasing all rows, and flushing the changes to the NLP solver
441  */
442 extern
444  SCIP_NLP* nlp, /**< NLP data */
445  BMS_BLKMEM* blkmem, /**< block memory */
446  SCIP_SET* set, /**< global SCIP settings */
447  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
448  SCIP_LP* lp /**< SCIP LP, needed for releasing variables */
449  );
450 
451 /** currently a dummy function that always returns TRUE */
452 extern
454  SCIP_NLP* nlp /**< NLP data */
455  );
456 
457 /** ensures, that variables array of NLP can store at least num entries */
458 extern
460  SCIP_NLP* nlp, /**< NLP data */
461  BMS_BLKMEM* blkmem, /**< block memory */
462  SCIP_SET* set, /**< global SCIP settings */
463  int num /**< minimum number of entries to store */
464  );
465 
466 /** adds a variable to the NLP and captures the variable */
467 extern
469  SCIP_NLP* nlp, /**< NLP data */
470  BMS_BLKMEM* blkmem, /**< block memory */
471  SCIP_SET* set, /**< global SCIP settings */
472  SCIP_VAR* var /**< variable */
473  );
474 
475 /** adds a set of variables to the NLP and captures the variables */
476 extern
478  SCIP_NLP* nlp, /**< NLP data */
479  BMS_BLKMEM* blkmem, /**< block memory */
480  SCIP_SET* set, /**< global SCIP settings */
481  int nvars, /**< number of variables to add */
482  SCIP_VAR** vars /**< variables to add */
483  );
484 
485 /** deletes a variable from the NLP and releases the variable */
486 extern
488  SCIP_NLP* nlp, /**< NLP data */
489  BMS_BLKMEM* blkmem, /**< block memory */
490  SCIP_SET* set, /**< global SCIP settings */
491  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
492  SCIP_LP* lp, /**< SCIP LP, needed to release variable */
493  SCIP_VAR* var /**< variable */
494  );
495 
496 /** ensures, that nonlinear rows array of NLP can store at least num entries */
497 extern
499  SCIP_NLP* nlp, /**< NLP data */
500  BMS_BLKMEM* blkmem, /**< block memory */
501  SCIP_SET* set, /**< global SCIP settings */
502  int num /**< minimum number of entries to store */
503  );
504 
505 /** adds a nonlinear row to the NLP and captures it
506  * all variables of the row need to be present in the NLP */
507 extern
509  SCIP_NLP* nlp, /**< NLP data */
510  BMS_BLKMEM* blkmem, /**< block memory */
511  SCIP_SET* set, /**< global SCIP settings */
512  SCIP_STAT* stat, /**< problem statistics data */
513  SCIP_NLROW* nlrow /**< nonlinear row */
514  );
515 
516 /** adds nonlinear rows to the NLP and captures them
517  * all variables of the row need to be present in the NLP */
518 extern
520  SCIP_NLP* nlp, /**< NLP data */
521  BMS_BLKMEM* blkmem, /**< block memory */
522  SCIP_SET* set, /**< global SCIP settings */
523  SCIP_STAT* stat, /**< problem statistics data */
524  int nnlrows, /**< number of rows to add */
525  SCIP_NLROW** nlrows /**< rows to add */
526  );
527 
528 /** deletes a nonlinear row from the NLP
529  * does nothing if nonlinear row is not in NLP */
530 extern
532  SCIP_NLP* nlp, /**< NLP data */
533  BMS_BLKMEM* blkmem, /**< block memory */
534  SCIP_SET* set, /**< global SCIP settings */
535  SCIP_NLROW* nlrow /**< nonlinear row */
536  );
537 
538 /** applies all cached changes to the NLP solver */
539 extern
541  SCIP_NLP* nlp, /**< current NLP data */
542  BMS_BLKMEM* blkmem, /**< block memory */
543  SCIP_SET* set /**< global SCIP settings */
544  );
545 
546 /** solves the NLP */
547 extern
549  SCIP_NLP* nlp, /**< NLP data */
550  BMS_BLKMEM* blkmem, /**< block memory buffers */
551  SCIP_SET* set, /**< global SCIP settings */
552  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
553  SCIP_STAT* stat /**< problem statistics */
554  );
555 
556 /** gets objective value of current NLP */
557 extern
559  SCIP_NLP* nlp /**< current NLP data */
560  );
561 
562 /** gives current pseudo objective value */
563 extern
565  SCIP_NLP* nlp, /**< current NLP data */
566  SCIP_SET* set, /**< global SCIP settings */
567  SCIP_STAT* stat, /**< problem statistics */
568  SCIP_Real* pseudoobjval /**< buffer to store pseudo objective value */
569  );
570 
571 /** gets fractional variables of last NLP solution along with solution values and fractionalities
572  */
573 extern
575  SCIP_NLP* nlp, /**< NLP data structure */
576  BMS_BLKMEM* blkmem, /**< block memory */
577  SCIP_SET* set, /**< global SCIP settings */
578  SCIP_STAT* stat, /**< problem statistics */
579  SCIP_VAR*** fracvars, /**< pointer to store the array of NLP fractional variables, or NULL */
580  SCIP_Real** fracvarssol, /**< pointer to store the array of NLP fractional variables solution values, or NULL */
581  SCIP_Real** fracvarsfrac, /**< pointer to store the array of NLP fractional variables fractionalities, or NULL */
582  int* nfracvars, /**< pointer to store the number of NLP fractional variables , or NULL */
583  int* npriofracvars /**< pointer to store the number of NLP fractional variables with maximal branching priority, or NULL */
584  );
585 
586 /** removes all redundant nonlinear rows */
587 extern
589  SCIP_NLP* nlp, /**< current NLP data */
590  BMS_BLKMEM* blkmem, /**< block memory buffers */
591  SCIP_SET* set, /**< global SCIP settings */
592  SCIP_STAT* stat /**< problem statistics */
593  );
594 
595 /** set initial guess (approximate primal solution) for next solve
596  *
597  * array initguess must be NULL or have length at least SCIPnlpGetNVars()
598  */
599 extern
601  SCIP_NLP* nlp, /**< current NLP data */
602  BMS_BLKMEM* blkmem, /**< block memory buffers */
603  SCIP_Real* initguess /**< new initial guess, or NULL to clear previous one */
604  );
605 
606 /** writes NLP to a file */
607 extern
609  SCIP_NLP* nlp, /**< current NLP data */
610  SCIP_SET* set, /**< global SCIP settings */
611  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
612  const char* fname /**< file name */
613  );
614 
615 /*
616  * NLP diving methods
617  */
618 
619 /** signals start of diving */
620 extern
622  SCIP_NLP* nlp, /**< current NLP data */
623  BMS_BLKMEM* blkmem, /**< block memory buffers */
624  SCIP_SET* set /**< global SCIP settings */
625  );
626 
627 /** resets the bound and objective changes made during diving and disables diving mode */
628 extern
630  SCIP_NLP* nlp, /**< current NLP data */
631  BMS_BLKMEM* blkmem, /**< block memory buffers */
632  SCIP_SET* set /**< global SCIP settings */
633  );
634 
635 /** changes coefficient of variable in diving NLP */
636 extern
638  SCIP_NLP* nlp, /**< current NLP data */
639  BMS_BLKMEM* blkmem, /**< block memory */
640  SCIP_SET* set, /**< global SCIP settings */
641  SCIP_STAT* stat, /**< problem statistics data */
642  SCIP_VAR* var, /**< variable which coefficient to change */
643  SCIP_Real coef /**< new linear coefficient of variable in objective */
644  );
645 
646 /** changes bounds of variable in diving NLP */
647 extern
649  SCIP_NLP* nlp, /**< current NLP data */
650  SCIP_VAR* var, /**< variable which bounds to change */
651  SCIP_Real lb, /**< new lower bound of variable */
652  SCIP_Real ub /**< new upper bound of variable */
653  );
654 
655 /** changes bounds of a set of variables in diving NLP */
656 extern
658  SCIP_NLP* nlp, /**< current NLP data */
659  SCIP_SET* set, /**< global SCIP settings */
660  int nvars, /**< number of variables which bounds to change */
661  SCIP_VAR** vars, /**< variables which bounds to change */
662  SCIP_Real* lbs, /**< new lower bounds of variables */
663  SCIP_Real* ubs /**< new upper bounds of variables */
664  );
665 
666 /** returns whether the objective function has been changed during diving */
667 extern
669  SCIP_NLP* nlp /**< current NLP data */
670  );
671 
672 /** solves diving NLP */
673 extern
675  SCIP_NLP* nlp, /**< current NLP data */
676  BMS_BLKMEM* blkmem, /**< block memory buffers */
677  SCIP_SET* set, /**< global SCIP settings */
678  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
679  SCIP_STAT* stat /**< problem statistics */
680  );
681 
682 /** gets array with variables of the NLP */
683 extern
685  SCIP_NLP* nlp /**< current NLP data */
686  );
687 
688 /** gets current number of variables in NLP */
689 extern
690 int SCIPnlpGetNVars(
691  SCIP_NLP* nlp /**< current NLP data */
692  );
693 
694 /** computes for each variables the number of NLP rows in which the variable appears in a nonlinear var */
695 extern
697  SCIP_NLP* nlp, /**< current NLP data */
698  int* nlcount /**< an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables */
699  );
700 
701 /** indicates whether there exists a row that contains a continuous variable in a nonlinear term
702  *
703  * @note The method may have to touch every row and nonlinear term to compute its result.
704  */
705 extern
707  SCIP_NLP* nlp /**< current NLP data */
708  );
709 
710 /** gives dual solution values associated with lower bounds of NLP variables */
711 extern
713  SCIP_NLP* nlp /**< current NLP data */
714  );
715 
716 /** gives dual solution values associated with upper bounds of NLP variables */
717 extern
719  SCIP_NLP* nlp /**< current NLP data */
720  );
721 
722 /** gets array with nonlinear rows of the NLP */
723 extern
725  SCIP_NLP* nlp /**< current NLP data */
726  );
727 
728 /** gets current number of nonlinear rows in NLP */
729 extern
731  SCIP_NLP* nlp /**< current NLP data */
732  );
733 
734 /** gets the NLP solver interface */
735 extern
737  SCIP_NLP* nlp /**< current NLP data */
738  );
739 
740 /** gets the NLP problem in the solver interface */
741 extern
743  SCIP_NLP* nlp /**< current NLP data */
744  );
745 
746 /** indicates whether NLP is currently in diving mode */
747 extern
749  SCIP_NLP* nlp /**< current NLP data */
750  );
751 
752 /** gets solution status of current NLP */
753 extern
755  SCIP_NLP* nlp /**< current NLP data */
756  );
757 
758 /** gets termination status of last NLP solve */
759 extern
761  SCIP_NLP* nlp /**< current NLP data */
762  );
763 
764 /** gives statistics (number of iterations, solving time, ...) of last NLP solve */
765 extern
767  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
768  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
769  );
770 
771 /** indicates whether a feasible solution for the current NLP is available
772  * thus, returns whether the solution status <= feasible */
773 extern
775  SCIP_NLP* nlp /**< current NLP data */
776  );
777 
778 /** gets integer parameter of NLP */
779 extern
781  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
782  SCIP_NLPPARAM type, /**< parameter number */
783  int* ival /**< pointer to store the parameter value */
784  );
785 
786 /** sets integer parameter of NLP */
787 extern
789  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
790  SCIP_NLPPARAM type, /**< parameter number */
791  int ival /**< parameter value */
792  );
793 
794 /** gets floating point parameter of NLP */
795 extern
797  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
798  SCIP_NLPPARAM type, /**< parameter number */
799  SCIP_Real* dval /**< pointer to store the parameter value */
800  );
801 
802 /** sets floating point parameter of NLP */
803 extern
805  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
806  SCIP_NLPPARAM type, /**< parameter number */
807  SCIP_Real dval /**< parameter value */
808  );
809 
810 /** gets string parameter of NLP */
811 extern
813  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
814  SCIP_NLPPARAM type, /**< parameter number */
815  const char** sval /**< pointer to store the parameter value */
816  );
817 
818 /** sets string parameter of NLP */
819 extern
821  SCIP_NLP* nlp, /**< pointer to NLP datastructure */
822  SCIP_NLPPARAM type, /**< parameter number */
823  const char* sval /**< parameter value */
824  );
825 
826 /**@} */
827 
828 #ifdef __cplusplus
829 }
830 #endif
831 
832 #endif /* __SCIP_NLP_H__ */
SCIP_RETCODE SCIPnlpDelVar(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var)
Definition: nlp.c:5327
SCIP_RETCODE SCIPnlpFree(SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: nlp.c:5134
SCIP_RETCODE SCIPnlrowEnsureQuadVarsSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: nlp.c:2514
SCIP_RETCODE SCIPnlpSetStringPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, const char *sval)
Definition: nlp.c:6058
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:85
int SCIPnlpGetNVars(SCIP_NLP *nlp)
Definition: nlp.c:5751
SCIP_RETCODE SCIPnlpEndDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: nlp.c:6108
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPnlrowFree(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem)
Definition: nlp.c:2242
SCIP_NLPTERMSTAT SCIPnlpGetTermstat(SCIP_NLP *nlp)
Definition: nlp.c:5938
SCIP_RETCODE SCIPnlrowChgConstant(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real constant)
Definition: nlp.c:2762
SCIP_RETCODE SCIPnlrowChgExprtreeParam(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int paramidx, SCIP_Real paramval)
Definition: nlp.c:2717
int SCIPnlpGetNNlRows(SCIP_NLP *nlp)
Definition: nlp.c:5888
SCIP_RETCODE SCIPnlrowGetSolFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *feasibility)
Definition: nlp.c:3148
SCIP_RETCODE SCIPnlrowAddQuadVar(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
Definition: nlp.c:2538
SCIP_RETCODE SCIPnlrowCreateCopy(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *sourcenlrow)
Definition: nlp.c:2142
SCIP_NLPI * SCIPnlpGetNLPI(SCIP_NLP *nlp)
Definition: nlp.c:5898
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPnlpEnsureVarsSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: nlp.c:5242
type definitions for global SCIP settings
SCIP_Bool SCIPnlpIsDiving(SCIP_NLP *nlp)
Definition: nlp.c:5918
SCIP_RETCODE SCIPnlpAddVar(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
Definition: nlp.c:5276
SCIP_Real SCIPnlpGetObjval(SCIP_NLP *nlp)
Definition: nlp.c:5538
SCIP_RETCODE SCIPnlpChgVarObjDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real coef)
Definition: nlp.c:6169
SCIP_RETCODE SCIPnlrowDelQuadElement(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int idx1, int idx2)
Definition: nlp.c:2612
SCIP_RETCODE SCIPnlrowRecalcNLPActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
Definition: nlp.c:2838
SCIP_RETCODE SCIPnlpGetRealPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real *dval)
Definition: nlp.c:6008
SCIP_RETCODE SCIPnlpAddVars(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int nvars, SCIP_VAR **vars)
Definition: nlp.c:5302
SCIP_RETCODE SCIPnlpChgVarBoundsDive(SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real lb, SCIP_Real ub)
Definition: nlp.c:6228
enum SCIP_NlpParam SCIP_NLPPARAM
Definition: type_nlpi.h:56
SCIP_Real * SCIPnlpGetVarsLbDualsol(SCIP_NLP *nlp)
Definition: nlp.c:5858
SCIP_NLPIPROBLEM * SCIPnlpGetNLPIProblem(SCIP_NLP *nlp)
Definition: nlp.c:5908
SCIP_RETCODE SCIPnlrowCreateFromRow(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row)
Definition: nlp.c:2177
SCIP_RETCODE SCIPnlrowPrint(SCIP_NLROW *nlrow, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: nlp.c:2279
void SCIPnlrowCapture(SCIP_NLROW *nlrow)
Definition: nlp.c:2334
type definitions for problem statistics
SCIP_RETCODE SCIPexprtreeRemoveFixedVars(SCIP_EXPRTREE *tree, SCIP_SET *set, SCIP_Bool *changed, int *varpos, int *newvarsstart)
Definition: nlp.c:223
type definitions for LP management
SCIP_RETCODE SCIPnlpWrite(SCIP_NLP *nlp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname)
Definition: nlp.c:5690
SCIP_RETCODE SCIPnlrowGetActivityBounds(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *minactivity, SCIP_Real *maxactivity)
Definition: nlp.c:3169
SCIP_RETCODE SCIPnlrowEnsureQuadElementsSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: nlp.c:2573
SCIP_RETCODE SCIPnlpSetRealPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real dval)
Definition: nlp.c:6025
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:69
SCIP_RETCODE SCIPnlpReset(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: nlp.c:5193
SCIP_RETCODE SCIPnlrowIsRedundant(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool *isredundant)
Definition: nlp.c:3200
SCIP_RETCODE SCIPnlrowChgExprtreeParams(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *paramvals)
Definition: nlp.c:2740
SCIP_RETCODE SCIPnlrowChgRhs(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real rhs)
Definition: nlp.c:2802
SCIP_RETCODE SCIPnlrowGetNLPFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *feasibility)
Definition: nlp.c:2942
SCIP_RETCODE SCIPnlpGetVarsNonlinearity(SCIP_NLP *nlp, int *nlcount)
Definition: nlp.c:5761
SCIP_RETCODE SCIPnlpInclude(SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: nlp.c:4988
SCIP_RETCODE SCIPnlpRemoveRedundantNlRows(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: nlp.c:5611
SCIP_RETCODE SCIPnlrowAddLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real val)
Definition: nlp.c:2395
SCIP_RETCODE SCIPnlpCreate(SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, int nvars_estimate)
Definition: nlp.c:5013
type definitions for problem variables
SCIP_RETCODE SCIPnlrowRecalcPseudoActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat)
Definition: nlp.c:2962
SCIP_RETCODE SCIPnlpStartDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: nlp.c:6078
SCIP_Bool SCIPnlpHasContinuousNonlinearity(SCIP_NLP *nlp)
Definition: nlp.c:5820
public methods for NLP management
SCIP_Bool SCIPnlpIsDivingObjChanged(SCIP_NLP *nlp)
Definition: nlp.c:6300
SCIP_RETCODE SCIPnlrowDelLinearCoef(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var)
Definition: nlp.c:2443
#define SCIP_Bool
Definition: def.h:53
SCIP_RETCODE SCIPnlpGetIntPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, int *ival)
Definition: nlp.c:5975
SCIP_RETCODE SCIPnlpSolveDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
Definition: nlp.c:6308
SCIP_Real * SCIPnlpGetVarsUbDualsol(SCIP_NLP *nlp)
Definition: nlp.c:5868
SCIP_RETCODE SCIPnlrowAddQuadElement(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
Definition: nlp.c:2597
SCIP_RETCODE SCIPnlrowGetPseudoActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoactivity)
Definition: nlp.c:3017
SCIP_NLROW ** SCIPnlpGetNlRows(SCIP_NLP *nlp)
Definition: nlp.c:5878
SCIP_RETCODE SCIPnlpGetStringPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, const char **sval)
Definition: nlp.c:6041
SCIP_RETCODE SCIPnlrowGetPseudoFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudofeasibility)
Definition: nlp.c:3043
SCIP_RETCODE SCIPnlrowChgLhs(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real lhs)
Definition: nlp.c:2782
SCIP_RETCODE SCIPnlrowRelease(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: nlp.c:2346
type definitions for storing primal CIP solutions
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPnlrowChgQuadElem(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
Definition: nlp.c:2646
SCIP_RETCODE SCIPnlrowCreate(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *exprtree, SCIP_Real lhs, SCIP_Real rhs)
Definition: nlp.c:1995
SCIP_RETCODE SCIPnlpEnsureNlRowsSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: nlp.c:5363
SCIP_RETCODE SCIPnlpDelNlRow(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *nlrow)
Definition: nlp.c:5443
SCIP_RETCODE SCIPnlpFlush(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: nlp.c:5474
SCIP_RETCODE SCIPnlpChgVarsBoundsDive(SCIP_NLP *nlp, SCIP_SET *set, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
Definition: nlp.c:6256
SCIP_RETCODE SCIPnlpSetInitialGuess(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_Real *initguess)
Definition: nlp.c:5657
#define SCIP_Real
Definition: def.h:127
SCIP_Bool SCIPnlpHasSolution(SCIP_NLP *nlp)
Definition: nlp.c:5965
SCIP_RETCODE SCIPnlrowChgLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef)
Definition: nlp.c:2476
SCIP_RETCODE SCIPnlpSetIntPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, int ival)
Definition: nlp.c:5992
SCIP_NLPSOLSTAT SCIPnlpGetSolstat(SCIP_NLP *nlp)
Definition: nlp.c:5928
SCIP_RETCODE SCIPnlpGetStatistics(SCIP_NLP *nlp, SCIP_NLPSTATISTICS *statistics)
Definition: nlp.c:5948
SCIP_RETCODE SCIPnlpSolve(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
Definition: nlp.c:5511
SCIP_RETCODE SCIPnlrowRemoveFixedVars(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
Definition: nlp.c:2822
type definitions for collecting primal CIP solutions and primal informations
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPnlrowEnsureLinearSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: nlp.c:2370
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
SCIP_RETCODE SCIPnlpGetFracVars(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
Definition: nlp.c:5577
SCIP_RETCODE SCIPnlrowChgExprtree(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_EXPRTREE *exprtree)
Definition: nlp.c:2678
SCIP_RETCODE SCIPnlpGetPseudoObjval(SCIP_NLP *nlp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoobjval)
Definition: nlp.c:5548
SCIP_RETCODE SCIPnlrowGetNLPActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *activity)
Definition: nlp.c:2915
SCIP_Bool SCIPnlpHasCurrentNodeNLP(SCIP_NLP *nlp)
Definition: nlp.c:5234
SCIP_RETCODE SCIPnlpAddNlRows(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int nnlrows, SCIP_NLROW **nlrows)
Definition: nlp.c:5415
SCIP_RETCODE SCIPnlrowGetSolActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *activity)
Definition: nlp.c:3063
SCIP_RETCODE SCIPnlpAddNlRow(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLROW *nlrow)
Definition: nlp.c:5391
SCIP_VAR ** SCIPnlpGetVars(SCIP_NLP *nlp)
Definition: nlp.c:5741
memory allocation routines