equal
deleted
inserted
replaced
116 SOLVED = 0, |
116 SOLVED = 0, |
117 ///Any other case (including the case when some user specified limit has been exceeded) |
117 ///Any other case (including the case when some user specified limit has been exceeded) |
118 UNSOLVED = 1 |
118 UNSOLVED = 1 |
119 }; |
119 }; |
120 |
120 |
121 ///\e |
121 ///\e |
122 enum SolutionStatus { |
122 enum SolutionStatus { |
123 ///Feasible solution has'n been found (but may exist). |
123 ///Feasible solution has'n been found (but may exist). |
124 |
124 |
125 ///\todo NOTFOUND might be a better name. |
125 ///\todo NOTFOUND might be a better name. |
126 /// |
126 /// |
135 |
135 |
136 ///\todo Give a feasible solution and an infinite ray (and the |
136 ///\todo Give a feasible solution and an infinite ray (and the |
137 ///corresponding bases) |
137 ///corresponding bases) |
138 INFINITE = 4 |
138 INFINITE = 4 |
139 }; |
139 }; |
|
140 |
|
141 ///\e The type of the investigated LP problem |
|
142 enum Problemtypes { |
|
143 ///Primal-dual feasible |
|
144 PRIMAL_DUAL_FEASIBLE = 0, |
|
145 ///Primal feasible dual infeasible |
|
146 PRIMAL_FEASIBLE_DUAL_INFEASIBLE = 1, |
|
147 ///Primal infeasible dual feasible |
|
148 PRIMAL_INFEASIBLE_DUAL_FEASIBLE = 2, |
|
149 ///Primal-dual infeasible |
|
150 PRIMAL_DUAL_INFEASIBLE = 3, |
|
151 ///Could not determine so far |
|
152 UNKNOWN = 4 |
|
153 }; |
140 |
154 |
141 ///The floating point type used by the solver |
155 ///The floating point type used by the solver |
142 typedef double Value; |
156 typedef double Value; |
143 ///The infinity constant |
157 ///The infinity constant |
144 static const Value INF; |
158 static const Value INF; |
561 // Value const * values ) = 0; |
575 // Value const * values ) = 0; |
562 virtual SolveExitStatus _solve() = 0; |
576 virtual SolveExitStatus _solve() = 0; |
563 virtual Value _getPrimal(int i) = 0; |
577 virtual Value _getPrimal(int i) = 0; |
564 virtual Value _getPrimalValue() = 0; |
578 virtual Value _getPrimalValue() = 0; |
565 virtual SolutionStatus _getPrimalStatus() = 0; |
579 virtual SolutionStatus _getPrimalStatus() = 0; |
|
580 virtual SolutionStatus _getDualStatus() = 0; |
|
581 ///\todo This could be implemented here, too, using _getPrimalStatus() and |
|
582 ///_getDualStatus() |
|
583 virtual ProblemTypes _getProblemType() = 0; |
|
584 |
566 virtual void _setMax() = 0; |
585 virtual void _setMax() = 0; |
567 virtual void _setMin() = 0; |
586 virtual void _setMin() = 0; |
568 |
587 |
569 //Own protected stuff |
588 //Own protected stuff |
570 |
589 |
928 |
947 |
929 ///\name Obtain the solution |
948 ///\name Obtain the solution |
930 |
949 |
931 ///@{ |
950 ///@{ |
932 |
951 |
933 ///\e |
952 /// The status of the primal problem (the original LP problem) |
934 SolutionStatus primalStatus() { |
953 SolutionStatus primalStatus() { |
935 return _getPrimalStatus(); |
954 return _getPrimalStatus(); |
|
955 } |
|
956 |
|
957 /// The status of the dual (of the original LP) problem |
|
958 SolutionStatus dualStatus() { |
|
959 return _getDualStatus(); |
|
960 } |
|
961 |
|
962 ///The type of the original LP problem |
|
963 Problemtypes problemType() { |
|
964 return _getProblemType(); |
936 } |
965 } |
937 |
966 |
938 ///\e |
967 ///\e |
939 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } |
968 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } |
940 |
969 |