Skip to content

Commit

Permalink
Merge pull request #7 from msakai/feature/re-export-default
Browse files Browse the repository at this point in the history
re-export Default class from Numeric.Optimization.MIP
  • Loading branch information
msakai committed Dec 26, 2020
2 parents f557d36 + f736d16 commit 80587ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion MIP-glpk/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ tests:
dependencies:
- MIP-glpk
- async
- data-default-class
- tasty >=0.10.1
- tasty-hunit >=0.9 && <0.11
- tasty-quickcheck >=0.8 && <0.11
Expand Down
13 changes: 6 additions & 7 deletions MIP-glpk/test/TestSuite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Main where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad
import Data.Default.Class
import qualified Data.Map as Map
import Test.Tasty
import Test.Tasty.HUnit
Expand All @@ -21,8 +20,8 @@ import Numeric.Optimization.MIP.Solver.GLPK

case_glpk :: Assertion
case_glpk = do
prob <- MIP.readFile def "samples/lp/test.lp"
sol <- solve glpk def prob
prob <- MIP.readFile MIP.def "samples/lp/test.lp"
sol <- solve glpk MIP.def prob
sol @?=
MIP.Solution
{ MIP.solStatus = MIP.StatusOptimal
Expand All @@ -32,8 +31,8 @@ case_glpk = do

case_glpk_unbounded :: Assertion
case_glpk_unbounded = do
prob <- MIP.readFile def "samples/lp/unbounded-ip.lp"
sol <- solve glpk def prob
prob <- MIP.readFile MIP.def "samples/lp/unbounded-ip.lp"
sol <- solve glpk MIP.def prob
let status = MIP.solStatus sol
unless (status == MIP.StatusUnbounded || status == MIP.StatusFeasible || status == MIP.StatusInfeasibleOrUnbounded) $
assertFailure $ unlines $
Expand All @@ -43,8 +42,8 @@ case_glpk_unbounded = do

case_glpk_infeasible :: Assertion
case_glpk_infeasible = do
prob <- MIP.readFile def "samples/lp/infeasible.lp"
sol <- solve glpk def prob
prob <- MIP.readFile MIP.def "samples/lp/infeasible.lp"
sol <- solve glpk MIP.def prob
MIP.solStatus sol @?= MIP.StatusInfeasible

-- ------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions MIP/src/Numeric/Optimization/MIP/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module Numeric.Optimization.MIP.Base
, FileOptions (..)

-- * Utilities
, Default (..)
, Variables (..)
, intersectBounds
) where
Expand Down

0 comments on commit 80587ed

Please sign in to comment.