Scippy

SoPlex

Sequential object-oriented simPlex

spxharrisrt.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/spxharrisrt.h"
21 
22 namespace soplex
23 {
24 /**@todo suspicious: *max is not set, but it is used
25  * (with the default setting *max=1) in selectLeave and selectEnter
26  * The question might be if max shouldn't be updated with themax?
27  *
28  * numCycle and maxCycle are integers. So degeneps will be
29  * exactly delta until numCycle >= maxCycle. Then it will be
30  * 0 until numCycle >= 2 * maxCycle, after wich it becomes
31  * negative. This does not look ok.
32  */
34 {
35  return solver()->delta()
36  * (1.0 - solver()->numCycle() / solver()->maxCycle());
37 }
38 
40  Real* /*max*/, /* max abs value in upd */
41  Real* val, /* initial and chosen value */
42  int num, /* # of indices in idx */
43  const int* idx, /* nonzero indices in upd */
44  const Real* upd, /* update vector for vec */
45  const Real* vec, /* current vector */
46  const Real* low, /* lower bounds for vec */
47  const Real* up, /* upper bounds for vec */
48  Real epsilon) const /* what is 0? */
49 {
50  Real x;
51  Real theval;
52  /**@todo patch suggests using *max instead of themax */
53  Real themax;
54  int sel;
55  int i;
56 
57  assert(*val >= 0);
58 
59  theval = *val;
60  themax = 0;
61  sel = -1;
62 
63  while(num--)
64  {
65  i = idx[num];
66  x = upd[i];
67 
68  if(x > epsilon)
69  {
70  themax = (x > themax) ? x : themax;
71  x = (up[i] - vec[i] + delta) / x;
72 
73  if(x < theval && up[i] < infinity)
74  theval = x;
75  }
76  else if(x < -epsilon)
77  {
78  themax = (-x > themax) ? -x : themax;
79  x = (low[i] - vec[i] - delta) / x;
80 
81  if(x < theval && low[i] > -infinity)
82  theval = x;
83  }
84  }
85 
86  *val = theval;
87  return sel;
88 }
89 
90 /**@todo suspicious: *max is not set, but it is used
91  (with the default setting *max=1)
92  in selectLeave and selectEnter
93 */
95  Real* /*max*/, /* max abs value in upd */
96  Real* val, /* initial and chosen value */
97  int num, /* # of indices in idx */
98  const int* idx, /* nonzero indices in upd */
99  const Real* upd, /* update vector for vec */
100  const Real* vec, /* current vector */
101  const Real* low, /* lower bounds for vec */
102  const Real* up, /* upper bounds for vec */
103  Real epsilon) const /* what is 0? */
104 {
105  Real x;
106  Real theval;
107  /**@todo patch suggests using *max instead of themax */
108  Real themax;
109  int sel;
110  int i;
111 
112  assert(*val < 0);
113 
114  theval = *val;
115  themax = 0;
116  sel = -1;
117 
118  while(num--)
119  {
120  i = idx[num];
121  x = upd[i];
122 
123  if(x > epsilon)
124  {
125  themax = (x > themax) ? x : themax;
126  x = (low[i] - vec[i] - delta) / x;
127 
128  if(x > theval && low[i] > -infinity)
129  theval = x;
130  }
131  else if(x < -epsilon)
132  {
133  themax = (-x > themax) ? -x : themax;
134  x = (up[i] - vec[i] + delta) / x;
135 
136  if(x > theval && up[i] < infinity)
137  theval = x;
138  }
139  }
140 
141  *val = theval;
142  return sel;
143 }
144 
145 /**
146  Here comes our implementation of the Harris procedure improved by shifting
147  bounds. The basic idea is to used the tolerated infeasibility within
148  solver()->entertol() for searching numerically stable pivots.
149 
150  The algorithms operates in two phases. In a first phase, the maximum \p val
151  is determined, when infeasibility within solver()->entertol() is allowed. In the second
152  phase, between all variables with values < \p val the one is selected which
153  gives the best step forward in the simplex iteration. However, this may not
154  allways yield an improvement. In that case, we shift the variable toward
155  infeasibility and retry. This avoids cycling in the shifted LP.
156  */
158 {
159  int i, j;
160  Real stab, x, y;
161  Real max;
162  Real sel;
163  Real lastshift;
164  Real useeps;
165  int leave = -1;
166  Real maxabs = 1;
167 
168  Real epsilon = solver()->epsilon();
169  Real degeneps = degenerateEps();
170 
171  SSVector& upd = solver()->fVec().delta();
172  Vector& vec = solver()->fVec();
173 
174  const Vector& up = solver()->ubBound();
175  const Vector& low = solver()->lbBound();
176 
177  assert(delta > epsilon);
178  assert(epsilon > 0);
179  assert(solver()->maxCycle() > 0);
180 
181  max = val;
182  lastshift = solver()->shift();
183 
184  solver()->fVec().delta().setup();
185 
186  if(max > epsilon)
187  {
188  // phase 1:
189  maxDelta(
190  &maxabs, /* max abs value in upd */
191  &max, /* initial and chosen value */
192  upd.size(), /* # of indices in upd */
193  upd.indexMem(), /* nonzero indices in upd */
194  upd.values(), /* update vector for vec */
195  vec.get_const_ptr(), /* current vector */
196  low.get_const_ptr(), /* lower bounds for vec */
197  up.get_const_ptr(), /* upper bounds for vec */
198  epsilon); /* what is 0? */
199 
200  if(max == val)
201  return -1;
202 
203 
204  // phase 2:
205  stab = 0;
206  sel = -infinity;
207  useeps = maxabs * epsilon * 0.001;
208 
209  if(useeps < epsilon)
210  useeps = epsilon;
211 
212  for(j = upd.size() - 1; j >= 0; --j)
213  {
214  i = upd.index(j);
215  x = upd[i];
216 
217  if(x > useeps)
218  {
219  y = up[i] - vec[i];
220 
221  if(y < -degeneps)
222  solver()->shiftUBbound(i, vec[i]); // ensure simplex improvement
223  else
224  {
225  y /= x;
226 
227  if(y <= max && y > sel - epsilon && x > stab)
228  {
229  sel = y;
230  leave = i;
231  stab = x;
232  }
233  }
234  }
235  else if(x < -useeps)
236  {
237  y = low[i] - vec[i];
238 
239  if(y > degeneps)
240  solver()->shiftLBbound(i, vec[i]); // ensure simplex improvement
241  else
242  {
243  y /= x;
244 
245  if(y <= max && y > sel - epsilon && -x > stab)
246  {
247  sel = y;
248  leave = i;
249  stab = -x;
250  }
251  }
252  }
253  else
254  upd.clearNum(j);
255  }
256  }
257 
258 
259  else if(max < -epsilon)
260  {
261  // phase 1:
262  minDelta(
263  &maxabs, /* max abs value in upd */
264  &max, /* initial and chosen value */
265  upd.size(), /* # of indices in upd */
266  upd.indexMem(), /* nonzero indices in upd */
267  upd.values(), /* update vector for vec */
268  vec.get_const_ptr(), /* current vector */
269  low.get_const_ptr(), /* lower bounds for vec */
270  up.get_const_ptr(), /* upper bounds for vec */
271  epsilon); /* what is 0? */
272 
273  if(max == val)
274  return -1;
275 
276  // phase 2:
277  stab = 0;
278  sel = infinity;
279  useeps = maxabs * epsilon * 0.001;
280 
281  if(useeps < epsilon)
282  useeps = epsilon;
283 
284  for(j = upd.size() - 1; j >= 0; --j)
285  {
286  i = upd.index(j);
287  x = upd[i];
288 
289  if(x < -useeps)
290  {
291  y = up[i] - vec[i];
292 
293  if(y < -degeneps)
294  solver()->shiftUBbound(i, vec[i]); // ensure simplex improvement
295  else
296  {
297  y /= x;
298 
299  if(y >= max && y < sel + epsilon && -x > stab)
300  {
301  sel = y;
302  leave = i;
303  stab = -x;
304  }
305  }
306  }
307  else if(x > useeps)
308  {
309  y = low[i] - vec[i];
310 
311  if(y > degeneps)
312  solver()->shiftLBbound(i, vec[i]); // ensure simplex improvement
313  else
314  {
315  y /= x;
316 
317  if(y >= max && y < sel + epsilon && x > stab)
318  {
319  sel = y;
320  leave = i;
321  stab = x;
322  }
323  }
324  }
325  else
326  upd.clearNum(j);
327  }
328  }
329 
330  else
331  return -1;
332 
333 
334  if(lastshift != solver()->shift())
335  return selectLeave(val, 0, false);
336 
337  assert(leave >= 0);
338 
339  val = sel;
340  return leave;
341 }
342 
343 
345 {
346  int i, j;
347  SPxId enterId;
348  Real stab, x, y;
349  Real max = 0.0;
350  Real sel = 0.0;
351  Real lastshift;
352  Real cuseeps;
353  Real ruseeps;
354  Real cmaxabs = 1;
355  Real rmaxabs = 1;
356  int pnr, cnr;
357 
358  Real minStability = 0.0001;
359  Real epsilon = solver()->epsilon();
360  Real degeneps = degenerateEps();
361 
362  Vector& pvec = solver()->pVec();
363  SSVector& pupd = solver()->pVec().delta();
364 
365  Vector& cvec = solver()->coPvec();
366  SSVector& cupd = solver()->coPvec().delta();
367 
368  const Vector& upb = solver()->upBound();
369  const Vector& lpb = solver()->lpBound();
370  const Vector& ucb = solver()->ucBound();
371  const Vector& lcb = solver()->lcBound();
372 
373  assert(delta > epsilon);
374  assert(epsilon > 0);
375  assert(solver()->maxCycle() > 0);
376 
377  solver()->coPvec().delta().setup();
378  solver()->pVec().delta().setup();
379 
380  if(val > epsilon)
381  {
382  for(;;)
383  {
384  pnr = -1;
385  cnr = -1;
386  max = val;
387  lastshift = solver()->shift();
388  assert(delta > epsilon);
389 
390  // phase 1:
391  maxDelta(
392  &rmaxabs, /* max abs value in upd */
393  &max, /* initial and chosen value */
394  pupd.size(), /* # of indices in pupd */
395  pupd.indexMem(), /* nonzero indices in pupd */
396  pupd.values(), /* update vector for vec */
397  pvec.get_const_ptr(), /* current vector */
398  lpb.get_const_ptr(), /* lower bounds for vec */
399  upb.get_const_ptr(), /* upper bounds for vec */
400  epsilon); /* what is 0? */
401 
402  maxDelta(
403  &cmaxabs, /* max abs value in upd */
404  &max, /* initial and chosen value */
405  cupd.size(), /* # of indices in cupd */
406  cupd.indexMem(), /* nonzero indices in cupd */
407  cupd.values(), /* update vector for vec */
408  cvec.get_const_ptr(), /* current vector */
409  lcb.get_const_ptr(), /* lower bounds for vec */
410  ucb.get_const_ptr(), /* upper bounds for vec */
411  epsilon); /* what is 0? */
412 
413  if(max == val)
414  return enterId;
415 
416 
417  // phase 2:
418  stab = 0;
419  sel = -infinity;
420  ruseeps = rmaxabs * 0.001 * epsilon;
421 
422  if(ruseeps < epsilon)
423  ruseeps = epsilon;
424 
425  cuseeps = cmaxabs * 0.001 * epsilon;
426 
427  if(cuseeps < epsilon)
428  cuseeps = epsilon;
429 
430  for(j = pupd.size() - 1; j >= 0; --j)
431  {
432  i = pupd.index(j);
433  x = pupd[i];
434 
435  if(x > ruseeps)
436  {
437  y = upb[i] - pvec[i];
438 
439  if(y < -degeneps)
440  solver()->shiftUPbound(i, pvec[i] - degeneps);
441  else
442  {
443  y /= x;
444 
445  if(y <= max && x >= stab) // && y > sel-epsilon
446  {
447  enterId = solver()->id(i);
448  sel = y;
449  pnr = i;
450  stab = x;
451  }
452  }
453  }
454  else if(x < -ruseeps)
455  {
456  y = lpb[i] - pvec[i];
457 
458  if(y > degeneps)
459  solver()->shiftLPbound(i, pvec[i] + degeneps);
460  else
461  {
462  y /= x;
463 
464  if(y <= max && -x >= stab) // && y > sel-epsilon
465  {
466  enterId = solver()->id(i);
467  sel = y;
468  pnr = i;
469  stab = -x;
470  }
471  }
472  }
473  else
474  {
475  MSG_DEBUG(std::cout << "DHARRI01 removing value " << pupd[i] << std::endl;)
476  pupd.clearNum(j);
477  }
478  }
479 
480  for(j = cupd.size() - 1; j >= 0; --j)
481  {
482  i = cupd.index(j);
483  x = cupd[i];
484 
485  if(x > cuseeps)
486  {
487  y = ucb[i] - cvec[i];
488 
489  if(y < -degeneps)
490  solver()->shiftUCbound(i, cvec[i] - degeneps);
491  else
492  {
493  y /= x;
494 
495  if(y <= max && x >= stab) // && y > sel-epsilon
496  {
497  enterId = solver()->coId(i);
498  sel = y;
499  cnr = j;
500  stab = x;
501  }
502  }
503  }
504  else if(x < -cuseeps)
505  {
506  y = lcb[i] - cvec[i];
507 
508  if(y > degeneps)
509  solver()->shiftLCbound(i, cvec[i] + degeneps);
510  else
511  {
512  y /= x;
513 
514  if(y <= max && -x >= stab) // && y > sel-epsilon
515  {
516  enterId = solver()->coId(i);
517  sel = y;
518  cnr = j;
519  stab = -x;
520  }
521  }
522  }
523  else
524  {
525  MSG_DEBUG(std::cout << "DHARRI02 removing value " << cupd[i] << std::endl;)
526  cupd.clearNum(j);
527  }
528  }
529 
530  if(lastshift == solver()->shift())
531  {
532  if(cnr >= 0)
533  {
534  if(solver()->isBasic(enterId))
535  {
536  cupd.clearNum(cnr);
537  continue;
538  }
539  else
540  break;
541  }
542  else if(pnr >= 0)
543  {
544  pvec[pnr] = solver()->vector(pnr) * cvec;
545 
546  if(solver()->isBasic(enterId))
547  {
548  pupd.setValue(pnr, 0.0);
549  continue;
550  }
551  else
552  {
553  x = pupd[pnr];
554 
555  if(x > 0)
556  {
557  sel = upb[pnr] - pvec[pnr];
558 
559  if(x < minStability && sel < delta)
560  {
561  minStability /= 2.0;
562  solver()->shiftUPbound(pnr, pvec[pnr]);
563  continue;
564  }
565  }
566  else
567  {
568  sel = lpb[pnr] - pvec[pnr];
569 
570  if(-x < minStability && -sel < delta)
571  {
572  minStability /= 2.0;
573  solver()->shiftLPbound(pnr, pvec[pnr]);
574  continue;
575  }
576  }
577 
578  sel /= x;
579  }
580  }
581  else
582  {
583  val = 0;
584  enterId.inValidate();
585  return enterId;
586  }
587 
588  if(sel > max) // instability detected => recompute
589  continue; // ratio test with corrected value
590 
591  break;
592  }
593  }
594  }
595  else if(val < -epsilon)
596  {
597  for(;;)
598  {
599  pnr = -1;
600  cnr = -1;
601  max = val;
602  lastshift = solver()->shift();
603  assert(delta > epsilon);
604 
605 
606  // phase 1:
607  minDelta
608  (
609  &rmaxabs, /* max abs value in upd */
610  &max, /* initial and chosen value */
611  pupd.size(), /* # of indices in pupd */
612  pupd.indexMem(), /* nonzero indices in pupd */
613  pupd.values(), /* update vector for vec */
614  pvec.get_const_ptr(), /* current vector */
615  lpb.get_const_ptr(), /* lower bounds for vec */
616  upb.get_const_ptr(), /* upper bounds for vec */
617  epsilon); /* what is 0? */
618 
619  minDelta
620  (
621  &cmaxabs, /* max abs value in upd */
622  &max, /* initial and chosen value */
623  cupd.size(), /* # of indices in cupd */
624  cupd.indexMem(), /* nonzero indices in cupd */
625  cupd.values(), /* update vector for vec */
626  cvec.get_const_ptr(), /* current vector */
627  lcb.get_const_ptr(), /* lower bounds for vec */
628  ucb.get_const_ptr(), /* upper bounds for vec */
629  epsilon); /* what is 0? */
630 
631  if(max == val)
632  return enterId;
633 
634 
635  // phase 2:
636  stab = 0;
637  sel = infinity;
638  ruseeps = rmaxabs * epsilon * 0.001;
639  cuseeps = cmaxabs * epsilon * 0.001;
640 
641  for(j = pupd.size() - 1; j >= 0; --j)
642  {
643  i = pupd.index(j);
644  x = pupd[i];
645 
646  if(x > ruseeps)
647  {
648  y = lpb[i] - pvec[i];
649 
650  if(y > degeneps)
651  solver()->shiftLPbound(i, pvec[i]); // ensure simplex improvement
652  else
653  {
654  y /= x;
655 
656  if(y >= max && x > stab) // && y < sel+epsilon
657  {
658  enterId = solver()->id(i);
659  sel = y;
660  pnr = i;
661  stab = x;
662  }
663  }
664  }
665  else if(x < -ruseeps)
666  {
667  y = upb[i] - pvec[i];
668 
669  if(y < -degeneps)
670  solver()->shiftUPbound(i, pvec[i]); // ensure simplex improvement
671  else
672  {
673  y /= x;
674 
675  if(y >= max && -x > stab) // && y < sel+epsilon
676  {
677  enterId = solver()->id(i);
678  sel = y;
679  pnr = i;
680  stab = -x;
681  }
682  }
683  }
684  else
685  {
686  MSG_DEBUG(std::cout << "DHARRI03 removing value " << pupd[i] << std::endl;)
687  pupd.clearNum(j);
688  }
689  }
690 
691  for(j = cupd.size() - 1; j >= 0; --j)
692  {
693  i = cupd.index(j);
694  x = cupd[i];
695 
696  if(x > cuseeps)
697  {
698  y = lcb[i] - cvec[i];
699 
700  if(y > degeneps)
701  solver()->shiftLCbound(i, cvec[i]); // ensure simplex improvement
702  else
703  {
704  y /= x;
705 
706  if(y >= max && x > stab) // && y < sel+epsilon
707  {
708  enterId = solver()->coId(i);
709  sel = y;
710  cnr = j;
711  stab = x;
712  }
713  }
714  }
715  else if(x < -cuseeps)
716  {
717  y = ucb[i] - cvec[i];
718 
719  if(y < -degeneps)
720  solver()->shiftUCbound(i, cvec[i]); // ensure simplex improvement
721  else
722  {
723  y /= x;
724 
725  if(y >= max && -x > stab) // && y < sel+epsilon
726  {
727  enterId = solver()->coId(i);
728  sel = y;
729  cnr = j;
730  stab = -x;
731  }
732  }
733  }
734  else
735  {
736  MSG_DEBUG(std::cout << "DHARRI04 removing value " << x << std::endl;);
737  cupd.clearNum(j);
738  }
739  }
740 
741  if(lastshift == solver()->shift())
742  {
743  if(cnr >= 0)
744  {
745  if(solver()->isBasic(enterId))
746  {
747  cupd.clearNum(cnr);
748  continue;
749  }
750  else
751  break;
752  }
753  else if(pnr >= 0)
754  {
755  pvec[pnr] = solver()->vector(pnr) * cvec;
756 
757  if(solver()->isBasic(enterId))
758  {
759  pupd.setValue(pnr, 0.0);
760  continue;
761  }
762  else
763  {
764  x = pupd[pnr];
765 
766  if(x > 0)
767  {
768  sel = lpb[pnr] - pvec[pnr];
769 
770  if(x < minStability && -sel < delta)
771  {
772  minStability /= 2;
773  solver()->shiftLPbound(pnr, pvec[pnr]);
774  continue;
775  }
776  }
777  else
778  {
779  sel = upb[pnr] - pvec[pnr];
780 
781  if(-x < minStability && sel < delta)
782  {
783  minStability /= 2;
784  solver()->shiftUPbound(pnr, pvec[pnr]);
785  continue;
786  }
787  }
788 
789  sel /= x;
790  }
791  }
792  else
793  {
794  val = 0;
795  enterId.inValidate();
796  return enterId;
797  }
798 
799  if(sel < max) // instability detected => recompute
800  continue; // ratio test with corrected value
801 
802  break;
803  }
804  }
805  }
806 
807  assert(max * val >= 0);
808  assert(enterId.type() != SPxId::INVALID);
809 
810  val = sel;
811 
812  return enterId;
813 }
814 } // namespace soplex
SPxId coId(int i) const
id of i &#39;th covector.
Definition: spxsolver.h:1117
const Vector & ucBound() const
Definition: spxsolver.h:1417
virtual Real shift() const
total current shift amount.
Definition: spxsolver.h:1627
virtual SPxId selectEnter(Real &val, int, bool)
THREADLOCAL const Real infinity
Definition: spxdefines.cpp:26
Real delta
allowed bound violation
virtual int selectLeave(Real &val, Real, bool)
void inValidate()
makes the id invalid.
Definition: spxid.h:156
void setValue(int i, R x)
Sets i &#39;th element to x.
Definition: ssvectorbase.h:219
Real degenerateEps() const
Definition: spxharrisrt.cpp:33
const Vector & lcBound() const
Definition: spxsolver.h:1438
void shiftLBbound(int i, Real to)
shift i &#39;th lbBound to to.
Definition: spxsolver.h:1584
invalid id.
Definition: spxid.h:98
int maxCycle() const
maximum number of degenerate simplex steps before we detect cycling.
Definition: spxsolver.h:882
const R * get_const_ptr() const
Conversion to C-style pointer.
Definition: vectorbase.h:455
const Vector & ubBound() const
upper bound for fVec.
Definition: spxsolver.h:1341
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
Definition: spxid.h:85
UpdateVector & coPvec() const
copricing vector.
Definition: spxsolver.h:1398
double Real
Definition: spxdefines.h:218
const R * values() const
Returns array values.
Definition: ssvectorbase.h:300
#define MSG_DEBUG(x)
Definition: spxdefines.h:132
void shiftLPbound(int i, Real to)
shift i &#39;th lpBound to to.
Definition: spxsolver.h:1600
const Vector & lbBound() const
lower bound for fVec.
Definition: spxsolver.h:1359
SPxId id(int i) const
id of i &#39;th vector.
Definition: spxsolver.h:1098
UpdateVector & fVec() const
feasibility vector.
Definition: spxsolver.h:1323
void clearNum(int n)
Sets n &#39;th nonzero element to 0 (index n must exist).
Definition: ssvectorbase.h:270
int minDelta(Real *, Real *val, int num, const int *idx, const Real *upd, const Real *vec, const Real *low, const Real *up, Real epsilon) const
Definition: spxharrisrt.cpp:94
Real delta() const
guaranteed primal and dual bound violation for optimal solution, returning the maximum of feastol() a...
Definition: spxsolver.h:819
int maxDelta(Real *, Real *val, int num, const int *idx, const Real *upd, const Real *vec, const Real *low, const Real *up, Real epsilon) const
Definition: spxharrisrt.cpp:39
void shiftUCbound(int i, Real to)
shift i &#39;th ucBound to to.
Definition: spxsolver.h:1608
int index(int n) const
Returns index of the n &#39;th nonzero element.
Definition: ssvectorbase.h:175
void shiftUBbound(int i, Real to)
shift i &#39;th ubBound to to.
Definition: spxsolver.h:1576
const int * indexMem() const
Returns array indices.
Definition: ssvectorbase.h:294
Real epsilon() const
values are considered to be 0.
Definition: spxsolver.h:784
Debugging, floating point type and parameter definitions.
UpdateVector & pVec() const
pricing vector.
Definition: spxsolver.h:1478
const Vector & lpBound() const
Definition: spxsolver.h:1504
int size() const
Returns the number of nonzeros.
Definition: ssvectorbase.h:200
Everything should be within this namespace.
void shiftUPbound(int i, Real to)
shift i &#39;th upBound to to.
Definition: spxsolver.h:1592
Harris pricing with shifting.
void shiftLCbound(int i, Real to)
shift i &#39;th lcBound to to.
Definition: spxsolver.h:1616
virtual SPxSolver * solver() const
returns loaded LP solver.
void setup()
Initializes nonzero indices for elements with absolute values above epsilon and sets all other elemen...
Definition: ssvectorbase.h:133
int numCycle() const
actual number of degenerate simplex steps encountered so far.
Definition: spxsolver.h:887
const Vector & upBound() const
Definition: spxsolver.h:1483
Type type() const
returns the type of the id.
Definition: spxid.h:146
const SVector & vector(int i) const
i &#39;th vector.
Definition: spxsolver.h:1157
SSVector & delta()
update vector , writeable
Definition: updatevector.h:122