limp 0.3.2.2 → 0.3.2.3
raw patch · 4 files changed
+54/−9 lines, 4 filesdep ~QuickCheckdep ~containersdep ~tastyPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: QuickCheck, containers, tasty, tasty-quickcheck
API changes (from Hackage documentation)
- Numeric.Limp.Program.Constraint: instance Data.Semigroup.Semigroup (Numeric.Limp.Program.Constraint.Constraint z r c)
- Numeric.Limp.Rep.Rep: instance (GHC.Classes.Ord z, GHC.Classes.Ord r) => Data.Semigroup.Semigroup (Numeric.Limp.Rep.Rep.Assignment z r c)
+ Numeric.Limp.Program.Constraint: infix 4 :!
+ Numeric.Limp.Program.Constraint: infix 5 :>
+ Numeric.Limp.Program.Constraint: infixr 3 :&&
+ Numeric.Limp.Program.Constraint: instance GHC.Base.Semigroup (Numeric.Limp.Program.Constraint.Constraint z r c)
+ Numeric.Limp.Program.ResultKind: type family KRep (a :: K) :: * -> *
+ Numeric.Limp.Rep.Rep: -- | Real numbers
+ Numeric.Limp.Rep.Rep: instance (GHC.Classes.Ord z, GHC.Classes.Ord r) => GHC.Base.Semigroup (Numeric.Limp.Rep.Rep.Assignment z r c)
- Numeric.Limp.Canon.Constraint: C1 :: (Maybe (R c)) -> (Linear z r c) -> (Maybe (R c)) -> Constraint1 z r c
+ Numeric.Limp.Canon.Constraint: C1 :: Maybe (R c) -> Linear z r c -> Maybe (R c) -> Constraint1 z r c
- Numeric.Limp.Canon.Linear: Linear :: (Map (Either z r) (R c)) -> Linear z r c
+ Numeric.Limp.Canon.Linear: Linear :: Map (Either z r) (R c) -> Linear z r c
- Numeric.Limp.Program.Bounds: BoundR :: (B (R c) r) -> Bounds z r c
+ Numeric.Limp.Program.Bounds: BoundR :: B (R c) r -> Bounds z r c
- Numeric.Limp.Program.Bounds: BoundZ :: (B (Z c) z) -> Bounds z r c
+ Numeric.Limp.Program.Bounds: BoundZ :: B (Z c) z -> Bounds z r c
- Numeric.Limp.Program.Linear: [LR] :: [(Either z r, R c)] -> (R c) -> Linear z r c 'KR
+ Numeric.Limp.Program.Linear: [LR] :: [(Either z r, R c)] -> R c -> Linear z r c 'KR
- Numeric.Limp.Program.Linear: [LZ] :: [(z, Z c)] -> (Z c) -> Linear z r c 'KZ
+ Numeric.Limp.Program.Linear: [LZ] :: [(z, Z c)] -> Z c -> Linear z r c 'KZ
- Numeric.Limp.Program.ResultKind: [LR] :: [(Either z r, R c)] -> (R c) -> Linear z r c 'KR
+ Numeric.Limp.Program.ResultKind: [LR] :: [(Either z r, R c)] -> R c -> Linear z r c 'KR
- Numeric.Limp.Program.ResultKind: [LZ] :: [(z, Z c)] -> (Z c) -> Linear z r c 'KZ
+ Numeric.Limp.Program.ResultKind: [LZ] :: [(z, Z c)] -> Z c -> Linear z r c 'KZ
- Numeric.Limp.Rep.Rep: Assignment :: (Map z (Z c)) -> (Map r (R c)) -> Assignment z r c
+ Numeric.Limp.Rep.Rep: Assignment :: Map z (Z c) -> Map r (R c) -> Assignment z r c
- Numeric.Limp.Solve.Simplex.Maps: Progress :: (Standard z r c) -> IterateResult z r c
+ Numeric.Limp.Solve.Simplex.Maps: Progress :: Standard z r c -> IterateResult z r c
- Numeric.Limp.Solve.Simplex.Maps: assignmentAll :: (Rep c) => Standard z r c -> (Map (StandardVar z r) (R c), R c)
+ Numeric.Limp.Solve.Simplex.Maps: assignmentAll :: Rep c => Standard z r c -> (Map (StandardVar z r) (R c), R c)
- Numeric.Limp.Solve.Simplex.StandardForm: SV :: (Either z r) -> StandardVar z r
+ Numeric.Limp.Solve.Simplex.StandardForm: SV :: Either z r -> StandardVar z r
- Numeric.Limp.Solve.Simplex.StandardForm: SVLower :: (Either z r) -> StandardVar z r
+ Numeric.Limp.Solve.Simplex.StandardForm: SVLower :: Either z r -> StandardVar z r
- Numeric.Limp.Solve.Simplex.StandardForm: SVNeg :: (Either z r) -> StandardVar z r
+ Numeric.Limp.Solve.Simplex.StandardForm: SVNeg :: Either z r -> StandardVar z r
- Numeric.Limp.Solve.Simplex.StandardForm: SVPos :: (Either z r) -> StandardVar z r
+ Numeric.Limp.Solve.Simplex.StandardForm: SVPos :: Either z r -> StandardVar z r
Files
- README.md +10/−0
- changelog +30/−0
- limp.cabal +12/−8
- src/Numeric/Limp/Canon/Pretty.hs +2/−1
+ README.md view
@@ -0,0 +1,10 @@+limp+====++This package provides two representations for linear programs: "Numeric.Limp.Program", which is what I expect end-users to use, and+"Numeric.Limp.Canon", which is simpler, but would be less nice for writing linear programs.+You can convert programs from the Program representation to the Canon representation using "Numeric.Limp.Canon.Convert", and then pretty-print the program using "Numeric.Limp.Canon.Pretty".++There is a very simple branch-and-bound solver in "Numeric.Limp.Solve.Branch.Simple", and a simplex solver for relaxed (real only) programs in "Numeric.Limp.Solve.Simplex.Maps".+See the limp-cbc package for a simple external solver.+
+ changelog view
@@ -0,0 +1,30 @@+0.3.2.3, 2018/11/13:+ * Fix pretty-printing bug: printed programs did not include final 'End' line, so cbc could not parse the programs+ * Relax the upper bound for containers dependency (contributed by @fumieval)+ * Update test dependencies+ * Update package description++0.3.2.2, 2018/06/04:+ * Build -Wall clean with GHC 8.4.3+ * Relax the upper bound for base dependency+ * Add missing semigroup instances (contributed by @fumieval)++0.3.2.1, 2015/07/21:+ * Naive implementations of two solving algorithms:+ * Branch-and-bound algorithm for mixed programs+ * Simplex algorithm for relaxed (real) programs+ * Add tests to package description++0.3.2.0, 2014/11/02:+ * Error handling for simplifier++0.3.1.0, 2014/09/19:+ * Simplifier for Canon programs+ * Pretty-printer for Canon programs++0.3.0.0, 2014/09/03:+ * Simplify Canonical representation+ * Add evaluator for Program representation++0.1.0.0, 2014/06/04:+ * Initial release
limp.cabal view
@@ -1,10 +1,13 @@ name: limp-version: 0.3.2.2+version: 0.3.2.3 synopsis: representation of Integer Linear Programs-description: so far, this package just provides two representations for linear programs: "Numeric.Limp.Program", which is what I expect end-users to use, and+description: This package provides two representations for linear programs: "Numeric.Limp.Program", which is what I expect end-users to use, and "Numeric.Limp.Canon", which is simpler, but would be less nice for writing linear programs.- see the limp-cbc package for a simple solver.+ You can convert programs from the Program representation to the Canon representation using "Numeric.Limp.Canon.Convert", and then pretty-print the program using "Numeric.Limp.Canon.Pretty". + There is a very simple branch-and-bound solver in "Numeric.Limp.Solve.Branch.Simple", and a simplex solver for relaxed (real only) programs in "Numeric.Limp.Solve.Simplex.Maps".+ See the limp-cbc package for a simple external solver.+ license: MIT license-file: LICENSE author: Amos Robinson@@ -13,6 +16,7 @@ build-type: Simple cabal-version: >=1.10 homepage: https://github.com/amosr/limp+extra-source-files: README.md changelog source-repository head@@ -54,7 +58,7 @@ build-depends: base >= 4.9 && < 5,- containers == 0.5.*+ containers >= 0.5 && < 0.7 ghc-options: -Wall -fno-warn-orphans default-language: Haskell2010@@ -76,11 +80,11 @@ Simplify build-depends: base < 5,- containers == 0.5.*,- tasty == 0.10.*,+ containers >= 0.5 && < 0.7,+ tasty, tasty-th == 0.1.*,- tasty-quickcheck == 0.8.*,- QuickCheck == 2.7.*,+ tasty-quickcheck >= 0.8,+ QuickCheck, limp default-language: Haskell2010
src/Numeric/Limp/Canon/Pretty.hs view
@@ -21,7 +21,8 @@ , "Bounds" , pprBs $ _bounds p , "Generals"- , pprGs $ varsOfProgram p ]+ , pprGs $ varsOfProgram p+ , "End" ] where indent = ("\t"++)