source: trunk/Clp/src/AbcSimplex.hpp @ 1879

Last change on this file since 1879 was 1878, checked in by forrest, 7 years ago

minor changes to implement Aboca

File size: 44.3 KB
Line 
1/* $Id: AbcSimplex.hpp 1831 2011-12-05 14:42:00Z forrest $ */
2// Copyright (C) 2002, International Business Machines
3// Corporation and others, Copyright (C) 2012, FasterCoin.  All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5/*
6  Authors
7 
8  John Forrest
9 
10*/
11#ifndef AbcSimplex_H
12#define AbcSimplex_H
13
14#include <iostream>
15#include <cfloat>
16#include "ClpModel.hpp"
17#include "ClpMatrixBase.hpp"
18#include "CoinIndexedVector.hpp"
19#include "AbcCommon.hpp"
20class AbcSimplex;
21#include "ClpSolve.hpp"
22#include "CoinAbcCommon.hpp"
23class ClpSimplex;
24class AbcDualRowPivot;
25class AbcPrimalColumnPivot;
26class AbcSimplexFactorization;
27class AbcNonLinearCost;
28class OsiAbcSolverInterface;
29class CoinWarmStartBasis;
30class ClpDisasterHandler;
31class AbcSimplexProgress;
32class AbcMatrix;
33class AbcTolerancesEtc;
34
35/** This solves LPs using the simplex method
36   
37    It inherits from ClpModel and all its arrays are created at
38    algorithm time. Originally I tried to work with model arrays
39    but for simplicity of coding I changed to single arrays with
40    structural variables then row variables.  Some coding is still
41    based on old style and needs cleaning up.
42   
43    For a description of algorithms:
44   
45    for dual see AbcSimplexDual.hpp and at top of AbcSimplexDual.cpp
46    for primal see AbcSimplexPrimal.hpp and at top of AbcSimplexPrimal.cpp
47   
48    There is an algorithm data member.  + for primal variations
49    and - for dual variations
50   
51*/
52#define PAN
53#if ABC_NORMAL_DEBUG>0
54#define PRINT_PAN 1
55#endif
56#define TRY_ABC_GUS
57#define HEAVY_PERTURBATION 57
58#if ABC_PARALLEL==1
59// Use pthreads
60#include <pthread.h>
61#endif
62typedef struct {
63  double result;
64  //const CoinIndexedVector * constVector; // can get rid of
65  //CoinIndexedVector * vectors[2]; // can get rid of
66  int status;
67  int stuff[4];
68} CoinAbcThreadInfo;
69#include "ClpSimplex.hpp"
70class AbcSimplex : public ClpSimplex {
71  friend void AbcSimplexUnitTest(const std::string & mpsDir);
72 
73public:
74  /** enums for status of various sorts.
75      ClpModel order (and warmstart) is
76      isFree = 0x00,
77      basic = 0x01,
78      atUpperBound = 0x02,
79      atLowerBound = 0x03,
80      isFixed means fixed at lower bound and out of basis
81  */
82  enum Status {
83    atLowerBound = 0x00, // so we can use bottom two bits to sort and swap signs
84    atUpperBound = 0x01,
85    isFree = 0x04,
86    superBasic = 0x05,
87    basic = 0x06,
88    isFixed = 0x07
89  };
90  // For Dual
91  enum FakeBound {
92    noFake = 0x00,
93    lowerFake = 0x01,
94    upperFake = 0x02,
95    bothFake = 0x03
96  };
97 
98  /**@name Constructors and destructor and copy */
99  //@{
100  /// Default constructor
101  AbcSimplex (bool emptyMessages = false  );
102 
103  /** Copy constructor.
104  */
105  AbcSimplex(const AbcSimplex & rhs);
106  /** Copy constructor from model.
107  */
108  AbcSimplex(const ClpSimplex & rhs);
109  /** Subproblem constructor.  A subset of whole model is created from the
110      row and column lists given.  The new order is given by list order and
111      duplicates are allowed.  Name and integer information can be dropped
112      Can optionally modify rhs to take into account variables NOT in list
113      in this case duplicates are not allowed (also see getbackSolution)
114  */
115  AbcSimplex (const ClpSimplex * wholeModel,
116              int numberRows, const int * whichRows,
117              int numberColumns, const int * whichColumns,
118              bool dropNames = true, bool dropIntegers = true,
119              bool fixOthers = false);
120  /** Subproblem constructor.  A subset of whole model is created from the
121      row and column lists given.  The new order is given by list order and
122      duplicates are allowed.  Name and integer information can be dropped
123      Can optionally modify rhs to take into account variables NOT in list
124      in this case duplicates are not allowed (also see getbackSolution)
125  */
126  AbcSimplex (const AbcSimplex * wholeModel,
127              int numberRows, const int * whichRows,
128              int numberColumns, const int * whichColumns,
129              bool dropNames = true, bool dropIntegers = true,
130              bool fixOthers = false);
131  /** This constructor modifies original AbcSimplex and stores
132      original stuff in created AbcSimplex.  It is only to be used in
133      conjunction with originalModel */
134  AbcSimplex (AbcSimplex * wholeModel,
135              int numberColumns, const int * whichColumns);
136  /** This copies back stuff from miniModel and then deletes miniModel.
137      Only to be used with mini constructor */
138  void originalModel(AbcSimplex * miniModel);
139  /** This constructor copies from ClpSimplex */
140  AbcSimplex (const ClpSimplex * clpSimplex);
141  /// Put back solution into ClpSimplex
142  void putBackSolution(ClpSimplex * simplex);
143  /** Array persistence flag
144      If 0 then as now (delete/new)
145      1 then only do arrays if bigger needed
146      2 as 1 but give a bit extra if bigger needed
147  */
148  //void setPersistenceFlag(int value);
149  /// Save a copy of model with certain state - normally without cuts
150  void makeBaseModel();
151  /// Switch off base model
152  void deleteBaseModel();
153  /// See if we have base model
154  inline AbcSimplex *  baseModel() const {
155    return abcBaseModel_;
156  }
157  /** Reset to base model (just size and arrays needed)
158      If model NULL use internal copy
159  */
160  void setToBaseModel(AbcSimplex * model = NULL);
161  /// Assignment operator. This copies the data
162  AbcSimplex & operator=(const AbcSimplex & rhs);
163  /// Destructor
164  ~AbcSimplex (  );
165  //@}
166 
167  /**@name Functions most useful to user */
168  //@{
169  /** Dual algorithm - see AbcSimplexDual.hpp for method.
170  */
171  int dual();
172  int doAbcDual();
173  /** Primal algorithm - see AbcSimplexPrimal.hpp for method.
174  */
175  int primal(int ifValuesPass);
176  int doAbcPrimal(int ifValuesPass);
177  /// Returns a basis (to be deleted by user)
178  CoinWarmStartBasis * getBasis() const;
179  /// Passes in factorization
180  void setFactorization( AbcSimplexFactorization & factorization);
181  /// Swaps factorization
182  AbcSimplexFactorization * swapFactorization( AbcSimplexFactorization * factorization);
183  /// Gets clean and emptyish factorization
184  AbcSimplexFactorization * getEmptyFactorization();
185  /** Tightens primal bounds to make dual faster.  Unless
186      fixed or doTight>10, bounds are slightly looser than they could be.
187      This is to make dual go faster and is probably not needed
188      with a presolve.  Returns non-zero if problem infeasible.
189     
190      Fudge for branch and bound - put bounds on columns of factor *
191      largest value (at continuous) - should improve stability
192      in branch and bound on infeasible branches (0.0 is off)
193  */
194  int tightenPrimalBounds();
195  /// Sets row pivot choice algorithm in dual
196  void setDualRowPivotAlgorithm(AbcDualRowPivot & choice);
197  /// Sets column pivot choice algorithm in primal
198  void setPrimalColumnPivotAlgorithm(AbcPrimalColumnPivot & choice);
199  //@}
200  /// If user left factorization frequency then compute
201  void defaultFactorizationFrequency();
202  //@}
203 
204  /**@name most useful gets and sets */
205  //@{
206  /// factorization
207  inline AbcSimplexFactorization * factorization() const {
208    return reinterpret_cast<AbcSimplexFactorization *>(abcFactorization_);
209  }
210#ifdef EARLY_FACTORIZE
211  /// Early factorization
212  inline AbcSimplexFactorization * earlyFactorization() const {
213    return reinterpret_cast<AbcSimplexFactorization *>(abcEarlyFactorization_);
214  }
215#endif
216  /// Factorization frequency
217  int factorizationFrequency() const;
218  void setFactorizationFrequency(int value);
219  /// Maximum rows
220  inline int maximumAbcNumberRows() const
221  { return maximumAbcNumberRows_;}
222  /// Maximum Total
223  inline int maximumNumberTotal() const
224  { return maximumNumberTotal_;}
225  inline int maximumTotal() const
226  { return maximumNumberTotal_;}
227  /// Return true if the objective limit test can be relied upon
228  bool isObjectiveLimitTestValid() const ;
229  /// Number of variables (includes spare rows)
230  inline int numberTotal() const
231  { return numberTotal_;}
232  /// Number of variables without fixed to zero (includes spare rows)
233  inline int numberTotalWithoutFixed() const
234  { return numberTotalWithoutFixed_;}
235  /// Useful arrays (0,1,2,3,4,5,6,7)
236  inline CoinPartitionedVector * usefulArray(int index) {
237    return & usefulArray_[index];
238  }
239  inline CoinPartitionedVector * usefulArray(int index) const {
240    return const_cast<CoinPartitionedVector *>(&usefulArray_[index]);
241  }
242  //@}
243 
244  /******************** End of most useful part **************/
245  /**@name Functions less likely to be useful to casual user */
246  //@{
247  /** Given an existing factorization computes and checks
248      primal and dual solutions.  Uses current problem arrays for
249      bounds.  Returns feasibility states */
250  int getSolution ();
251  /// Sets objectiveValue_ from rawObjectiveValue_
252  void setClpSimplexObjectiveValue();
253  /** Sets dual values pass djs using unscaled duals
254      type 1 - values pass
255      type 2 - just use as infeasibility weights
256      type 3 - as 2 but crash
257  */
258  void setupDualValuesPass(const double * fakeDuals,
259                           const double * fakePrimals,
260                           int type);
261  /// Gets objective value with all offsets but as for minimization
262  inline double minimizationObjectiveValue() const
263  { return objectiveValue_-dblParam_[ClpObjOffset];}
264  /// Current dualTolerance (will end up as dualTolerance_)
265  inline double currentDualTolerance() const
266  { return currentDualTolerance_;}
267  inline void setCurrentDualTolerance(double value) {
268    currentDualTolerance_ = value;
269  }
270  /// Return pointer to details of costs
271  inline AbcNonLinearCost * abcNonLinearCost() const {
272    return abcNonLinearCost_;
273  }
274  /// Perturbation (fixed) - is just scaled random numbers
275  double * perturbationSaved() const
276  { return perturbationSaved_;}
277  /// Acceptable pivot for this iteration
278  inline double acceptablePivot() const
279  { return acceptablePivot_;}
280  /// Set to 1 if no free or super basic
281  inline int ordinaryVariables() const
282  { return ordinaryVariables_;}
283  /// Number of ordinary (lo/up) in tableau row
284  inline int numberOrdinary() const
285  { return numberOrdinary_;}
286  /// Set number of ordinary (lo/up) in tableau row
287  inline void setNumberOrdinary(int number)
288  { numberOrdinary_=number;}
289  /// Current dualBound (will end up as dualBound_)
290  inline double currentDualBound() const
291  { return currentDualBound_;}
292  /// dual row pivot choice
293  inline AbcDualRowPivot * dualRowPivot() const {
294    return abcDualRowPivot_;
295  }
296  /// primal column pivot choice
297  inline AbcPrimalColumnPivot * primalColumnPivot() const {
298    return abcPrimalColumnPivot_;
299  }
300  /// Abc Matrix
301  inline AbcMatrix * abcMatrix() const     {
302    return abcMatrix_;
303  }
304  /** Factorizes using current basis.
305      solveType - 1 iterating, 0 initial, -1 external
306      If 10 added then in primal values pass
307      Return codes are as from AbcSimplexFactorization unless initial factorization
308      when total number of singularities is returned.
309      Special case is numberRows_+1 -> all slack basis.
310      if initial should be before permute in
311      pivotVariable may be same as toExternal
312  */
313  int internalFactorize(int solveType);
314  /**
315     Permutes in from ClpModel data - assumes scale factors done
316     and AbcMatrix exists but is in original order (including slacks)
317     For now just add basicArray at end
318     ==
319     But could partition into
320     normal (i.e. reasonable lower/upper)
321     abnormal - free, odd bounds
322     fixed
323     ==
324     sets a valid pivotVariable
325     Slacks always shifted by offset
326     Fixed variables always shifted by offset
327     Recode to allow row objective so can use pi from idiot etc
328  */
329  void permuteIn();
330  /// deals with new basis and puts in abcPivotVariable_
331  void permuteBasis();
332  /// Permutes out - bit settings same as stateOfProblem
333  void permuteOut(int whatsWanted);
334  /// Save data
335  ClpDataSave saveData() ;
336  /// Restore data
337  void restoreData(ClpDataSave saved);
338  /// Clean up status
339  void cleanStatus();
340  /** Computes duals from scratch. If givenDjs then
341      allows for nonzero basic djs.  Returns number of refinements  */
342  int computeDuals(double * givenDjs, CoinIndexedVector * array1, CoinIndexedVector * array2);
343  /// Computes primals from scratch.  Returns number of refinements
344  int computePrimals (CoinIndexedVector * array1, CoinIndexedVector * array2);
345  /// Computes nonbasic cost and total cost
346  void computeObjective ();
347  /// set multiple sequence in
348  void setMultipleSequenceIn(int sequenceIn[4]);
349  /**
350     Unpacks one column of the matrix into indexed array
351     Uses sequenceIn_
352  */
353  inline void unpack(CoinIndexedVector & rowArray) const 
354  {unpack(rowArray,sequenceIn_);}
355  /**
356     Unpacks one column of the matrix into indexed array
357  */
358  void unpack(CoinIndexedVector & rowArray, int sequence) const;
359  /**
360     This does basis housekeeping and does values for in/out variables.
361     Can also decide to re-factorize
362  */
363  int housekeeping(/*double objectiveChange*/);
364  /** This sets largest infeasibility and most infeasible and sum
365      and number of infeasibilities (Primal) */
366  void checkPrimalSolution(bool justBasic);
367  /** This sets largest infeasibility and most infeasible and sum
368      and number of infeasibilities (Dual) */
369  void checkDualSolution();
370  /** This sets largest infeasibility and most infeasible and sum
371      and number of infeasibilities AND sumFakeInfeasibilites_ (Dual) */
372  void checkDualSolutionPlusFake();
373  /** This sets sum and number of infeasibilities (Dual and Primal) */
374  void checkBothSolutions();
375  /// Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)
376  int gutsOfSolution(int type);
377  /// Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)
378  int gutsOfPrimalSolution(int type);
379  /// Saves good status etc
380  void saveGoodStatus();
381  /// Restores previous good status and says trouble
382  void restoreGoodStatus(int type);
383#define rowUseScale_ scaleFromExternal_
384#define inverseRowUseScale_ scaleToExternal_
385  /// After modifying first copy refreshes second copy and marks as updated
386  void refreshCosts();
387  void refreshLower(unsigned int type=~(ROW_LOWER_SAME|COLUMN_UPPER_SAME));
388  void refreshUpper(unsigned int type=~(ROW_LOWER_SAME|COLUMN_LOWER_SAME));
389  /// Sets up all extra pointers
390  void setupPointers(int maxRows,int maxColumns);
391  /// Copies all saved versions to working versions and may do something for perturbation
392  void copyFromSaved(int type=31);
393  /// fills in perturbationSaved_ from start with 0.5+random
394  void fillPerturbation(int start, int number);
395  /// For debug - prints summary of arrays which are out of kilter
396  void checkArrays(int ignoreEmpty=0) const;
397  /// For debug - summarizes dj situation (1 recomputes duals first, 2 checks duals as well)
398  void checkDjs(int type=1) const;
399  /// For debug - checks solutionBasic
400  void checkSolutionBasic() const;
401  /// For debug - moves solution back to external and computes stuff (always checks djs)
402  void checkMoveBack(bool checkDuals);
403public:
404  /** For advanced use.  When doing iterative solves things can get
405      nasty so on values pass if incoming solution has largest
406      infeasibility < incomingInfeasibility throw out variables
407      from basis until largest infeasibility < allowedInfeasibility
408      or incoming largest infeasibility.
409      If allowedInfeasibility>= incomingInfeasibility this is
410      always possible altough you may end up with an all slack basis.
411     
412      Defaults are 1.0,10.0
413  */
414  void setValuesPassAction(double incomingInfeasibility,
415                           double allowedInfeasibility);
416  /** Get a clean factorization - i.e. throw out singularities
417      may do more later */
418  int cleanFactorization(int ifValuesPass);
419  /// Move status and solution to ClpSimplex
420  void moveStatusToClp(ClpSimplex * clpModel);
421  /// Move status and solution from ClpSimplex
422  void moveStatusFromClp(ClpSimplex * clpModel);
423  //@}
424  /**@name most useful gets and sets */
425  //@{
426public:
427
428  /// Objective value
429  inline double clpObjectiveValue() const {
430  return (objectiveValue_+objectiveOffset_-bestPossibleImprovement_)*optimizationDirection_ - dblParam_[ClpObjOffset];
431  }
432  /** Basic variables pivoting on which rows
433      may be same as toExternal but may be as at invert */
434  inline int * pivotVariable() const {
435    return abcPivotVariable_;
436  }
437  /// State of problem
438  inline int stateOfProblem() const
439  { return stateOfProblem_;}
440  /// State of problem
441  inline void setStateOfProblem(int value)
442  { stateOfProblem_=value;}
443  /// Points from external to internal
444  //inline int * fromExternal() const
445  //{ return fromExternal_;}
446  /// Points from internal to external
447  //inline int * toExternal() const
448  //{return toExternal_;}
449  /** Scale from primal external to internal (in external order) Or other way for dual
450   */
451  inline double * scaleFromExternal() const
452  {return scaleFromExternal_;}
453  /** Scale from primal internal to external (in external order) Or other way for dual
454   */
455  inline double * scaleToExternal() const
456  {return scaleToExternal_;}
457  /// corresponds to rowScale etc
458  inline double * rowScale2() const
459  {return rowUseScale_;}
460  inline double * inverseRowScale2() const
461  {return inverseRowUseScale_;}
462  inline double * inverseColumnScale2() const
463  {return inverseColumnUseScale_;}
464  inline double * columnScale2() const
465  {return columnUseScale_;}
466  inline int arrayForDualColumn() const
467  {return arrayForDualColumn_;}
468  /// upper theta from dual column
469  inline double upperTheta() const
470  {return upperTheta_;}
471  inline int arrayForReplaceColumn() const
472  { return arrayForReplaceColumn_;}
473  inline int arrayForFlipBounds() const
474  { return arrayForFlipBounds_;}
475  inline int arrayForFlipRhs() const
476  { return arrayForFlipRhs_;}
477  inline int arrayForBtran() const
478  { return arrayForBtran_;}
479  inline int arrayForFtran() const
480  { return arrayForFtran_;}
481  inline int arrayForTableauRow() const
482  { return arrayForTableauRow_;}
483  /// value of incoming variable (in Dual)
484  double valueIncomingDual() const;
485  /// Get pointer to array[getNumCols()] of primal solution vector
486  const double * getColSolution() const; 
487 
488  /// Get pointer to array[getNumRows()] of dual prices
489  const double * getRowPrice() const;
490 
491  /// Get a pointer to array[getNumCols()] of reduced costs
492  const double * getReducedCost() const; 
493 
494  /** Get pointer to array[getNumRows()] of row activity levels (constraint
495      matrix times the solution vector */
496  const double * getRowActivity() const; 
497  //@}
498 
499  /**@name protected methods */
500  //@{
501  /** May change basis and then returns number changed.
502      Computation of solutions may be overriden by given pi and solution
503  */
504  int gutsOfSolution ( double * givenDuals,
505                       const double * givenPrimals,
506                       bool valuesPass = false);
507  /// Does most of deletion for arrays etc(0 just null arrays, 1 delete first)
508  void gutsOfDelete(int type);
509  /// Does most of copying
510  void gutsOfCopy(const AbcSimplex & rhs);
511  /// Initializes arrays
512  void gutsOfInitialize(int numberRows,int numberColumns,bool doMore);
513  /// resizes arrays
514  void gutsOfResize(int numberRows,int numberColumns);
515  /** Translates ClpModel to AbcSimplex
516      See DO_ bits in stateOfProblem_ for type e.g. DO_BASIS_AND_ORDER
517  */
518  void translate(int type);
519  /// Moves basic stuff to basic area
520  void moveToBasic(int which=15);
521  //@}
522public:
523  /**@name public methods */
524  //@{
525  /// Return region
526  inline double * solutionRegion() const {
527    return abcSolution_;
528  }
529  inline double * djRegion() const {
530    return abcDj_;
531  }
532  inline double * lowerRegion() const {
533    return abcLower_;
534  }
535  inline double * upperRegion() const {
536    return abcUpper_;
537  }
538  inline double * costRegion() const {
539    return abcCost_;
540  }
541  /// Return region
542  inline double * solutionRegion(int which) const {
543    return abcSolution_+which*maximumAbcNumberRows_;
544  }
545  inline double * djRegion(int which) const {
546    return abcDj_+which*maximumAbcNumberRows_;
547  }
548  inline double * lowerRegion(int which) const {
549    return abcLower_+which*maximumAbcNumberRows_;
550  }
551  inline double * upperRegion(int which) const {
552    return abcUpper_+which*maximumAbcNumberRows_;
553  }
554  inline double * costRegion(int which) const {
555    return abcCost_+which*maximumAbcNumberRows_;
556  }
557  /// Return region
558  inline double * solutionBasic() const {
559    return solutionBasic_;
560  }
561  inline double * djBasic() const {
562    return djBasic_;
563  }
564  inline double * lowerBasic() const {
565    return lowerBasic_;
566  }
567  inline double * upperBasic() const {
568    return upperBasic_;
569  }
570  inline double * costBasic() const {
571    return costBasic_;
572  }
573  /// Perturbation
574  inline double * abcPerturbation() const
575  { return abcPerturbation_;}
576  /// Fake djs
577  inline double * fakeDjs() const
578  { return djSaved_;}
579  inline unsigned char * internalStatus() const 
580  { return internalStatus_;}
581  inline AbcSimplex::Status getInternalStatus(int sequence) const {
582    return static_cast<Status> (internalStatus_[sequence] & 7);
583  }
584  inline AbcSimplex::Status getInternalColumnStatus(int sequence) const {
585    return static_cast<Status> (internalStatus_[sequence+maximumAbcNumberRows_] & 7);
586  }
587  inline void setInternalStatus(int sequence, AbcSimplex::Status newstatus) {
588    unsigned char & st_byte = internalStatus_[sequence];
589    st_byte = static_cast<unsigned char>(st_byte & ~7);
590    st_byte = static_cast<unsigned char>(st_byte | newstatus);
591  }
592  inline void setInternalColumnStatus(int sequence, AbcSimplex::Status newstatus) {
593    unsigned char & st_byte = internalStatus_[sequence+maximumAbcNumberRows_];
594    st_byte = static_cast<unsigned char>(st_byte & ~7);
595    st_byte = static_cast<unsigned char>(st_byte | newstatus);
596  }
597  /** Normally the first factorization does sparse coding because
598      the factorization could be singular.  This allows initial dense
599      factorization when it is known to be safe
600  */
601  void setInitialDenseFactorization(bool onOff);
602  bool  initialDenseFactorization() const;
603  /** Return sequence In or Out */
604  inline int sequenceIn() const {
605    return sequenceIn_;
606  }
607  inline int sequenceOut() const {
608    return sequenceOut_;
609  }
610  /** Set sequenceIn or Out */
611  inline void  setSequenceIn(int sequence) {
612    sequenceIn_ = sequence;
613  }
614  inline void  setSequenceOut(int sequence) {
615    sequenceOut_ = sequence;
616  }
617#if 0
618  /** Return sequenceInternal In or Out */
619  inline int sequenceInternalIn() const {
620    return sequenceInternalIn_;
621  }
622  inline int sequenceInternalOut() const {
623    return sequenceInternalOut_;
624  }
625  /** Set sequenceInternalIn or Out */
626  inline void  setSequenceInternalIn(int sequence) {
627    sequenceInternalIn_ = sequence;
628  }
629  inline void  setSequenceInternalOut(int sequence) {
630    sequenceInternalOut_ = sequence;
631  }
632#endif
633  /// Returns 1 if sequence indicates column
634  inline int isColumn(int sequence) const {
635    return sequence >= maximumAbcNumberRows_ ? 1 : 0;
636  }
637  /// Returns sequence number within section
638  inline int sequenceWithin(int sequence) const {
639    return sequence < maximumAbcNumberRows_ ? sequence : sequence - maximumAbcNumberRows_;
640  }
641  /// Current/last pivot row (set after END of choosing pivot row in dual)
642  inline int lastPivotRow() const
643  { return lastPivotRow_;}
644  /// First Free_
645  inline int firstFree() const
646  { return firstFree_;}
647  /// Last firstFree_
648  inline int lastFirstFree() const
649  { return lastFirstFree_;}
650  /// Free chosen vector
651  inline int freeSequenceIn() const
652  { return freeSequenceIn_;}
653  /// Acceptable pivot for this iteration
654  inline double currentAcceptablePivot() const
655  { return currentAcceptablePivot_;}
656#ifdef PAN
657  /** Returns
658      1 if fake superbasic
659      0 if free or true superbasic
660      -1 if was fake but has cleaned itself up (sets status)
661      -2 if wasn't fake
662   */
663  inline int fakeSuperBasic(int iSequence) {
664    if ((internalStatus_[iSequence]&7)==4)
665      return 0; // free
666    if ((internalStatus_[iSequence]&7)!=5)
667      return -2;
668    double value=abcSolution_[iSequence];
669    if (value<abcLower_[iSequence]+primalTolerance_) {
670      if(abcDj_[iSequence]>=-currentDualTolerance_) {
671        setInternalStatus(iSequence,atLowerBound);
672#if PRINT_PAN>1
673        printf("Pansetting %d to lb\n",iSequence);
674#endif
675        return -1;
676      } else {
677        return 1;
678      }
679    } else if (value>abcUpper_[iSequence]-primalTolerance_) {
680      if (abcDj_[iSequence]<=currentDualTolerance_) {
681        setInternalStatus(iSequence,atUpperBound);
682#if PRINT_PAN>1
683        printf("Pansetting %d to ub\n",iSequence);
684#endif
685        return -1;
686      } else {
687        return 1;
688      }
689    } else {
690      return 0;
691    }
692  }
693#endif
694  /// Return row or column values
695  inline double solution(int sequence) {
696    return abcSolution_[sequence];
697  }
698  /// Return address of row or column values
699  inline double & solutionAddress(int sequence) {
700    return abcSolution_[sequence];
701  }
702  inline double reducedCost(int sequence) {
703    return abcDj_[sequence];
704  }
705  inline double & reducedCostAddress(int sequence) {
706    return abcDj_[sequence];
707  }
708  inline double lower(int sequence) {
709    return abcLower_[sequence];
710  }
711  /// Return address of row or column lower bound
712  inline double & lowerAddress(int sequence) {
713    return abcLower_[sequence];
714  }
715  inline double upper(int sequence) {
716    return abcUpper_[sequence];
717  }
718  /// Return address of row or column upper bound
719  inline double & upperAddress(int sequence) {
720    return abcUpper_[sequence];
721  }
722  inline double cost(int sequence) {
723    return abcCost_[sequence];
724  }
725  /// Return address of row or column cost
726  inline double & costAddress(int sequence) {
727    return abcCost_[sequence];
728  }
729  /// Return original lower bound
730  inline double originalLower(int iSequence) const {
731    if (iSequence < numberColumns_) return columnLower_[iSequence];
732    else
733      return rowLower_[iSequence-numberColumns_];
734  }
735  /// Return original lower bound
736  inline double originalUpper(int iSequence) const {
737    if (iSequence < numberColumns_) return columnUpper_[iSequence];
738    else
739      return rowUpper_[iSequence-numberColumns_];
740  }
741  /// For dealing with all issues of cycling etc
742  inline AbcSimplexProgress * abcProgress()
743  { return &abcProgress_;}
744public:
745  /** Clears an array and says available (-1 does all)
746      when no possibility of going parallel */
747  inline void clearArraysPublic(int which)
748  { clearArrays(which);}
749  /** Returns first available empty array (and sets flag)
750      when no possibility of going parallel */
751  inline int getAvailableArrayPublic() const
752  { return getAvailableArray();}
753#if ABC_PARALLEL
754  /// get parallel mode
755  inline int parallelMode() const
756  { return parallelMode_;}
757  /// set parallel mode
758  inline void setParallelMode(int value)
759  { parallelMode_=value;}
760  /// Number of cpus
761  inline int numberCpus() const
762  { return parallelMode_+1;}
763#if ABC_PARALLEL==1
764  /// set stop start
765  inline void setStopStart(int value)
766  { stopStart_=value;}
767#endif
768#endif
769  //protected:
770  /// Clears an array and says available (-1 does all)
771  void clearArrays(int which);
772  /// Clears an array and says available
773  void clearArrays(CoinPartitionedVector * which);
774  /// Returns first available empty array (and sets flag)
775  int getAvailableArray() const;
776  /// Say array going to be used
777  inline void setUsedArray(int which) const 
778  {int check=1<<which;assert ((stateOfProblem_&check)==0);stateOfProblem_|=check;}
779  /// Say array going available
780  inline void setAvailableArray(int which) const
781  {int check=1<<which;assert ((stateOfProblem_&check)!=0);
782    assert (!usefulArray_[which].getNumElements());stateOfProblem_&=~check;}
783  /// Swaps primal stuff
784  void swapPrimalStuff();
785  /// Swaps dual stuff
786  void swapDualStuff(int lastSequenceOut,int lastDirectionOut);
787protected:
788  //@}
789  /**@name status methods */
790  //@{
791  /// Swaps two variables and does status
792  void swap(int pivotRow,int nonBasicPosition,Status newStatus);
793  inline void setFakeBound(int sequence, FakeBound fakeBound) {
794    unsigned char & st_byte = internalStatus_[sequence];
795    st_byte = static_cast<unsigned char>(st_byte & ~24);
796    st_byte = static_cast<unsigned char>(st_byte | (fakeBound << 3));
797  }
798  inline FakeBound getFakeBound(int sequence) const {
799    return static_cast<FakeBound> ((internalStatus_[sequence] >> 3) & 3);
800  }
801  bool atFakeBound(int sequence) const;
802  inline void setPivoted( int sequence) {
803    internalStatus_[sequence] = static_cast<unsigned char>(internalStatus_[sequence] | 32);
804  }
805  inline void clearPivoted( int sequence) {
806    internalStatus_[sequence] = static_cast<unsigned char>(internalStatus_[sequence] & ~32);
807  }
808  inline bool pivoted(int sequence) const {
809    return (((internalStatus_[sequence] >> 5) & 1) != 0);
810  }
811public:
812  /// Swaps two variables
813  void swap(int pivotRow,int nonBasicPosition);
814  /// To flag a variable
815  void setFlagged( int sequence);
816  inline void clearFlagged( int sequence) {
817    internalStatus_[sequence] = static_cast<unsigned char>(internalStatus_[sequence] & ~64);
818  }
819  inline bool flagged(int sequence) const {
820    return ((internalStatus_[sequence] & 64) != 0);
821  }
822protected:
823  /// To say row active in primal pivot row choice
824  inline void setActive( int iRow) {
825    internalStatus_[iRow] = static_cast<unsigned char>(internalStatus_[iRow] | 128);
826  }
827  inline void clearActive( int iRow) {
828    internalStatus_[iRow] = static_cast<unsigned char>(internalStatus_[iRow] & ~128);
829  }
830  inline bool active(int iRow) const {
831    return ((internalStatus_[iRow] & 128) != 0);
832  }
833public:
834  /** Set up status array (can be used by OsiAbc).
835      Also can be used to set up all slack basis */
836  void createStatus() ;
837  /// Does sort of crash
838  void crash(int type);
839  /** Puts more stuff in basis
840      1 bit set - do even if basis exists
841      2 bit set - don't bother staying triangular
842   */
843  void putStuffInBasis(int type);
844  /** Sets up all slack basis and resets solution to
845      as it was after initial load or readMps */
846  void allSlackBasis();
847  /// For debug - check pivotVariable consistent
848  void checkConsistentPivots() const;
849  /// Print stuff
850  void printStuff() const;
851  /// Common bits of coding for dual and primal
852  int startup(int ifValuesPass);
853 
854  /// Raw objective value (so always minimize in primal)
855  inline double rawObjectiveValue() const {
856    return objectiveValue_;
857  }
858  /// Compute objective value from solution and put in objectiveValue_
859  void computeObjectiveValue(bool useWorkingSolution = false);
860  /// Compute minimization objective value from internal solution without perturbation
861  double computeInternalObjectiveValue();
862  /// Move status and solution across
863  void moveInfo(const AbcSimplex & rhs, bool justStatus = false);
864#define NUMBER_THREADS 3
865#if ABC_PARALLEL==1
866  // For waking up thread
867  inline pthread_mutex_t * mutexPointer(int which,int thread=0) 
868  { return mutex_+which+3*thread;}
869  inline pthread_barrier_t * barrierPointer() 
870  { return &barrier_;}
871  inline int whichLocked(int thread=0) const
872  { return locked_[thread];}
873  inline CoinAbcThreadInfo * threadInfoPointer(int thread=0) 
874  { return threadInfo_+thread;}
875  void startParallelStuff(int type);
876  int stopParallelStuff(int type);
877  /// so thread can find out which one it is
878  int whichThread() const; 
879#elif ABC_PARALLEL==2
880  //inline CoinAbcThreadInfo * threadInfoPointer(int thread=0)
881  //{ return threadInfo_+thread;}
882#endif
883  //@}
884 
885  //-------------------------------------------------------------------------
886  /**@name Changing bounds on variables and constraints */
887  //@{
888  /** Set an objective function coefficient */
889  void setObjectiveCoefficient( int elementIndex, double elementValue );
890  /** Set an objective function coefficient */
891  inline void setObjCoeff( int elementIndex, double elementValue ) {
892    setObjectiveCoefficient( elementIndex, elementValue);
893  }
894 
895  /** Set a single column lower bound<br>
896      Use -DBL_MAX for -infinity. */
897  void setColumnLower( int elementIndex, double elementValue );
898 
899  /** Set a single column upper bound<br>
900      Use DBL_MAX for infinity. */
901  void setColumnUpper( int elementIndex, double elementValue );
902 
903  /** Set a single column lower and upper bound */
904  void setColumnBounds( int elementIndex,
905                        double lower, double upper );
906 
907  /** Set the bounds on a number of columns simultaneously<br>
908      The default implementation just invokes setColLower() and
909      setColUpper() over and over again.
910      @param indexFirst,indexLast pointers to the beginning and after the
911      end of the array of the indices of the variables whose
912      <em>either</em> bound changes
913      @param boundList the new lower/upper bound pairs for the variables
914  */
915  void setColumnSetBounds(const int* indexFirst,
916                          const int* indexLast,
917                          const double* boundList);
918 
919  /** Set a single column lower bound<br>
920      Use -DBL_MAX for -infinity. */
921  inline void setColLower( int elementIndex, double elementValue ) {
922    setColumnLower(elementIndex, elementValue);
923  }
924  /** Set a single column upper bound<br>
925      Use DBL_MAX for infinity. */
926  inline void setColUpper( int elementIndex, double elementValue ) {
927    setColumnUpper(elementIndex, elementValue);
928  }
929 
930  /** Set a single column lower and upper bound */
931  inline void setColBounds( int elementIndex,
932                            double newlower, double newupper ) {
933    setColumnBounds(elementIndex, newlower, newupper);
934  }
935 
936  /** Set the bounds on a number of columns simultaneously<br>
937      @param indexFirst,indexLast pointers to the beginning and after the
938      end of the array of the indices of the variables whose
939      <em>either</em> bound changes
940      @param boundList the new lower/upper bound pairs for the variables
941  */
942  inline void setColSetBounds(const int* indexFirst,
943                              const int* indexLast,
944                              const double* boundList) {
945    setColumnSetBounds(indexFirst, indexLast, boundList);
946  }
947 
948  /** Set a single row lower bound<br>
949      Use -DBL_MAX for -infinity. */
950  void setRowLower( int elementIndex, double elementValue );
951 
952  /** Set a single row upper bound<br>
953      Use DBL_MAX for infinity. */
954  void setRowUpper( int elementIndex, double elementValue ) ;
955 
956  /** Set a single row lower and upper bound */
957  void setRowBounds( int elementIndex,
958                     double lower, double upper ) ;
959 
960  /** Set the bounds on a number of rows simultaneously<br>
961      @param indexFirst,indexLast pointers to the beginning and after the
962      end of the array of the indices of the constraints whose
963      <em>either</em> bound changes
964      @param boundList the new lower/upper bound pairs for the constraints
965  */
966  void setRowSetBounds(const int* indexFirst,
967                       const int* indexLast,
968                       const double* boundList);
969  /// Resizes rim part of model
970  void resize (int newNumberRows, int newNumberColumns);
971 
972  //@}
973 
974  ////////////////// data //////////////////
975protected:
976 
977  /**@name data.  Many arrays have a row part and a column part.
978     There is a single array with both - columns then rows and
979     then normally two arrays pointing to rows and columns.  The
980     single array is the owner of memory
981  */
982  //@{
983  /// Sum of nonbasic costs
984  double sumNonBasicCosts_;
985  /// Sum of costs (raw objective value)
986  double rawObjectiveValue_;
987  /// Objective offset (from offset_)
988  double objectiveOffset_;
989  /**  Perturbation factor
990       If <0.0 then virtual
991       if 0.0 none
992       if >0.0 use this as factor */
993  double perturbationFactor_;
994  /// Current dualTolerance (will end up as dualTolerance_)
995  double currentDualTolerance_;
996  /// Current dualBound (will end up as dualBound_)
997  double currentDualBound_;
998  /// Largest gap
999  double largestGap_;
1000  /// Last dual bound
1001  double lastDualBound_;
1002  /// Sum of infeasibilities when using fake perturbation tolerance
1003  double sumFakeInfeasibilities_;
1004  /// Last primal error
1005  double lastPrimalError_;
1006  /// Last dual error
1007  double lastDualError_;
1008  /// Acceptable pivot for this iteration
1009  double currentAcceptablePivot_;
1010  /// Movement of variable
1011  double movement_;
1012  /// Objective change
1013  double objectiveChange_;
1014  /// Btran alpha
1015  double btranAlpha_;
1016  /// FT alpha
1017#ifdef ABC_LONG_FACTORIZATION
1018  long
1019#endif
1020  double ftAlpha_;
1021  /// Minimum theta movement
1022  double minimumThetaMovement_;
1023  /// Initial sum of infeasibilities
1024  double initialSumInfeasibilities_;
1025public:
1026  /// Where we are in iteration
1027  int stateOfIteration_;
1028protected:
1029  /// Last firstFree_
1030  int lastFirstFree_;
1031  /// Free chosen vector
1032  int freeSequenceIn_;
1033  /// Maximum number rows
1034  int maximumAbcNumberRows_;
1035  /// Maximum number columns
1036  int maximumAbcNumberColumns_;
1037  /// Maximum numberTotal
1038  int maximumNumberTotal_;
1039  /// Current number of variables flagged
1040  int numberFlagged_;
1041  /// Iteration at which to do relaxed dualColumn
1042  int normalDualColumnIteration_;
1043  /** State of dual waffle
1044      -2 - in initial large tolerance phase
1045      -1 - in medium tolerance phase
1046      n - in correct tolerance phase and thought optimal n times
1047   */
1048  int stateDualColumn_;
1049  /*
1050    May want to put some arrays into struct
1051    Two arrays point to/from external
1052    Order is basic,unused basic, at lower, at upper, superbasic, free, fixed with starts
1053  */
1054  /// Number of variables (includes spare rows)
1055  int numberTotal_;
1056  /// Number of variables without fixed to zero (includes spare rows)
1057  int numberTotalWithoutFixed_;
1058  /// Start of variables at lower bound with no upper
1059#define startAtLowerNoOther_ maximumAbcNumberRows_
1060  /// Start of variables at lower bound with upper
1061  int startAtLowerOther_;
1062  /// Start of variables at upper bound with no lower
1063  int startAtUpperNoOther_;
1064  /// Start of variables at upper bound with lower
1065  int startAtUpperOther_;
1066  /// Start of superBasic, free or awkward bounds variables
1067  int startOther_;
1068  /// Start of fixed variables
1069  int startFixed_;
1070#ifdef EARLY_FACTORIZE
1071  /// Number of iterations to try factorizing early
1072  int numberEarly_;
1073#endif
1074  /**
1075     State of problem
1076     State of external arrays
1077     2048 - status OK
1078     4096 - row primal solution OK
1079     8192 - row dual solution OK
1080     16384 - column primal solution OK
1081     32768 - column dual solution OK
1082     65536 - Everything not going smoothly (when smooth we forget about tiny bad djs)
1083     131072 - when increasing rows add a bit
1084     262144 - scale matrix and create new one
1085     524288 - do basis and order
1086     1048576 - just status (and check if order needed)
1087     2097152 - just solution
1088     4194304 - just redo bounds (and offset)
1089     Bottom bits say if usefulArray in use
1090   */
1091#define ALL_STATUS_OK 2048
1092#define ROW_PRIMAL_OK 4096
1093#define ROW_DUAL_OK 8192
1094#define COLUMN_PRIMAL_OK 16384
1095#define COLUMN_DUAL_OK 32768
1096#define PESSIMISTIC 65536
1097#define ADD_A_BIT 131072
1098#define DO_SCALE_AND_MATRIX 262144
1099#define DO_BASIS_AND_ORDER 524288
1100#define DO_STATUS 1048576
1101#define DO_SOLUTION 2097152
1102#define DO_JUST_BOUNDS 0x400000
1103#define NEED_BASIS_SORT 0x800000
1104#define FAKE_SUPERBASIC 0x1000000
1105#define VALUES_PASS 0x2000000
1106#define VALUES_PASS2 0x4000000
1107  mutable int stateOfProblem_;
1108#if ABC_PARALLEL
1109public:
1110  /// parallel mode
1111  int parallelMode_;
1112protected:
1113#endif
1114  /// Number of ordinary (lo/up) in tableau row
1115  int numberOrdinary_;
1116  /// Set to 1 if no free or super basic
1117  int ordinaryVariables_;
1118  /// Number of free nonbasic variables
1119  int numberFreeNonBasic_;
1120  /// Last time cleaned up
1121  int lastCleaned_;
1122  /// Current/last pivot row (set after END of choosing pivot row in dual)
1123  int lastPivotRow_;
1124  /// Nonzero (probably 10) if swapped algorithms
1125  int swappedAlgorithm_;
1126  /// Initial number of infeasibilities
1127  int initialNumberInfeasibilities_;
1128  /// Points from external to internal
1129  //int * fromExternal_;
1130  /// Points from internal to external
1131  //int * toExternal_;
1132  /** Scale from primal external to internal (in external order) Or other way for dual
1133   */
1134  double * scaleFromExternal_;
1135  /** Scale from primal internal to external (in external order) Or other way for dual
1136   */
1137  double * scaleToExternal_;
1138  /// use this instead of columnScale
1139  double * columnUseScale_;
1140  /// use this instead of inverseColumnScale
1141  double * inverseColumnUseScale_;
1142  /** Primal offset (in external order)
1143      So internal value is (external-offset)*scaleFromExternal
1144   */
1145  double * offset_;
1146  /// Offset for accumulated offsets*matrix
1147  double * offsetRhs_;
1148  /// Useful array of numberTotal length
1149  double * tempArray_;
1150  /** Working status
1151      ? may be signed
1152      ? link pi_ to an indexed array?
1153      may have saved from last factorization at end */
1154  unsigned char * internalStatus_;
1155  /// Saved status
1156  unsigned char * internalStatusSaved_;
1157  /** Perturbation (fixed) - is just scaled random numbers
1158      If perturbationFactor_<0 then virtual perturbation */
1159  double * abcPerturbation_;
1160  /// saved perturbation
1161  double * perturbationSaved_;
1162  /// basic perturbation
1163  double * perturbationBasic_;
1164  /// Working matrix
1165  AbcMatrix * abcMatrix_;
1166  /** Working scaled copy of lower bounds
1167      has original scaled copy at end */
1168  double * abcLower_;
1169  /** Working scaled copy of upper bounds
1170      has original scaled copy at end */
1171  double * abcUpper_;
1172  /** Working scaled copy of objective
1173      ? where perturbed copy or can we
1174      always work with perturbed copy (in B&B) if we adjust increments/cutoffs
1175      ? should we save a fixed perturbation offset array
1176      has original scaled copy at end */
1177  double * abcCost_;
1178  /** Working scaled primal solution
1179      may have saved from last factorization at end */
1180  double * abcSolution_;
1181  /** Working scaled dual solution
1182      may have saved from last factorization at end */
1183  double * abcDj_;
1184  /// Saved scaled copy of  lower bounds
1185  double * lowerSaved_;
1186  /// Saved scaled copy of  upper bounds
1187  double * upperSaved_;
1188  /// Saved scaled copy of  objective
1189  double * costSaved_;
1190  /// Saved scaled  primal solution
1191  double * solutionSaved_;
1192  /// Saved scaled  dual solution
1193  double * djSaved_;
1194  /// Working scaled copy of basic lower bounds
1195  double * lowerBasic_;
1196  /// Working scaled copy of basic upper bounds
1197  double * upperBasic_;
1198  /// Working scaled copy of basic objective
1199  double * costBasic_;
1200  /// Working scaled basic primal solution
1201  double * solutionBasic_;
1202  /// Working scaled basic dual solution (want it to be zero)
1203  double * djBasic_;
1204  /// dual row pivot choice
1205  AbcDualRowPivot * abcDualRowPivot_;
1206  /// primal column pivot choice
1207  AbcPrimalColumnPivot * abcPrimalColumnPivot_;
1208  /** Basic variables pivoting on which rows
1209      followed by atLo/atUp then free/superbasic then fixed
1210  */
1211  int * abcPivotVariable_;
1212  /// Reverse abcPivotVariable_ for moving around
1213  int * reversePivotVariable_;
1214  /// factorization
1215  AbcSimplexFactorization * abcFactorization_;
1216#ifdef EARLY_FACTORIZE
1217  /// Alternative factorization
1218  AbcSimplexFactorization * abcEarlyFactorization_;
1219#endif
1220#ifdef TEMPORARY_FACTORIZATION
1221  /// Alternative factorization
1222  AbcSimplexFactorization * abcOtherFactorization_;
1223#endif
1224  /// Saved version of solution
1225  //double * savedSolution_;
1226  /// A copy of model with certain state - normally without cuts
1227  AbcSimplex * abcBaseModel_;
1228  /// A copy of model as ClpSimplex with certain state
1229  ClpSimplex * clpModel_;
1230  /** Very wasteful way of dealing with infeasibilities in primal.
1231      However it will allow non-linearities and use of dual
1232      analysis.  If it doesn't work it can easily be replaced.
1233  */
1234  AbcNonLinearCost * abcNonLinearCost_;
1235  /// Useful arrays (all of row+column+2 length)
1236  /* has secondary offset and counts so row goes first then column
1237     Probably back to CoinPartitionedVector as AbcMatrix has slacks
1238     also says if in use - so we can just get next available one */
1239#define ABC_NUMBER_USEFUL 8
1240  mutable CoinPartitionedVector usefulArray_[ABC_NUMBER_USEFUL];
1241  /// For dealing with all issues of cycling etc
1242  AbcSimplexProgress abcProgress_;
1243  /// For saving stuff at beginning
1244  ClpDataSave saveData_;
1245  /// upper theta from dual column
1246  double upperTheta_;
1247  /// Multiple sequence in
1248  int multipleSequenceIn_[4];
1249public:
1250  int arrayForDualColumn_;
1251  int arrayForReplaceColumn_;
1252  int arrayForFlipBounds_; //2
1253  int arrayForFlipRhs_; // if sequential can re-use
1254  int arrayForBtran_; // 0
1255  int arrayForFtran_; // 1
1256  int arrayForTableauRow_; //3
1257protected:
1258  int numberFlipped_;
1259  int numberDisasters_;
1260  //int nextCleanNonBasicIteration_;
1261#if ABC_PARALLEL==1
1262  // For waking up thread
1263  pthread_mutex_t mutex_[3*NUMBER_THREADS];
1264  pthread_barrier_t barrier_; 
1265  CoinAbcThreadInfo threadInfo_[NUMBER_THREADS];
1266  pthread_t abcThread_[NUMBER_THREADS];
1267  int locked_[NUMBER_THREADS];
1268  int stopStart_;
1269#elif ABC_PARALLEL==2
1270  //CoinAbcThreadInfo threadInfo_[NUMBER_THREADS];
1271#endif
1272  //@}
1273};
1274//#############################################################################
1275/** A function that tests the methods in the AbcSimplex class. The
1276    only reason for it not to be a member method is that this way it doesn't
1277    have to be compiled into the library. And that's a gain, because the
1278    library should be compiled with optimization on, but this method should be
1279    compiled with debugging.
1280   
1281    It also does some testing of AbcSimplexFactorization class
1282*/
1283void
1284AbcSimplexUnitTest(const std::string & mpsDir);
1285#endif
Note: See TracBrowser for help on using the repository browser.