You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'findFeasibleSolution' performs phase one of the two-phase simplex method.
11
+
'optimizeFeasibleSystem' performs phase two of the two-phase simplex method.
12
+
'twoPhaseSimplex' performs both phases of the two-phase simplex method.
13
+
-}
13
14
moduleLinear.Simplex.Simplex (findFeasibleSolution, optimizeFeasibleSystem, twoPhaseSimplex) where
14
15
15
16
importData.Bifunctor
@@ -24,10 +25,11 @@ import Prelude hiding (EQ)
24
25
25
26
trace s a = a
26
27
27
-
--| Find a feasible solution for the given system of 'PolyConstraint's by performing the first phase of the two-phase simplex method
28
-
-- All 'Integer' variables in the 'PolyConstraint' must be positive.
29
-
-- If the system is infeasible, return 'Nothing'
30
-
-- Otherwise, return the feasible system in 'DictionaryForm' as well as a list of slack variables, a list artificial variables, and the objective variable.
28
+
{- | Find a feasible solution for the given system of 'PolyConstraint's by performing the first phase of the two-phase simplex method
29
+
All 'Integer' variables in the 'PolyConstraint' must be positive.
30
+
If the system is infeasible, return 'Nothing'
31
+
Otherwise, return the feasible system in 'DictionaryForm' as well as a list of slack variables, a list artificial variables, and the objective variable.
r =ifnull rationalConstant then0else (snd.head) rationalConstant -- If there is no rational constant found in the right side, the rational constant is 0.
134
138
135
-
--| If this function is given 'Nothing', return 'Nothing'.
136
-
-- Otherwise, we 'lookup' the 'Integer' given in the first item of the pair in the map given in the second item of the pair.
137
-
-- This is typically used to extract the value of the 'ObjectiveFunction' after calling 'Linear.Simplex.Simplex.twoPhaseSimplex'.
139
+
{- | If this function is given 'Nothing', return 'Nothing'.
140
+
Otherwise, we 'lookup' the 'Integer' given in the first item of the pair in the map given in the second item of the pair.
141
+
This is typically used to extract the value of the 'ObjectiveFunction' after calling 'Linear.Simplex.Simplex.twoPhaseSimplex'.
0 commit comments