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