Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvanbalen committed Apr 9, 2024
1 parent d4d36c6 commit c92f26b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import qualified Debug.Trace

instance (MakesILP op, MIP.IsSolver s IO) => ILPSolver s op where
solve :: s -> ILP op -> IO (Maybe (Solution op))
solve s (ILP dir obj constr bnds n) = makeSolution names . addZeroes <$> MIP.solve s options problem
solve s (ILP dir obj constr bnds n) = makeSolution names . addZeroes problem <$> MIP.solve s options problem
where
options = MIP.SolveOptions{ MIP.solveTimeLimit = Just 60
, MIP.solveLogger = const (pure ()) --putStrLn . ("AccILPSolver: " ++)
Expand All @@ -62,9 +62,9 @@ instance (MakesILP op, MIP.IsSolver s IO) => ILPSolver s op where


addZeroes :: MIP.Problem Scientific -> MIP.Solution Scientific -> MIP.Solution Scientific
addZeroes problem (Solution stat obj solmap) =
addZeroes problem (MIP.Solution stat obj solmap) =

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | ubuntu-latest-x64 ghc-9.4 release

This binding for ‘problem’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | ubuntu-latest-x64 ghc-9.4 release

This binding for ‘obj’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | ubuntu-latest-x64 ghc-9.4 debug

This binding for ‘problem’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | ubuntu-latest-x64 ghc-9.4 debug

This binding for ‘obj’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | macOS-latest-x64 ghc-9.4 debug

This binding for ‘problem’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | macOS-latest-x64 ghc-9.4 debug

This binding for ‘obj’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | macOS-latest-x64 ghc-9.4 release

This binding for ‘problem’ shadows the existing binding

Check warning on line 65 in src/Data/Array/Accelerate/Trafo/Partitioning/ILP/MIP.hs

View workflow job for this annotation

GitHub Actions / cabal | macOS-latest-x64 ghc-9.4 release

This binding for ‘obj’ shadows the existing binding
-- Map.union is left-biased: only values not present in the solution are added.
Solution stat obj $ Map.union solmap (Map.fromSet (const 0) (vars problem))
MIP.Solution stat obj $ M.union solmap (M.fromSet (const 0) (vars problem))

-- MIP has a Num instance for expressions, but it's scary (because
-- you can't guarantee linearity with arbitrary multiplications).
Expand Down

0 comments on commit c92f26b

Please sign in to comment.