Scippy

SoPlex

Sequential object-oriented simPlex

changesoplex.cpp
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-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 #include <assert.h>
17 #include <iostream>
18 
19 #include "soplex/spxdefines.h"
20 #include "soplex/spxsolver.h"
21 #include "soplex/spxpricer.h"
22 #include "soplex/spxratiotester.h"
23 #include "soplex/exceptions.h"
24 
25 namespace soplex
26 {
27 
29 {
30 
31  if(n > 0)
32  {
34 
35  unInit();
36  reDim();
37 
40  }
41 
42  /* we must not assert consistency here, since addedCols() might be still necessary to obtain a consistent basis */
43 }
44 
46 {
47 
48  if(n > 0)
49  {
51 
52  unInit();
53  reDim();
54 
57  }
58 
59  /* we must not assert consistency here, since addedRows() might be still necessary to obtain a consistent basis */
60 }
61 
63 {
64 
66 
67  unInit();
68 
70  {
71  removedRow(i);
72 
73  switch(SPxBasis::status())
74  {
75  case SPxBasis::DUAL:
78  break;
79 
80  case SPxBasis::OPTIMAL:
82  break;
83 
84  default:
85  break;
86  }
87  }
88 }
89 
90 void SPxSolver::doRemoveRows(int perm[])
91 {
92 
93  SPxLP::doRemoveRows(perm);
94 
95  unInit();
96 
98  {
99  removedRows(perm);
100 
101  switch(SPxBasis::status())
102  {
103  case SPxBasis::DUAL:
106  break;
107 
108  case SPxBasis::OPTIMAL:
110  break;
111 
112  default:
113  break;
114  }
115  }
116 }
117 
119 {
121 
123 
124  unInit();
125 
127  {
128  removedCol(i);
129 
130  switch(SPxBasis::status())
131  {
132  case SPxBasis::PRIMAL:
133  case SPxBasis::UNBOUNDED:
135  break;
136 
137  case SPxBasis::OPTIMAL:
139  break;
140 
141  default:
142  break;
143  }
144  }
145 }
146 
147 void SPxSolver::doRemoveCols(int perm[])
148 {
150 
151  SPxLP::doRemoveCols(perm);
152 
153  unInit();
154 
156  {
157  removedCols(perm);
158 
159  switch(SPxBasis::status())
160  {
161  case SPxBasis::PRIMAL:
162  case SPxBasis::UNBOUNDED:
164  break;
165 
166  case SPxBasis::OPTIMAL:
168  break;
169 
170  default:
171  break;
172  }
173  }
174 }
175 
176 void SPxSolver::changeObj(const Vector& newObj, bool scale)
177 {
179 
180  SPxLP::changeObj(newObj, scale);
181 
182  /**@todo Factorization remains valid, we do not need a reDim()
183  * pricing vectors should be recomputed.
184  */
185  unInit();
186 }
187 
188 void SPxSolver::changeObj(int i, const Real& newVal, bool scale)
189 {
191 
192  SPxLP::changeObj(i, newVal, scale);
193 
194 
195  /**@todo Factorization remains valid, we do not need a reDim()
196  * pricing vectors should be recomputed.
197  */
198  unInit();
199 }
200 
201 void SPxSolver::changeMaxObj(const Vector& newObj, bool scale)
202 {
204 
205  SPxLP::changeMaxObj(newObj, scale);
206 
207  /**@todo Factorization remains valid, we do not need a reDim()
208  * pricing vectors should be recomputed.
209  */
210  unInit();
211 }
212 
213 void SPxSolver::changeMaxObj(int i, const Real& newVal, bool scale)
214 {
216 
217  SPxLP::changeMaxObj(i, newVal, scale);
218 
219  /**@todo Factorization remains valid, we do not need a reDim()
220  * pricing vectors should be recomputed.
221  */
222  unInit();
223 }
224 
225 void SPxSolver::changeRowObj(const Vector& newObj, bool scale)
226 {
228 
229  SPxLP::changeRowObj(newObj, scale);
230 
231  /**@todo Factorization remains valid, we do not need a reDim()
232  * pricing vectors should be recomputed.
233  */
234  unInit();
235 }
236 
237 void SPxSolver::changeRowObj(int i, const Real& newVal, bool scale)
238 {
240 
241  SPxLP::changeRowObj(i, newVal, scale);
242 
243  /**@todo Factorization remains valid, we do not need a reDim()
244  * pricing vectors should be recomputed.
245  */
246  unInit();
247 }
248 
249 void SPxSolver::changeLowerStatus(int i, Real newLower, Real oldLower)
250 {
252  Real currUpper = upper(i);
253  Real objChange = 0.0;
254 
255  MSG_DEBUG(std::cout << "DCHANG01 changeLowerStatus(): col " << i
256  << "[" << newLower << ":" << currUpper << "] " << stat;)
257 
258  switch(stat)
259  {
261  if(newLower <= -infinity)
262  {
263  if(currUpper >= infinity)
264  {
265  stat = SPxBasis::Desc::P_FREE;
266 
268  objChange = -theLCbound[i] * oldLower;
269  }
270  else
271  {
273 
275  objChange = (theUCbound[i] * currUpper) - (theLCbound[i] * oldLower);
276  }
277  }
278  else if(EQ(newLower, currUpper))
279  {
281 
283  objChange = maxObj(i) * (newLower - oldLower);
284  }
285  else if(m_nonbasicValueUpToDate && rep() == COLUMN)
286  objChange = theLCbound[i] * (newLower - oldLower);
287 
288  break;
289 
291  if(EQ(newLower, currUpper))
293 
294  break;
295 
297  if(newLower > -infinity)
298  {
300 
302  objChange = theLCbound[i] * newLower;
303  }
304 
305  break;
306 
308  if(NE(newLower, currUpper))
309  {
311 
312  if(isInitialized())
313  theUCbound[i] = maxObj(i);
314  }
315 
316  break;
317 
323  if(rep() == ROW && theShift > 0.0)
325 
326  stat = dualColStatus(i);
327  break;
328 
329  default:
330  throw SPxInternalCodeException("XCHANG01 This should never happen.");
331  }
332 
333  MSG_DEBUG(std::cout << " -> " << stat << std::endl;)
334 
335  // we only need to update the nonbasic value in column representation (see nonbasicValue() for comparison/explanation)
336  if(rep() == COLUMN)
337  updateNonbasicValue(objChange);
338 }
339 
340 void SPxSolver::changeLower(const Vector& newLower, bool scale)
341 {
342  // we better recompute the nonbasic value when changing all lower bounds
344 
345  SPxLP::changeLower(newLower, scale);
346 
348  {
349  for(int i = 0; i < newLower.dim(); ++i)
350  changeLowerStatus(i, lower(i));
351 
352  unInit();
353  }
354 }
355 
356 void SPxSolver::changeLower(int i, const Real& newLower, bool scale)
357 {
358  if(newLower != (scale ? lowerUnscaled(i) : lower(i)))
359  {
360  Real oldLower = lower(i);
361  // This has to be done before calling changeLowerStatus() because that is calling
362  // basis.dualColStatus() which calls lower() and needs the changed value.
363  SPxLP::changeLower(i, newLower, scale);
364 
366  {
367  changeLowerStatus(i, lower(i), oldLower);
368  unInit();
369  }
370  }
371 }
372 
373 void SPxSolver::changeUpperStatus(int i, Real newUpper, Real oldUpper)
374 {
376  Real currLower = lower(i);
377  Real objChange = 0.0;
378 
379  MSG_DEBUG(std::cout << "DCHANG02 changeUpperStatus(): col " << i
380  << "[" << currLower << ":" << newUpper << "] " << stat;)
381 
382  switch(stat)
383  {
385  if(newUpper == currLower)
387 
388  break;
389 
391  if(newUpper >= infinity)
392  {
393  if(currLower <= -infinity)
394  {
395  stat = SPxBasis::Desc::P_FREE;
396 
398  objChange = -theUCbound[i] * oldUpper;
399  }
400  else
401  {
403 
405  objChange = (theLCbound[i] * currLower) - (theUCbound[i] * oldUpper);
406  }
407  }
408  else if(EQ(newUpper, currLower))
409  {
411 
413  objChange = maxObj(i) * (newUpper - oldUpper);
414  }
415  else if(m_nonbasicValueUpToDate && rep() == COLUMN)
416  objChange = theUCbound[i] * (newUpper - oldUpper);
417 
418  break;
419 
421  if(newUpper < infinity)
422  {
424 
426  objChange = theUCbound[i] * newUpper;
427  }
428 
429  break;
430 
432  if(NE(newUpper, currLower))
433  {
435 
436  if(isInitialized())
437  theLCbound[i] = maxObj(i);
438  }
439 
440  break;
441 
447  if(rep() == ROW && theShift > 0.0)
449 
450  stat = dualColStatus(i);
451  break;
452 
453  default:
454  throw SPxInternalCodeException("XCHANG02 This should never happen.");
455  }
456 
457  MSG_DEBUG(std::cout << " -> " << stat << std::endl;);
458 
459  // we only need to update the nonbasic value in column representation (see nonbasicValue() for comparison/explanation)
460  if(rep() == COLUMN)
461  updateNonbasicValue(objChange);
462 }
463 
464 void SPxSolver::changeUpper(const Vector& newUpper, bool scale)
465 {
466  // we better recompute the nonbasic value when changing all upper bounds
468 
469  SPxLP::changeUpper(newUpper, scale);
470 
472  {
473  for(int i = 0; i < newUpper.dim(); ++i)
474  changeUpperStatus(i, upper(i));
475 
476  unInit();
477  }
478 }
479 
480 void SPxSolver::changeUpper(int i, const Real& newUpper, bool scale)
481 {
482  if(newUpper != (scale ? upperUnscaled(i) : upper(i)))
483  {
484  Real oldUpper = upper(i);
485  SPxLP::changeUpper(i, newUpper, scale);
486 
488  {
489  changeUpperStatus(i, upper(i), oldUpper);
490  unInit();
491  }
492  }
493 }
494 
495 void SPxSolver::changeBounds(const Vector& newLower, const Vector& newUpper, bool scale)
496 {
497  changeLower(newLower, scale);
498  changeUpper(newUpper, scale);
499 }
500 
501 void SPxSolver::changeBounds(int i, const Real& newLower, const Real& newUpper, bool scale)
502 {
503  changeLower(i, newLower, scale);
504  changeUpper(i, newUpper, scale);
505 }
506 
507 void SPxSolver::changeLhsStatus(int i, Real newLhs, Real oldLhs)
508 {
510  Real currRhs = rhs(i);
511  Real objChange = 0.0;
512 
513  MSG_DEBUG(std::cout << "DCHANG03 changeLhsStatus() : row " << i
514  << ": " << stat;)
515 
516  switch(stat)
517  {
519  if(newLhs <= -infinity)
520  {
521  if(currRhs >= infinity)
522  {
523  stat = SPxBasis::Desc::P_FREE;
524 
526  objChange = -theURbound[i] * oldLhs;
527  }
528  else
529  {
531 
533  objChange = (theLRbound[i] * currRhs) - (theURbound[i] * oldLhs);
534  }
535  }
536  else if(EQ(newLhs, currRhs))
537  {
539 
541  objChange = maxRowObj(i) * (newLhs - oldLhs);
542  }
543  else if(m_nonbasicValueUpToDate && rep() == COLUMN)
544  objChange = theURbound[i] * (newLhs - oldLhs);
545 
546  break;
547 
549  if(EQ(newLhs, currRhs))
551 
552  break;
553 
555  if(newLhs > -infinity)
556  {
558 
560  objChange = theURbound[i] * newLhs;
561  }
562 
563  break;
564 
566  if(NE(newLhs, currRhs))
567  {
569 
570  if(isInitialized())
571  theLRbound[i] = maxRowObj(i);
572  }
573 
574  break;
575 
581  if(rep() == ROW && theShift > 0.0)
583 
584  stat = dualRowStatus(i);
585  break;
586 
587  default:
588  throw SPxInternalCodeException("XCHANG03 This should never happen.");
589  }
590 
591  MSG_DEBUG(std::cout << " -> " << stat << std::endl;)
592 
593  // we only need to update the nonbasic value in column representation (see nonbasicValue() for comparison/explanation)
594  if(rep() == COLUMN)
595  updateNonbasicValue(objChange);
596 }
597 
598 void SPxSolver::changeLhs(const Vector& newLhs, bool scale)
599 {
600  // we better recompute the nonbasic value when changing all lhs
602 
603  SPxLP::changeLhs(newLhs, scale);
604 
606  {
607  for(int i = 0; i < nRows(); ++i)
608  changeLhsStatus(i, lhs(i));
609 
610  unInit();
611  }
612 }
613 
614 void SPxSolver::changeLhs(int i, const Real& newLhs, bool scale)
615 {
616  if(newLhs != (scale ? lhsUnscaled(i) : lhs(i)))
617  {
618  Real oldLhs = lhs(i);
619  SPxLP::changeLhs(i, newLhs, scale);
620 
622  {
623  changeLhsStatus(i, lhs(i), oldLhs);
624  unInit();
625  }
626  }
627 }
628 
629 void SPxSolver::changeRhsStatus(int i, Real newRhs, Real oldRhs)
630 {
632  Real currLhs = lhs(i);
633  Real objChange = 0.0;
634 
635  MSG_DEBUG(std::cout << "DCHANG04 changeRhsStatus() : row " << i
636  << ": " << stat;)
637 
638  switch(stat)
639  {
641  if(newRhs >= infinity)
642  {
643  if(currLhs <= -infinity)
644  {
645  stat = SPxBasis::Desc::P_FREE;
646 
648  objChange = -theLRbound[i] * oldRhs;
649  }
650  else
651  {
653 
655  objChange = (theURbound[i] * currLhs) - (theLRbound[i] * oldRhs);
656  }
657  }
658  else if(EQ(newRhs, currLhs))
659  {
661 
663  objChange = maxRowObj(i) * (newRhs - oldRhs);
664  }
665  else if(m_nonbasicValueUpToDate && rep() == COLUMN)
666  objChange = theLRbound[i] * (newRhs - oldRhs);
667 
668  break;
669 
671  if(EQ(newRhs, currLhs))
673 
674  break;
675 
677  if(newRhs < infinity)
678  {
680 
682  objChange = theLRbound[i] * newRhs;
683  }
684 
685  break;
686 
688  if(NE(newRhs, currLhs))
689  {
691 
692  if(isInitialized())
693  theURbound[i] = maxRowObj(i);
694  }
695 
696  break;
697 
703  if(rep() == ROW && theShift > 0.0)
705 
706  stat = dualRowStatus(i);
707  break;
708 
709  default:
710  throw SPxInternalCodeException("XCHANG04 This should never happen.");
711  }
712 
713  MSG_DEBUG(std::cout << " -> " << stat << std::endl;)
714 
715  // we only need to update the nonbasic value in column representation (see nonbasicValue() for comparison/explanation)
716  if(rep() == COLUMN)
717  updateNonbasicValue(objChange);
718 }
719 
720 
721 void SPxSolver::changeRhs(const Vector& newRhs, bool scale)
722 {
723  // we better recompute the nonbasic value when changing all rhs
725 
726  SPxLP::changeRhs(newRhs, scale);
727 
729  {
730  for(int i = 0; i < nRows(); ++i)
731  changeRhsStatus(i, rhs(i));
732 
733  unInit();
734  }
735 }
736 
737 void SPxSolver::changeRhs(int i, const Real& newRhs, bool scale)
738 {
739  if(newRhs != (scale ? rhsUnscaled(i) : rhs(i)))
740  {
741  Real oldRhs = rhs(i);
742  SPxLP::changeRhs(i, newRhs, scale);
743 
745  {
746  changeRhsStatus(i, rhs(i), oldRhs);
747  unInit();
748  }
749  }
750 }
751 
752 void SPxSolver::changeRange(const Vector& newLhs, const Vector& newRhs, bool scale)
753 {
754  // we better recompute the nonbasic value when changing all ranges
756 
757  SPxLP::changeLhs(newLhs, scale);
758  SPxLP::changeRhs(newRhs, scale);
759 
761  {
762  for(int i = nRows() - 1; i >= 0; --i)
763  {
764  changeLhsStatus(i, lhs(i));
765  changeRhsStatus(i, rhs(i));
766  }
767 
768  unInit();
769  }
770 }
771 
772 void SPxSolver::changeRange(int i, const Real& newLhs, const Real& newRhs, bool scale)
773 {
774  Real oldLhs = lhs(i);
775  Real oldRhs = rhs(i);
776 
777  SPxLP::changeLhs(i, newLhs, scale);
778  SPxLP::changeRhs(i, newRhs, scale);
779 
781  {
782  changeLhsStatus(i, lhs(i), oldLhs);
783  changeRhsStatus(i, rhs(i), oldRhs);
784  unInit();
785  }
786 }
787 
788 void SPxSolver::changeRow(int i, const LPRow& newRow, bool scale)
789 {
791 
792  SPxLP::changeRow(i, newRow, scale);
793 
796 
797  unInit();
798 }
799 
800 void SPxSolver::changeCol(int i, const LPCol& newCol, bool scale)
801 {
802  if(i < 0)
803  return;
804 
806 
807  SPxLP::changeCol(i, newCol, scale);
808 
811 
812  unInit();
813 }
814 
815 void SPxSolver::changeElement(int i, int j, const Real& val, bool scale)
816 {
817  if(i < 0 || j < 0)
818  return;
819 
821 
822  SPxLP::changeElement(i, j, val, scale);
823 
826 
827  unInit();
828 }
829 
831 {
832 
833  SPxLP::changeSense(sns);
834  unInit();
835 }
836 } // namespace soplex
const VectorBase< R > & rhs() const
Returns right hand side vector.
Definition: spxlpbase.h:221
virtual void addedRows(int n)
virtual void changeRow(int i, const LPRow &newRow, bool scale=false)
Exception class for things that should NEVER happen.This class is derived from the SoPlex exception b...
Definition: exceptions.h:109
void addedRows(int n)
inform SPxBasis, that n new rows had been added.
Basis is dual feasible.
Definition: spxbasis.h:95
Basis is not known to be dual nor primal feasible.
Definition: spxbasis.h:94
primal variable is fixed to both bounds
Definition: spxbasis.h:190
virtual void changeLower(const Vector &newLower, bool scale=false)
primal or dual variable is undefined
Definition: spxbasis.h:195
const VectorBase< R > & upper() const
Returns upper bound vector.
Definition: spxlpbase.h:461
Desc::Status dualColStatus(int i) const
dual Status for the i&#39;th column variable of the loaded LP.
Definition: spxbasis.cpp:69
THREADLOCAL const Real infinity
Definition: spxdefines.cpp:26
void removedCols(const int perm[])
inform SPxBasis that columns in perm with negative entry were removed.
Abstract pricer base class.
virtual void reDim()
reset dimensions of vectors according to loaded LP.
Definition: spxsolver.cpp:469
Basis is optimal, i.e. dual and primal feasible.
Definition: spxbasis.h:97
Exception classes for SoPlex.
Status & rowStatus(int i)
Definition: spxbasis.h:239
R rhsUnscaled(int i) const
Returns unscaled right hand side of row number i.
virtual void changeCol(int n, const LPColBase< Real > &newCol, bool scale=false)
Replaces i &#39;th column of LP with newCol. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1701
virtual void addedCols(int newcols)
Called after the last n columns have just been added.
Definition: spxlpbase.h:2174
Abstract ratio test base class.
virtual void changeUpper(const Vector &newUpper, bool scale=false)
bool NE(Real a, Real b, Real eps=Param::epsilon())
returns true iff |a-b| > eps
Definition: spxdefines.h:382
void changedCol(int)
inform SPxBasis that a column had been changed.
virtual void addedCols(int n)
virtual void changeCol(int i, const LPCol &newCol, bool scale=false)
void changedElement(int, int)
inform SPxBasis that a matrix entry had been changed.
rowwise representation.
Definition: spxsolver.h:107
Desc::Status dualRowStatus(int i) const
dual Status for the i&#39;th row variable of the loaded LP.
Definition: spxbasis.cpp:46
void changedRow(int)
inform SPxBasis that a row had been changed.
dual variable is left free, but unset
Definition: spxbasis.h:191
int nRows() const
Returns number of rows in LP.
Definition: spxlpbase.h:152
void removedCol(int i)
inform SPxBasis that column i had been removed.
virtual void changeRhs(const Vector &newRhs, bool scale=false)
primal variable is set to its upper bound
Definition: spxbasis.h:188
virtual void changeBounds(const Vector &newLower, const Vector &newUpper, bool scale=false)
virtual void changeLhsStatus(int i, Real newLhs, Real oldLhs=0.0)
SPxSense
Optimization sense.
Definition: spxlpbase.h:97
virtual void doRemoveRow(int i)
virtual void changeRowObj(const Vector &newObj, bool scale=false)
SPxStatus status() const
returns current SPxStatus.
Definition: spxbasis.h:425
double Real
Definition: spxdefines.h:218
virtual void doRemoveRows(int perm[])
Internal helper method.
Definition: spxlpbase.h:2083
void removedRows(const int perm[])
inform SPxBasis that rows in perm with negative entry were removed.
virtual void doRemoveCols(int perm[])
#define MSG_DEBUG(x)
Definition: spxdefines.h:132
virtual void changeMaxObj(const VectorBase< Real > &newObj, bool scale=false)
Changes objective vector to newObj. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1371
virtual void unInit()
uninitialize data structures.
Definition: spxsolver.h:1859
R upperUnscaled(int i) const
Returns unscaled upper bound of column i.
virtual void changeSense(SPxSense sns)
virtual void changeElement(int i, int j, const Real &val, bool scale=false)
dual variable is set to its upper bound
Definition: spxbasis.h:192
main LP solver class
virtual void changeLhs(const Vector &newLhs, bool scale=false)
primal variable is left free, but unset
Definition: spxbasis.h:189
virtual void changeLower(const VectorBase< Real > &newLower, bool scale=false)
Changes vector of lower bounds to newLower. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1409
virtual void changeRhs(const VectorBase< Real > &newRhs, bool scale=false)
Changes right hand side vector for constraints to newRhs. scale determines whether the new data shoul...
Definition: spxlpbase.h:1555
const VectorBase< R > & lhs() const
Returns left hand side vector.
Definition: spxlpbase.h:255
bool updateNonbasicValue(Real objChange)
Definition: spxsolver.cpp:962
DVector theURbound
Upper Row Feasibility bound.
Definition: spxsolver.h:346
virtual void changeLowerStatus(int i, Real newLower, Real oldLower=0.0)
const VectorBase< R > & maxRowObj() const
Definition: spxlpbase.h:300
R lhsUnscaled(int i) const
Returns unscaled left hand side of row number i.
Status & colStatus(int i)
Definition: spxbasis.h:254
(In)equality for LPs.Class LPRowBase provides constraints for linear programs in the form where a is...
Definition: lprowbase.h:45
virtual void changeRow(int n, const LPRowBase< Real > &newRow, bool scale=false)
Replaces i &#39;th row of LP with newRow. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1652
virtual void changeRhsStatus(int i, Real newRhs, Real oldRhs=0.0)
virtual void changeUpper(const VectorBase< Real > &newUpper, bool scale=false)
Changes vector of upper bounds to newUpper. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1447
virtual void changeMaxObj(const Vector &newObj, bool scale=false)
Debugging, floating point type and parameter definitions.
bool EQ(Real a, Real b, Real eps=Param::epsilon())
returns true iff |a-b| <= eps
Definition: spxdefines.h:376
virtual void changeObj(const VectorBase< Real > &newObj, bool scale=false)
Changes objective vector to newObj. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1335
DVector theLRbound
Lower Row Feasibility bound.
Definition: spxsolver.h:347
DVector theUCbound
Upper Column Feasibility bound.
Definition: spxsolver.h:348
bool isInitialized() const
has the internal data been initialized?
Definition: spxsolver.h:1850
int dim() const
Dimension of vector.
Definition: vectorbase.h:217
virtual void doRemoveCols(int perm[])
Internal helper method.
Definition: spxlpbase.h:2147
Everything should be within this namespace.
virtual void changeRange(const Vector &newLhs, const Vector &newRhs, bool scale=false)
R lowerUnscaled(int i) const
Returns unscaled lower bound of column i.
primal variable is set to its lower bound
Definition: spxbasis.h:187
bool m_nonbasicValueUpToDate
true, if the stored objValue is up to date
Definition: spxsolver.h:258
const VectorBase< R > & maxObj() const
Returns objective vector for maximization problem.
Definition: spxlpbase.h:434
DVector theLCbound
Lower Column Feasibility bound.
Definition: spxsolver.h:349
virtual void changeRowObj(const VectorBase< Real > &newRowObj, bool scale=false)
Changes row objective function vector to newRowObj. scale determines whether the new data should be s...
Definition: spxlpbase.h:1617
virtual void changeUpperStatus(int i, Real newUpper, Real oldLower=0.0)
void removedRow(int i)
inform SPxBasis that row i had been removed.
dual variable is set to its lower bound
Definition: spxbasis.h:193
virtual void changeSense(SPxSense sns)
Changes optimization sense to sns.
Definition: spxlpbase.h:1830
Real theShift
sum of all shifts applied to any bound.
Definition: spxsolver.h:268
virtual void doRemoveCol(int i)
virtual void changeElement(int i, int j, const Real &val, bool scale=false)
Changes LP element (i, j) to val. scale determines whether the new data should be scaled...
Definition: spxlpbase.h:1750
virtual void changeLhs(const VectorBase< Real > &newLhs, bool scale=false)
Changes left hand side vector for constraints to newLhs. scale determines whether the new data should...
Definition: spxlpbase.h:1517
dual variable has two bounds
Definition: spxbasis.h:194
virtual void doRemoveRow(int j)
Internal helper method.
Definition: spxlpbase.h:2045
virtual void doRemoveRows(int perm[])
virtual void addedRows(int newrows)
Called after the last n rows have just been added.
Definition: spxlpbase.h:2170
void forceRecompNonbasicValue()
Definition: spxsolver.h:670
virtual void doRemoveCol(int j)
Internal helper method.
Definition: spxlpbase.h:2106
Status
Status of a variable.
Definition: spxbasis.h:185
virtual void changeObj(const Vector &newObj, bool scale=false)
scale determines whether the new data needs to be scaled according to the existing LP (persistent sca...
LP has been proven to be primal unbounded.
Definition: spxbasis.h:98
const VectorBase< R > & lower() const
Returns (internal and possibly scaled) lower bound vector.
Definition: spxlpbase.h:488
LP column.Class LPColBase provides a datatype for storing the column of an LP a the form similar to ...
Definition: lpcolbase.h:45
const Desc & desc() const
Definition: spxbasis.h:464
Representation rep() const
return the current basis representation.
Definition: spxsolver.h:506
columnwise representation.
Definition: spxsolver.h:108
Basis is primal feasible.
Definition: spxbasis.h:96
void setBasisStatus(SPxBasis::SPxStatus stat)
set the lp solver&#39;s basis status.
Definition: spxsolver.h:2051
void addedCols(int n)
inform SPxBasis that n new columns had been added.
LP has been proven to be primal infeasible.
Definition: spxbasis.h:99
No Problem has been loaded to the basis.
Definition: spxbasis.h:92