Scippy

SoPlex

Sequential object-oriented simPlex

soplex.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the class library */
4/* SoPlex --- the Sequential object-oriented simPlex. */
5/* */
6/* Copyright (c) 1996-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file soplex.h
26 * @brief Preconfigured SoPlex LP solver
27 */
28
29#ifndef _SOPLEX_H_
30#define _SOPLEX_H_
31
32#include <string.h>
33
34#include "soplex/spxgithash.h"
35#include "soplex/spxdefines.h"
36#include "soplex/basevectors.h"
37#include "soplex/spxsolver.h"
38#include "soplex/slufactor.h"
40
41///@todo try to move to cpp file by forward declaration
43#include "soplex/spxmainsm.h"
44
45#include "soplex/spxscaler.h"
46#include "soplex/spxequilisc.h"
47#include "soplex/spxleastsqsc.h"
48#include "soplex/spxgeometsc.h"
49
50#include "soplex/spxstarter.h"
51#include "soplex/spxweightst.h"
52#include "soplex/spxsumst.h"
53#include "soplex/spxvectorst.h"
54
55#include "soplex/spxpricer.h"
56#include "soplex/spxautopr.h"
57#include "soplex/spxdantzigpr.h"
58#include "soplex/spxparmultpr.h"
59#include "soplex/spxdevexpr.h"
60#include "soplex/spxsteeppr.h"
61#include "soplex/spxsteepexpr.h"
62#include "soplex/spxhybridpr.h"
63
65#include "soplex/spxdefaultrt.h"
66#include "soplex/spxharrisrt.h"
67#include "soplex/spxfastrt.h"
69
70#include "soplex/solbase.h"
71#include "soplex/sol.h"
72
73#include "soplex/spxlpbase.h"
74
75#include "soplex/spxpapilo.h"
76
77#ifdef SOPLEX_WITH_GMP
78#include <gmp.h>
79#endif
80
81#ifdef SOPLEX_WITH_BOOST
82#ifdef SOPLEX_WITH_MPFR
83// For multiple precision
84#include <boost/multiprecision/mpfr.hpp>
85#endif
86#ifdef SOPLEX_WITH_CPPMPF
87#include <boost/multiprecision/cpp_dec_float.hpp>
88#endif
89
90// An alias for boost multiprecision
91namespace mpf = boost::multiprecision;
92#endif
93
94#define SOPLEX_DEFAULT_RANDOM_SEED 0 // used to suppress output when the seed was not changed
95
96///@todo implement automatic rep switch, based on row/col dim
97///@todo introduce status codes for SoPlex, especially for rational solving
98
99///@todo record and return "best" solutions found during IR (Ambros)
100///@todo implement main IR loop for primal and dual feasible case with fail otherwise (Ambros)
101///@todo implement statistical info (time, factor time, iters, ...) since last call to solveReal() or solveRational() (Ambros?)
102///@todo implement performInfeasibilityIR (Ambros?)
103///@todo extend IR loop to infeasible case (Dan?)
104///@todo extend IR loop to unbounded case (Dan?)
105
106///@todo interface rational reconstruction code for rational vectors
107///@todo integrate rational reconstruction into IR loop
108///@todo integrate rational SPxSolver and distinguish between original and transformed rational LP
109///@todo rational scalers
110///@todo rational simplifier
111
112namespace soplex
113{
114
115/**@class SoPlex
116 * @brief Preconfigured SoPlex LP-solver.
117 * @ingroup Algo
118 */
119template <class R>
121{
122public:
123
124 ///@name Construction and destruction
125 ///@{
126
127 /// default constructor
129
130 /// assignment operator
132
133 /// copy constructor
135
136 /// destructor
137 virtual ~SoPlexBase();
138
139 ///@}
140
141
142 ///@name Access to the real LP
143 ///@{
144
145 /// returns number of rows
146 int numRows() const;
147 int numRowsReal() const; /* For SCIP compatibility */
148 int numRowsRational() const;
149
150 /// Templated function that
151 /// returns number of columns
152 int numCols() const;
153 int numColsReal() const; /* For SCIP compatibility */
154 int numColsRational() const;
155
156 /// returns number of nonzeros
157 int numNonzeros() const;
158
160
161 /// returns smallest non-zero element in absolute value
163
164 /// returns biggest non-zero element in absolute value
166
167 /// returns (unscaled) coefficient
168 R coefReal(int row, int col) const;
169
170 /// returns vector of row \p i, ignoring scaling
172
173 /// gets vector of row \p i
174 void getRowVectorReal(int i, DSVectorBase<R>& row) const;
175
176 /// returns right-hand side vector, ignoring scaling
178
179 /// gets right-hand side vector
180 void getRhsReal(VectorBase<R>& rhs) const;
181
182 /// returns right-hand side of row \p i
183 R rhsReal(int i) const;
184
185 /// returns left-hand side vector, ignoring scaling
187
188 /// gets left-hand side vector
189 void getLhsReal(VectorBase<R>& lhs) const;
190
191 /// returns left-hand side of row \p i
192 R lhsReal(int i) const;
193
194 /// returns inequality type of row \p i
195 typename LPRowBase<R>::Type rowTypeReal(int i) const;
196
197 /// returns vector of col \p i, ignoring scaling
199
200 /// gets vector of col \p i
201 void getColVectorReal(int i, DSVectorBase<R>& col) const;
202
203 /// returns upper bound vector
205
206 /// returns upper bound of column \p i
207 R upperReal(int i) const;
208
209 /// gets upper bound vector
210 void getUpperReal(VectorBase<R>& upper) const;
211
212 /// returns lower bound vector
214
215 /// returns lower bound of column \p i
216 R lowerReal(int i) const;
217
218 /// gets lower bound vector
219 void getLowerReal(VectorBase<R>& lower) const;
220
221 /// gets objective function vector
222 void getObjReal(VectorBase<R>& obj) const;
223
224 /// returns objective value of column \p i
225 R objReal(int i) const;
226
227 /// returns objective function vector after transformation to a maximization problem; since this is how it is stored
228 /// internally, this is generally faster
230
231 /// returns objective value of column \p i after transformation to a maximization problem; since this is how it is
232 /// stored internally, this is generally faster
233 R maxObjReal(int i) const;
234
235 /// gets number of available dual norms
236 void getNdualNorms(int& nnormsRow, int& nnormsCol) const;
237
238 /// gets steepest edge norms and returns false if they are not available
239 bool getDualNorms(int& nnormsRow, int& nnormsCol, R* norms) const;
240
241 /// sets steepest edge norms and returns false if that's not possible
242 bool setDualNorms(int nnormsRow, int nnormsCol, R* norms);
243
244 /// pass integrality information about the variables to the solver
245 void setIntegralityInformation(int ncols, int* intInfo);
246
247 ///@}
248
249
250 ///@name Access to the rational LP
251 ///@{
252
253 /// returns smallest non-zero element in absolute value
255
256 /// returns biggest non-zero element in absolute value
258
259 /// gets row \p i
260 void getRowRational(int i, LPRowRational& lprow) const;
261
262 /// gets rows \p start, ..., \p end.
263 void getRowsRational(int start, int end, LPRowSetRational& lprowset) const;
264
265 /// returns vector of row \p i
267
268 /// returns right-hand side vector
270
271 /// returns right-hand side of row \p i
272 const Rational& rhsRational(int i) const;
273
274 /// returns left-hand side vector
276
277 /// returns left-hand side of row \p i
278 const Rational& lhsRational(int i) const;
279
280 /// returns inequality type of row \p i
282
283 /// gets column \p i
284 void getColRational(int i, LPColRational& lpcol) const;
285
286 /// gets columns \p start, ..., \p end
287 void getColsRational(int start, int end, LPColSetRational& lpcolset) const;
288
289 /// returns vector of column \p i
291
292 /// returns upper bound vector
294
295 /// returns upper bound of column \p i
296 const Rational& upperRational(int i) const;
297
298 /// returns lower bound vector
300
301 /// returns lower bound of column \p i
302 const Rational& lowerRational(int i) const;
303
304 /// gets objective function vector
306
307 /// gets objective value of column \p i
308 void getObjRational(int i, Rational& obj) const;
309
310 /// returns objective value of column \p i
311 Rational objRational(int i) const;
312
313 /// returns objective function vector after transformation to a maximization problem; since this is how it is stored
314 /// internally, this is generally faster
316
317 /// returns objective value of column \p i after transformation to a maximization problem; since this is how it is
318 /// stored internally, this is generally faster
319 const Rational& maxObjRational(int i) const;
320
321 ///@}
322
323
324 ///@name Modification of the real LP
325 ///@{
326
327 /// adds a single row
328 void addRowReal(const LPRowBase<R>& lprow);
329
330 /// adds multiple rows
331 void addRowsReal(const LPRowSetBase<R>& lprowset);
332
333 /// adds a single column
334 void addColReal(const LPColBase<R>& lpcol);
335
336 /// adds multiple columns
337 void addColsReal(const LPColSetBase<R>& lpcolset);
338
339 /// replaces row \p i with \p lprow
340 void changeRowReal(int i, const LPRowBase<R>& lprow);
341
342 /// changes left-hand side vector for constraints to \p lhs
343 void changeLhsReal(const VectorBase<R>& lhs);
344
345 /// changes left-hand side of row \p i to \p lhs
346 void changeLhsReal(int i, const R& lhs);
347
348 /// changes right-hand side vector to \p rhs
349 void changeRhsReal(const VectorBase<R>& rhs);
350
351 /// changes right-hand side of row \p i to \p rhs
352 void changeRhsReal(int i, const R& rhs);
353
354 /// changes left- and right-hand side vectors
355 void changeRangeReal(const VectorBase<R>& lhs, const VectorBase<R>& rhs);
356
357 /// changes left- and right-hand side of row \p i
358 void changeRangeReal(int i, const R& lhs, const R& rhs);
359
360 /// replaces column \p i with \p lpcol
361 void changeColReal(int i, const LPColReal& lpcol);
362
363 /// changes vector of lower bounds to \p lower
364 void changeLowerReal(const VectorBase<R>& lower);
365
366 /// changes lower bound of column i to \p lower
367 void changeLowerReal(int i, const R& lower);
368
369 /// changes vector of upper bounds to \p upper
370 void changeUpperReal(const VectorBase<R>& upper);
371
372 /// changes \p i 'th upper bound to \p upper
373 void changeUpperReal(int i, const R& upper);
374
375 /// changes vectors of column bounds to \p lower and \p upper
376 void changeBoundsReal(const VectorBase<R>& lower, const VectorBase<R>& upper);
377
378 /// changes bounds of column \p i to \p lower and \p upper
379 void changeBoundsReal(int i, const R& lower, const R& upper);
380
381 /// changes objective function vector to \p obj
382 void changeObjReal(const VectorBase<R>& obj);
383
384 /// changes objective coefficient of column i to \p obj
385 void changeObjReal(int i, const R& obj);
386
387 /// changes matrix entry in row \p i and column \p j to \p val
388 void changeElementReal(int i, int j, const R& val);
389
390 /// removes row \p i
391 void removeRowReal(int i);
392
393 /// removes all rows with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the
394 /// new index where row \p i has been moved to; note that \p perm must point to an array of size at least
395 /// #numRows()
396 void removeRowsReal(int perm[]);
397
398 /// remove all rows with indices in array \p idx of size \p n; an array \p perm of size #numRows() may be passed
399 /// as buffer memory
400 void removeRowsReal(int idx[], int n, int perm[] = nullptr);
401
402 /// removes rows \p start to \p end including both; an array \p perm of size #numRows() may be passed as buffer
403 /// memory
404 void removeRowRangeReal(int start, int end, int perm[] = nullptr);
405
406 /// removes column i
407 void removeColReal(int i);
408
409 /// removes all columns with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the
410 /// new index where column \p i has been moved to; note that \p perm must point to an array of size at least
411 /// #numColsReal()
412 void removeColsReal(int perm[]);
413
414 /// remove all columns with indices in array \p idx of size \p n; an array \p perm of size #numColsReal() may be
415 /// passed as buffer memory
416 void removeColsReal(int idx[], int n, int perm[] = nullptr);
417
418 /// removes columns \p start to \p end including both; an array \p perm of size #numColsReal() may be passed as
419 /// buffer memory
420 void removeColRangeReal(int start, int end, int perm[] = nullptr);
421
422 /// clears the LP
424
425 /// synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP, if sync mode is manual
427
428 ///@}
429
430
431 ///@name Modification of the rational LP
432 ///@{
433
434 /// adds a single row
435 void addRowRational(const LPRowRational& lprow);
436
437#ifdef SOPLEX_WITH_GMP
438 /// adds a single row (GMP only method)
439 void addRowRational(const mpq_t* lhs, const mpq_t* rowValues, const int* rowIndices,
440 const int rowSize, const mpq_t* rhs);
441
442 /// adds a set of rows (GMP only method)
443 void addRowsRational(const mpq_t* lhs, const mpq_t* rowValues, const int* rowIndices,
444 const int* rowStarts, const int* rowLengths, const int numRows, const int numValues,
445 const mpq_t* rhs);
446#endif
447
448 /// adds multiple rows
449 void addRowsRational(const LPRowSetRational& lprowset);
450
451 /// adds a single column
452 void addColRational(const LPColRational& lpcol);
453
454#ifdef SOPLEX_WITH_GMP
455 /// adds a single column (GMP only method)
456 void addColRational(const mpq_t* obj, const mpq_t* lower, const mpq_t* colValues,
457 const int* colIndices, const int colSize, const mpq_t* upper);
458
459 /// adds a set of columns (GMP only method)
460 void addColsRational(const mpq_t* obj, const mpq_t* lower, const mpq_t* colValues,
461 const int* colIndices, const int* colStarts, const int* colLengths, const int numCols,
462 const int numValues, const mpq_t* upper);
463#endif
464
465 /// adds multiple columns
466 void addColsRational(const LPColSetRational& lpcolset);
467
468 /// replaces row \p i with \p lprow
469 void changeRowRational(int i, const LPRowRational& lprow);
470
471 /// changes left-hand side vector for constraints to \p lhs
473
474 /// changes left-hand side of row \p i to \p lhs
475 void changeLhsRational(int i, const Rational& lhs);
476
477#ifdef SOPLEX_WITH_GMP
478 /// changes left-hand side of row \p i to \p lhs (GMP only method)
479 void changeLhsRational(int i, const mpq_t* lhs);
480#endif
481
482 /// changes right-hand side vector to \p rhs
484
485#ifdef SOPLEX_WITH_GMP
486 /// changes right-hand side vector to \p rhs (GMP only method)
487 void changeRhsRational(const mpq_t* rhs, int rhsSize);
488#endif
489
490 /// changes right-hand side of row \p i to \p rhs
491 void changeRhsRational(int i, const Rational& rhs);
492
493 /// changes left- and right-hand side vectors
495
496 /// changes left- and right-hand side of row \p i
497 void changeRangeRational(int i, const Rational& lhs, const Rational& rhs);
498
499#ifdef SOPLEX_WITH_GMP
500 /// changes left- and right-hand side of row \p i (GMP only method)
501 void changeRangeRational(int i, const mpq_t* lhs, const mpq_t* rhs);
502#endif
503
504 /// replaces column \p i with \p lpcol
505 void changeColRational(int i, const LPColRational& lpcol);
506
507 /// changes vector of lower bounds to \p lower
509
510 /// changes lower bound of column i to \p lower
511 void changeLowerRational(int i, const Rational& lower);
512
513#ifdef SOPLEX_WITH_GMP
514 /// changes lower bound of column i to \p lower (GMP only method)
515 void changeLowerRational(int i, const mpq_t* lower);
516#endif
517
518 /// changes vector of upper bounds to \p upper
520
521 /// changes \p i 'th upper bound to \p upper
522 void changeUpperRational(int i, const Rational& upper);
523
524#ifdef SOPLEX_WITH_GMP
525 /// changes upper bound of column i to \p upper (GMP only method)
526 void changeUpperRational(int i, const mpq_t* upper);
527#endif
528
529 /// changes vectors of column bounds to \p lower and \p upper
530 void changeBoundsRational(const VectorRational& lower, const VectorRational& upper);
531
532 /// changes bounds of column \p i to \p lower and \p upper
533 void changeBoundsRational(int i, const Rational& lower, const Rational& upper);
534
535#ifdef SOPLEX_WITH_GMP
536 /// changes bounds of column \p i to \p lower and \p upper (GMP only method)
537 void changeBoundsRational(int i, const mpq_t* lower, const mpq_t* upper);
538#endif
539
540 /// changes objective function vector to \p obj
542
543 /// changes objective coefficient of column i to \p obj
544 void changeObjRational(int i, const Rational& obj);
545
546#ifdef SOPLEX_WITH_GMP
547 /// changes objective coefficient of column i to \p obj (GMP only method)
548 void changeObjRational(int i, const mpq_t* obj);
549#endif
550
551 /// changes matrix entry in row \p i and column \p j to \p val
552 void changeElementRational(int i, int j, const Rational& val);
553
554#ifdef SOPLEX_WITH_GMP
555 /// changes matrix entry in row \p i and column \p j to \p val (GMP only method)
556 void changeElementRational(int i, int j, const mpq_t* val);
557#endif
558
559 /// removes row \p i
560 void removeRowRational(int i);
561
562 /// removes all rows with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the new
563 /// index where row \p i has been moved to; note that \p perm must point to an array of size at least
564 /// #numRowsRational()
565 void removeRowsRational(int perm[]);
566
567 /// remove all rows with indices in array \p idx of size \p n; an array \p perm of size #numRowsRational() may be
568 /// passed as buffer memory
569 void removeRowsRational(int idx[], int n, int perm[] = nullptr);
570
571 /// removes rows \p start to \p end including both; an array \p perm of size #numRowsRational() may be passed as
572 /// buffer memory
573 void removeRowRangeRational(int start, int end, int perm[] = nullptr);
574
575 /// removes column i
576 void removeColRational(int i);
577
578 /// removes all columns with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the
579 /// new index where column \p i has been moved to; note that \p perm must point to an array of size at least
580 /// #numColsRational()
581 void removeColsRational(int perm[]);
582
583 /// remove all columns with indices in array \p idx of size \p n; an array \p perm of size #numColsRational() may be
584 /// passed as buffer memory
585 void removeColsRational(int idx[], int n, int perm[] = nullptr);
586
587 /// removes columns \p start to \p end including both; an array \p perm of size #numColsRational() may be passed as
588 /// buffer memory
589 void removeColRangeRational(int start, int end, int perm[] = nullptr);
590
591 /// clears the LP
593
594 /// synchronizes rational LP with real LP, i.e., copies real LP to rational LP, if sync mode is manual
596
597 ///@}
598
599 ///@name Solving and general solution query
600 ///@{
601
602 /// optimize the given LP
603 typename SPxSolverBase<R>::Status optimize(volatile bool* interrupt = nullptr);
604
605 // old name for backwards compatibility
606 typename SPxSolverBase<R>::Status solve(volatile bool* interrupt = nullptr)
607 {
608 return optimize(interrupt);
609 }
610
611 /// returns the current solver status
613
614 /// is stored primal solution feasible?
615 bool isPrimalFeasible() const;
616
617 /// is a solution available (not neccessarily feasible)?
618 bool hasSol() const;
619
620 /// deprecated: use #hasSol() instead
621 bool hasPrimal() const
622 {
623 return hasSol();
624 }
625
626 /// deprecated: use #hasSol() instead
627 bool hasDual() const
628 {
629 return hasSol();
630 }
631
632 /// is a primal unbounded ray available?
633 bool hasPrimalRay() const;
634
635 /// is stored dual solution feasible?
636 bool isDualFeasible() const;
637
638 /// is Farkas proof of infeasibility available?
639 bool hasDualFarkas() const;
640
641 /// sets the status to OPTIMAL in case the LP has been solved with unscaled violations
643 {
645 {
647 return true;
648 }
649 else
650 return false;
651 }
652 ///@}
653
654
655 ///@name Query for the real solution data
656 ///@{
657
658 /// returns the objective value if a primal solution is available
660
661 /// gets the primal solution vector if available; returns true on success
663 bool getPrimalReal(R* p_vector, int size); // For SCIP compatibility
665
666 /// gets the vector of slack values if available; returns true on success
668 bool getSlacksReal(R* p_vector, int dim);
669
670 /// gets the primal ray if available; returns true on success
672 bool getPrimalRayReal(R* vector, int dim); /* For SCIP compatibility */
674
675 /// gets the dual solution vector if available; returns true on success
676 bool getDual(VectorBase<R>& vector);
677 bool getDualReal(R* p_vector, int dim); /* For SCIP compatibility */
679
680 /// gets the vector of reduced cost values if available; returns true on success
682 bool getRedCostReal(R* vector, int dim); /* For SCIP compatibility */
684
685 /// gets the Farkas proof if available; returns true on success
687 bool getDualFarkasReal(R* vector, int dim);
689
690 /// gets violation of bounds; returns true on success
691 bool getBoundViolation(R& maxviol, R& sumviol);
693
694 /// gets violation of constraints; returns true on success
695 bool getRowViolation(R& maxviol, R& sumviol);
696 bool getRowViolationRational(Rational& maxviol, Rational& sumviol);
697
698 /// gets violation of reduced costs; returns true on success
699 bool getRedCostViolation(R& maxviol, R& sumviol);
701
702 /// gets violation of dual multipliers; returns true on success
703 bool getDualViolation(R& maxviol, R& sumviol);
705
706 ///@}
707
708
709 ///@name Query for the rational solution data
710 ///@{
711
712 /// returns the objective value if a primal solution is available
714
715 /// gets the vector of slack values if available; returns true on success
717
718#ifdef SOPLEX_WITH_GMP
719 /// gets the primal solution vector if available; returns true on success (GMP only method)
720 bool getPrimalRational(mpq_t* vector, const int size);
721
722 /// gets the vector of slack values if available; returns true on success (GMP only method)
723 bool getSlacksRational(mpq_t* vector, const int size);
724
725 /// gets the primal ray if LP is unbounded; returns true on success (GMP only method)
726 bool getPrimalRayRational(mpq_t* vector, const int size);
727
728 /// gets the dual solution vector if available; returns true on success (GMP only method)
729 bool getDualRational(mpq_t* vector, const int size);
730
731 /// gets the vector of reduced cost values if available; returns true on success (GMP only method)
732 bool getRedCostRational(mpq_t* vector, const int size);
733
734 /// gets the Farkas proof if LP is infeasible; returns true on success (GMP only method)
735 bool getDualFarkasRational(mpq_t* vector, const int size);
736#endif
737
738 /// get size of primal solution
739 int totalSizePrimalRational(const int base = 2);
740
741 /// get size of dual solution
742 int totalSizeDualRational(const int base = 2);
743
744 /// get size of least common multiple of denominators in primal solution
745 int dlcmSizePrimalRational(const int base = 2);
746
747 /// get size of least common multiple of denominators in dual solution
748 int dlcmSizeDualRational(const int base = 2);
749
750 /// get size of largest denominator in primal solution
751 int dmaxSizePrimalRational(const int base = 2);
752
753 /// get size of largest denominator in dual solution
754 int dmaxSizeDualRational(const int base = 2);
755
756 ///@}
757
758
759 ///@name Access and modification of basis information
760 ///@{
761
762 /// is an advanced starting basis available?
763 bool hasBasis() const;
764
765 /// returns the current basis status
767
768 /// returns basis status for a single row
770
771 /// returns basis status for a single column
773
774 /// gets current basis via arrays of statuses
776 typename SPxSolverBase<R>::VarStatus cols[]) const;
777
778 /// gets the indices of the basic columns and rows; basic column n gives value n, basic row m gives value -1-m
779 void getBasisInd(int* bind) const;
780
781 /** compute one of several matrix metrics based on the diagonal of the LU factorization
782 * type = 0: max/min ratio
783 * type = 1: trace of U (sum of diagonal elements)
784 * type = 2: determinant (product of diagonal elements)
785 */
786 bool getBasisMetric(R& metric, int type = 0);
787
788 /// computes an estimated condition number for the current basis matrix using the power method; returns true on success
789 bool getEstimatedCondition(R& condition);
790
791 /// computes the exact condition number for the current basis matrix using the power method; returns true on success
792 bool getExactCondition(R& condition);
793
794 /// computes row \p r of basis inverse; returns true on success
795 /// @param r which row of the basis inverse is computed
796 /// @param coef values of result vector (not packed but scattered)
797 /// @param inds indices of result vector (nullptr if not to be used)
798 /// @param ninds number of nonzeros in result vector
799 /// @param unscale determines whether the result should be unscaled according to the original LP data
800 bool getBasisInverseRowReal(int r, R* coef, int* inds = nullptr, int* ninds = nullptr,
801 bool unscale = true);
802
803 /// computes column \p c of basis inverse; returns true on success
804 /// @param c which column of the basis inverse is computed
805 /// @param coef values of result vector (not packed but scattered)
806 /// @param inds indices of result vector (nullptr if not to be used)
807 /// @param ninds number of nonzeros in result vector
808 /// @param unscale determines whether the result should be unscaled according to the original LP data
809 bool getBasisInverseColReal(int c, R* coef, int* inds = nullptr, int* ninds = nullptr,
810 bool unscale = true);
811
812 /// computes dense solution of basis matrix B * \p sol = \p rhs; returns true on success
813 bool getBasisInverseTimesVecReal(R* rhs, R* sol, bool unscale = true);
814
815 /// multiply with basis matrix; B * \p vec (inplace)
816 /// @param vec (dense) vector to be multiplied with
817 /// @param unscale determines whether the result should be unscaled according to the original LP data
818 bool multBasis(R* vec, bool unscale = true);
819
820 /// multiply with transpose of basis matrix; \p vec * B^T (inplace)
821 /// @param vec (dense) vector to be multiplied with
822 /// @param unscale determines whether the result should be unscaled according to the original LP data
823 bool multBasisTranspose(R* vec, bool unscale = true);
824
825 /// compute rational basis inverse; returns true on success
827
828 /// gets an array of indices for the columns of the rational basis matrix; bind[i] >= 0 means that the i-th column of
829 /// the basis matrix contains variable bind[i]; bind[i] < 0 means that the i-th column of the basis matrix contains
830 /// the slack variable for row -bind[i]-1; performs rational factorization if not available; returns true on success
832
833 /// computes row r of basis inverse; performs rational factorization if not available; returns true on success
835
836 /// computes column c of basis inverse; performs rational factorization if not available; returns true on success
838
839 /// computes solution of basis matrix B * sol = rhs; performs rational factorization if not available; returns true
840 /// on success
842
843 /// sets starting basis via arrays of statuses
844 void setBasis(const typename SPxSolverBase<R>::VarStatus rows[],
845 const typename SPxSolverBase<R>::VarStatus cols[]);
846
847 /// clears starting basis
849
850 ///@}
851
852
853 ///@name Statistical information
854 ///@{
855
856 /// number of iterations since last call to solve
857 int numIterations() const;
858
859 /// number of iterative refinements
860 int numRefinements() const;
861
862 /// number of precision boosts since last call to solve
864
865 /// number of iterations in higher precision since last call to solve
867
868 /// time spen in higher precision since last call to solve
870
871 /// time spent in last call to solve
873
874 /// statistical information in form of a string
875 std::string statisticString() const;
876
877 /// name of starter
878 const char* getStarterName();
879
880 /// name of simplifier
881 const char* getSimplifierName();
882
883 /// name of scaling method
884 const char* getScalerName();
885
886 /// name of currently loaded pricer
887 const char* getPricerName();
888
889 /// name of currently loaded ratiotester
890 const char* getRatiotesterName();
891
892 ///@}
893
894
895 ///@name File I/O
896 ///@{
897
898 /// reads LP file in LP or MPS format according to READMODE parameter; gets row names, column names, and
899 /// integer variables if desired; returns true on success
900 bool readFile(const char* filename, NameSet* rowNames = nullptr, NameSet* colNames = nullptr,
901 DIdxSet* intVars = nullptr);
902
903 /// Templated write function
904 /// Real
905 /// writes real LP to file; LP or MPS format is chosen from the extension in \p filename; if \p rowNames and \p
906 /// colNames are \c nullptr, default names are used; if \p intVars is not \c nullptr, the variables contained in it are
907 /// marked as integer; returns true on success
908 /// Rational
909 /// writes rational LP to file; LP or MPS format is chosen from the extension in \p filename; if \p rowNames and \p
910 /// colNames are \c nullptr, default names are used; if \p intVars is not \c nullptr, the variables contained in it are
911 /// marked as integer; returns true on success
912 bool writeFile(const char* filename, const NameSet* rowNames = nullptr,
913 const NameSet* colNames = nullptr,
914 const DIdxSet* intvars = nullptr, const bool unscale = true,
915 const bool writeZeroObjective = false) const;
916
917 bool writeFileRational(const char* filename, const NameSet* rowNames = nullptr,
918 const NameSet* colNames = nullptr, const DIdxSet* intvars = nullptr,
919 const bool writeZeroObjective = false) const;
920
921 /* For SCIP compatibility */
922 bool writeFileReal(const char* filename, const NameSet* rowNames = nullptr,
923 const NameSet* colNames = nullptr,
924 const DIdxSet* intvars = nullptr, const bool unscale = true,
925 const bool writeZeroObjective = false) const;
926
927 /// writes the dual of the real LP to file; LP or MPS format is chosen from the extension in \p filename;
928 /// if \p rowNames and \p colNames are \c nullptr, default names are used; if \p intVars is not \c nullptr,
929 /// the variables contained in it are marked as integer; returns true on success
930 bool writeDualFileReal(const char* filename, const NameSet* rowNames = nullptr,
931 const NameSet* colNames = nullptr, const DIdxSet* intvars = nullptr,
932 const bool writeZeroObjective = false) const;
933
934 /// reads basis information from \p filename and returns true on success; if \p rowNames and \p colNames are \c nullptr,
935 /// default names are assumed; returns true on success
936 bool readBasisFile(const char* filename, const NameSet* rowNames = nullptr,
937 const NameSet* colNames = nullptr);
938
939 /// writes basis information to \p filename; if \p rowNames and \p colNames are \c nullptr, default names are used;
940 /// returns true on success
941 bool writeBasisFile(const char* filename, const NameSet* rowNames = nullptr,
942 const NameSet* colNames = nullptr,
943 const bool cpxFormat = false) const;
944
945 /// writes internal LP, basis information, and parameter settings; if \p rowNames and \p colNames are \c nullptr,
946 /// default names are used
947 void writeStateReal(const char* filename, const NameSet* rowNames = nullptr,
948 const NameSet* colNames = nullptr,
949 const bool cpxFormat = false, const bool writeZeroObjective = false) const;
950
951 /// writes internal LP, basis information, and parameter settings; if \p rowNames and \p colNames are \c nullptr,
952 /// default names are used
953 void writeStateRational(const char* filename, const NameSet* rowNames = nullptr,
954 const NameSet* colNames = nullptr, const bool cpxFormat = false,
955 const bool writeZeroObjective = false) const;
956
957 ///@}
958
959
960 ///@name Parameters
961 ///@{
962
963 /// boolean parameters
964 typedef enum
965 {
966 /// should lifting be used to reduce range of nonzero matrix coefficients?
968
969 /// should LP be transformed to equality form before a rational solve?
971
972 /// should dual infeasibility be tested in order to try to return a dual solution even if primal infeasible?
974
975 /// should a rational factorization be performed after iterative refinement?
977
978 /// should cycling solutions be accepted during iterative refinement?
980
981 /// apply rational reconstruction after each iterative refinement?
983
984 /// round scaling factors for iterative refinement to powers of two?
986
987 /// continue iterative refinement with exact basic solution if not optimal?
989
990 /// use bound flipping also for row representation?
992
993 /// use persistent scaling?
995
996 /// perturb the entire problem or only the relevant bounds of s single pivot?
998
999 /// re-optimize the original problem to get a proof (ray) of infeasibility/unboundedness?
1001
1002 /// try to enforce that the optimal solution is a basic solution
1004
1005 // enable presolver SingletonCols in PaPILO?
1007
1008 // enable presolver ConstraintPropagation in PaPILO?
1010
1011 // enable presolver ParallelRowDetection in PaPILO?
1013
1014 // enable presolver ParallelColDetection in PaPILO?
1016
1017 // enable presolver SingletonStuffing in PaPILO?
1019
1020 // enable presolver DualFix in PaPILO?
1022
1023 // enable presolver FixContinuous in PaPILO?
1025
1026 // enable presolver DominatedCols in PaPILO?
1028
1029 // enable iterative refinement ?
1031
1032 /// adapt tolerances to the multiprecision used
1034
1035 /// enable precision boosting ?
1037
1038 /// boosted solver start from last basis
1040
1041 /// try different settings when solve fails
1043
1044 /// number of boolean parameters
1045 BOOLPARAM_COUNT = 26
1047
1048 /// integer parameters
1049 typedef enum
1050 {
1051 /// objective sense
1053
1054 /// type of computational form, i.e., column or row representation
1056
1057 /// type of algorithm, i.e., primal or dual
1059
1060 /// type of LU update
1062
1063 /// maximum number of updates without fresh factorization
1065
1066 /// iteration limit (-1 if unlimited)
1068
1069 /// refinement limit (-1 if unlimited)
1071
1072 /// stalling refinement limit (-1 if unlimited)
1074
1075 /// display frequency
1077
1078 /// verbosity level
1080
1081 /// type of simplifier
1083
1084 /// type of scaler
1086
1087 /// type of starter used to create crash basis
1089
1090 /// type of pricer
1092
1093 /// type of ratio test
1095
1096 /// mode for synchronizing real and rational LP
1098
1099 /// mode for reading LP files
1101
1102 /// mode for iterative refinement strategy
1104
1105 /// mode for a posteriori feasibility checks
1107
1108 /// type of timer
1109 TIMER = 19,
1110
1111 /// mode for hyper sparse pricing
1113
1114 /// minimum number of stalling refinements since last pivot to trigger rational factorization
1116
1117 /// maximum number of conjugate gradient iterations in least square scaling
1119
1120 /// mode for solution polishing
1122
1123 /// print condition number during the solve
1125
1126 /// type of timer for statistics
1128
1129 // maximum number of digits for the multiprecision type
1131
1132 ///@todo precision-boosting find better parameter name
1133 /// after how many simplex pivots do we store the advanced and stable basis, 1 = every iterations
1135
1136 /// number of integer parameters
1137 INTPARAM_COUNT = 28
1139
1140 /// values for parameter OBJSENSE
1141 enum
1142 {
1143 /// minimization
1145
1146 /// maximization
1149
1150 /// values for parameter REPRESENTATION
1151 enum
1152 {
1153 /// automatic choice according to number of rows and columns
1155
1156 /// column representation Ax - s = 0, lower <= x <= upper, lhs <= s <= rhs
1158
1159 /// row representation (lower,lhs) <= (x,Ax) <= (upper,rhs)
1162
1163 /// values for parameter ALGORITHM
1164 enum
1165 {
1166 /// primal simplex algorithm, i.e., entering for column and leaving for row representation
1168
1169 /// dual simplex algorithm, i.e., leaving for column and entering for row representation
1170 ALGORITHM_DUAL = 1
1172
1173 /// values for parameter FACTOR_UPDATE_TYPE
1174 enum
1175 {
1176 /// product form update
1178
1179 /// Forrest-Tomlin type update
1182
1183 /// values for parameter VERBOSITY
1184 enum
1185 {
1186 /// only error output
1188
1189 /// only error and warning output
1191
1192 /// only error, warning, and debug output
1194
1195 /// standard verbosity level
1197
1198 /// high verbosity level
1200
1201 /// full verbosity level
1202 VERBOSITY_FULL = 5
1204
1205 /// values for parameter SIMPLIFIER
1206 enum
1207 {
1208 /// disabling presolving
1210
1211 /// using internal presolving methods
1213
1214 /// using the presolve lib papilo
1216
1217 /// SoPlex chooses automatically (currently always "internal")
1218 SIMPLIFIER_AUTO = 1
1220
1221 /// values for parameter SCALER
1222 enum
1223 {
1224 /// no scaler
1226
1227 /// equilibrium scaling on rows or columns
1229
1230 /// equilibrium scaling on rows and columns
1232
1233 /// geometric mean scaling on rows and columns, max 1 round
1235
1236 /// geometric mean scaling on rows and columns, max 8 rounds
1238
1239 /// least square scaling
1241
1242 /// geometric mean scaling (max 8 rounds) followed by equilibrium scaling (rows and columns)
1243 SCALER_GEOEQUI = 6
1245
1246 /// values for parameter STARTER
1247 enum
1248 {
1249 /// slack basis
1251
1252 /// greedy crash basis weighted by objective, bounds, and sides
1254
1255 /// crash basis from a greedy solution
1257
1258 /// generic solution-based crash basis
1259 STARTER_VECTOR = 3
1261
1262 /// values for parameter PRICER
1263 enum
1264 {
1265 /// automatic pricer
1267
1268 /// Dantzig pricer
1270
1271 /// partial multiple pricer based on Dantzig pricing
1273
1274 /// devex pricer
1276
1277 /// steepest edge pricer with initialization to unit norms
1279
1280 /// steepest edge pricer with exact initialization of norms
1281 PRICER_STEEP = 5
1283
1284 /// values for parameter RATIOTESTER
1285 enum
1286 {
1287 /// textbook ratio test without stabilization
1289
1290 /// standard Harris ratio test
1292
1293 /// modified Harris ratio test
1295
1296 /// bound flipping ratio test for long steps in the dual simplex
1299
1300 /// values for parameter SYNCMODE
1301 enum
1302 {
1303 /// store only real LP
1305
1306 /// automatic sync of real and rational LP
1308
1309 /// user sync of real and rational LP
1310 SYNCMODE_MANUAL = 2
1312
1313 /// values for parameter READMODE
1314 enum
1315 {
1316 /// standard floating-point parsing
1318
1319 /// rational parsing
1322
1323 /// values for parameter SOLVEMODE
1324 enum
1325 {
1326 /// apply standard floating-point algorithm
1328
1329 /// decide depending on tolerances whether to apply iterative refinement
1331
1332 /// force iterative refinement
1335
1336 /// values for parameter CHECKMODE
1337 enum
1338 {
1339 /// floating-point check
1341
1342 /// decide according to READMODE
1344
1345 /// rational check
1348
1349 /// values for parameter TIMER
1350 enum
1351 {
1352 /// disable timing
1354
1355 /// cpu or user time
1357
1358 /// wallclock time
1359 TIMER_WALLCLOCK = 2
1361
1362 /// values for parameter HYPER_PRICING
1363 enum
1364 {
1365 /// never
1367
1368 /// decide according to problem size
1370
1371 /// always
1374
1375 /// values for parameter SOLUTION_POLISHING
1376 enum
1377 {
1378 /// no solution polishing
1380
1381 /// maximize number of basic slack variables, i.e. more variables on bounds
1383
1384 /// minimize number of basic slack variables, i.e. more variables between bounds
1387
1388 /// real parameters
1389 typedef enum
1390 {
1391 /// primal feasibility tolerance
1393
1394 /// dual feasibility tolerance
1396
1397 /// general zero tolerance
1399
1400 /// zero tolerance used in factorization
1402
1403 /// zero tolerance used in update of the factorization
1405
1406 /// pivot zero tolerance used in factorization
1408
1409 /// infinity threshold
1411
1412 /// time limit in seconds (INFTY if unlimited)
1414
1415 /// lower limit on objective value
1417
1418 /// upper limit on objective value
1420
1421 /// working tolerance for feasibility in floating-point solver during iterative refinement
1423
1424 /// working tolerance for optimality in floating-point solver during iterative refinement
1426
1427 /// maximum increase of scaling factors between refinements
1429
1430 /// lower threshold in lifting (nonzero matrix coefficients with smaller absolute value will be reformulated)
1432
1433 /// upper threshold in lifting (nonzero matrix coefficients with larger absolute value will be reformulated)
1435
1436 /// sparse pricing threshold (\#violations < dimension * SPARSITY_THRESHOLD activates sparse pricing)
1438
1439 /// threshold on number of rows vs. number of columns for switching from column to row representations in auto mode
1441
1442 /// geometric frequency at which to apply rational reconstruction
1444
1445 /// minimal reduction (sum of removed rows/cols) to continue simplification
1447
1448 /// refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix
1450
1451 /// refactor threshold for fill-in in current factor update compared to fill-in in last factorization
1453
1454 /// refactor threshold for memory growth in factorization since last refactorization
1456
1457 /// accuracy of conjugate gradient method in least squares scaling (higher value leads to more iterations)
1459
1460 /// objective offset
1462
1463 /// minimal Markowitz threshold to control sparsity/stability in LU factorization
1465
1466 /// minimal modification threshold to apply presolve reductions
1468
1469 /// factor by which the precision of the floating-point solver is multiplied
1471
1472 /// number of real parameters
1473 REALPARAM_COUNT = 27
1475
1476#ifdef SOPLEX_WITH_RATIONALPARAM
1477 /// rational parameters
1478 typedef enum
1479 {
1480 /// number of rational parameters
1481 RATIONALPARAM_COUNT = 0
1482 } RationalParam;
1483#endif
1484
1485 /// class of parameter settings
1487 {
1488 public:
1489 static struct BoolParam
1490 {
1491 /// constructor
1493 /// array of names for boolean parameters
1495 /// array of descriptions for boolean parameters
1497 /// array of default values for boolean parameters
1500
1501 static struct IntParam
1502 {
1503 /// constructor
1505 /// array of names for integer parameters
1507 /// array of descriptions for integer parameters
1509 /// array of default values for integer parameters
1511 /// array of lower bounds for int parameter values
1513 /// array of upper bounds for int parameter values
1516
1517 static struct RealParam
1518 {
1519 /// constructor
1521 /// array of names for real parameters
1523 /// array of descriptions for real parameters
1525 /// array of default values for real parameters
1527 /// array of lower bounds for real parameter values
1529 /// array of upper bounds for real parameter values
1532
1533#ifdef SOPLEX_WITH_RATIONALPARAM
1534 static struct RationalParam
1535 {
1536 /// constructor
1537 RationalParam();
1538 /// array of names for rational parameters
1539 std::string name[SoPlexBase<R>::RATIONALPARAM_COUNT];
1540 /// array of descriptions for rational parameters
1541 std::string description[SoPlexBase<R>::RATIONALPARAM_COUNT];
1542 /// array of default values for rational parameters
1544 /// array of lower bounds for rational parameter values
1546 /// array of upper bounds for rational parameter values
1548 } rationalParam;
1549#endif
1550
1551 /// array of current boolean parameter values
1553
1554 /// array of current integer parameter values
1556
1557 /// array of current real parameter values
1559
1560#ifdef SOPLEX_WITH_RATIONALPARAM
1561 /// array of current rational parameter values
1562 Rational _rationalParamValues[SoPlexBase<R>::RATIONALPARAM_COUNT];
1563#endif
1564
1565 /// default constructor initializing default settings
1567
1568 /// copy constructor
1570
1571 /// assignment operator
1573 };
1574
1576
1577 /// returns boolean parameter value
1578 bool boolParam(const BoolParam param) const;
1579
1580 /// returns integer parameter value
1581 int intParam(const IntParam param) const;
1582
1583 /// returns real parameter value
1584 Real realParam(const RealParam param) const;
1585
1586#ifdef SOPLEX_WITH_RATIONALPARAM
1587 /// returns rational parameter value
1588 Rational rationalParam(const RationalParam param) const;
1589#endif
1590
1591 /// returns current parameter settings
1592 const Settings& settings() const;
1593
1594 /// returns current tolerances
1595 const std::shared_ptr<Tolerances> tolerances() const;
1596
1597 /// sets boolean parameter value; returns true on success
1598 bool setBoolParam(const BoolParam param, const bool value, const bool init = true);
1599
1600 /// sets integer parameter value; returns true on success
1601 bool setIntParam(const IntParam param, const int value, const bool init = true);
1602
1603 /// sets real parameter value; returns true on success
1604 bool setRealParam(const RealParam param, const Real value, const bool init = true);
1605
1606#ifdef SOPLEX_WITH_RATIONALPARAM
1607 /// sets rational parameter value; returns true on success
1608 bool setRationalParam(const RationalParam param, const Rational value, const bool init = true);
1609#endif
1610
1611 /// sets parameter settings; returns true on success
1612 bool setSettings(const Settings& newSettings, const bool init = true);
1613
1614 /// resets default parameter settings
1615 void resetSettings(const bool quiet = false, const bool init = true);
1616
1617 /// print non-default parameter values
1619
1620 /// writes settings file; returns true on success
1621 bool saveSettingsFile(const char* filename, const bool onlyChanged = false,
1622 int solvemode = 1) const;
1623
1624 /// reads settings file; returns true on success
1625 bool loadSettingsFile(const char* filename);
1626
1627 /// parses one setting string and returns true on success; note that string is modified
1628 bool parseSettingsString(char* str);
1629
1630 ///@}
1631
1632
1633 ///@name Statistics
1634 ///@{
1635
1636 /// set statistic timers to a certain type
1637 void setTimings(const Timer::TYPE ttype);
1638
1639 /// prints solution statistics
1640 void printSolutionStatistics(std::ostream& os);
1641
1642 /// prints statistics on solving process
1643 void printSolvingStatistics(std::ostream& os);
1644
1645 /// prints short statistics
1646 void printShortStatistics(std::ostream& os);
1647
1648 /// prints complete statistics
1649 void printStatistics(std::ostream& os);
1650
1651 /// prints status
1652
1653 void printStatus(std::ostream& os, typename SPxSolverBase<R>::Status status);
1654
1655 ///@}
1656
1657
1658 ///@name Miscellaneous
1659 ///@{
1660
1661 /// prints version and compilation options
1662 void printVersion() const;
1663
1664 /// checks if real LP and rational LP are in sync; dimensions will always be compared,
1665 /// vector and matrix values only if the respective parameter is set to true.
1666 /// If quiet is set to true the function will only display which vectors are different.
1667 bool areLPsInSync(const bool checkVecVals = true, const bool checkMatVals = false,
1668 const bool quiet = false) const;
1669
1670 /// set the random seeds of the solver instance
1671 void setRandomSeed(unsigned int seed);
1672
1673 /// returns the current random seed of the solver instance
1674 unsigned int randomSeed() const;
1675
1676 ///@}
1677
1678private:
1679
1680 ///@name Statistics on solving process
1681 ///@{
1682
1683 /// class of statistics
1684 class Statistics;
1685
1686 /// statistics since last call to solveReal() or solveRational()
1688
1689 ///@}
1690
1691
1692 ///@name Parameter settings
1693 ///@{
1694
1696
1697 std::shared_ptr<Tolerances> _tolerances;
1698
1704
1705 ///@}
1706
1707
1708 ///@name Data for the real LP
1709 ///@{
1710
1734
1739
1740#ifdef SOPLEX_WITH_BOOST
1741#ifdef SOPLEX_WITH_MPFR
1742 //----------------------------- BOOSTED SOLVER -----------------------------
1743 // multiprecision type used for the boosted solver
1744 using BP = number<mpfr_float_backend<0>, et_off>;
1745#else
1746#ifdef SOPLEX_WITH_GMP
1747 using BP = number<gmp_float<50>, et_off>;
1748#else
1749 using BP = number<cpp_dec_float<50>, et_off>;
1750#endif
1751#endif
1752#else
1753 using BP = double;
1754#endif
1755
1756 // boosted solver object
1758
1759 // ------------- Main attributes for precision boosting
1760
1761 int _initialPrecision = 50; // initial number of digits for multiprecision
1762 bool _boostingLimitReached; // true if BP::default_precision() > max authorized number of digits
1763 bool _switchedToBoosted; // true if _boostedSolver is used instead of _solver to cope with the numerical failure of _solver
1764 // this attribute remembers wether we are testing feasibility (1), unboundedness (2) or neither (0)
1765 // it is used when storing/loading the right basis in precision boosting.
1766 // example: if _certificateMode == 1, it is the basis for the feasibility LP that should be stored/loaded.
1768
1769 // ------------- Buffers for statistics of precision boosting
1770
1771 // ideally these four attributes would be local variables, however the precision boosting loop
1772 // wraps the solve in a way that it is complicated to declare these variables locally.
1773 int _lastStallPrecBoosts; // number of previous stalling precision boosts
1774 bool _factorSolNewBasisPrecBoost; // false if the current basis has already been factorized (no new iterations have been done)
1775 int _nextRatrecPrecBoost; // the iteration during or after which rational reconstruction can be performed
1776 // buffer storing the number of iterations before a given precision boost
1777 // used to detect stalling (_prevIterations < _statistics->iterations)
1779
1780 // ------------- Tolerances Ratios
1781
1782 /// ratios for computing the tolerances for precision boosting
1783 /// ratio denotes the proportion of precision used by the tolerance
1784 /// e.g. ratio = 0.65, precision = 100 digits, new tol = 10^(0.65*100)
1790
1791 // ------------- [Boosted] SLUFactor, Pricers, RatioTesters, Scalers, Simplifiers
1792
1794
1801
1806
1809
1816
1819
1820 //--------------------------------------------------------------------------
1821
1822 bool _isRealLPLoaded; // true indicates that the original LP is loaded in the _solver variable, hence all actions
1823 // are performed on the original LP.
1826
1833
1834 ///@}
1835
1836
1837 ///@name Data for the rational LP
1838 ///@{
1839
1843
1867
1868 /// type of bounds and sides
1869 typedef enum
1870 {
1871 /// both bounds are infinite
1873
1874 /// lower bound is finite, upper bound is infinite
1876
1877 /// upper bound is finite, lower bound is infinite
1879
1880 /// lower and upper bound finite, but different
1882
1883 /// lower bound equals upper bound
1884 RANGETYPE_FIXED = 4
1886
1889
1890 ///@}
1891
1892
1893 ///@name Solution data
1894 ///@{
1895
1898
1901
1902 // indicates wether an old basis is currently stored for warm start
1904 bool _hasOldFeasBasis; // basis for testing feasibility
1905 bool _hasOldUnbdBasis; // basis for testing unboundedness
1906
1907 // these vectors store the last basis met in precision boosting when not testing feasibility or unboundedness.
1910
1911 // these vectors store the last basis met when testing feasibility in precision boosting.
1914
1915 // these vectors store the last basis met when testing unboundedness in precision boosting.
1918
1919 // these vectors don't replace _basisStatusRows and _basisStatusCols
1920 // they aim to overcome the issue of having the enum VarStatus inside SPxSolverBase.
1921 // When calling setBasis or getBasis (from SPxSolverBase class), a specific conversion is needed.
1922 // Function: SPxSolverBase<BP>::setBasis(...)
1923 // Usage: copy _basisStatusRows(Cols) to _tmpBasisStatusRows(Cols) before calling
1924 // mysolver.setBasis(_tmpBasisStatusRows, _tmpBasisStatusCols)
1925 // Function: SPxSolverBase<BP>::getBasis(...)
1926 // Usage: copy _tmpBasisStatusRows(Cols) to _basisStatusRows(Cols) after calling
1927 // mysolver.getBasis(_tmpBasisStatusRows, _tmpBasisStatusCols, _basisStatusRows.size(), _basisStatusCols.size())
1930
1934
1938
1939 ///@}
1940
1941 ///@name Miscellaneous
1942 ///@{
1943
1946
1950
1951 ///@}
1952
1953 ///@name Constant helper methods
1954 ///@{
1955
1956 /// extends sparse vector to hold newmax entries if and only if it holds no more free entries
1957 void _ensureDSVectorRationalMemory(DSVectorRational& vec, const int newmax) const;
1958
1959 /// creates a permutation for removing rows/columns from an array of indices
1960 void _idxToPerm(int* idx, int idxSize, int* perm, int permSize) const;
1961
1962 /// creates a permutation for removing rows/columns from a range of indices
1963 void _rangeToPerm(int start, int end, int* perm, int permSize) const;
1964
1965 /// checks consistency for the boosted solver
1967
1968 /// checks consistency
1969 bool _isConsistent() const;
1970
1971 /// should solving process be stopped?
1972 bool _isSolveStopped(bool& stoppedTime, bool& stoppedIter) const;
1973
1974 /// determines RangeType from real bounds
1975 RangeType _rangeTypeReal(const R& lower, const R& upper) const;
1976
1977 /// determines RangeType from rational bounds
1978 RangeType _rangeTypeRational(const Rational& lower, const Rational& upper) const;
1979
1980 /// switches RANGETYPE_LOWER to RANGETYPE_UPPER and vice versa
1981 RangeType _switchRangeType(const RangeType& rangeType) const;
1982
1983 /// checks whether RangeType corresponds to finite lower bound
1984 bool _lowerFinite(const RangeType& rangeType) const;
1985
1986 /// checks whether RangeType corresponds to finite upper bound
1987 bool _upperFinite(const RangeType& rangeType) const;
1988
1989 ///@}
1990
1991
1992 ///@name Non-constant helper methods
1993 ///@{
1994
1995 /// adds a single row to the real LP and adjusts basis
1996 void _addRowReal(const LPRowBase<R>& lprow);
1997
1998 /// adds a single row to the real LP and adjusts basis
1999 void _addRowReal(R lhs, const SVectorBase<R>& lprow, R rhs);
2000
2001 /// adds multiple rows to the real LP and adjusts basis
2002 void _addRowsReal(const LPRowSetBase<R>& lprowset);
2003
2004 /// adds a single column to the real LP and adjusts basis
2005 void _addColReal(const LPColReal& lpcol);
2006
2007 /// adds a single column to the real LP and adjusts basis
2008 void _addColReal(R obj, R lower, const SVectorBase<R>& lpcol, R upper);
2009
2010 /// adds multiple columns to the real LP and adjusts basis
2011 void _addColsReal(const LPColSetReal& lpcolset);
2012
2013 /// replaces row \p i with \p lprow and adjusts basis
2014 void _changeRowReal(int i, const LPRowBase<R>& lprow);
2015
2016 /// changes left-hand side vector for constraints to \p lhs and adjusts basis
2018
2019 /// changes left-hand side of row \p i to \p lhs and adjusts basis
2020 void _changeLhsReal(int i, const R& lhs);
2021
2022 /// changes right-hand side vector to \p rhs and adjusts basis
2024
2025 /// changes right-hand side of row \p i to \p rhs and adjusts basis
2026 void _changeRhsReal(int i, const R& rhs);
2027
2028 /// changes left- and right-hand side vectors and adjusts basis
2029 void _changeRangeReal(const VectorBase<R>& lhs, const VectorBase<R>& rhs);
2030
2031 /// changes left- and right-hand side of row \p i and adjusts basis
2032 void _changeRangeReal(int i, const R& lhs, const R& rhs);
2033
2034 /// replaces column \p i with \p lpcol and adjusts basis
2035 void _changeColReal(int i, const LPColReal& lpcol);
2036
2037 /// changes vector of lower bounds to \p lower and adjusts basis
2039
2040 /// changes lower bound of column i to \p lower and adjusts basis
2041 void _changeLowerReal(int i, const R& lower);
2042
2043 /// changes vector of upper bounds to \p upper and adjusts basis
2045
2046 /// changes \p i 'th upper bound to \p upper and adjusts basis
2047 void _changeUpperReal(int i, const R& upper);
2048
2049 /// changes vectors of column bounds to \p lower and \p upper and adjusts basis
2050 void _changeBoundsReal(const VectorBase<R>& lower, const VectorBase<R>& upper);
2051
2052 /// changes bounds of column \p i to \p lower and \p upper and adjusts basis
2053 void _changeBoundsReal(int i, const R& lower, const R& upper);
2054
2055 /// changes matrix entry in row \p i and column \p j to \p val and adjusts basis
2056 void _changeElementReal(int i, int j, const R& val);
2057
2058 /// removes row \p i and adjusts basis
2059 void _removeRowReal(int i);
2060
2061 /// removes all rows with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the
2062 /// new index where row \p i has been moved to; note that \p perm must point to an array of size at least
2063 /// #numRows()
2064 void _removeRowsReal(int perm[]);
2065
2066 /// remove all rows with indices in array \p idx of size \p n; an array \p perm of size #numRows() may be passed
2067 /// as buffer memory
2068 void _removeRowsReal(int idx[], int n, int perm[]);
2069
2070 /// removes rows \p start to \p end including both; an array \p perm of size #numRows() may be passed as buffer
2071 /// memory
2072 void _removeRowRangeReal(int start, int end, int perm[]);
2073
2074 /// removes column i
2075 void _removeColReal(int i);
2076
2077 /// removes all columns with an index \p i such that \p perm[i] < 0; upon completion, \p perm[i] >= 0 indicates the
2078 /// new index where column \p i has been moved to; note that \p perm must point to an array of size at least
2079 /// #numColsReal()
2080 void _removeColsReal(int perm[]);
2081
2082 /// remove all columns with indices in array \p idx of size \p n; an array \p perm of size #numColsReal() may be
2083 /// passed as buffer memory
2084 void _removeColsReal(int idx[], int n, int perm[]);
2085
2086 /// removes columns \p start to \p end including both; an array \p perm of size #numColsReal() may be passed as
2087 /// buffer memory
2088 void _removeColRangeReal(int start, int end, int perm[]);
2089
2090 /// invalidates solution
2092
2093 /// enables simplifier and scaler according to current parameters
2095
2096 /// disables simplifier and scaler
2098
2099 /// ensures that the rational LP is available; performs no sync
2101
2102 /// ensures that the real LP and the basis are loaded in the solver; performs no sync
2104
2105 /// call floating-point solver and update statistics on iterations etc.
2106 void _solveBoostedRealLPAndRecordStatistics(volatile bool* interrupt = nullptr);
2107
2108 /// call floating-point solver and update statistics on iterations etc.
2109 void _solveRealLPAndRecordStatistics(volatile bool* interrupt = nullptr);
2110
2111 /// reads real LP in LP or MPS format from file and returns true on success; gets row names, column names, and
2112 /// integer variables if desired
2113 bool _readFileReal(const char* filename, NameSet* rowNames = nullptr, NameSet* colNames = nullptr,
2114 DIdxSet* intVars = nullptr);
2115
2116 /// reads rational LP in LP or MPS format from file and returns true on success; gets row names, column names, and
2117 /// integer variables if desired
2118 bool _readFileRational(const char* filename, NameSet* rowNames = nullptr,
2119 NameSet* colNames = nullptr,
2120 DIdxSet* intVars = nullptr);
2121
2122 /// completes range type arrays after adding columns and/or rows
2124
2125 /// recomputes range types from scratch using real LP
2127
2128 /// recomputes range types from scratch using rational LP
2130
2131 /// synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP, without looking at the sync mode
2132 void _syncLPReal(bool time = true);
2133
2134 /// synchronizes rational LP with real LP, i.e., copies real LP to rational LP, without looking at the sync mode
2135 void _syncLPRational(bool time = true);
2136
2137 /// synchronizes rational solution with real solution, i.e., copies (rounded) rational solution to real solution
2139
2140 /// synchronizes real solution with rational solution, i.e., copies real solution to rational solution
2142
2143 /// returns pointer to a constant unit vector available until destruction of the SoPlexBase class
2145
2146 /// parses one line in a settings file and returns true on success; note that the string is modified
2147 bool _parseSettingsLine(char* line, const int lineNumber);
2148
2149 ///@}
2150
2151
2152 //**@name Private solving methods implemented in solverational.hpp */
2153 ///@{
2154
2155 /// stores floating-point solution of original LP as current rational solution and ensure that solution vectors have right dimension; ensure that solution is aligned with basis
2156 template <typename T>
2158 SolRational& sol,
2159 VectorBase<T>& primalReal,
2160 VectorBase<T>& dualReal,
2161 int& dualSize);
2162
2163 /// computes violation of bounds during the refinement loop
2164 void _computeBoundsViolation(SolRational& sol, Rational& boundsViolation);
2165
2166 /// computes violation of sides during the refinement loop
2167 void _computeSidesViolation(SolRational& sol, Rational& sideViolation);
2168
2169 /// computes violation of reduced costs during the refinement loop
2171 SolRational& sol,
2172 Rational& redCostViolation,
2173 const bool& maximizing);
2174
2175 /// computes dual violation during the refinement loop
2177 SolRational& sol,
2178 Rational& dualViolation,
2179 const bool& maximizing);
2180
2181 /// checks termination criteria for refinement loop
2183 bool& primalFeasible,
2184 bool& dualFeasible,
2185 Rational& boundsViolation,
2186 Rational& sideViolation,
2187 Rational& redCostViolation,
2188 Rational& dualViolation,
2189 int minIRRoundsRemaining,
2190 bool& stoppedTime,
2191 bool& stoppedIter,
2192 int numFailedRefinements);
2193
2194 /// checks refinement loop progress
2196 Rational& boundsViolation,
2197 Rational& sideViolation,
2198 Rational& redCostViolation,
2199 Rational& dualViolation,
2200 Rational& maxViolation,
2201 Rational& bestViolation,
2202 const Rational& violationImprovementFactor,
2203 int& numFailedRefinements);
2204
2205 /// performs rational reconstruction and/or factorizationd
2207 int& minIRRoundsRemaining,
2208 int& lastStallIterations,
2209 int& numberOfIterations,
2210 bool& factorSolNewBasis,
2211 int& nextRatrec,
2212 const Rational& errorCorrectionFactor,
2213 Rational& errorCorrection,
2214 Rational& maxViolation,
2215 SolRational& sol,
2216 bool& primalFeasible,
2217 bool& dualFeasible,
2218 bool& stoppedTime,
2219 bool& stoppedIter,
2220 bool& error,
2221 bool& breakAfter,
2222 bool& continueAfter);
2223
2224 /// forces value of given nonbasic variable to bound
2226 SolRational& sol,
2227 int& c,
2228 const int& maxDimRational,
2229 bool toLower);
2230
2231 /// computes primal scaling factor; limit increase in scaling by tolerance used in floating point solve
2233 Rational& maxScale,
2234 Rational& primalScale,
2235 Rational& boundsViolation,
2236 Rational& sideViolation,
2237 Rational& redCostViolation);
2238
2239 /// computes dual scaling factor; limit increase in scaling by tolerance used in floating point solve
2241 Rational& maxScale,
2242 Rational& primalScale,
2243 Rational& dualScale,
2244 Rational& redCostViolation,
2245 Rational& dualViolation);
2246
2247 /// applies scaled bounds
2248 template <typename T>
2249 void _applyScaledBounds(SPxSolverBase<T>& solver, Rational& primalScale);
2250
2251 /// applies scaled sides
2252 template <typename T>
2253 void _applyScaledSides(SPxSolverBase<T>& solver, Rational& primalScale);
2254
2255 /// applies scaled objective function
2256 template <typename T>
2257 void _applyScaledObj(SPxSolverBase<T>& solver, Rational& dualScale, SolRational& sol);
2258
2259 /// evaluates result of solve. Return true if the algorithm must to stopped, false otherwise.
2260 template <typename T>
2262 SPxSolverBase<T>& solver,
2263 typename SPxSolverBase<T>::Status result,
2264 bool usingRefinedLP,
2265 SolRational& sol,
2266 VectorBase<T>& dualReal,
2267 bool& infeasible,
2268 bool& unbounded,
2269 bool& stoppedTime,
2270 bool& stoppedIter,
2271 bool& error);
2272
2273 /// corrects primal solution and aligns with basis
2274 template <typename T>
2276 SolRational& sol,
2277 Rational& primalScale,
2278 int& primalSize,
2279 const int& maxDimRational,
2280 VectorBase<T>& primalReal);
2281
2282 /// updates or recomputes slacks depending on which looks faster
2283 void _updateSlacks(SolRational& sol, int& primalSize);
2284
2285 /// corrects dual solution and aligns with basis
2286 template <typename T>
2288 SPxSolverBase<T>& solver,
2289 SolRational& sol,
2290 const bool& maximizing,
2291 VectorBase<T>& dualReal,
2292 Rational& dualScale,
2293 int& dualSize,
2294 const int& maxDimRational);
2295
2296 /// updates or recomputes reduced cost values depending on which looks faster; adding one to the length of the
2297 /// dual vector accounts for the objective function vector
2298 void _updateReducedCosts(SolRational& sol, int& dualSize, const int& numCorrectedPrimals);
2299
2300 ///@todo precision-boosting move some place else
2301 /// converts the given DataArray of VarStatus to boostedPrecision
2303 DataArray< typename SPxSolverBase<R>::VarStatus >& base,
2304 DataArray< typename SPxSolverBase<BP>::VarStatus >& copy);
2305
2306 ///@todo precision-boosting move some place else
2307 /// converts the given DataArray of VarStatus to R precision
2309 DataArray< typename SPxSolverBase<BP>::VarStatus >& base,
2310 DataArray< typename SPxSolverBase<R>::VarStatus >& copy);
2311
2312 /// disable initial precision solver and switch to boosted solver
2314
2315 /// setup boosted solver before launching iteration
2317
2318 /// increase the multiprecision, return false if maximum precision is reached, true otherwise
2320
2321 /// reset the boosted precision to the default value
2323
2324 /// setup recovery mecanism using multiprecision, return false if maximum precision reached, true otherwise
2326
2327 /// return true if slack basis has to be loaded for boosted solver
2328 bool _isBoostedStartingFromSlack(bool initialSolve = true);
2329
2330 /// indicate if we are testing feasibility, unboundedness or neither
2334
2335 /// check if we are testing feasibility, unboundedness or neither
2339
2340 // stores given basis in old basis attributes: _oldBasisStatusRows, _oldFeasBasisStatusRows, _oldUnbdBasisStatusRows (and ...Cols)
2342 DataArray< typename SPxSolverBase<R>::VarStatus >& cols);
2343
2344 // stores given basis in old basis attributes: _oldBasisStatusRows, _oldFeasBasisStatusRows, _oldUnbdBasisStatusRows (and ...Cols)
2346 DataArray< typename SPxSolverBase<BP>::VarStatus >& cols);
2347
2348 // get the last advanced and stable basis stored by the initial solver and store it as old basis, unsimplify basis if simplifier activated
2349 void _storeLastStableBasis(bool vanished);
2350
2351 // get the last advanced and stable basis stored by the boosted solver and store it as old basis, unsimplify basis if simplifier activated
2352 void _storeLastStableBasisBoosted(bool vanished);
2353
2354 // load old basis in solver. The old basis loaded depends on the certificate mode (feasibility, unboundedness, or neither)
2355 bool _loadBasisFromOldBasis(bool boosted);
2356
2357 // update statistics for precision boosting
2359
2360 /// solves current problem using multiprecision floating-point solver
2361 /// return false if a new boosted iteration is necessary, true otherwise
2363 SolRational& sol,
2364 bool& primalFeasible,
2365 bool& dualFeasible,
2366 bool& infeasible,
2367 bool& unbounded,
2368 bool& stoppedTime,
2369 bool& stoppedIter,
2370 bool& error,
2371 bool& needNewBoostedIt);
2372
2373 /// solves current problem with iterative refinement and recovery mechanism using boosted solver
2375 SolRational& sol,
2376 bool acceptUnbounded,
2377 bool acceptInfeasible,
2378 int minIRRoundsRemaining,
2379 bool& primalFeasible,
2380 bool& dualFeasible,
2381 bool& infeasible,
2382 bool& unbounded,
2383 bool& stoppedTime,
2384 bool& stoppedIter,
2385 bool& error,
2386 bool& needNewBoostedIt);
2387
2388 /// perform iterative refinement using the right precision
2390 SolRational& sol,
2391 bool acceptUnbounded,
2392 bool acceptInfeasible,
2393 int minIRRoundsRemaining,
2394 bool& primalFeasible,
2395 bool& dualFeasible,
2396 bool& infeasible,
2397 bool& unbounded,
2398 bool& stoppedTime,
2399 bool& stoppedIter,
2400 bool& error
2401 );
2402
2403 /// solves current problem using double floating-point solver
2405 SolRational& sol,
2406 bool& primalFeasible,
2407 bool& dualFeasible,
2408 bool& infeasible,
2409 bool& unbounded,
2410 bool& stoppedTime,
2411 bool& stoppedIter,
2412 bool& error);
2413
2414 /// solves current problem with iterative refinement and recovery mechanism
2416 bool acceptUnbounded,
2417 bool acceptInfeasible,
2418 int minIRRoundsRemaining,
2419 bool& primalFeasible,
2420 bool& dualFeasible,
2421 bool& infeasible,
2422 bool& unbounded,
2423 bool& stoppedTime,
2424 bool& stoppedIter,
2425 bool& error);
2426
2427 /// performs iterative refinement on the auxiliary problem for testing unboundedness
2428 void _performUnboundedIRStable(SolRational& sol, bool& hasUnboundedRay, bool& stoppedTime,
2429 bool& stoppedIter, bool& error);
2430
2431 /// performs iterative refinement on the auxiliary problem for testing feasibility
2432 void _performFeasIRStable(SolRational& sol, bool& withDualFarkas, bool& stoppedTime,
2433 bool& stoppedIter, bool& error);
2434
2435 /// reduces matrix coefficient in absolute value by the lifting procedure of Thiele et al. 2013
2436 void _lift();
2437
2438 /// undoes lifting
2440
2441 /// store basis
2443
2444 /// restore basis
2446
2447 /// stores objective, bounds, and sides of real LP
2449
2450 /// restores objective, bounds, and sides of real LP
2452
2453 /// introduces slack variables to transform inequality constraints into equations for both rational and real LP,
2454 /// which should be in sync
2456
2457 /// undoes transformation to equality form
2459
2460 /// transforms LP to unboundedness problem by moving the objective function to the constraints, changing right-hand
2461 /// side and bounds to zero, and adding an auxiliary variable for the decrease in the objective function
2463
2464 /// undoes transformation to unboundedness problem
2465 void _untransformUnbounded(SolRational& sol, bool unbounded);
2466
2467 /// transforms LP to feasibility problem by removing the objective function, shifting variables, and homogenizing the
2468 /// right-hand side
2470
2471 /// undoes transformation to feasibility problem
2472 void _untransformFeasibility(SolRational& sol, bool infeasible);
2473
2474 /** computes radius of infeasibility box implied by an approximate Farkas' proof
2475
2476 Given constraints of the form \f$ lhs <= Ax <= rhs \f$, a farkas proof y should satisfy \f$ y^T A = 0 \f$ and
2477 \f$ y_+^T lhs - y_-^T rhs > 0 \f$, where \f$ y_+, y_- \f$ denote the positive and negative parts of \f$ y \f$.
2478 If \f$ y \f$ is approximate, it may not satisfy \f$ y^T A = 0 \f$ exactly, but the proof is still valid as long
2479 as the following holds for all potentially feasible \f$ x \f$:
2480
2481 \f[
2482 y^T Ax < (y_+^T lhs - y_-^T rhs) (*)
2483 \f]
2484
2485 we may therefore calculate \f$ y^T A \f$ and \f$ y_+^T lhs - y_-^T rhs \f$ exactly and check if the upper and lower
2486 bounds on \f$ x \f$ imply that all feasible \f$ x \f$ satisfy (*), and if not then compute bounds on \f$ x \f$ to
2487 guarantee (*). The simplest way to do this is to compute
2488
2489 \f[
2490 B = (y_+^T lhs - y_-^T rhs) / \sum_i(|(y^T A)_i|)
2491 \f]
2492
2493 noting that if every component of \f$ x \f$ has \f$ |x_i| < B \f$, then (*) holds.
2494
2495 \f$ B \f$ can be increased by iteratively including variable bounds smaller than \f$ B \f$. The speed of this
2496 method can be further improved by using interval arithmetic for all computations. For related information see
2497 Sec. 4 of Neumaier and Shcherbina, Mathematical Programming A, 2004.
2498
2499 Set transformed to true if this method is called after _transformFeasibility().
2500 */
2501 void _computeInfeasBox(SolRational& sol, bool transformed);
2502
2503 /// solves real LP during iterative refinement
2505 VectorBase<R>& dual,
2506 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusRows,
2507 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusCols);
2508
2509 /// solves real LP with recovery mechanism
2510 typename SPxSolverBase<R>::Status _solveRealStable(bool acceptUnbounded, bool acceptInfeasible,
2511 VectorBase<R>& primal, VectorBase<R>& dual,
2512 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusRows,
2513 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusCols,
2514 const bool forceNoSimplifier = false);
2515
2516 /// solves real LP during iterative refinement
2518 VectorBase<BP>& primal, VectorBase<BP>& dual,
2519 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusRows,
2520 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusCols,
2521 typename SPxSolverBase<BP>::Status& boostedResult, bool initialSolve);
2522
2523 /// computes rational inverse of basis matrix as defined by _rationalLUSolverBind
2525
2526 /// factorizes rational basis matrix in column representation
2528 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusRows,
2529 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusCols, bool& stoppedTime,
2530 bool& stoppedIter, bool& error, bool& optimal);
2531
2532 /// attempts rational reconstruction of primal-dual solution
2534 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusRows,
2535 DataArray< typename SPxSolverBase<R>::VarStatus >& basisStatusCols,
2536 const Rational& denomBoundSquared);
2537 ///@}
2538
2539 ///@name Private solving methods implemented in solvereal.cpp
2540 ///@{
2541
2542 /// solves the templated LP
2543 void _optimize(volatile bool* interrupt = nullptr);
2544
2545 /// temporary fix for Rational
2546 void _optimizeRational(volatile bool* interrupt = nullptr);
2547
2548 /// checks result of the solving process and solves again without preprocessing if necessary
2549 void _evaluateSolutionReal(typename SPxSimplifier<R>::Result simplificationStatus);
2550
2551 /// solves real LP with/without preprocessing
2552 void _preprocessAndSolveReal(bool applyPreprocessing, volatile bool* interrupt = nullptr);
2553
2554 /// loads original problem into solver and solves again after it has been solved to optimality with preprocessing
2555 void _resolveWithoutPreprocessing(typename SPxSimplifier<R>::Result simplificationStatus);
2556
2557 /// verify computed solution and resolve if necessary
2559
2560 /// verify computed obj stop and resolve if necessary
2562
2563 /// stores solution of the real LP; before calling this, the real LP must be loaded in the solver and solved (again)
2564 void _storeSolutionReal(bool verify = true);
2565
2566 /// stores solution from the simplifier because problem vanished in presolving step
2568
2569 /// unscales stored solution to remove internal or external scaling of LP
2570 void _unscaleSolutionReal(SPxLPBase<R>& LP, bool persistent = true);
2571
2572 /// load original LP and possibly setup a slack basis
2573 void _loadRealLP(bool initBasis);
2574
2575 /// check scaling of LP
2576 void _checkScaling(SPxLPBase<R>* origLP) const;
2577
2578 /// check correctness of (un)scaled basis matrix operations
2580
2581 /// check whether persistent scaling is supposed to be reapplied again after unscaling
2583
2584 /// checks the dual feasibility of the current basis
2586 ///@}
2587};
2588
2589/* Backwards compatibility */
2591// A header file containing all the general templated functions
2592
2593} // namespace soplex
2594
2595// General templated function
2596#include "soplex.hpp"
2597#include "soplex/solverational.hpp"
2598#include "soplex/testsoplex.hpp"
2599#include "soplex/solvereal.hpp"
2600
2601#endif // _SOPLEX_H_
Collection of dense, sparse, and semi-sparse vectors.
Safe arrays of arbitrary types.
Definition: array.h:73
Dynamic index set.
Definition: didxset.h:52
Dynamic sparse vectors.
Definition: dsvectorbase.h:53
LP column.
Definition: lpcolbase.h:55
(In)equality for LPs.
Definition: lprowbase.h:55
Type
(In)Equality type of an LP row.
Definition: lprowbase.h:82
Set of LP rows.
Definition: lprowsetbase.h:54
Set of strings.
Definition: nameset.h:71
Implementation of Sparse Linear Solver with Rational precision.
Implementation of Sparse Linear Solver.
Definition: slufactor.h:51
Auto pricer.
Definition: spxautopr.h:52
SPxStatus
basis status.
Definition: spxbasis.h:102
Bound flipping ratio test ("long step dual") for SoPlex.
Dantzig pricer.
Definition: spxdantzigpr.h:49
Textbook ratio test for SoPlex.
Definition: spxdefaultrt.h:53
Devex pricer.
Definition: spxdevexpr.h:54
Equilibrium row/column scaling.
Definition: spxequilisc.h:46
Fast shifting ratio test.
Definition: spxfastrt.h:54
Geometric mean row/column scaling.
Definition: spxgeometsc.h:46
Harris pricing with shifting.
Definition: spxharrisrt.h:51
Saving LPs in a form suitable for SoPlex.
Definition: spxlpbase.h:108
Least squares scaling.
Definition: spxleastsqsc.h:48
LP simplifier for removing uneccessary row/columns.
Definition: spxmainsm.h:72
Wrapper for several output streams. A verbosity level is used to decide which stream to use and wheth...
Definition: spxout.h:78
Partial multiple pricing.
Definition: spxparmultpr.h:58
LP scaler abstract base class.
Definition: spxscaler.h:87
LP simplification abstract base class.
Definition: spxsimplifier.h:52
Result
Result of the simplification.
Definition: spxsimplifier.h:93
Sequential object-oriented SimPlex.
Definition: spxsolver.h:104
SoPlex start basis generation base class.
Definition: spxstarter.h:52
Steepest edge pricer.
Definition: spxsteepexpr.h:51
Steepest edge pricer.
Definition: spxsteeppr.h:52
Simple heuristic SPxStarter.
Definition: spxsumst.h:48
Solution vector based start basis.
Definition: spxvectorst.h:55
Weighted start basis.
Definition: spxweightst.h:67
Sparse vectors.
Definition: svectorbase.h:140
class of parameter settings
Definition: soplex.h:1487
int _intParamValues[SoPlexBase< R >::INTPARAM_COUNT]
array of current integer parameter values
Definition: soplex.h:1555
static struct soplex::SoPlexBase::Settings::BoolParam boolParam
bool _boolParamValues[SoPlexBase< R >::BOOLPARAM_COUNT]
array of current boolean parameter values
Definition: soplex.h:1552
static struct soplex::SoPlexBase::Settings::IntParam intParam
Settings(const Settings &settings)
copy constructor
Settings & operator=(const Settings &settings)
assignment operator
Real _realParamValues[SoPlexBase< R >::REALPARAM_COUNT]
array of current real parameter values
Definition: soplex.h:1558
static struct soplex::SoPlexBase::Settings::RealParam realParam
Settings()
default constructor initializing default settings
int numRows() const
returns number of rows
void _performOptIRStableBoosted(SolRational &sol, bool acceptUnbounded, bool acceptInfeasible, int minIRRoundsRemaining, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error, bool &needNewBoostedIt)
solves current problem with iterative refinement and recovery mechanism using boosted solver
bool getBasisInverseTimesVecRational(const SVectorRational &rhs, SSVectorRational &sol)
computes solution of basis matrix B * sol = rhs; performs rational factorization if not available; re...
bool _isSolveStopped(bool &stoppedTime, bool &stoppedIter) const
should solving process be stopped?
SPxLeastSqSC< BP > _boostedScalerLeastsq
Definition: soplex.h:1815
@ STARTER_VECTOR
generic solution-based crash basis
Definition: soplex.h:1259
@ STARTER_WEIGHT
greedy crash basis weighted by objective, bounds, and sides
Definition: soplex.h:1253
@ STARTER_SUM
crash basis from a greedy solution
Definition: soplex.h:1256
@ STARTER_OFF
slack basis
Definition: soplex.h:1250
bool getDualNorms(int &nnormsRow, int &nnormsCol, R *norms) const
gets steepest edge norms and returns false if they are not available
@ CHECKMODE_REAL
floating-point check
Definition: soplex.h:1340
@ CHECKMODE_RATIONAL
rational check
Definition: soplex.h:1346
@ CHECKMODE_AUTO
decide according to READMODE
Definition: soplex.h:1343
VectorRational _modObj
Definition: soplex.h:1859
void _changeColReal(int i, const LPColReal &lpcol)
replaces column i with lpcol and adjusts basis
SPxSolverBase< R >::Status _solveRealForRational(bool fromscratch, VectorBase< R > &primal, VectorBase< R > &dual, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusRows, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusCols)
solves real LP during iterative refinement
void _untransformFeasibility(SolRational &sol, bool infeasible)
undoes transformation to feasibility problem
void _computeDualViolation(SolRational &sol, Rational &dualViolation, const bool &maximizing)
computes dual violation during the refinement loop
@ OBJSENSE_MAXIMIZE
maximization
Definition: soplex.h:1147
@ OBJSENSE_MINIMIZE
minimization
Definition: soplex.h:1144
bool getRowViolation(R &maxviol, R &sumviol)
gets violation of constraints; returns true on success
void _resolveWithoutPreprocessing(typename SPxSimplifier< R >::Result simplificationStatus)
loads original problem into solver and solves again after it has been solved to optimality with prepr...
R objValueReal()
returns the objective value if a primal solution is available
void _removeRowsReal(int idx[], int n, int perm[])
remove all rows with indices in array idx of size n; an array perm of size numRows() may be passed as...
bool _setupBoostedSolverAfterRecovery()
setup recovery mecanism using multiprecision, return false if maximum precision reached,...
VectorRational _modUpper
Definition: soplex.h:1856
void _storeSolutionReal(bool verify=true)
stores solution of the real LP; before calling this, the real LP must be loaded in the solver and sol...
void getObjReal(VectorBase< R > &obj) const
gets objective function vector
void _updateBoostingStatistics()
void _storeLPReal()
stores objective, bounds, and sides of real LP
Real solveTime() const
time spent in last call to solve
void _storeRealSolutionAsRational(SolRational &sol, VectorBase< T > &primalReal, VectorBase< T > &dualReal, int &dualSize)
stores floating-point solution of original LP as current rational solution and ensure that solution v...
VectorBase< R > _manualRhs
Definition: soplex.h:1830
bool multBasisTranspose(R *vec, bool unscale=true)
multiply with transpose of basis matrix; vec * B^T (inplace)
void _removeRowReal(int i)
removes row i and adjusts basis
void _rangeToPerm(int start, int end, int *perm, int permSize) const
creates a permutation for removing rows/columns from a range of indices
void changeColRational(int i, const LPColRational &lpcol)
replaces column i with lpcol
void setTimings(const Timer::TYPE ttype)
set statistic timers to a certain type
SPxWeightST< R > _starterWeight
Definition: soplex.h:1721
const VectorBase< R > & lhsRealInternal() const
returns left-hand side vector, ignoring scaling
bool _isBoostedConsistent() const
checks consistency for the boosted solver
R coefReal(int row, int col) const
returns (unscaled) coefficient
VectorRational _unboundedLhs
Definition: soplex.h:1847
bool getSlacksReal(VectorBase< R > &vector)
gets the vector of slack values if available; returns true on success
DataArray< typename SPxSolverBase< BP >::VarStatus > _tmpBasisStatusRows
Definition: soplex.h:1928
SPxDantzigPR< BP > _boostedPricerDantzig
Definition: soplex.h:1796
void _removeColsReal(int idx[], int n, int perm[])
remove all columns with indices in array idx of size n; an array perm of size numColsReal() may be pa...
SPxEquiliSC< R > _scalerBiequi
Definition: soplex.h:1716
RealParam
real parameters
Definition: soplex.h:1390
@ OPTTOL
dual feasibility tolerance
Definition: soplex.h:1395
@ FPOPTTOL
working tolerance for optimality in floating-point solver during iterative refinement
Definition: soplex.h:1425
@ PRECISION_BOOSTING_FACTOR
factor by which the precision of the floating-point solver is multiplied
Definition: soplex.h:1470
@ SPARSITY_THRESHOLD
sparse pricing threshold (#violations < dimension * SPARSITY_THRESHOLD activates sparse pricing)
Definition: soplex.h:1437
@ LIFTMAXVAL
upper threshold in lifting (nonzero matrix coefficients with larger absolute value will be reformulat...
Definition: soplex.h:1434
@ EPSILON_ZERO
general zero tolerance
Definition: soplex.h:1398
@ EPSILON_FACTORIZATION
zero tolerance used in factorization
Definition: soplex.h:1401
@ OBJLIMIT_UPPER
upper limit on objective value
Definition: soplex.h:1419
@ FPFEASTOL
working tolerance for feasibility in floating-point solver during iterative refinement
Definition: soplex.h:1422
@ RATREC_FREQ
geometric frequency at which to apply rational reconstruction
Definition: soplex.h:1443
@ MAXSCALEINCR
maximum increase of scaling factors between refinements
Definition: soplex.h:1428
@ TIMELIMIT
time limit in seconds (INFTY if unlimited)
Definition: soplex.h:1413
@ LIFTMINVAL
lower threshold in lifting (nonzero matrix coefficients with smaller absolute value will be reformula...
Definition: soplex.h:1431
@ REPRESENTATION_SWITCH
threshold on number of rows vs. number of columns for switching from column to row representations in...
Definition: soplex.h:1440
@ REFAC_UPDATE_FILL
refactor threshold for fill-in in current factor update compared to fill-in in last factorization
Definition: soplex.h:1452
@ REALPARAM_COUNT
number of real parameters
Definition: soplex.h:1473
@ MINRED
minimal reduction (sum of removed rows/cols) to continue simplification
Definition: soplex.h:1446
@ OBJ_OFFSET
objective offset
Definition: soplex.h:1461
@ OBJLIMIT_LOWER
lower limit on objective value
Definition: soplex.h:1416
@ FEASTOL
primal feasibility tolerance
Definition: soplex.h:1392
@ EPSILON_PIVOT
pivot zero tolerance used in factorization
Definition: soplex.h:1407
@ MIN_MARKOWITZ
minimal Markowitz threshold to control sparsity/stability in LU factorization
Definition: soplex.h:1464
@ REFAC_MEM_FACTOR
refactor threshold for memory growth in factorization since last refactorization
Definition: soplex.h:1455
@ SIMPLIFIER_MODIFYROWFAC
minimal modification threshold to apply presolve reductions
Definition: soplex.h:1467
@ EPSILON_UPDATE
zero tolerance used in update of the factorization
Definition: soplex.h:1404
@ REFAC_BASIS_NNZ
refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix
Definition: soplex.h:1449
@ LEASTSQ_ACRCY
accuracy of conjugate gradient method in least squares scaling (higher value leads to more iterations...
Definition: soplex.h:1458
@ INFTY
infinity threshold
Definition: soplex.h:1410
bool getDualViolation(R &maxviol, R &sumviol)
gets violation of dual multipliers; returns true on success
void _enableSimplifierAndScaler()
enables simplifier and scaler according to current parameters
void _verifyObjLimitReal()
verify computed obj stop and resolve if necessary
bool getSlacksReal(R *p_vector, int dim)
DataArray< typename SPxSolverBase< R >::VarStatus > _basisStatusRows
Definition: soplex.h:1899
SoPlexBase()
default constructor
void changeLhsReal(const VectorBase< R > &lhs)
changes left-hand side vector for constraints to lhs
void addRowsRational(const LPRowSetRational &lprowset)
adds multiple rows
@ TIMER_WALLCLOCK
wallclock time
Definition: soplex.h:1359
@ TIMER_CPU
cpu or user time
Definition: soplex.h:1356
@ TIMER_OFF
disable timing
Definition: soplex.h:1353
VectorRational _feasObj
Definition: soplex.h:1850
bool _switchedToBoosted
Definition: soplex.h:1763
void changeRhsRational(const VectorRational &rhs)
changes right-hand side vector to rhs
IntParam
integer parameters
Definition: soplex.h:1050
@ HYPER_PRICING
mode for hyper sparse pricing
Definition: soplex.h:1112
@ DISPLAYFREQ
display frequency
Definition: soplex.h:1076
@ TIMER
type of timer
Definition: soplex.h:1109
@ CHECKMODE
mode for a posteriori feasibility checks
Definition: soplex.h:1106
@ STATTIMER
type of timer for statistics
Definition: soplex.h:1127
@ FACTOR_UPDATE_TYPE
type of LU update
Definition: soplex.h:1061
@ READMODE
mode for reading LP files
Definition: soplex.h:1100
@ STALLREFLIMIT
stalling refinement limit (-1 if unlimited)
Definition: soplex.h:1073
@ STARTER
type of starter used to create crash basis
Definition: soplex.h:1088
@ STORE_BASIS_SIMPLEX_FREQ
Definition: soplex.h:1134
@ REFLIMIT
refinement limit (-1 if unlimited)
Definition: soplex.h:1070
@ SYNCMODE
mode for synchronizing real and rational LP
Definition: soplex.h:1097
@ PRICER
type of pricer
Definition: soplex.h:1091
@ LEASTSQ_MAXROUNDS
maximum number of conjugate gradient iterations in least square scaling
Definition: soplex.h:1118
@ ALGORITHM
type of algorithm, i.e., primal or dual
Definition: soplex.h:1058
@ INTPARAM_COUNT
number of integer parameters
Definition: soplex.h:1137
@ OBJSENSE
objective sense
Definition: soplex.h:1052
@ SIMPLIFIER
type of simplifier
Definition: soplex.h:1082
@ PRINTBASISMETRIC
print condition number during the solve
Definition: soplex.h:1124
@ REPRESENTATION
type of computational form, i.e., column or row representation
Definition: soplex.h:1055
@ SOLVEMODE
mode for iterative refinement strategy
Definition: soplex.h:1103
@ RATFAC_MINSTALLS
minimum number of stalling refinements since last pivot to trigger rational factorization
Definition: soplex.h:1115
@ SOLUTION_POLISHING
mode for solution polishing
Definition: soplex.h:1121
@ FACTOR_UPDATE_MAX
maximum number of updates without fresh factorization
Definition: soplex.h:1064
@ SCALER
type of scaler
Definition: soplex.h:1085
@ ITERLIMIT
iteration limit (-1 if unlimited)
Definition: soplex.h:1067
@ RATIOTESTER
type of ratio test
Definition: soplex.h:1094
@ VERBOSITY
verbosity level
Definition: soplex.h:1079
DSVectorRational _tauColVector
Definition: soplex.h:1849
int numRefinements() const
number of iterative refinements
void _removeColReal(int i)
removes column i
void changeUpperRational(const VectorRational &upper)
changes vector of upper bounds to upper
void _convertDataArrayVarStatusToRPrecision(DataArray< typename SPxSolverBase< BP >::VarStatus > &base, DataArray< typename SPxSolverBase< R >::VarStatus > &copy)
SolRational _solRational
Definition: soplex.h:1932
bool _hasOldFeasBasis
Definition: soplex.h:1904
void _addColReal(const LPColReal &lpcol)
adds a single column to the real LP and adjusts basis
DataArray< typename SPxSolverBase< R >::VarStatus > _storedBasisStatusRows
Definition: soplex.h:1861
bool getDualRational(mpq_t *vector, const int size)
gets the dual solution vector if available; returns true on success (GMP only method)
void changeElementRational(int i, int j, const Rational &val)
changes matrix entry in row i and column j to val
LPRowRational::Type rowTypeRational(int i) const
returns inequality type of row i
void getObjRational(int i, Rational &obj) const
gets objective value of column i
const char * getStarterName()
name of starter
void _storeBasis()
store basis
void _ensureRealLPLoaded()
ensures that the real LP and the basis are loaded in the solver; performs no sync
void changeLhsRational(int i, const mpq_t *lhs)
changes left-hand side of row i to lhs (GMP only method)
SolRational _workSol
Definition: soplex.h:1933
const Rational & upperRational(int i) const
returns upper bound of column i
bool getSlacksRational(mpq_t *vector, const int size)
gets the vector of slack values if available; returns true on success (GMP only method)
VectorRational _unboundedLower
Definition: soplex.h:1845
bool getBasisInverseRowReal(int r, R *coef, int *inds=nullptr, int *ninds=nullptr, bool unscale=true)
computes row r of basis inverse; returns true on success
int _nextRatrecPrecBoost
Definition: soplex.h:1775
void printSolvingStatistics(std::ostream &os)
prints statistics on solving process
const VectorBase< R > & maxObjRealInternal() const
returns objective function vector after transformation to a maximization problem; since this is how i...
void _updateReducedCosts(SolRational &sol, int &dualSize, const int &numCorrectedPrimals)
updates or recomputes reduced cost values depending on which looks faster; adding one to the length o...
int numRowsRational() const
bool checkBasisDualFeasibility(VectorBase< R > feasVec)
checks the dual feasibility of the current basis
void _updateSlacks(SolRational &sol, int &primalSize)
updates or recomputes slacks depending on which looks faster
bool getSlacksRational(VectorRational &vector)
gets the vector of slack values if available; returns true on success
const SVectorBase< R > & rowVectorRealInternal(int i) const
returns vector of row i, ignoring scaling
const VectorBase< R > & lowerRealInternal() const
returns lower bound vector
bool getBasisIndRational(DataArray< int > &bind)
gets an array of indices for the columns of the rational basis matrix; bind[i] >= 0 means that the i-...
bool getBasisInverseTimesVecReal(R *rhs, R *sol, bool unscale=true)
computes dense solution of basis matrix B * sol = rhs; returns true on success
void _applyScaledObj(SPxSolverBase< T > &solver, Rational &dualScale, SolRational &sol)
applies scaled objective function
void _syncLPReal(bool time=true)
synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP,...
void _recomputeRangeTypesRational()
recomputes range types from scratch using rational LP
int numIterations() const
number of iterations since last call to solve
const SVectorBase< R > & colVectorRealInternal(int i) const
returns vector of col i, ignoring scaling
bool setDualNorms(int nnormsRow, int nnormsCol, R *norms)
sets steepest edge norms and returns false if that's not possible
bool _factorSolNewBasisPrecBoost
Definition: soplex.h:1774
SPxGeometSC< R > _scalerGeo1
Definition: soplex.h:1717
void addRowsReal(const LPRowSetBase< R > &lprowset)
adds multiple rows
void changeBoundsReal(int i, const R &lower, const R &upper)
changes bounds of column i to lower and upper
bool getPrimalRayReal(R *vector, int dim)
void _solveRealForRationalStable(SolRational &sol, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error)
solves current problem using double floating-point solver
bool parseSettingsString(char *str)
parses one setting string and returns true on success; note that string is modified
int numNonzerosRational() const
const SVectorRational & rowVectorRational(int i) const
returns vector of row i
number< gmp_float< 50 >, et_off > BP
Definition: soplex.h:1747
SPxLPBase< R > _manualRealLP
Definition: soplex.h:1832
void changeColReal(int i, const LPColReal &lpcol)
replaces column i with lpcol
void changeObjRational(int i, const Rational &obj)
changes objective coefficient of column i to obj
void _changeBoundsReal(int i, const R &lower, const R &upper)
changes bounds of column i to lower and upper and adjusts basis
void getBasisInd(int *bind) const
gets the indices of the basic columns and rows; basic column n gives value n, basic row m gives value...
SPxHarrisRT< BP > _boostedRatiotesterHarris
Definition: soplex.h:1803
void clearLPRational()
clears the LP
void printStatus(std::ostream &os, typename SPxSolverBase< R >::Status status)
prints status
void changeRhsRational(const mpq_t *rhs, int rhsSize)
changes right-hand side vector to rhs (GMP only method)
bool getBasisInverseColReal(int c, R *coef, int *inds=nullptr, int *ninds=nullptr, bool unscale=true)
computes column c of basis inverse; returns true on success
void removeColRational(int i)
removes column i
void getBasis(typename SPxSolverBase< R >::VarStatus rows[], typename SPxSolverBase< R >::VarStatus cols[]) const
gets current basis via arrays of statuses
void _syncRealSolution()
synchronizes rational solution with real solution, i.e., copies (rounded) rational solution to real s...
int numColsRational() const
void addColReal(const LPColBase< R > &lpcol)
adds a single column
void getRowRational(int i, LPRowRational &lprow) const
gets row i
SPxLPBase< R > * _realLP
Definition: soplex.h:1735
void _changeLhsReal(const VectorBase< R > &lhs)
changes left-hand side vector for constraints to lhs and adjusts basis
@ SYNCMODE_MANUAL
user sync of real and rational LP
Definition: soplex.h:1310
@ SYNCMODE_ONLYREAL
store only real LP
Definition: soplex.h:1304
@ SYNCMODE_AUTO
automatic sync of real and rational LP
Definition: soplex.h:1307
bool boolParam(const BoolParam param) const
returns boolean parameter value
const Rational & lowerRational(int i) const
returns lower bound of column i
int dmaxSizeDualRational(const int base=2)
get size of largest denominator in dual solution
SPxParMultPR< R > _pricerParMult
Definition: soplex.h:1726
const char * getPricerName()
name of currently loaded pricer
void addColsRational(const LPColSetRational &lpcolset)
adds multiple columns
VectorRational _feasLhs
Definition: soplex.h:1851
void changeElementReal(int i, int j, const R &val)
changes matrix entry in row i and column j to val
void changeRangeReal(int i, const R &lhs, const R &rhs)
changes left- and right-hand side of row i
void getColRational(int i, LPColRational &lpcol) const
gets column i
void printUserSettings()
print non-default parameter values
bool _loadBasisFromOldBasis(bool boosted)
void _computePrimalScalingFactor(Rational &maxScale, Rational &primalScale, Rational &boundsViolation, Rational &sideViolation, Rational &redCostViolation)
computes primal scaling factor; limit increase in scaling by tolerance used in floating point solve
VectorRational _feasRhs
Definition: soplex.h:1852
VectorRational _feasLower
Definition: soplex.h:1853
void _correctDualSolution(SPxSolverBase< T > &solver, SolRational &sol, const bool &maximizing, VectorBase< T > &dualReal, Rational &dualScale, int &dualSize, const int &maxDimRational)
corrects dual solution and aligns with basis
SPxAutoPR< BP > _boostedPricerAuto
Definition: soplex.h:1795
int numColsReal() const
bool areLPsInSync(const bool checkVecVals=true, const bool checkMatVals=false, const bool quiet=false) const
checks if real LP and rational LP are in sync; dimensions will always be compared,...
void _loadRealLP(bool initBasis)
load original LP and possibly setup a slack basis
const std::shared_ptr< Tolerances > tolerances() const
returns current tolerances
bool hasDual() const
deprecated: use hasSol() instead
Definition: soplex.h:627
bool getDualFarkasReal(R *vector, int dim)
void changeUpperRational(int i, const mpq_t *upper)
changes upper bound of column i to upper (GMP only method)
void addRowsRational(const mpq_t *lhs, const mpq_t *rowValues, const int *rowIndices, const int *rowStarts, const int *rowLengths, const int numRows, const int numValues, const mpq_t *rhs)
adds a set of rows (GMP only method)
void _solveRealLPAndRecordStatistics(volatile bool *interrupt=nullptr)
call floating-point solver and update statistics on iterations etc.
void _changeBoundsReal(const VectorBase< R > &lower, const VectorBase< R > &upper)
changes vectors of column bounds to lower and upper and adjusts basis
void _completeRangeTypesRational()
completes range type arrays after adding columns and/or rows
void changeUpperReal(const VectorBase< R > &upper)
changes vector of upper bounds to upper
Rational _rationalNegInfty
Definition: soplex.h:1700
Rational _rationalZero
Definition: soplex.h:1949
void _invalidateSolution()
invalidates solution
void removeRowRangeRational(int start, int end, int perm[]=nullptr)
removes rows start to end including both; an array perm of size numRowsRational() may be passed as bu...
void _optimizeRational(volatile bool *interrupt=nullptr)
temporary fix for Rational
DataArray< RangeType > _colTypes
Definition: soplex.h:1887
bool isDualFeasible() const
is stored dual solution feasible?
DataArray< typename SPxSolverBase< R >::VarStatus > _basisStatusCols
Definition: soplex.h:1900
void _transformFeasibility()
transforms LP to feasibility problem by removing the objective function, shifting variables,...
bool getBasisMetric(R &metric, int type=0)
SPxDantzigPR< R > _pricerDantzig
Definition: soplex.h:1725
Presol< R > _simplifierPaPILO
Definition: soplex.h:1714
SPxGeometSC< BP > _boostedScalerGeo8
Definition: soplex.h:1813
bool getEstimatedCondition(R &condition)
computes an estimated condition number for the current basis matrix using the power method; returns t...
R lowerReal(int i) const
returns lower bound of column i
void removeRowRational(int i)
removes row i
void _optimize(volatile bool *interrupt=nullptr)
solves the templated LP
Rational _rationalPosone
Definition: soplex.h:1947
SPxParMultPR< BP > _boostedPricerParMult
Definition: soplex.h:1797
bool getPrimalRational(VectorRational &vector)
int totalSizeDualRational(const int base=2)
get size of dual solution
int dlcmSizeDualRational(const int base=2)
get size of least common multiple of denominators in dual solution
SPxSteepPR< R > _pricerQuickSteep
Definition: soplex.h:1728
void _project(SolRational &sol)
undoes lifting
bool getRedCostViolation(R &maxviol, R &sumviol)
gets violation of reduced costs; returns true on success
bool _applyPolishing
Definition: soplex.h:1825
SPxSolverBase< R >::Status optimize(volatile bool *interrupt=nullptr)
optimize the given LP
SPxSolverBase< R >::Status solve(volatile bool *interrupt=nullptr)
Definition: soplex.h:606
void addColRational(const LPColRational &lpcol)
adds a single column
DSVectorRational _primalDualDiff
Definition: soplex.h:1860
DataArray< typename SPxSolverBase< R >::VarStatus > _storedBasisStatusCols
Definition: soplex.h:1862
void _computeDualScalingFactor(Rational &maxScale, Rational &primalScale, Rational &dualScale, Rational &redCostViolation, Rational &dualViolation)
computes dual scaling factor; limit increase in scaling by tolerance used in floating point solve
SPxSumST< R > _starterSum
Definition: soplex.h:1722
bool ignoreUnscaledViolations()
sets the status to OPTIMAL in case the LP has been solved with unscaled violations
Definition: soplex.h:642
bool getDualFarkas(VectorBase< R > &vector)
gets the Farkas proof if available; returns true on success
bool getDualFarkasRational(mpq_t *vector, const int size)
gets the Farkas proof if LP is infeasible; returns true on success (GMP only method)
bool readBasisFile(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr)
reads basis information from filename and returns true on success; if rowNames and colNames are nullp...
SLUFactor< R > _slufactor
Definition: soplex.h:1712
int numCols() const
Templated function that returns number of columns.
void _applyScaledBounds(SPxSolverBase< T > &solver, Rational &primalScale)
applies scaled bounds
bool _lowerFinite(const RangeType &rangeType) const
checks whether RangeType corresponds to finite lower bound
SPxDevexPR< R > _pricerDevex
Definition: soplex.h:1727
void _checkRefinementProgress(Rational &boundsViolation, Rational &sideViolation, Rational &redCostViolation, Rational &dualViolation, Rational &maxViolation, Rational &bestViolation, const Rational &violationImprovementFactor, int &numFailedRefinements)
checks refinement loop progress
void changeObjReal(int i, const R &obj)
changes objective coefficient of column i to obj
bool _isRealLPScaled
Definition: soplex.h:1824
bool readFile(const char *filename, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr)
reads LP file in LP or MPS format according to READMODE parameter; gets row names,...
Rational objRational(int i) const
returns objective value of column i
VectorBase< R > _manualObj
Definition: soplex.h:1831
SLUFactorRational _rationalLUSolver
Definition: soplex.h:1841
void setRandomSeed(unsigned int seed)
set the random seeds of the solver instance
void _computeInfeasBox(SolRational &sol, bool transformed)
void printStatistics(std::ostream &os)
prints complete statistics
void writeStateReal(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const bool cpxFormat=false, const bool writeZeroObjective=false) const
writes internal LP, basis information, and parameter settings; if rowNames and colNames are nullptr,...
void _applyScaledSides(SPxSolverBase< T > &solver, Rational &primalScale)
applies scaled sides
int intParam(const IntParam param) const
returns integer parameter value
void changeBoundsRational(const VectorRational &lower, const VectorRational &upper)
changes vectors of column bounds to lower and upper
void _untransformEquality(SolRational &sol)
undoes transformation to equality form
@ SIMPLIFIER_INTERNAL
using internal presolving methods
Definition: soplex.h:1212
@ SIMPLIFIER_PAPILO
using the presolve lib papilo
Definition: soplex.h:1215
@ SIMPLIFIER_AUTO
SoPlex chooses automatically (currently always "internal")
Definition: soplex.h:1218
@ SIMPLIFIER_OFF
disabling presolving
Definition: soplex.h:1209
void removeRowsReal(int idx[], int n, int perm[]=nullptr)
remove all rows with indices in array idx of size n; an array perm of size numRows() may be passed as...
Real _epsPivotPrecisionRatio
Definition: soplex.h:1789
const char * getRatiotesterName()
name of currently loaded ratiotester
Rational objValueRational()
returns the objective value if a primal solution is available
void _solveRealForRationalBoosted(VectorBase< BP > &primal, VectorBase< BP > &dual, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusRows, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusCols, typename SPxSolverBase< BP >::Status &boostedResult, bool initialSolve)
solves real LP during iterative refinement
Real realParam(const RealParam param) const
returns real parameter value
int totalSizePrimalRational(const int base=2)
get size of primal solution
bool getBoundViolation(R &maxviol, R &sumviol)
gets violation of bounds; returns true on success
bool getBoundViolationRational(Rational &maxviol, Rational &sumviol)
void changeRangeRational(int i, const mpq_t *lhs, const mpq_t *rhs)
changes left- and right-hand side of row i (GMP only method)
void changeObjRational(int i, const mpq_t *obj)
changes objective coefficient of column i to obj (GMP only method)
bool _upperFinite(const RangeType &rangeType) const
checks whether RangeType corresponds to finite upper bound
bool saveSettingsFile(const char *filename, const bool onlyChanged=false, int solvemode=1) const
writes settings file; returns true on success
SPxEquiliSC< BP > _boostedScalerBiequi
Definition: soplex.h:1811
void changeRhsRational(int i, const Rational &rhs)
changes right-hand side of row i to rhs
SPxVectorST< R > _starterVector
Definition: soplex.h:1723
void _convertDataArrayVarStatusToBoosted(DataArray< typename SPxSolverBase< R >::VarStatus > &base, DataArray< typename SPxSolverBase< BP >::VarStatus > &copy)
SPxBoundFlippingRT< BP > _boostedRatiotesterBoundFlipping
Definition: soplex.h:1805
void removeRowsRational(int idx[], int n, int perm[]=nullptr)
remove all rows with indices in array idx of size n; an array perm of size numRowsRational() may be p...
void _performOptIRStable(SolRational &sol, bool acceptUnbounded, bool acceptInfeasible, int minIRRoundsRemaining, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error)
solves current problem with iterative refinement and recovery mechanism
void _forceNonbasicToBound(SolRational &sol, int &c, const int &maxDimRational, bool toLower)
forces value of given nonbasic variable to bound
void _changeRangeReal(const VectorBase< R > &lhs, const VectorBase< R > &rhs)
changes left- and right-hand side vectors and adjusts basis
void _transformUnbounded()
transforms LP to unboundedness problem by moving the objective function to the constraints,...
void setBasis(const typename SPxSolverBase< R >::VarStatus rows[], const typename SPxSolverBase< R >::VarStatus cols[])
sets starting basis via arrays of statuses
std::shared_ptr< Tolerances > _tolerances
Definition: soplex.h:1697
void _changeLowerReal(const VectorBase< R > &lower)
changes vector of lower bounds to lower and adjusts basis
void _changeUpperReal(const VectorBase< R > &upper)
changes vector of upper bounds to upper and adjusts basis
void removeColReal(int i)
removes column i
int dlcmSizePrimalRational(const int base=2)
get size of least common multiple of denominators in primal solution
void _computeBasisInverseRational()
computes rational inverse of basis matrix as defined by _rationalLUSolverBind
void _computeSidesViolation(SolRational &sol, Rational &sideViolation)
computes violation of sides during the refinement loop
R objReal(int i) const
returns objective value of column i
VectorRational _unboundedRhs
Definition: soplex.h:1848
@ SCALER_GEOEQUI
geometric mean scaling (max 8 rounds) followed by equilibrium scaling (rows and columns)
Definition: soplex.h:1243
@ SCALER_UNIEQUI
equilibrium scaling on rows or columns
Definition: soplex.h:1228
@ SCALER_BIEQUI
equilibrium scaling on rows and columns
Definition: soplex.h:1231
@ SCALER_LEASTSQ
least square scaling
Definition: soplex.h:1240
@ SCALER_GEO1
geometric mean scaling on rows and columns, max 1 round
Definition: soplex.h:1234
@ SCALER_OFF
no scaler
Definition: soplex.h:1225
@ SCALER_GEO8
geometric mean scaling on rows and columns, max 8 rounds
Definition: soplex.h:1237
SolBase< R > _solReal
Definition: soplex.h:1931
SLUFactor< BP > _boostedSlufactor
Definition: soplex.h:1793
DataArray< typename SPxSolverBase< R >::VarStatus > _oldFeasBasisStatusRows
Definition: soplex.h:1912
bool _isRealLPLoaded
Definition: soplex.h:1822
void _performUnboundedIRStable(SolRational &sol, bool &hasUnboundedRay, bool &stoppedTime, bool &stoppedIter, bool &error)
performs iterative refinement on the auxiliary problem for testing unboundedness
bool getPrimal(VectorBase< R > &vector)
gets the primal solution vector if available; returns true on success
bool _readFileReal(const char *filename, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr)
reads real LP in LP or MPS format from file and returns true on success; gets row names,...
Settings * _currentSettings
Definition: soplex.h:1695
void _switchToBoosted()
disable initial precision solver and switch to boosted solver
Presol< BP > _boostedSimplifierPaPILO
Definition: soplex.h:1818
unsigned int randomSeed() const
returns the current random seed of the solver instance
SPxAutoPR< R > _pricerAuto
Definition: soplex.h:1724
bool getExactCondition(R &condition)
computes the exact condition number for the current basis matrix using the power method; returns true...
void writeStateRational(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const bool cpxFormat=false, const bool writeZeroObjective=false) const
writes internal LP, basis information, and parameter settings; if rowNames and colNames are nullptr,...
Real _tolPrecisionRatio
ratios for computing the tolerances for precision boosting ratio denotes the proportion of precision ...
Definition: soplex.h:1785
int numRowsReal() const
void _changeUpperReal(int i, const R &upper)
changes i 'th upper bound to upper and adjusts basis
void changeLowerRational(const VectorRational &lower)
changes vector of lower bounds to lower
void _solveBoostedRealLPAndRecordStatistics(volatile bool *interrupt=nullptr)
call floating-point solver and update statistics on iterations etc.
void changeRowReal(int i, const LPRowBase< R > &lprow)
replaces row i with lprow
void _recomputeRangeTypesReal()
recomputes range types from scratch using real LP
int numIterationsBoosted() const
number of iterations in higher precision since last call to solve
SPxSteepExPR< R > _pricerSteep
Definition: soplex.h:1729
bool getBasisInverseColRational(const int c, SSVectorRational &vec)
computes column c of basis inverse; performs rational factorization if not available; returns true on...
Rational _rationalOpttol
Definition: soplex.h:1702
void _checkScaling(SPxLPBase< R > *origLP) const
check scaling of LP
void _solveRealForRationalBoostedStable(SolRational &sol, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error, bool &needNewBoostedIt)
solves current problem using multiprecision floating-point solver return false if a new boosted itera...
void removeRowReal(int i)
removes row i
DataArray< RangeType > _rowTypes
Definition: soplex.h:1888
SPxDefaultRT< R > _ratiotesterTextbook
Definition: soplex.h:1730
void _storeLastStableBasisBoosted(bool vanished)
SPxSolverBase< R >::VarStatus basisRowStatus(int row) const
returns basis status for a single row
void _restoreLPReal()
restores objective, bounds, and sides of real LP
SPxMainSM< BP > _boostedSimplifierMainSM
Definition: soplex.h:1817
bool setBoolParam(const BoolParam param, const bool value, const bool init=true)
sets boolean parameter value; returns true on success
void changeLowerReal(const VectorBase< R > &lower)
changes vector of lower bounds to lower
void printSolutionStatistics(std::ostream &os)
prints solution statistics
void changeUpperReal(int i, const R &upper)
changes i 'th upper bound to upper
const Rational & maxObjRational(int i) const
returns objective value of column i after transformation to a maximization problem; since this is how...
void printShortStatistics(std::ostream &os)
prints short statistics
const Rational & lhsRational(int i) const
returns left-hand side of row i
int dmaxSizePrimalRational(const int base=2)
get size of largest denominator in primal solution
VectorRational _modLower
Definition: soplex.h:1855
void changeUpperRational(int i, const Rational &upper)
changes i 'th upper bound to upper
bool getRedCost(VectorBase< R > &vector)
gets the vector of reduced cost values if available; returns true on success
SPxBoundFlippingRT< R > _ratiotesterBoundFlipping
Definition: soplex.h:1733
bool getRedCostReal(R *vector, int dim)
void _syncLPRational(bool time=true)
synchronizes rational LP with real LP, i.e., copies real LP to rational LP, without looking at the sy...
bool _isBoostedStartingFromSlack(bool initialSolve=true)
return true if slack basis has to be loaded for boosted solver
bool _parseSettingsLine(char *line, const int lineNumber)
parses one line in a settings file and returns true on success; note that the string is modified
void removeColRangeReal(int start, int end, int perm[]=nullptr)
removes columns start to end including both; an array perm of size numColsReal() may be passed as buf...
const char * getSimplifierName()
name of simplifier
const SVectorRational & colVectorRational(int i) const
returns vector of column i
void _syncRationalSolution()
synchronizes real solution with rational solution, i.e., copies real solution to rational solution
void _storeLastStableBasis(bool vanished)
void _changeLhsReal(int i, const R &lhs)
changes left-hand side of row i to lhs and adjusts basis
SPxSteepExPR< BP > _boostedPricerSteep
Definition: soplex.h:1800
VectorRational _unboundedUpper
Definition: soplex.h:1846
SPxSolverBase< R >::Status _status
Definition: soplex.h:1896
void changeElementRational(int i, int j, const mpq_t *val)
changes matrix entry in row i and column j to val (GMP only method)
void _removeRowRangeReal(int start, int end, int perm[])
removes rows start to end including both; an array perm of size numRows() may be passed as buffer mem...
void changeBoundsRational(int i, const Rational &lower, const Rational &upper)
changes bounds of column i to lower and upper
RangeType _switchRangeType(const RangeType &rangeType) const
switches RANGETYPE_LOWER to RANGETYPE_UPPER and vice versa
void _ensureDSVectorRationalMemory(DSVectorRational &vec, const int newmax) const
extends sparse vector to hold newmax entries if and only if it holds no more free entries
bool _evaluateResult(SPxSolverBase< T > &solver, typename SPxSolverBase< T >::Status result, bool usingRefinedLP, SolRational &sol, VectorBase< T > &dualReal, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error)
evaluates result of solve. Return true if the algorithm must to stopped, false otherwise.
@ ALGORITHM_PRIMAL
primal simplex algorithm, i.e., entering for column and leaving for row representation
Definition: soplex.h:1167
@ ALGORITHM_DUAL
dual simplex algorithm, i.e., leaving for column and entering for row representation
Definition: soplex.h:1170
void _factorizeColumnRational(SolRational &sol, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusRows, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusCols, bool &stoppedTime, bool &stoppedIter, bool &error, bool &optimal)
factorizes rational basis matrix in column representation
void syncLPReal()
synchronizes real LP with rational LP, i.e., copies (rounded) rational LP into real LP,...
void _transformEquality()
introduces slack variables to transform inequality constraints into equations for both rational and r...
void clearBasis()
clears starting basis
SPxScaler< BP > * _boostedScaler
Definition: soplex.h:1807
DataArray< int > _rationalLUSolverBind
Definition: soplex.h:1842
Real _epsZeroPrecisionRatio
Definition: soplex.h:1786
SPxGeometSC< R > _scalerGeo8
Definition: soplex.h:1718
void _ratrecAndOrRatfac(int &minIRRoundsRemaining, int &lastStallIterations, int &numberOfIterations, bool &factorSolNewBasis, int &nextRatrec, const Rational &errorCorrectionFactor, Rational &errorCorrection, Rational &maxViolation, SolRational &sol, bool &primalFeasible, bool &dualFeasible, bool &stoppedTime, bool &stoppedIter, bool &error, bool &breakAfter, bool &continueAfter)
performs rational reconstruction and/or factorizationd
std::string statisticString() const
statistical information in form of a string
void _ensureRationalLP()
ensures that the rational LP is available; performs no sync
DataArray< typename SPxSolverBase< R >::VarStatus > _oldBasisStatusRows
Definition: soplex.h:1908
VectorRational _modRhs
Definition: soplex.h:1858
VectorBase< R > _manualLhs
Definition: soplex.h:1829
void changeBoundsReal(const VectorBase< R > &lower, const VectorBase< R > &upper)
changes vectors of column bounds to lower and upper
void changeBoundsRational(int i, const mpq_t *lower, const mpq_t *upper)
changes bounds of column i to lower and upper (GMP only method)
void getNdualNorms(int &nnormsRow, int &nnormsCol) const
gets number of available dual norms
Rational _rationalNegone
Definition: soplex.h:1948
SPxSolverBase< BP > _boostedSolver
Definition: soplex.h:1757
void changeLhsRational(const VectorRational &lhs)
changes left-hand side vector for constraints to lhs
bool _isConsistent() const
checks consistency
void changeRowRational(int i, const LPRowRational &lprow)
replaces row i with lprow
void _addRowReal(const LPRowBase< R > &lprow)
adds a single row to the real LP and adjusts basis
void getUpperReal(VectorBase< R > &upper) const
gets upper bound vector
VectorBase< R > _manualLower
Definition: soplex.h:1827
SoPlexBase< R > & operator=(const SoPlexBase< R > &rhs)
assignment operator
const VectorRational & maxObjRational() const
returns objective function vector after transformation to a maximization problem; since this is how i...
bool hasPrimalRay() const
is a primal unbounded ray available?
bool getDual(VectorBase< R > &vector)
gets the dual solution vector if available; returns true on success
SPxSimplifier< BP > * _boostedSimplifier
Definition: soplex.h:1808
void resetSettings(const bool quiet=false, const bool init=true)
resets default parameter settings
bool hasPrimal() const
deprecated: use hasSol() instead
Definition: soplex.h:621
void changeObjReal(const VectorBase< R > &obj)
changes objective function vector to obj
bool writeFile(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const DIdxSet *intvars=nullptr, const bool unscale=true, const bool writeZeroObjective=false) const
Templated write function Real writes real LP to file; LP or MPS format is chosen from the extension i...
Rational maxAbsNonzeroRational() const
returns biggest non-zero element in absolute value
@ POLISHING_FRACTIONALITY
minimize number of basic slack variables, i.e. more variables between bounds
Definition: soplex.h:1385
@ POLISHING_OFF
no solution polishing
Definition: soplex.h:1379
@ POLISHING_INTEGRALITY
maximize number of basic slack variables, i.e. more variables on bounds
Definition: soplex.h:1382
void _correctPrimalSolution(SolRational &sol, Rational &primalScale, int &primalSize, const int &maxDimRational, VectorBase< T > &primalReal)
corrects primal solution and aligns with basis
Array< UnitVectorRational * > _unitMatrixRational
Definition: soplex.h:1863
void _switchToStandardMode()
indicate if we are testing feasibility, unboundedness or neither
void _preprocessAndSolveReal(bool applyPreprocessing, volatile bool *interrupt=nullptr)
solves real LP with/without preprocessing
@ RATIOTESTER_TEXTBOOK
textbook ratio test without stabilization
Definition: soplex.h:1288
@ RATIOTESTER_FAST
modified Harris ratio test
Definition: soplex.h:1294
@ RATIOTESTER_HARRIS
standard Harris ratio test
Definition: soplex.h:1291
@ RATIOTESTER_BOUNDFLIPPING
bound flipping ratio test for long steps in the dual simplex
Definition: soplex.h:1297
VectorBase< R > _manualUpper
Definition: soplex.h:1828
R maxObjReal(int i) const
returns objective value of column i after transformation to a maximization problem; since this is how...
void _unscaleSolutionReal(SPxLPBase< R > &LP, bool persistent=true)
unscales stored solution to remove internal or external scaling of LP
bool _reapplyPersistentScaling() const
check whether persistent scaling is supposed to be reapplied again after unscaling
void removeRowsReal(int perm[])
removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the n...
bool _inStandardMode()
check if we are testing feasibility, unboundedness or neither
int numNonzeros() const
returns number of nonzeros
void _changeRhsReal(const VectorBase< R > &rhs)
changes right-hand side vector to rhs and adjusts basis
bool _readFileRational(const char *filename, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr)
reads rational LP in LP or MPS format from file and returns true on success; gets row names,...
SoPlexBase(const SoPlexBase< R > &rhs)
copy constructor
const VectorBase< R > & rhsRealInternal() const
returns right-hand side vector, ignoring scaling
void changeLowerRational(int i, const mpq_t *lower)
changes lower bound of column i to lower (GMP only method)
void _removeRowsReal(int perm[])
removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the n...
void _addRowReal(R lhs, const SVectorBase< R > &lprow, R rhs)
adds a single row to the real LP and adjusts basis
bool getBasisInverseRowRational(const int r, SSVectorRational &vec)
computes row r of basis inverse; performs rational factorization if not available; returns true on su...
SPxLeastSqSC< R > _scalerLeastsq
Definition: soplex.h:1720
bool getPrimalRayRational(mpq_t *vector, const int size)
gets the primal ray if LP is unbounded; returns true on success (GMP only method)
bool getPrimalRayRational(VectorRational &vector)
void _storeBasisAsOldBasisBoosted(DataArray< typename SPxSolverBase< BP >::VarStatus > &rows, DataArray< typename SPxSolverBase< BP >::VarStatus > &cols)
SPxGeometSC< BP > _boostedScalerGeo1
Definition: soplex.h:1812
void printVersion() const
prints version and compilation options
Statistics * _statistics
statistics since last call to solveReal() or solveRational()
Definition: soplex.h:1684
SPxSolverBase< R > _solver
Definition: soplex.h:1711
bool _boostPrecision()
increase the multiprecision, return false if maximum precision is reached, true otherwise
SPxDevexPR< BP > _boostedPricerDevex
Definition: soplex.h:1798
void syncLPRational()
synchronizes rational LP with real LP, i.e., copies real LP to rational LP, if sync mode is manual
bool writeFileReal(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const DIdxSet *intvars=nullptr, const bool unscale=true, const bool writeZeroObjective=false) const
bool writeFileRational(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const DIdxSet *intvars=nullptr, const bool writeZeroObjective=false) const
void clearLPReal()
clears the LP
@ HYPER_PRICING_OFF
never
Definition: soplex.h:1366
@ HYPER_PRICING_ON
always
Definition: soplex.h:1372
@ HYPER_PRICING_AUTO
decide according to problem size
Definition: soplex.h:1369
bool _hasOldUnbdBasis
Definition: soplex.h:1905
void getColVectorReal(int i, DSVectorBase< R > &col) const
gets vector of col i
bool hasDualFarkas() const
is Farkas proof of infeasibility available?
SPxLPRational * _rationalLP
Definition: soplex.h:1840
void _changeRangeReal(int i, const R &lhs, const R &rhs)
changes left- and right-hand side of row i and adjusts basis
VectorRational _feasUpper
Definition: soplex.h:1854
void getColsRational(int start, int end, LPColSetRational &lpcolset) const
gets columns start, ..., end
@ READMODE_REAL
standard floating-point parsing
Definition: soplex.h:1317
@ READMODE_RATIONAL
rational parsing
Definition: soplex.h:1320
@ FACTOR_UPDATE_TYPE_ETA
product form update
Definition: soplex.h:1177
@ FACTOR_UPDATE_TYPE_FT
Forrest-Tomlin type update.
Definition: soplex.h:1180
bool setSettings(const Settings &newSettings, const bool init=true)
sets parameter settings; returns true on success
bool getRedCostRational(mpq_t *vector, const int size)
gets the vector of reduced cost values if available; returns true on success (GMP only method)
@ PRICER_DEVEX
devex pricer
Definition: soplex.h:1275
@ PRICER_STEEP
steepest edge pricer with exact initialization of norms
Definition: soplex.h:1281
@ PRICER_QUICKSTEEP
steepest edge pricer with initialization to unit norms
Definition: soplex.h:1278
@ PRICER_PARMULT
partial multiple pricer based on Dantzig pricing
Definition: soplex.h:1272
@ PRICER_AUTO
automatic pricer
Definition: soplex.h:1266
@ PRICER_DANTZIG
Dantzig pricer.
Definition: soplex.h:1269
void _addColsReal(const LPColSetReal &lpcolset)
adds multiple columns to the real LP and adjusts basis
Real _epsUpdatePrecisionRatio
Definition: soplex.h:1788
Real _epsFactorPrecisionRatio
Definition: soplex.h:1787
void _changeRhsReal(int i, const R &rhs)
changes right-hand side of row i to rhs and adjusts basis
SPxSimplifier< R > * _simplifier
Definition: soplex.h:1736
void getRowVectorReal(int i, DSVectorBase< R > &row) const
gets vector of row i
void _storeBasisAsOldBasis(DataArray< typename SPxSolverBase< R >::VarStatus > &rows, DataArray< typename SPxSolverBase< R >::VarStatus > &cols)
void changeLhsReal(int i, const R &lhs)
changes left-hand side of row i to lhs
DataArray< typename SPxSolverBase< R >::VarStatus > _oldUnbdBasisStatusCols
Definition: soplex.h:1917
void removeRowsRational(int perm[])
removes all rows with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates the n...
const Settings & settings() const
returns current parameter settings
@ SOLVEMODE_RATIONAL
force iterative refinement
Definition: soplex.h:1333
@ SOLVEMODE_REAL
apply standard floating-point algorithm
Definition: soplex.h:1327
@ SOLVEMODE_AUTO
decide depending on tolerances whether to apply iterative refinement
Definition: soplex.h:1330
LPRowBase< R >::Type rowTypeReal(int i) const
returns inequality type of row i
SPxFastRT< R > _ratiotesterFast
Definition: soplex.h:1732
SPxDefaultRT< BP > _boostedRatiotesterTextbook
Definition: soplex.h:1802
SPxFastRT< BP > _boostedRatiotesterFast
Definition: soplex.h:1804
void _resetBoostedPrecision()
reset the boosted precision to the default value
Rational _rationalFeastol
Definition: soplex.h:1701
const VectorRational & lhsRational() const
returns left-hand side vector
void changeObjRational(const VectorRational &obj)
changes objective function vector to obj
void getLhsReal(VectorBase< R > &lhs) const
gets left-hand side vector
SPxSolverBase< R >::Status status() const
returns the current solver status
int _lastStallPrecBoosts
Definition: soplex.h:1773
bool getDualFarkasRational(VectorRational &vector)
R maxAbsNonzeroReal() const
returns biggest non-zero element in absolute value
SPxBasisBase< R >::SPxStatus basisStatus() const
returns the current basis status
bool isPrimalFeasible() const
is stored primal solution feasible?
void getLowerReal(VectorBase< R > &lower) const
gets lower bound vector
void _performFeasIRStable(SolRational &sol, bool &withDualFarkas, bool &stoppedTime, bool &stoppedIter, bool &error)
performs iterative refinement on the auxiliary problem for testing feasibility
SPxStarter< R > * _starter
Definition: soplex.h:1738
void _restoreBasis()
restore basis
SPxSteepPR< BP > _boostedPricerQuickSteep
Definition: soplex.h:1799
RangeType _rangeTypeReal(const R &lower, const R &upper) const
determines RangeType from real bounds
bool getPrimalReal(R *p_vector, int size)
bool writeDualFileReal(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const DIdxSet *intvars=nullptr, const bool writeZeroObjective=false) const
writes the dual of the real LP to file; LP or MPS format is chosen from the extension in filename; if...
bool getDualRational(VectorRational &vector)
bool hasBasis() const
is an advanced starting basis available?
SPxScaler< R > * _scaler
Definition: soplex.h:1737
void _untransformUnbounded(SolRational &sol, bool unbounded)
undoes transformation to unboundedness problem
bool _boostingLimitReached
Definition: soplex.h:1762
void _verifySolutionReal()
verify computed solution and resolve if necessary
void removeColsReal(int perm[])
removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates th...
DataArray< typename SPxSolverBase< R >::VarStatus > _oldFeasBasisStatusCols
Definition: soplex.h:1913
Real precisionBoostTime() const
time spen in higher precision since last call to solve
virtual ~SoPlexBase()
destructor
SPxSolverBase< R >::Status _solveRealStable(bool acceptUnbounded, bool acceptInfeasible, VectorBase< R > &primal, VectorBase< R > &dual, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusRows, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusCols, const bool forceNoSimplifier=false)
solves real LP with recovery mechanism
void changeLowerReal(int i, const R &lower)
changes lower bound of column i to lower
void _evaluateSolutionReal(typename SPxSimplifier< R >::Result simplificationStatus)
checks result of the solving process and solves again without preprocessing if necessary
void removeColRangeRational(int start, int end, int perm[]=nullptr)
removes columns start to end including both; an array perm of size numColsRational() may be passed as...
R upperReal(int i) const
returns upper bound of column i
bool setRealParam(const RealParam param, const Real value, const bool init=true)
sets real parameter value; returns true on success
const VectorRational & lowerRational() const
returns lower bound vector
void _removeColRangeReal(int start, int end, int perm[])
removes columns start to end including both; an array perm of size numColsReal() may be passed as buf...
void _changeElementReal(int i, int j, const R &val)
changes matrix entry in row i and column j to val and adjusts basis
void addRowReal(const LPRowBase< R > &lprow)
adds a single row
void _removeColsReal(int perm[])
removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates th...
bool writeBasisFile(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const bool cpxFormat=false) const
writes basis information to filename; if rowNames and colNames are nullptr, default names are used; r...
SPxSolverBase< R >::VarStatus basisColStatus(int col) const
returns basis status for a single column
Rational minAbsNonzeroRational() const
returns smallest non-zero element in absolute value
bool setIntParam(const IntParam param, const int value, const bool init=true)
sets integer parameter value; returns true on success
bool getDualReal(R *p_vector, int dim)
void getRowsRational(int start, int end, LPRowSetRational &lprowset) const
gets rows start, ..., end.
SPxMainSM< R > _simplifierMainSM
Definition: soplex.h:1713
bool _hasSolRational
Definition: soplex.h:1937
bool getDualViolationRational(Rational &maxviol, Rational &sumviol)
@ VERBOSITY_HIGH
high verbosity level
Definition: soplex.h:1199
@ VERBOSITY_WARNING
only error and warning output
Definition: soplex.h:1190
@ VERBOSITY_DEBUG
only error, warning, and debug output
Definition: soplex.h:1193
@ VERBOSITY_NORMAL
standard verbosity level
Definition: soplex.h:1196
@ VERBOSITY_ERROR
only error output
Definition: soplex.h:1187
@ VERBOSITY_FULL
full verbosity level
Definition: soplex.h:1202
void _addRowsReal(const LPRowSetBase< R > &lprowset)
adds multiple rows to the real LP and adjusts basis
int numPrecisionBoosts() const
number of precision boosts since last call to solve
DataArray< typename SPxSolverBase< R >::VarStatus > _oldUnbdBasisStatusRows
Definition: soplex.h:1916
void addColsReal(const LPColSetBase< R > &lpcolset)
adds multiple columns
void changeRhsReal(const VectorBase< R > &rhs)
changes right-hand side vector to rhs
const VectorRational & rhsRational() const
returns right-hand side vector
void changeRangeReal(const VectorBase< R > &lhs, const VectorBase< R > &rhs)
changes left- and right-hand side vectors
void addRowRational(const mpq_t *lhs, const mpq_t *rowValues, const int *rowIndices, const int rowSize, const mpq_t *rhs)
adds a single row (GMP only method)
bool computeBasisInverseRational()
compute rational basis inverse; returns true on success
@ REPRESENTATION_AUTO
automatic choice according to number of rows and columns
Definition: soplex.h:1154
@ REPRESENTATION_COLUMN
column representation Ax - s = 0, lower <= x <= upper, lhs <= s <= rhs
Definition: soplex.h:1157
@ REPRESENTATION_ROW
row representation (lower,lhs) <= (x,Ax) <= (upper,rhs)
Definition: soplex.h:1160
bool loadSettingsFile(const char *filename)
reads settings file; returns true on success
void _storeSolutionRealFromPresol()
stores solution from the simplifier because problem vanished in presolving step
const char * getScalerName()
name of scaling method
SPxGeometSC< R > _scalerGeoequi
Definition: soplex.h:1719
void addColRational(const mpq_t *obj, const mpq_t *lower, const mpq_t *colValues, const int *colIndices, const int colSize, const mpq_t *upper)
adds a single column (GMP only method)
bool multBasis(R *vec, bool unscale=true)
multiply with basis matrix; B * vec (inplace)
VectorRational _modLhs
Definition: soplex.h:1857
bool _reconstructSolutionRational(SolRational &sol, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusRows, DataArray< typename SPxSolverBase< R >::VarStatus > &basisStatusCols, const Rational &denomBoundSquared)
attempts rational reconstruction of primal-dual solution
void _changeLowerReal(int i, const R &lower)
changes lower bound of column i to lower and adjusts basis
void changeRangeRational(const VectorRational &lhs, const VectorRational &rhs)
changes left- and right-hand side vectors
void removeColsReal(int idx[], int n, int perm[]=nullptr)
remove all columns with indices in array idx of size n; an array perm of size numColsReal() may be pa...
void _addColReal(R obj, R lower, const SVectorBase< R > &lpcol, R upper)
adds a single column to the real LP and adjusts basis
void changeLhsRational(int i, const Rational &lhs)
changes left-hand side of row i to lhs
void _performOptIRWrapper(SolRational &sol, bool acceptUnbounded, bool acceptInfeasible, int minIRRoundsRemaining, bool &primalFeasible, bool &dualFeasible, bool &infeasible, bool &unbounded, bool &stoppedTime, bool &stoppedIter, bool &error)
perform iterative refinement using the right precision
Rational _rationalMaxscaleincr
Definition: soplex.h:1703
DataArray< typename SPxSolverBase< R >::VarStatus > _oldBasisStatusCols
Definition: soplex.h:1909
void setIntegralityInformation(int ncols, int *intInfo)
pass integrality information about the variables to the solver
void _computeReducedCostViolation(SolRational &sol, Rational &redCostViolation, const bool &maximizing)
computes violation of reduced costs during the refinement loop
R lhsReal(int i) const
returns left-hand side of row i
void addColsRational(const mpq_t *obj, const mpq_t *lower, const mpq_t *colValues, const int *colIndices, const int *colStarts, const int *colLengths, const int numCols, const int numValues, const mpq_t *upper)
adds a set of columns (GMP only method)
bool getPrimalRational(mpq_t *vector, const int size)
gets the primal solution vector if available; returns true on success (GMP only method)
void _computeBoundsViolation(SolRational &sol, Rational &boundsViolation)
computes violation of bounds during the refinement loop
void _disableSimplifierAndScaler()
disables simplifier and scaler
R minAbsNonzeroReal() const
returns smallest non-zero element in absolute value
void getObjRational(VectorRational &obj) const
gets objective function vector
SPxGeometSC< BP > _boostedScalerGeoequi
Definition: soplex.h:1814
bool getPrimalRay(VectorBase< R > &vector)
gets the primal ray if available; returns true on success
void removeRowRangeReal(int start, int end, int perm[]=nullptr)
removes rows start to end including both; an array perm of size numRows() may be passed as buffer mem...
SPxHarrisRT< R > _ratiotesterHarris
Definition: soplex.h:1731
const Rational & rhsRational(int i) const
returns right-hand side of row i
const UnitVectorRational * _unitVectorRational(const int i)
returns pointer to a constant unit vector available until destruction of the SoPlexBase class
void _changeRowReal(int i, const LPRowBase< R > &lprow)
replaces row i with lprow and adjusts basis
bool getRedCostRational(VectorRational &vector)
void _setupBoostedSolver()
setup boosted solver before launching iteration
R rhsReal(int i) const
returns right-hand side of row i
bool _isRefinementOver(bool &primalFeasible, bool &dualFeasible, Rational &boundsViolation, Rational &sideViolation, Rational &redCostViolation, Rational &dualViolation, int minIRRoundsRemaining, bool &stoppedTime, bool &stoppedIter, int numFailedRefinements)
checks termination criteria for refinement loop
const VectorBase< R > & upperRealInternal() const
returns upper bound vector
bool getRedCostViolationRational(Rational &maxviol, Rational &sumviol)
bool hasSol() const
is a solution available (not neccessarily feasible)?
SPxEquiliSC< BP > _boostedScalerUniequi
Definition: soplex.h:1810
LPColSetRational _slackCols
Definition: soplex.h:1844
void changeRhsReal(int i, const R &rhs)
changes right-hand side of row i to rhs
void _idxToPerm(int *idx, int idxSize, int *perm, int permSize) const
creates a permutation for removing rows/columns from an array of indices
void changeRangeRational(int i, const Rational &lhs, const Rational &rhs)
changes left- and right-hand side of row i
void _lift()
reduces matrix coefficient in absolute value by the lifting procedure of Thiele et al....
void removeColsRational(int perm[])
removes all columns with an index i such that perm[i] < 0; upon completion, perm[i] >= 0 indicates th...
const VectorRational & upperRational() const
returns upper bound vector
BoolParam
boolean parameters
Definition: soplex.h:965
@ TESTDUALINF
should dual infeasibility be tested in order to try to return a dual solution even if primal infeasib...
Definition: soplex.h:973
@ FORCEBASIC
try to enforce that the optimal solution is a basic solution
Definition: soplex.h:1003
@ ENSURERAY
re-optimize the original problem to get a proof (ray) of infeasibility/unboundedness?
Definition: soplex.h:1000
@ SIMPLIFIER_FIXCONTINUOUS
Definition: soplex.h:1024
@ PRECISION_BOOSTING
enable precision boosting ?
Definition: soplex.h:1036
@ SIMPLIFIER_PARALLELCOLDETECTION
Definition: soplex.h:1015
@ ACCEPTCYCLING
should cycling solutions be accepted during iterative refinement?
Definition: soplex.h:979
@ SIMPLIFIER_SINGLETONCOLS
Definition: soplex.h:1006
@ RATREC
apply rational reconstruction after each iterative refinement?
Definition: soplex.h:982
@ RATFAC
should a rational factorization be performed after iterative refinement?
Definition: soplex.h:976
@ ADAPT_TOLS_TO_MULTIPRECISION
adapt tolerances to the multiprecision used
Definition: soplex.h:1033
@ LIFTING
should lifting be used to reduce range of nonzero matrix coefficients?
Definition: soplex.h:967
@ SIMPLIFIER_CONSTRAINTPROPAGATION
Definition: soplex.h:1009
@ EQTRANS
should LP be transformed to equality form before a rational solve?
Definition: soplex.h:970
@ FULLPERTURBATION
perturb the entire problem or only the relevant bounds of s single pivot?
Definition: soplex.h:997
@ BOOSTED_WARM_START
boosted solver start from last basis
Definition: soplex.h:1039
@ SIMPLIFIER_SINGLETONSTUFFING
Definition: soplex.h:1018
@ POWERSCALING
round scaling factors for iterative refinement to powers of two?
Definition: soplex.h:985
@ BOOLPARAM_COUNT
number of boolean parameters
Definition: soplex.h:1045
@ SIMPLIFIER_PARALLELROWDETECTION
Definition: soplex.h:1012
@ PERSISTENTSCALING
use persistent scaling?
Definition: soplex.h:994
@ SIMPLIFIER_DOMINATEDCOLS
Definition: soplex.h:1027
@ ROWBOUNDFLIPS
use bound flipping also for row representation?
Definition: soplex.h:991
@ RATFACJUMP
continue iterative refinement with exact basic solution if not optimal?
Definition: soplex.h:988
@ RECOVERY_MECHANISM
try different settings when solve fails
Definition: soplex.h:1042
RangeType
type of bounds and sides
Definition: soplex.h:1870
@ RANGETYPE_UPPER
upper bound is finite, lower bound is infinite
Definition: soplex.h:1878
@ RANGETYPE_FIXED
lower bound equals upper bound
Definition: soplex.h:1884
@ RANGETYPE_BOXED
lower and upper bound finite, but different
Definition: soplex.h:1881
@ RANGETYPE_LOWER
lower bound is finite, upper bound is infinite
Definition: soplex.h:1875
@ RANGETYPE_FREE
both bounds are infinite
Definition: soplex.h:1872
void changeLowerRational(int i, const Rational &lower)
changes lower bound of column i to lower
void addRowRational(const LPRowRational &lprow)
adds a single row
void removeColsRational(int idx[], int n, int perm[]=nullptr)
remove all columns with indices in array idx of size n; an array perm of size numColsRational() may b...
Rational _rationalPosInfty
Definition: soplex.h:1699
void _checkBasisScaling()
check correctness of (un)scaled basis matrix operations
RangeType _rangeTypeRational(const Rational &lower, const Rational &upper) const
determines RangeType from rational bounds
SPxEquiliSC< R > _scalerUniequi
Definition: soplex.h:1715
void getRhsReal(VectorBase< R > &rhs) const
gets right-hand side vector
DataArray< typename SPxSolverBase< BP >::VarStatus > _tmpBasisStatusCols
Definition: soplex.h:1929
bool getRowViolationRational(Rational &maxviol, Rational &sumviol)
Class for storing a primal-dual solution with basis information.
Definition: solbase.h:53
TYPE
types of timers
Definition: timer.h:109
Dense vector.
Definition: vectorbase.h:86
Everything should be within this namespace.
SoPlexBase< Real > SoPlex
Definition: soplex.h:2590
double Real
Definition: spxdefines.h:269
number< gmp_rational, et_off > Rational
Definition: rational.h:29
Implementation of Sparse Linear Solver.
Implementation of Sparse Linear Solver with Rational precision.
Types of solution classes.
Class for storing a primal-dual solution with basis information.
Auto pricer.
Bound flipping ratio test (long step dual) for SoPlex.
Dantzig pricer.
Textbook ratio test for SoPlex.
Debugging, floating point type and parameter definitions.
Devex pricer.
LP equilibrium scaling.
Fast shifting ratio test.
LP geometric mean scaling.
returns the current git hash of SoPlex
Harris pricing with shifting.
Hybrid pricer.
LP least squares scaling.
Saving LPs in a form suitable for SoPlex.
General methods in LP preprocessing.
Partial multiple pricing.
Abstract pricer base class.
Abstract ratio test base class.
LP scaling base class.
LP simplification base class.
main LP solver class
SoPlex start basis generation base class.
Steepest edge pricer with exact initialization of weights.
Steepest edge pricer.
Simple heuristic SPxStarter.
Solution vector based start basis.
Weighted start basis.
std::string name[SoPlexBase< R >::BOOLPARAM_COUNT]
array of names for boolean parameters
Definition: soplex.h:1494
std::string description[SoPlexBase< R >::BOOLPARAM_COUNT]
array of descriptions for boolean parameters
Definition: soplex.h:1496
bool defaultValue[SoPlexBase< R >::BOOLPARAM_COUNT]
array of default values for boolean parameters
Definition: soplex.h:1498
std::string name[SoPlexBase< R >::INTPARAM_COUNT]
array of names for integer parameters
Definition: soplex.h:1506
int lower[SoPlexBase< R >::INTPARAM_COUNT]
array of lower bounds for int parameter values
Definition: soplex.h:1512
int upper[SoPlexBase< R >::INTPARAM_COUNT]
array of upper bounds for int parameter values
Definition: soplex.h:1514
int defaultValue[SoPlexBase< R >::INTPARAM_COUNT]
array of default values for integer parameters
Definition: soplex.h:1510
std::string description[SoPlexBase< R >::INTPARAM_COUNT]
array of descriptions for integer parameters
Definition: soplex.h:1508
Real upper[SoPlexBase< R >::REALPARAM_COUNT]
array of upper bounds for real parameter values
Definition: soplex.h:1530
Real defaultValue[SoPlexBase< R >::REALPARAM_COUNT]
array of default values for real parameters
Definition: soplex.h:1526
Real lower[SoPlexBase< R >::REALPARAM_COUNT]
array of lower bounds for real parameter values
Definition: soplex.h:1528
std::string description[SoPlexBase< R >::REALPARAM_COUNT]
array of descriptions for real parameters
Definition: soplex.h:1524
std::string name[SoPlexBase< R >::REALPARAM_COUNT]
array of names for real parameters
Definition: soplex.h:1522