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