Skip to content

Commit

Permalink
Rename Linaer.Simplex.Simplex to Linear.Simplex.Solver.TwoPhase
Browse files Browse the repository at this point in the history
+ I like this name better
+ Allows for alternative solvers
  • Loading branch information
rasheedja committed Nov 24, 2023
1 parent ebd2099 commit af6e364
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Quick Overview

The `Linear.Simplex.Simplex` module contain both phases of the simplex method.
The `Linear.Simplex.Solver.TwoPhase` module contain both phases of the two-phase simplex method.

### Phase One

Expand Down
2 changes: 1 addition & 1 deletion simplex-method.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ source-repository head
library
exposed-modules:
Linear.Simplex.Prettify
Linear.Simplex.Simplex
Linear.Simplex.Solver.TwoPhase
Linear.Simplex.Types
Linear.Simplex.Util
other-modules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- |
-- Module : Linear.Simplex.Simplex
-- Module : Linear.Simplex.Simplex.TwoPhase
-- Description : Implements the twoPhaseSimplex method
-- Copyright : (c) Junaid Rasheed, 2020-2022
-- License : BSD-3
Expand All @@ -10,7 +10,7 @@
-- 'findFeasibleSolution' performs phase one of the two-phase simplex method.
-- 'optimizeFeasibleSystem' performs phase two of the two-phase simplex method.
-- 'twoPhaseSimplex' performs both phases of the two-phase simplex method.
module Linear.Simplex.Simplex (findFeasibleSolution, optimizeFeasibleSystem, twoPhaseSimplex) where
module Linear.Simplex.Solver.TwoPhase (findFeasibleSolution, optimizeFeasibleSystem, twoPhaseSimplex) where

import Prelude hiding (EQ)

Expand Down
2 changes: 1 addition & 1 deletion src/Linear/Simplex/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tableauInDictionaryForm =

-- | If this function is given 'Nothing', return 'Nothing'.
-- Otherwise, we 'lookup' the 'Integer' given in the first item of the pair in the map given in the second item of the pair.
-- This is typically used to extract the value of the 'ObjectiveFunction' after calling 'Linear.Simplex.Simplex.twoPhaseSimplex'.
-- This is typically used to extract the value of the 'ObjectiveFunction' after calling 'Linear.Simplex.Solver.TwoPhase.twoPhaseSimplex'.
extractObjectiveValue :: Maybe Result -> Maybe SimplexNum
extractObjectiveValue = fmap $ \result ->
case Map.lookup result.objectiveVar result.varValMap of
Expand Down
2 changes: 1 addition & 1 deletion test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Control.Monad.IO.Class
import Control.Monad.Logger

import Linear.Simplex.Prettify
import Linear.Simplex.Simplex
import Linear.Simplex.Solver.TwoPhase
import Linear.Simplex.Types
import Linear.Simplex.Util

Expand Down

0 comments on commit af6e364

Please sign in to comment.