Scippy

SCIP

Solving Constraint Integer Programs

lpi_none.c
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-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file lpi_none.c
17  * @ingroup LPIS
18  * @brief dummy interface for the case no LP solver is needed
19  * @author Stefan Heinz
20  */
21 
22 /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #include <assert.h>
25 
26 #include "lpi/lpi.h"
27 #include "scip/pub_message.h"
28 
29 #define LPINAME "NONE" /**< name of the LPI interface */
30 #define LPIINFINITY 1e20 /**< infinity value */
31 
32 
33 /* globally turn off lint warnings: */
34 /*lint --e{715}*/
35 
36 /** LP interface
37  *
38  * Store several statistic values about the LP. These values are only needed in order to provide a rudimentary
39  * communication, e.g., there are asserts that check the number of rows and columns.
40  */
41 struct SCIP_LPi
42 {
43  int nrows; /**< number of rows */
44  int ncols; /**< number of columns */
45 };
46 
47 
48 /*
49  * Local Methods
50  */
51 
52 /** error handling method */
53 static
55  void
56  )
57 { /*lint --e{2707}*/
58  SCIPerrorMessage("No LP solver available (LPS=none).\n");
59  SCIPerrorMessage("Ensure <lp/solvefreq = -1>; note that continuous variables might require an LP-solver.\n");
60  SCIPABORT();
61 }
62 
63 /** error handling method */
64 static
66  void
67  )
68 {
69  SCIPerrorMessage("No LP solver available (LPS=none).\n");
70  SCIPerrorMessage("Ensure <lp/solvefreq = -1>; note that continuous variables might require an LP-solver.\n");
71 }
72 
73 /*
74  * LP Interface Methods
75  */
76 
77 
78 /*
79  * Miscellaneous Methods
80  */
81 
82 /**@name Miscellaneous Methods */
83 /**@{ */
84 
85 /** gets name and version of LP solver */
87  void
88  )
89 {
90  return LPINAME;
91 }
92 
93 /** gets description of LP solver (developer, webpage, ...) */
95  void
96  )
97 {
98  return "dummy LP solver interface which solely purpose is to resolve references at linking";
99 }
100 
101 /** gets pointer for LP solver - use only with great care */
103  SCIP_LPI* lpi /**< pointer to an LP interface structure */
104  )
105 { /*lint --e{715}*/
106  return (void*) NULL;
107 }
108 
109 /** pass integrality information to LP solver */
111  SCIP_LPI* lpi, /**< pointer to an LP interface structure */
112  int ncols, /**< length of integrality array */
113  int* intInfo /**< integrality array (0: continuous, 1: integer). May be NULL iff ncols is 0. */
114  )
115 { /*lint --e{715}*/
116  SCIPerrorMessage("SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
117  return SCIP_LPERROR;
118 }
119 
120 /** informs about availability of a primal simplex solving method */
122  void
123  )
124 {
125  return FALSE;
126 }
127 
128 /** informs about availability of a dual simplex solving method */
130  void
131  )
132 {
133  return FALSE;
134 }
135 
136 /** informs about availability of a barrier solving method */
138  void
139  )
140 {
141  return FALSE;
142 }
143 
144 /**@} */
145 
146 
147 
148 
149 /*
150  * LPI Creation and Destruction Methods
151  */
152 
153 /**@name LPI Creation and Destruction Methods */
154 /**@{ */
155 
156 /** creates an LP problem object */
158  SCIP_LPI** lpi, /**< pointer to an LP interface structure */
159  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler to use for printing messages, or NULL */
160  const char* name, /**< problem name */
161  SCIP_OBJSEN objsen /**< objective sense */
162  )
163 { /*lint --e{715}*/
164  assert(lpi != NULL);
165  assert(name != NULL);
166  SCIPdebugMessage("SCIPlpiCreate()\n");
167  SCIPdebugMessage("Note that there is no LP solver linked to the binary\n");
168 
169  /* create empty LPI */
170  SCIP_ALLOC( BMSallocMemory(lpi) );
171  (*lpi)->nrows = 0;
172  (*lpi)->ncols = 0;
173 
174  return SCIP_OKAY;
175 }
176 
177 /** deletes an LP problem object */
179  SCIP_LPI** lpi /**< pointer to an LP interface structure */
180  )
181 { /*lint --e{715}*/
182  assert( lpi != NULL );
183  SCIPdebugMessage("SCIPlpiFree()\n");
184 
185  BMSfreeMemory(lpi);
186 
187  return SCIP_OKAY;
188 }
189 
190 /**@} */
191 
192 
193 
194 
195 /*
196  * Modification Methods
197  */
198 
199 /**@name Modification Methods */
200 /**@{ */
201 
202 /** copies LP data with column matrix into LP solver */
204  SCIP_LPI* lpi, /**< LP interface structure */
205  SCIP_OBJSEN objsen, /**< objective sense */
206  int ncols, /**< number of columns */
207  const SCIP_Real* obj, /**< objective function values of columns */
208  const SCIP_Real* lb, /**< lower bounds of columns */
209  const SCIP_Real* ub, /**< upper bounds of columns */
210  char** colnames, /**< column names, or NULL */
211  int nrows, /**< number of rows */
212  const SCIP_Real* lhs, /**< left hand sides of rows */
213  const SCIP_Real* rhs, /**< right hand sides of rows */
214  char** rownames, /**< row names, or NULL */
215  int nnonz, /**< number of nonzero elements in the constraint matrix */
216  const int* beg, /**< start index of each column in ind- and val-array */
217  const int* ind, /**< row indices of constraint matrix entries */
218  const SCIP_Real* val /**< values of constraint matrix entries */
219  )
220 { /*lint --e{715}*/
221 
222 #ifndef NDEBUG
223  {
224  int j;
225  for( j = 0; j < nnonz; j++ )
226  assert( val[j] != 0 );
227  }
228 #endif
229 
230  assert( lpi != NULL );
231  assert(lhs != NULL);
232  assert(rhs != NULL);
233  assert(obj != NULL);
234  assert(lb != NULL);
235  assert(ub != NULL);
236  assert(beg != NULL);
237  assert(ind != NULL);
238  assert(val != NULL);
239 
240  lpi->nrows = nrows;
241  lpi->ncols = ncols;
242  assert( lpi->nrows >= 0 );
243  assert( lpi->ncols >= 0 );
244 
245  return SCIP_OKAY;
246 }
247 
248 /** adds columns to the LP */
250  SCIP_LPI* lpi, /**< LP interface structure */
251  int ncols, /**< number of columns to be added */
252  const SCIP_Real* obj, /**< objective function values of new columns */
253  const SCIP_Real* lb, /**< lower bounds of new columns */
254  const SCIP_Real* ub, /**< upper bounds of new columns */
255  char** colnames, /**< column names, or NULL */
256  int nnonz, /**< number of nonzero elements to be added to the constraint matrix */
257  const int* beg, /**< start index of each column in ind- and val-array, or NULL if nnonz == 0 */
258  const int* ind, /**< row indices of constraint matrix entries, or NULL if nnonz == 0 */
259  const SCIP_Real* val /**< values of constraint matrix entries, or NULL if nnonz == 0 */
260  )
261 { /*lint --e{715}*/
262  assert( lpi != NULL );
263  assert( lpi->ncols >= 0 );
264  assert(obj != NULL);
265  assert(lb != NULL);
266  assert(ub != NULL);
267  assert(nnonz == 0 || beg != NULL);
268  assert(nnonz == 0 || ind != NULL);
269  assert(nnonz == 0 || val != NULL);
270  assert(nnonz >= 0);
271  assert(ncols >= 0);
272 
273 #ifndef NDEBUG
274  {
275  int j;
276  for( j = 0; j < nnonz; j++ )
277  {
278  assert( val[j] != 0.0 );
279  /* perform check that no new rows are added - this is forbidden */
280  assert( 0 <= ind[j] && ind[j] < lpi->nrows );
281  }
282  }
283 #endif
284 
285  lpi->ncols += ncols;
286 
287  return SCIP_OKAY;
288 }
289 
290 /** deletes all columns in the given range from LP */
292  SCIP_LPI* lpi, /**< LP interface structure */
293  int firstcol, /**< first column to be deleted */
294  int lastcol /**< last column to be deleted */
295  )
296 { /*lint --e{715}*/
297  assert( lpi != NULL );
298  assert( lpi->ncols >= 0 );
299 
300  lpi->ncols -= lastcol - firstcol + 1;
301  assert( lpi->ncols >= 0 );
302 
303  return SCIP_OKAY;
304 }
305 
306 /** deletes columns from SCIP_LP; the new position of a column must not be greater that its old position */
308  SCIP_LPI* lpi, /**< LP interface structure */
309  int* dstat /**< deletion status of columns
310  * input: 1 if column should be deleted, 0 if not
311  * output: new position of column, -1 if column was deleted */
312  )
313 { /*lint --e{715}*/
314  int cnt = 0;
315  int j;
316 
317  assert( lpi != NULL );
318  assert( dstat != NULL );
319  assert( lpi->ncols >= 0 );
320 
321  for (j = 0; j < lpi->ncols; ++j)
322  {
323  if ( dstat[j] )
324  {
325  ++cnt;
326  dstat[j] = -1;
327  }
328  else
329  dstat[j] = cnt;
330  }
331  lpi->ncols -= cnt;
332  assert( lpi->ncols >= 0 );
333 
334  return SCIP_OKAY;
335 }
336 
337 /** adds rows to the LP */
339  SCIP_LPI* lpi, /**< LP interface structure */
340  int nrows, /**< number of rows to be added */
341  const SCIP_Real* lhs, /**< left hand sides of new rows */
342  const SCIP_Real* rhs, /**< right hand sides of new rows */
343  char** rownames, /**< row names, or NULL */
344  int nnonz, /**< number of nonzero elements to be added to the constraint matrix */
345  const int* beg, /**< start index of each row in ind- and val-array, or NULL if nnonz == 0 */
346  const int* ind, /**< column indices of constraint matrix entries, or NULL if nnonz == 0 */
347  const SCIP_Real* val /**< values of constraint matrix entries, or NULL if nnonz == 0 */
348  )
349 { /*lint --e{715}*/
350 
351  assert( lpi != NULL );
352  assert( lpi->nrows >= 0 );
353  assert(lhs != NULL);
354  assert(rhs != NULL);
355  assert(nnonz == 0 || beg != NULL);
356  assert(nnonz == 0 || ind != NULL);
357  assert(nnonz == 0 || val != NULL);
358 
359 #ifndef NDEBUG
360  /* perform check that no new columns are added - this is forbidden */
361  {
362  int j;
363  for (j = 0; j < nnonz; ++j)
364  {
365  assert( val[j] != 0.0 );
366  assert( 0 <= ind[j] && ind[j] < lpi->ncols );
367  }
368  }
369 #endif
370 
371  lpi->nrows += nrows;
372 
373  return SCIP_OKAY;
374 }
375 
376 /** deletes all rows in the given range from LP */
378  SCIP_LPI* lpi, /**< LP interface structure */
379  int firstrow, /**< first row to be deleted */
380  int lastrow /**< last row to be deleted */
381  )
382 { /*lint --e{715}*/
383  assert( lpi != NULL );
384  assert( lpi->nrows >= 0 );
385 
386  lpi->nrows -= lastrow - firstrow + 1;
387  assert( lpi->nrows >= 0 );
388 
389  return SCIP_OKAY;
390 }
391 
392 /** deletes rows from SCIP_LP; the new position of a row must not be greater that its old position */
394  SCIP_LPI* lpi, /**< LP interface structure */
395  int* dstat /**< deletion status of rows
396  * input: 1 if row should be deleted, 0 if not
397  * output: new position of row, -1 if row was deleted */
398  )
399 { /*lint --e{715}*/
400  int cnt = 0;
401  int i;
402 
403  assert( lpi != NULL );
404  assert( dstat != NULL );
405  assert( lpi->nrows >= 0 );
406 
407  for (i = 0; i < lpi->nrows; ++i)
408  {
409  if ( dstat[i] )
410  {
411  ++cnt;
412  dstat[i] = -1;
413  }
414  else
415  dstat[i] = cnt;
416  }
417  lpi->nrows -= cnt;
418  assert( lpi->nrows >= 0 );
419 
420  return SCIP_OKAY;
421 }
422 
423 /** clears the whole LP */
425  SCIP_LPI* lpi /**< LP interface structure */
426  )
427 { /*lint --e{715}*/
428  assert( lpi != NULL );
429  assert( lpi->nrows >= 0 );
430  assert( lpi->ncols >= 0 );
431 
432  lpi->nrows = 0;
433  lpi->ncols = 0;
434 
435  return SCIP_OKAY;
436 }
437 
438 /** changes lower and upper bounds of columns */
440  SCIP_LPI* lpi, /**< LP interface structure */
441  int ncols, /**< number of columns to change bounds for */
442  const int* ind, /**< column indices or NULL if ncols is zero */
443  const SCIP_Real* lb, /**< values for the new lower bounds or NULL if ncols is zero */
444  const SCIP_Real* ub /**< values for the new upper bounds or NULL if ncols is zero */
445  )
446 { /*lint --e{715}*/
447  int j;
448 
449  assert(ncols == 0 || (ind != NULL && lb != NULL && ub != NULL));
450 
451  if( ncols <= 0 )
452  return SCIP_OKAY;
453 
454  for (j = 0; j < ncols; ++j)
455  {
456  if ( SCIPlpiIsInfinity(lpi, lb[j]) )
457  {
458  SCIPerrorMessage("LP Error: fixing lower bound for variable %d to infinity.\n", ind[j]);
459  return SCIP_LPERROR;
460  }
461  if ( SCIPlpiIsInfinity(lpi, -ub[j]) )
462  {
463  SCIPerrorMessage("LP Error: fixing upper bound for variable %d to -infinity.\n", ind[j]);
464  return SCIP_LPERROR;
465  }
466  }
467 
468  return SCIP_OKAY;
469 }
470 
471 /** changes left and right hand sides of rows */
473  SCIP_LPI* lpi, /**< LP interface structure */
474  int nrows, /**< number of rows to change sides for */
475  const int* ind, /**< row indices */
476  const SCIP_Real* lhs, /**< new values for left hand sides */
477  const SCIP_Real* rhs /**< new values for right hand sides */
478  )
479 { /*lint --e{715}*/
480  assert(lpi != NULL);
481  assert(ind != NULL);
482  assert(lhs != NULL);
483  assert(rhs != NULL);
484  return SCIP_OKAY;
485 }
486 
487 /** changes a single coefficient */
489  SCIP_LPI* lpi, /**< LP interface structure */
490  int row, /**< row number of coefficient to change */
491  int col, /**< column number of coefficient to change */
492  SCIP_Real newval /**< new value of coefficient */
493  )
494 { /*lint --e{715}*/
495  assert(lpi != NULL);
496  return SCIP_OKAY;
497 }
498 
499 /** changes the objective sense */
501  SCIP_LPI* lpi, /**< LP interface structure */
502  SCIP_OBJSEN objsen /**< new objective sense */
503  )
504 { /*lint --e{715}*/
505  assert(lpi != NULL);
506  return SCIP_OKAY;
507 }
508 
509 /** changes objective values of columns in the LP */
511  SCIP_LPI* lpi, /**< LP interface structure */
512  int ncols, /**< number of columns to change objective value for */
513  const int* ind, /**< column indices to change objective value for */
514  const SCIP_Real* obj /**< new objective values for columns */
515  )
516 { /*lint --e{715}*/
517  assert(lpi != NULL);
518  assert(ind != NULL);
519  assert(obj != NULL);
520  return SCIP_OKAY;
521 }
522 
523 /** multiplies a row with a non-zero scalar; for negative scalars, the row's sense is switched accordingly */
525  SCIP_LPI* lpi, /**< LP interface structure */
526  int row, /**< row number to scale */
527  SCIP_Real scaleval /**< scaling multiplier */
528  )
529 { /*lint --e{715}*/
530  assert(lpi != NULL);
531  return SCIP_OKAY;
532 }
533 
534 /** multiplies a column with a non-zero scalar; the objective value is multiplied with the scalar, and the bounds
535  * are divided by the scalar; for negative scalars, the column's bounds are switched
536  */
538  SCIP_LPI* lpi, /**< LP interface structure */
539  int col, /**< column number to scale */
540  SCIP_Real scaleval /**< scaling multiplier */
541  )
542 { /*lint --e{715}*/
543  assert(lpi != NULL);
544  return SCIP_OKAY;
545 }
546 
547 /**@} */
548 
549 
550 
551 
552 /*
553  * Data Accessing Methods
554  */
555 
556 /**@name Data Accessing Methods */
557 /**@{ */
558 
559 /** gets the number of rows in the LP */
561  SCIP_LPI* lpi, /**< LP interface structure */
562  int* nrows /**< pointer to store the number of rows */
563  )
564 { /*lint --e{715}*/
565  assert( lpi != NULL );
566  assert( nrows != NULL );
567  assert( lpi->nrows >= 0 );
568 
569  *nrows = lpi->nrows;
570 
571  return SCIP_OKAY;
572 }
573 
574 /** gets the number of columns in the LP */
576  SCIP_LPI* lpi, /**< LP interface structure */
577  int* ncols /**< pointer to store the number of cols */
578  )
579 { /*lint --e{715}*/
580  assert( lpi != NULL );
581  assert( ncols != NULL );
582  assert( lpi->ncols >= 0 );
583 
584  *ncols = lpi->ncols;
585 
586  return SCIP_OKAY;
587 }
588 
589 /** gets the number of nonzero elements in the LP constraint matrix */
591  SCIP_LPI* lpi, /**< LP interface structure */
592  int* nnonz /**< pointer to store the number of nonzeros */
593  )
594 { /*lint --e{715}*/
595  assert(nnonz != NULL);
596  assert(lpi != NULL);
597  errorMessage();
598  return SCIP_PLUGINNOTFOUND;
599 }
600 
601 /** gets columns from LP problem object; the arrays have to be large enough to store all values
602  * Either both, lb and ub, have to be NULL, or both have to be non-NULL,
603  * either nnonz, beg, ind, and val have to be NULL, or all of them have to be non-NULL.
604  */
606  SCIP_LPI* lpi, /**< LP interface structure */
607  int firstcol, /**< first column to get from LP */
608  int lastcol, /**< last column to get from LP */
609  SCIP_Real* lb, /**< buffer to store the lower bound vector, or NULL */
610  SCIP_Real* ub, /**< buffer to store the upper bound vector, or NULL */
611  int* nnonz, /**< pointer to store the number of nonzero elements returned, or NULL */
612  int* beg, /**< buffer to store start index of each column in ind- and val-array, or NULL */
613  int* ind, /**< buffer to store row indices of constraint matrix entries, or NULL */
614  SCIP_Real* val /**< buffer to store values of constraint matrix entries, or NULL */
615  )
616 { /*lint --e{715}*/
617  errorMessage();
618  return SCIP_PLUGINNOTFOUND;
619 }
620 
621 /** gets rows from LP problem object; the arrays have to be large enough to store all values.
622  * Either both, lhs and rhs, have to be NULL, or both have to be non-NULL,
623  * either nnonz, beg, ind, and val have to be NULL, or all of them have to be non-NULL.
624  */
626  SCIP_LPI* lpi, /**< LP interface structure */
627  int firstrow, /**< first row to get from LP */
628  int lastrow, /**< last row to get from LP */
629  SCIP_Real* lhs, /**< buffer to store left hand side vector, or NULL */
630  SCIP_Real* rhs, /**< buffer to store right hand side vector, or NULL */
631  int* nnonz, /**< pointer to store the number of nonzero elements returned, or NULL */
632  int* beg, /**< buffer to store start index of each row in ind- and val-array, or NULL */
633  int* ind, /**< buffer to store column indices of constraint matrix entries, or NULL */
634  SCIP_Real* val /**< buffer to store values of constraint matrix entries, or NULL */
635  )
636 { /*lint --e{715}*/
637  errorMessage();
638  return SCIP_PLUGINNOTFOUND;
639 }
640 
641 /** gets column names */
643  SCIP_LPI* lpi, /**< LP interface structure */
644  int firstcol, /**< first column to get name from LP */
645  int lastcol, /**< last column to get name from LP */
646  char** colnames, /**< pointers to column names (of size at least lastcol-firstcol+1) or NULL if namestoragesize is zero */
647  char* namestorage, /**< storage for col names or NULL if namestoragesize is zero */
648  int namestoragesize, /**< size of namestorage (if 0, storageleft returns the storage needed) */
649  int* storageleft /**< amount of storage left (if < 0 the namestorage was not big enough) or NULL if namestoragesize is zero */
650  )
651 { /*lint --e{715}*/
652  assert(lpi != NULL);
653  assert(colnames != NULL || namestoragesize == 0);
654  assert(namestorage != NULL || namestoragesize == 0);
655  assert(namestoragesize >= 0);
656  assert(storageleft != NULL);
657  errorMessage();
658  return SCIP_PLUGINNOTFOUND;
659 }
660 
661 /** gets row names */
663  SCIP_LPI* lpi, /**< LP interface structure */
664  int firstrow, /**< first row to get name from LP */
665  int lastrow, /**< last row to get name from LP */
666  char** rownames, /**< pointers to row names (of size at least lastrow-firstrow+1) or NULL if namestoragesize is zero */
667  char* namestorage, /**< storage for row names or NULL if namestoragesize is zero */
668  int namestoragesize, /**< size of namestorage (if 0, -storageleft returns the storage needed) */
669  int* storageleft /**< amount of storage left (if < 0 the namestorage was not big enough) or NULL if namestoragesize is zero */
670  )
671 { /*lint --e{715}*/
672  assert(lpi != NULL);
673  assert(rownames != NULL || namestoragesize == 0);
674  assert(namestorage != NULL || namestoragesize == 0);
675  assert(namestoragesize >= 0);
676  assert(storageleft != NULL);
677  errorMessage();
678  return SCIP_PLUGINNOTFOUND;
679 }
680 
681 /** gets the objective sense of the LP */
683  SCIP_LPI* lpi, /**< LP interface structure */
684  SCIP_OBJSEN* objsen /**< pointer to store objective sense */
685  )
686 { /*lint --e{715}*/
687  errorMessage();
688  return SCIP_PLUGINNOTFOUND;
689 }
690 
691 /** gets objective coefficients from LP problem object */
693  SCIP_LPI* lpi, /**< LP interface structure */
694  int firstcol, /**< first column to get objective coefficient for */
695  int lastcol, /**< last column to get objective coefficient for */
696  SCIP_Real* vals /**< array to store objective coefficients */
697  )
698 { /*lint --e{715}*/
699  assert(lpi != NULL);
700  assert(firstcol <= lastcol);
701  assert(vals != NULL);
702  errorMessage();
703  return SCIP_PLUGINNOTFOUND;
704 }
705 
706 /** gets current bounds from LP problem object */
708  SCIP_LPI* lpi, /**< LP interface structure */
709  int firstcol, /**< first column to get bounds for */
710  int lastcol, /**< last column to get bounds for */
711  SCIP_Real* lbs, /**< array to store lower bound values, or NULL */
712  SCIP_Real* ubs /**< array to store upper bound values, or NULL */
713  )
714 { /*lint --e{715}*/
715  assert(lpi != NULL);
716  assert(firstcol <= lastcol);
717  errorMessage();
718  return SCIP_PLUGINNOTFOUND;
719 }
720 
721 /** gets current row sides from LP problem object */
723  SCIP_LPI* lpi, /**< LP interface structure */
724  int firstrow, /**< first row to get sides for */
725  int lastrow, /**< last row to get sides for */
726  SCIP_Real* lhss, /**< array to store left hand side values, or NULL */
727  SCIP_Real* rhss /**< array to store right hand side values, or NULL */
728  )
729 { /*lint --e{715}*/
730  assert(lpi != NULL);
731  assert(firstrow <= lastrow);
732  errorMessage();
733  return SCIP_PLUGINNOTFOUND;
734 }
735 
736 /** gets a single coefficient */
738  SCIP_LPI* lpi, /**< LP interface structure */
739  int row, /**< row number of coefficient */
740  int col, /**< column number of coefficient */
741  SCIP_Real* val /**< pointer to store the value of the coefficient */
742  )
743 { /*lint --e{715}*/
744  assert(lpi != NULL);
745  assert(val != NULL);
746  errorMessage();
747  return SCIP_PLUGINNOTFOUND;
748 }
749 
750 /**@} */
751 
752 
753 
754 
755 /*
756  * Solving Methods
757  */
758 
759 /**@name Solving Methods */
760 /**@{ */
761 
762 /** calls primal simplex to solve the LP */
764  SCIP_LPI* lpi /**< LP interface structure */
765  )
766 { /*lint --e{715}*/
767  assert(lpi != NULL);
768  errorMessage();
769  return SCIP_PLUGINNOTFOUND;
770 }
771 
772 /** calls dual simplex to solve the LP */
774  SCIP_LPI* lpi /**< LP interface structure */
775  )
776 { /*lint --e{715}*/
777  assert(lpi != NULL);
778  errorMessage();
779  return SCIP_PLUGINNOTFOUND;
780 }
781 
782 /** calls barrier or interior point algorithm to solve the LP with crossover to simplex basis */
784  SCIP_LPI* lpi, /**< LP interface structure */
785  SCIP_Bool crossover /**< perform crossover */
786  )
787 { /*lint --e{715}*/
788  assert(lpi != NULL);
789  errorMessage();
790  return SCIP_PLUGINNOTFOUND;
791 }
792 
793 /** start strong branching - call before any strong branching */
795  SCIP_LPI* lpi /**< LP interface structure */
796  )
797 { /*lint --e{715}*/
798  assert(lpi != NULL);
799  return SCIP_OKAY;
800 }
801 
802 /** end strong branching - call after any strong branching */
804  SCIP_LPI* lpi /**< LP interface structure */
805  )
806 { /*lint --e{715}*/
807  assert(lpi != NULL);
808  return SCIP_OKAY;
809 }
810 
811 /** performs strong branching iterations on one @b fractional candidate */
813  SCIP_LPI* lpi, /**< LP interface structure */
814  int col, /**< column to apply strong branching on */
815  SCIP_Real psol, /**< fractional current primal solution value of column */
816  int itlim, /**< iteration limit for strong branchings */
817  SCIP_Real* down, /**< stores dual bound after branching column down */
818  SCIP_Real* up, /**< stores dual bound after branching column up */
819  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound;
820  * otherwise, it can only be used as an estimate value */
821  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound;
822  * otherwise, it can only be used as an estimate value */
823  int* iter /**< stores total number of strong branching iterations, or -1; may be NULL */
824  )
825 { /*lint --e{715}*/
826  assert(lpi != NULL);
827  assert( down != NULL );
828  assert( up != NULL );
829  assert( downvalid != NULL );
830  assert( upvalid != NULL );
831  errorMessage();
832  return SCIP_PLUGINNOTFOUND;
833 }
834 
835 /** performs strong branching iterations on given @b fractional candidates */
837  SCIP_LPI* lpi, /**< LP interface structure */
838  int* cols, /**< columns to apply strong branching on */
839  int ncols, /**< number of columns */
840  SCIP_Real* psols, /**< fractional current primal solution values of columns */
841  int itlim, /**< iteration limit for strong branchings */
842  SCIP_Real* down, /**< stores dual bounds after branching columns down */
843  SCIP_Real* up, /**< stores dual bounds after branching columns up */
844  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds;
845  * otherwise, they can only be used as an estimate values */
846  SCIP_Bool* upvalid, /**< stores whether the returned up values are a valid dual bounds;
847  * otherwise, they can only be used as an estimate values */
848  int* iter /**< stores total number of strong branching iterations, or -1; may be NULL */
849  )
850 { /*lint --e{715}*/
851  assert(lpi != NULL);
852  assert( cols != NULL );
853  assert( psols != NULL );
854  assert( down != NULL );
855  assert( up != NULL );
856  assert( downvalid != NULL );
857  assert( upvalid != NULL );
858  errorMessage();
859  return SCIP_PLUGINNOTFOUND;
860 }
861 
862 /** performs strong branching iterations on one candidate with @b integral value */
864  SCIP_LPI* lpi, /**< LP interface structure */
865  int col, /**< column to apply strong branching on */
866  SCIP_Real psol, /**< current integral primal solution value of column */
867  int itlim, /**< iteration limit for strong branchings */
868  SCIP_Real* down, /**< stores dual bound after branching column down */
869  SCIP_Real* up, /**< stores dual bound after branching column up */
870  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound;
871  * otherwise, it can only be used as an estimate value */
872  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound;
873  * otherwise, it can only be used as an estimate value */
874  int* iter /**< stores total number of strong branching iterations, or -1; may be NULL */
875  )
876 { /*lint --e{715}*/
877  assert(lpi != NULL);
878  assert( down != NULL );
879  assert( up != NULL );
880  assert( downvalid != NULL );
881  assert( upvalid != NULL );
882  errorMessage();
883  return SCIP_PLUGINNOTFOUND;
884 }
885 
886 /** performs strong branching iterations on given candidates with @b integral values */
888  SCIP_LPI* lpi, /**< LP interface structure */
889  int* cols, /**< columns to apply strong branching on */
890  int ncols, /**< number of columns */
891  SCIP_Real* psols, /**< current integral primal solution values of columns */
892  int itlim, /**< iteration limit for strong branchings */
893  SCIP_Real* down, /**< stores dual bounds after branching columns down */
894  SCIP_Real* up, /**< stores dual bounds after branching columns up */
895  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds;
896  * otherwise, they can only be used as an estimate values */
897  SCIP_Bool* upvalid, /**< stores whether the returned up values are a valid dual bounds;
898  * otherwise, they can only be used as an estimate values */
899  int* iter /**< stores total number of strong branching iterations, or -1; may be NULL */
900  )
901 { /*lint --e{715}*/
902  assert(lpi != NULL);
903  assert( cols != NULL );
904  assert( psols != NULL );
905  assert( down != NULL );
906  assert( up != NULL );
907  assert( downvalid != NULL );
908  assert( upvalid != NULL );
909  errorMessage();
910  return SCIP_PLUGINNOTFOUND;
911 }
912 /**@} */
913 
914 
915 
916 
917 /*
918  * Solution Information Methods
919  */
920 
921 /**@name Solution Information Methods */
922 /**@{ */
923 
924 /** returns whether a solve method was called after the last modification of the LP */
926  SCIP_LPI* lpi /**< LP interface structure */
927  )
928 { /*lint --e{715}*/
929  assert(lpi != NULL);
931  return FALSE;
932 }
933 
934 /** gets information about primal and dual feasibility of the current LP solution
935  *
936  * The feasibility information is with respect to the last solving call and it is only relevant if SCIPlpiWasSolved()
937  * returns true. If the LP is changed, this information might be invalidated.
938  *
939  * Note that @a primalfeasible and @a dualfeasible should only return true if the solver has proved the respective LP to
940  * be feasible. Thus, the return values should be equal to the values of SCIPlpiIsPrimalFeasible() and
941  * SCIPlpiIsDualFeasible(), respectively. Note that if feasibility cannot be proved, they should return false (even if
942  * the problem might actually be feasible).
943  */
945  SCIP_LPI* lpi, /**< LP interface structure */
946  SCIP_Bool* primalfeasible, /**< pointer to store primal feasibility status */
947  SCIP_Bool* dualfeasible /**< pointer to store dual feasibility status */
948  )
949 { /*lint --e{715}*/
950  assert(lpi != NULL);
951  assert(primalfeasible != NULL);
952  assert(dualfeasible != NULL);
953  errorMessage();
954  return SCIP_PLUGINNOTFOUND;
955 }
956 
957 /** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point);
958  * this does not necessarily mean, that the solver knows and can return the primal ray
959  */
961  SCIP_LPI* lpi /**< LP interface structure */
962  )
963 { /*lint --e{715}*/
964  assert(lpi != NULL);
966  return FALSE;
967 }
968 
969 /** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point),
970  * and the solver knows and can return the primal ray
971  */
973  SCIP_LPI* lpi /**< LP interface structure */
974  )
975 { /*lint --e{715}*/
976  assert(lpi != NULL);
978  return FALSE;
979 }
980 
981 /** returns TRUE iff LP is proven to be primal unbounded */
983  SCIP_LPI* lpi /**< LP interface structure */
984  )
985 { /*lint --e{715}*/
986  assert(lpi != NULL);
988  return FALSE;
989 }
990 
991 /** returns TRUE iff LP is proven to be primal infeasible */
993  SCIP_LPI* lpi /**< LP interface structure */
994  )
995 { /*lint --e{715}*/
996  assert(lpi != NULL);
998  return FALSE;
999 }
1000 
1001 /** returns TRUE iff LP is proven to be primal feasible */
1003  SCIP_LPI* lpi /**< LP interface structure */
1004  )
1005 { /*lint --e{715}*/
1006  assert(lpi != NULL);
1008  return FALSE;
1009 }
1010 
1011 /** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point);
1012  * this does not necessarily mean, that the solver knows and can return the dual ray
1013  */
1015  SCIP_LPI* lpi /**< LP interface structure */
1016  )
1017 { /*lint --e{715}*/
1018  assert(lpi != NULL);
1020  return FALSE;
1021 }
1022 
1023 /** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point),
1024  * and the solver knows and can return the dual ray
1025  */
1027  SCIP_LPI* lpi /**< LP interface structure */
1028  )
1029 { /*lint --e{715}*/
1030  assert(lpi != NULL);
1032  return FALSE;
1033 }
1034 
1035 /** returns TRUE iff LP is proven to be dual unbounded */
1037  SCIP_LPI* lpi /**< LP interface structure */
1038  )
1039 { /*lint --e{715}*/
1040  assert(lpi != NULL);
1042  return FALSE;
1043 }
1044 
1045 /** returns TRUE iff LP is proven to be dual infeasible */
1047  SCIP_LPI* lpi /**< LP interface structure */
1048  )
1049 { /*lint --e{715}*/
1050  assert(lpi != NULL);
1052  return FALSE;
1053 }
1054 
1055 /** returns TRUE iff LP is proven to be dual feasible */
1057  SCIP_LPI* lpi /**< LP interface structure */
1058  )
1059 { /*lint --e{715}*/
1060  assert(lpi != NULL);
1062  return FALSE;
1063 }
1064 
1065 /** returns TRUE iff LP was solved to optimality */
1067  SCIP_LPI* lpi /**< LP interface structure */
1068  )
1069 { /*lint --e{715}*/
1070  assert(lpi != NULL);
1072  return FALSE;
1073 }
1074 
1075 /** returns TRUE iff current LP solution is stable
1076  *
1077  * This function should return true if the solution is reliable, i.e., feasible and optimal (or proven
1078  * infeasible/unbounded) with respect to the original problem. The optimality status might be with respect to a scaled
1079  * version of the problem, but the solution might not be feasible to the unscaled original problem; in this case,
1080  * SCIPlpiIsStable() should return false.
1081  */
1083  SCIP_LPI* lpi /**< LP interface structure */
1084  )
1085 { /*lint --e{715}*/
1086  assert(lpi != NULL);
1088  return FALSE;
1089 }
1090 
1091 /** returns TRUE iff the objective limit was reached */
1093  SCIP_LPI* lpi /**< LP interface structure */
1094  )
1095 { /*lint --e{715}*/
1096  assert(lpi != NULL);
1098  return FALSE;
1099 }
1100 
1101 /** returns TRUE iff the iteration limit was reached */
1103  SCIP_LPI* lpi /**< LP interface structure */
1104  )
1105 { /*lint --e{715}*/
1106  assert(lpi != NULL);
1108  return FALSE;
1109 }
1110 
1111 /** returns TRUE iff the time limit was reached */
1113  SCIP_LPI* lpi /**< LP interface structure */
1114  )
1115 { /*lint --e{715}*/
1116  assert(lpi != NULL);
1118  return FALSE;
1119 }
1120 
1121 /** returns the internal solution status of the solver */
1123  SCIP_LPI* lpi /**< LP interface structure */
1124  )
1125 { /*lint --e{715}*/
1126  assert(lpi != NULL);
1128  return FALSE;
1129 }
1130 
1131 /** tries to reset the internal status of the LP solver in order to ignore an instability of the last solving call */
1133  SCIP_LPI* lpi, /**< LP interface structure */
1134  SCIP_Bool* success /**< pointer to store, whether the instability could be ignored */
1135  )
1136 { /*lint --e{715}*/
1137  assert(lpi != NULL);
1138  assert(success != NULL);
1139  errorMessage();
1140  return SCIP_PLUGINNOTFOUND;
1141 }
1142 
1143 /** gets objective value of solution */
1145  SCIP_LPI* lpi, /**< LP interface structure */
1146  SCIP_Real* objval /**< stores the objective value */
1147  )
1148 { /*lint --e{715}*/
1149  assert(lpi != NULL);
1150  assert(objval != NULL);
1151  errorMessage();
1152  return SCIP_PLUGINNOTFOUND;
1153 }
1154 
1155 /** gets primal and dual solution vectors for feasible LPs
1156  *
1157  * Before calling this function, the caller must ensure that the LP has been solved to optimality, i.e., that
1158  * SCIPlpiIsOptimal() returns true.
1159  */
1161  SCIP_LPI* lpi, /**< LP interface structure */
1162  SCIP_Real* objval, /**< stores the objective value, may be NULL if not needed */
1163  SCIP_Real* primsol, /**< primal solution vector, may be NULL if not needed */
1164  SCIP_Real* dualsol, /**< dual solution vector, may be NULL if not needed */
1165  SCIP_Real* activity, /**< row activity vector, may be NULL if not needed */
1166  SCIP_Real* redcost /**< reduced cost vector, may be NULL if not needed */
1167  )
1168 { /*lint --e{715}*/
1169  assert(lpi != NULL);
1170  errorMessage();
1171  return SCIP_PLUGINNOTFOUND;
1172 }
1173 
1174 /** gets primal ray for unbounded LPs */
1176  SCIP_LPI* lpi, /**< LP interface structure */
1177  SCIP_Real* ray /**< primal ray */
1178  )
1179 { /*lint --e{715}*/
1180  assert(lpi != NULL);
1181  assert(ray != NULL);
1182  errorMessage();
1183  return SCIP_PLUGINNOTFOUND;
1184 }
1185 
1186 /** gets dual Farkas proof for infeasibility */
1188  SCIP_LPI* lpi, /**< LP interface structure */
1189  SCIP_Real* dualfarkas /**< dual Farkas row multipliers */
1190  )
1191 { /*lint --e{715}*/
1192  assert(lpi != NULL);
1193  assert(dualfarkas != NULL);
1194  errorMessage();
1195  return SCIP_PLUGINNOTFOUND;
1196 }
1197 
1198 /** gets the number of LP iterations of the last solve call */
1200  SCIP_LPI* lpi, /**< LP interface structure */
1201  int* iterations /**< pointer to store the number of iterations of the last solve call */
1202  )
1203 { /*lint --e{715}*/
1204  assert(lpi != NULL);
1205  assert(iterations != NULL);
1206  errorMessage();
1207  return SCIP_PLUGINNOTFOUND;
1208 }
1209 
1210 /** gets information about the quality of an LP solution
1211  *
1212  * Such information is usually only available, if also a (maybe not optimal) solution is available.
1213  * The LPI should return SCIP_INVALID for @p quality, if the requested quantity is not available.
1214  */
1216  SCIP_LPI* lpi, /**< LP interface structure */
1217  SCIP_LPSOLQUALITY qualityindicator, /**< indicates which quality should be returned */
1218  SCIP_Real* quality /**< pointer to store quality number */
1219  )
1220 { /*lint --e{715}*/
1221  assert(lpi != NULL);
1222  assert(quality != NULL);
1223 
1224  *quality = SCIP_INVALID;
1225 
1226  return SCIP_OKAY;
1227 }
1228 
1229 /**@} */
1230 
1231 
1232 
1233 
1234 /*
1235  * LP Basis Methods
1236  */
1237 
1238 /**@name LP Basis Methods */
1239 /**@{ */
1240 
1241 /** gets current basis status for columns and rows; arrays must be large enough to store the basis status */
1243  SCIP_LPI* lpi, /**< LP interface structure */
1244  int* cstat, /**< array to store column basis status, or NULL */
1245  int* rstat /**< array to store row basis status, or NULL */
1246  )
1247 { /*lint --e{715}*/
1248  assert(lpi != NULL);
1249  errorMessage();
1250  return SCIP_PLUGINNOTFOUND;
1251 }
1252 
1253 /** sets current basis status for columns and rows */
1255  SCIP_LPI* lpi, /**< LP interface structure */
1256  const int* cstat, /**< array with column basis status */
1257  const int* rstat /**< array with row basis status */
1258  )
1259 { /*lint --e{715}*/
1260  assert(lpi != NULL);
1261  assert(cstat != NULL);
1262  assert(rstat != NULL);
1263  errorMessage();
1264  return SCIP_PLUGINNOTFOUND;
1265 }
1266 
1267 /** returns the indices of the basic columns and rows; basic column n gives value n, basic row m gives value -1-m */
1269  SCIP_LPI* lpi, /**< LP interface structure */
1270  int* bind /**< pointer to store basis indices ready to keep number of rows entries */
1271  )
1272 { /*lint --e{715}*/
1273  assert(lpi != NULL);
1274  assert(bind != NULL);
1275  errorMessage();
1276  return SCIP_PLUGINNOTFOUND;
1277 }
1278 
1279 /** get row of inverse basis matrix B^-1
1280  *
1281  * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver
1282  * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated;
1283  * see also the explanation in lpi.h.
1284  */
1286  SCIP_LPI* lpi, /**< LP interface structure */
1287  int r, /**< row number */
1288  SCIP_Real* coef, /**< pointer to store the coefficients of the row */
1289  int* inds, /**< array to store the non-zero indices, or NULL */
1290  int* ninds /**< pointer to store the number of non-zero indices, or NULL
1291  * (-1: if we do not store sparsity information) */
1292  )
1293 { /*lint --e{715}*/
1294  assert(lpi != NULL);
1295  assert(coef != NULL);
1296  errorMessage();
1297  return SCIP_PLUGINNOTFOUND;
1298 }
1299 
1300 /** get column of inverse basis matrix B^-1
1301  *
1302  * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver
1303  * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated;
1304  * see also the explanation in lpi.h.
1305  */
1307  SCIP_LPI* lpi, /**< LP interface structure */
1308  int c, /**< column number of B^-1; this is NOT the number of the column in the LP;
1309  * you have to call SCIPlpiGetBasisInd() to get the array which links the
1310  * B^-1 column numbers to the row and column numbers of the LP!
1311  * c must be between 0 and nrows-1, since the basis has the size
1312  * nrows * nrows */
1313  SCIP_Real* coef, /**< pointer to store the coefficients of the column */
1314  int* inds, /**< array to store the non-zero indices, or NULL */
1315  int* ninds /**< pointer to store the number of non-zero indices, or NULL
1316  * (-1: if we do not store sparsity information) */
1317  )
1318 { /*lint --e{715}*/
1319  assert(lpi != NULL);
1320  assert(coef != NULL);
1321  errorMessage();
1322  return SCIP_PLUGINNOTFOUND;
1323 }
1324 
1325 /** get row of inverse basis matrix times constraint matrix B^-1 * A
1326  *
1327  * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver
1328  * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated;
1329  * see also the explanation in lpi.h.
1330  */
1332  SCIP_LPI* lpi, /**< LP interface structure */
1333  int r, /**< row number */
1334  const SCIP_Real* binvrow, /**< row in (A_B)^-1 from prior call to SCIPlpiGetBInvRow(), or NULL */
1335  SCIP_Real* coef, /**< vector to return coefficients of the row */
1336  int* inds, /**< array to store the non-zero indices, or NULL */
1337  int* ninds /**< pointer to store the number of non-zero indices, or NULL
1338  * (-1: if we do not store sparsity information) */
1339  )
1340 { /*lint --e{715}*/
1341  assert(lpi != NULL);
1342  assert(coef != NULL);
1343  errorMessage();
1344  return SCIP_PLUGINNOTFOUND;
1345 }
1346 
1347 /** get column of inverse basis matrix times constraint matrix B^-1 * A
1348  *
1349  * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver
1350  * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated;
1351  * see also the explanation in lpi.h.
1352  */
1354  SCIP_LPI* lpi, /**< LP interface structure */
1355  int c, /**< column number */
1356  SCIP_Real* coef, /**< vector to return coefficients of the column */
1357  int* inds, /**< array to store the non-zero indices, or NULL */
1358  int* ninds /**< pointer to store the number of non-zero indices, or NULL
1359  * (-1: if we do not store sparsity information) */
1360  )
1361 { /*lint --e{715}*/
1362  assert(lpi != NULL);
1363  assert(coef != NULL);
1364  errorMessage();
1365  return SCIP_PLUGINNOTFOUND;
1366 }
1367 
1368 /**@} */
1369 
1370 
1371 
1372 
1373 /*
1374  * LP State Methods
1375  */
1376 
1377 /**@name LP State Methods */
1378 /**@{ */
1379 
1380 /** stores LPi state (like basis information) into lpistate object */
1382  SCIP_LPI* lpi, /**< LP interface structure */
1383  BMS_BLKMEM* blkmem, /**< block memory */
1384  SCIP_LPISTATE** lpistate /**< pointer to LPi state information (like basis information) */
1385  )
1386 { /*lint --e{715}*/
1387  assert(lpi != NULL);
1388  assert(blkmem != NULL);
1389  assert(lpistate != NULL);
1390  assert(blkmem != NULL);
1391  errorMessage();
1392  return SCIP_PLUGINNOTFOUND;
1393 }
1394 
1395 /** loads LPi state (like basis information) into solver; note that the LP might have been extended with additional
1396  * columns and rows since the state was stored with SCIPlpiGetState()
1397  */
1399  SCIP_LPI* lpi, /**< LP interface structure */
1400  BMS_BLKMEM* blkmem, /**< block memory */
1401  const SCIP_LPISTATE* lpistate /**< LPi state information (like basis information), or NULL */
1402  )
1403 { /*lint --e{715}*/
1404  assert(lpi != NULL);
1405  assert(blkmem != NULL);
1406  assert(lpistate != NULL);
1407  errorMessage();
1408  return SCIP_PLUGINNOTFOUND;
1409 }
1410 
1411 /** clears current LPi state (like basis information) of the solver */
1413  SCIP_LPI* lpi /**< LP interface structure */
1414  )
1415 { /*lint --e{715}*/
1416  assert(lpi != NULL);
1417  return SCIP_OKAY;
1418 }
1419 
1420 /** frees LPi state information */
1422  SCIP_LPI* lpi, /**< LP interface structure */
1423  BMS_BLKMEM* blkmem, /**< block memory */
1424  SCIP_LPISTATE** lpistate /**< pointer to LPi state information (like basis information) */
1425  )
1426 { /*lint --e{715}*/
1427  assert(lpi != NULL);
1428  assert(lpistate != NULL);
1429  assert(blkmem != NULL);
1430  return SCIP_OKAY;
1431 }
1432 
1433 /** checks, whether the given LP state contains simplex basis information */
1435  SCIP_LPI* lpi, /**< LP interface structure */
1436  SCIP_LPISTATE* lpistate /**< LP state information (like basis information), or NULL */
1437  )
1438 { /*lint --e{715}*/
1439  assert(lpi != NULL);
1441  return FALSE;
1442 }
1443 
1444 /** reads LP state (like basis information from a file */
1446  SCIP_LPI* lpi, /**< LP interface structure */
1447  const char* fname /**< file name */
1448  )
1449 { /*lint --e{715}*/
1450  assert(lpi != NULL);
1451  assert(fname != NULL);
1452  errorMessage();
1453  return SCIP_PLUGINNOTFOUND;
1454 }
1455 
1456 /** writes LPi state (i.e. basis information) to a file */
1458  SCIP_LPI* lpi, /**< LP interface structure */
1459  const char* fname /**< file name */
1460  )
1461 { /*lint --e{715}*/
1462  assert(lpi != NULL);
1463  assert(fname != NULL);
1464  errorMessage();
1465  return SCIP_PLUGINNOTFOUND;
1466 }
1467 
1468 /**@} */
1469 
1470 
1471 
1472 
1473 /*
1474  * LP Pricing Norms Methods
1475  */
1476 
1477 /**@name LP Pricing Norms Methods */
1478 /**@{ */
1479 
1480 /** stores LPi pricing norms information
1481  * @todo should we store norm information?
1482  */
1484  SCIP_LPI* lpi, /**< LP interface structure */
1485  BMS_BLKMEM* blkmem, /**< block memory */
1486  SCIP_LPINORMS** lpinorms /**< pointer to LPi pricing norms information */
1487  )
1488 { /*lint --e{715}*/
1489  assert(lpi != NULL);
1490  assert(blkmem != NULL);
1491  assert(lpinorms != NULL);
1492  errorMessage();
1493  return SCIP_PLUGINNOTFOUND;
1494 }
1495 
1496 /** loads LPi pricing norms into solver; note that the LP might have been extended with additional
1497  * columns and rows since the state was stored with SCIPlpiGetNorms()
1498  */
1500  SCIP_LPI* lpi, /**< LP interface structure */
1501  BMS_BLKMEM* blkmem, /**< block memory */
1502  const SCIP_LPINORMS* lpinorms /**< LPi pricing norms information, or NULL */
1503  )
1504 { /*lint --e{715}*/
1505  assert(lpi != NULL);
1506  errorMessage();
1507  return SCIP_PLUGINNOTFOUND;
1508 }
1509 
1510 /** frees pricing norms information */
1512  SCIP_LPI* lpi, /**< LP interface structure */
1513  BMS_BLKMEM* blkmem, /**< block memory */
1514  SCIP_LPINORMS** lpinorms /**< pointer to LPi pricing norms information, or NULL */
1515  )
1516 { /*lint --e{715}*/
1517  assert(lpi != NULL);
1518  errorMessage();
1519  return SCIP_PLUGINNOTFOUND;
1520 }
1521 
1522 /**@} */
1523 
1524 
1525 
1526 
1527 /*
1528  * Parameter Methods
1529  */
1530 
1531 /**@name Parameter Methods */
1532 /**@{ */
1533 
1534 /** gets integer parameter of LP */
1536  SCIP_LPI* lpi, /**< LP interface structure */
1537  SCIP_LPPARAM type, /**< parameter number */
1538  int* ival /**< buffer to store the parameter value */
1539  )
1540 { /*lint --e{715}*/
1541  assert(lpi != NULL);
1542  assert(ival != NULL);
1543  return SCIP_PARAMETERUNKNOWN;
1544 }
1545 
1546 /** sets integer parameter of LP */
1548  SCIP_LPI* lpi, /**< LP interface structure */
1549  SCIP_LPPARAM type, /**< parameter number */
1550  int ival /**< parameter value */
1551  )
1552 { /*lint --e{715}*/
1553  assert(lpi != NULL);
1554  return SCIP_PARAMETERUNKNOWN;
1555 }
1556 
1557 /** gets floating point parameter of LP */
1559  SCIP_LPI* lpi, /**< LP interface structure */
1560  SCIP_LPPARAM type, /**< parameter number */
1561  SCIP_Real* dval /**< buffer to store the parameter value */
1562  )
1563 { /*lint --e{715}*/
1564  assert(lpi != NULL);
1565  assert(dval != NULL);
1566  return SCIP_PARAMETERUNKNOWN;
1567 }
1568 
1569 /** sets floating point parameter of LP */
1571  SCIP_LPI* lpi, /**< LP interface structure */
1572  SCIP_LPPARAM type, /**< parameter number */
1573  SCIP_Real dval /**< parameter value */
1574  )
1575 { /*lint --e{715}*/
1576  assert(lpi != NULL);
1577  return SCIP_PARAMETERUNKNOWN;
1578 }
1579 
1580 /**@} */
1581 
1582 /*
1583  * Numerical Methods
1584  */
1585 
1586 /**@name Numerical Methods */
1587 /**@{ */
1588 
1589 /** returns value treated as infinity in the LP solver */
1591  SCIP_LPI* lpi /**< LP interface structure */
1592  )
1593 { /*lint --e{715}*/
1594  assert(lpi != NULL);
1595  return LPIINFINITY;
1596 }
1597 
1598 /** checks if given value is treated as infinity in the LP solver */
1600  SCIP_LPI* lpi, /**< LP interface structure */
1601  SCIP_Real val /**< value to be checked for infinity */
1602  )
1603 { /*lint --e{715}*/
1604  assert(lpi != NULL);
1605  if( val >= LPIINFINITY )
1606  return TRUE;
1607  return FALSE;
1608 }
1609 
1610 /**@} */
1611 
1612 
1613 
1614 
1615 /*
1616  * File Interface Methods
1617  */
1618 
1619 /**@name File Interface Methods */
1620 /**@{ */
1621 
1622 /** reads LP from a file */
1624  SCIP_LPI* lpi, /**< LP interface structure */
1625  const char* fname /**< file name */
1626  )
1627 { /*lint --e{715}*/
1628  assert(lpi != NULL);
1629  assert(fname != NULL);
1630  errorMessage();
1631  return SCIP_PLUGINNOTFOUND;
1632 }
1633 
1634 /** writes LP to a file */
1636  SCIP_LPI* lpi, /**< LP interface structure */
1637  const char* fname /**< file name */
1638  )
1639 { /*lint --e{715}*/
1640  assert(lpi != NULL);
1641  errorMessage();
1642  return SCIP_PLUGINNOTFOUND;
1643 }
1644 
1645 /**@} */
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
Definition: lpi_none.c:157
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
Definition: lpi_none.c:1547
SCIP_RETCODE SCIPlpiStrongbranchesFrac(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
Definition: lpi_none.c:836
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
Definition: type_lpi.h:95
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
Definition: lpi_none.c:1590
const char * SCIPlpiGetSolverName(void)
Definition: lpi_none.c:86
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
Definition: lpi_none.c:1535
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
Definition: lpi_none.c:1499
int nrows
Definition: lpi_none.c:43
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
Definition: lpi_none.c:1187
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
Definition: lpi_none.c:488
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
Definition: lpi_none.c:1242
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
Definition: lpi_none.c:692
enum SCIP_ObjSen SCIP_OBJSEN
Definition: type_lpi.h:36
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
Definition: lpi_none.c:102
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
Definition: lpi_none.c:1434
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
Definition: lpi_none.c:972
interface methods for specific LP solvers
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
Definition: lpi_none.c:783
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
Definition: lpi_none.c:338
static void errorMessageAbort(void)
Definition: lpi_none.c:54
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
Definition: lpi_none.c:1599
#define FALSE
Definition: def.h:73
SCIP_Bool SCIPlpiHasPrimalSolve(void)
Definition: lpi_none.c:121
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
Definition: lpi_none.c:992
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
Definition: lpi_none.c:1353
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
Definition: lpi_none.c:794
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
Definition: lpi_none.c:1483
enum SCIP_LPParam SCIP_LPPARAM
Definition: type_lpi.h:64
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
Definition: lpi_none.c:1092
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
Definition: lpi_none.c:377
#define SCIPdebugMessage
Definition: pub_message.h:87
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
Definition: lpi_none.c:737
#define BMSfreeMemory(ptr)
Definition: memory.h:137
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
Definition: lpi_none.c:1306
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
Definition: lpi_none.c:1102
SCIP_RETCODE SCIPlpiLoadColLP(SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
Definition: lpi_none.c:203
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
Definition: lpi_none.c:1036
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
Definition: lpi_none.c:537
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
Definition: lpi_none.c:1445
SCIP_RETCODE SCIPlpiStrongbranchFrac(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
Definition: lpi_none.c:812
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
Definition: lpi_none.c:560
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
Definition: lpi_none.c:944
#define SCIPerrorMessage
Definition: pub_message.h:55
int ncols
Definition: lpi_none.c:44
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
Definition: lpi_none.c:803
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
Definition: lpi_none.c:1112
static void errorMessage(void)
Definition: lpi_none.c:65
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
Definition: lpi_none.c:1254
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
Definition: lpi_none.c:1635
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
Definition: lpi_none.c:307
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
Definition: lpi_none.c:662
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
Definition: lpi_none.c:110
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
Definition: lpi_none.c:1014
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
Definition: lpi_none.c:500
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
Definition: lpi_none.c:1144
SCIP_Bool SCIPlpiHasDualSolve(void)
Definition: lpi_none.c:129
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
Definition: lpi_none.c:1132
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
Definition: lpi_none.c:291
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
Definition: lpi_none.c:1412
#define NULL
Definition: lpi_spx1.cpp:155
int * rstat
Definition: lpi_clp.cpp:99
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
Definition: lpi_none.c:722
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
Definition: lpi_none.c:472
SCIP_RETCODE SCIPlpiStrongbranchesInt(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
Definition: lpi_none.c:887
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
Definition: lpi_none.c:249
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
Definition: lpi_none.c:1511
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
Definition: lpi_none.c:1056
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
Definition: lpi_none.c:439
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
Definition: lpi_none.c:1331
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
Definition: lpi_none.c:524
#define SCIP_Bool
Definition: def.h:70
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
Definition: lpi_none.c:763
const char * SCIPlpiGetSolverDesc(void)
Definition: lpi_none.c:94
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
Definition: lpi_none.c:1570
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
Definition: lpi_none.c:575
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
Definition: lpi_none.c:707
SCIP_RETCODE SCIPlpiGetCols(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
Definition: lpi_none.c:605
#define LPIINFINITY
Definition: lpi_none.c:30
SCIP_RETCODE SCIPlpiGetRows(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs, int *nnonz, int *beg, int *ind, SCIP_Real *val)
Definition: lpi_none.c:625
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
Definition: lpi_none.c:510
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
Definition: lpi_none.c:1082
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
Definition: lpi_none.c:1268
#define LPINAME
Definition: lpi_none.c:29
int iterations
Definition: lpi_cpx.c:157
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
Definition: lpi_none.c:642
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
Definition: lpi_none.c:1122
SCIP_Real * r
Definition: circlepacking.c:50
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
Definition: lpi_none.c:1026
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
Definition: lpi_none.c:982
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
Definition: lpi_none.c:1160
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
Definition: lpi_none.c:1381
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
Definition: lpi_none.c:1002
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
Definition: lpi_none.c:1066
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
Definition: lpi_none.c:178
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
Definition: lpi_none.c:1398
public methods for message output
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
Definition: lpi_none.c:590
#define SCIP_Real
Definition: def.h:163
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
Definition: lpi_none.c:925
#define BMSallocMemory(ptr)
Definition: memory.h:111
#define SCIP_INVALID
Definition: def.h:183
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
Definition: lpi_none.c:424
SCIP_RETCODE SCIPlpiStrongbranchInt(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
Definition: lpi_none.c:863
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
Definition: lpi_none.c:960
SCIP_MESSAGEHDLR * messagehdlr
Definition: lpi_cpx.c:175
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
Definition: lpi_none.c:1285
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
Definition: lpi_none.c:773
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
Definition: lpi_none.c:1421
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
Definition: lpi_none.c:1199
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
Definition: lpi_none.c:1046
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
Definition: lpi_none.c:1558
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
Definition: lpi_none.c:393
#define SCIP_ALLOC(x)
Definition: def.h:381
#define SCIPABORT()
Definition: def.h:342
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
Definition: lpi_none.c:1175
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
Definition: lpi_none.c:1623
char name[200]
Definition: lpi_xprs.c:80
int * cstat
Definition: lpi_clp.cpp:98
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
Definition: lpi_none.c:1215
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
Definition: lpi_none.c:1457
SCIP_Bool SCIPlpiHasBarrierSolve(void)
Definition: lpi_none.c:137
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
Definition: lpi_none.c:682