-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial refactor - much better types (#9)
* Initial refactor - much better types + Use types which are way clearer + Some docs + Use lens where they make things easier + New types required quite a significant factor of the codebase + Cleanup + Further refactoring/polishing + I want type names to reflect those typically used when talking about simplex methods + But first, I need to learn what the actual terms are + I'd also like to simplify a lot of these functions + The refactor has made it easier for me to think about these functions, which makes it easier to simplify them * Run formatter * `FeasibleSystem` instances * Re-add stack * (wip) fix pivoting issues * Switch CI to stack * Use stack to build haddocks * Run formatter * Matrix test windows and macos * Remove ghc 8.10 from CI * Make CI fail when tests fail * Run formatter * Fix broken tests + test10 was broken due to an LLM sneakily adding extra constraints and changing objective + testQuickCheck1/2 were broken because the constraints were built using `Map.fromList` with duplicate keys + only one of the key values were used, others were ignored * polishing * Lens getters -> RecordDot getters * Add logging, improve docs, more tests, handle edge cases + Control.Monad.Logger used for logging + Documented various functions + Handled some edge cases which shouldn't be possible (and log warnings/errors when we reach these edge cases) * fixme * Improve logging * Fourmolu upgrade: limit lines to 120 chars * Upgrade fourmolu action, specify fourmolu version * Bump package version * Bump lts * some helper functions * Rename Linaer.Simplex.Simplex to Linear.Simplex.Solver.TwoPhase + I like this name better + Allows for alternative solvers * Fix caching + I was using the cabal plan as a key, now I use stack files/cabal generated files * Update lts * Diagnose caching issues * Try fixing caching * Remove windows from CI + Don't want to spend effor fixing windows caching * Update workflow step labels * Update stack yaml lock * Add windows + caching to ci * Save .stack-work for windows too * Only save when cache is not hit * Update ChangeLog * Update copyright dates
- Loading branch information
Showing
16 changed files
with
1,529 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright Junaid Rasheed (c) 2020-2022 | ||
Copyright Junaid Rasheed (c) 2020-2023 | ||
|
||
All rights reserved. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: simplex-method | ||
version: 0.2.0.0 | ||
github: "rasheedja/simplex-method" | ||
license: BSD3 | ||
author: "Junaid Rasheed" | ||
maintainer: "[email protected]" | ||
copyright: "BSD-3" | ||
|
||
extra-source-files: | ||
- README.md | ||
- ChangeLog.md | ||
|
||
# Metadata used when publishing your package | ||
synopsis: Implementation of the two-phase simplex method in exact rational arithmetic | ||
category: Math, Maths, Mathematics, Optimisation, Optimization, Linear Programming | ||
|
||
# To avoid duplicated efforts in documentation and dealing with the | ||
# complications of embedding Haddock markup inside cabal files, it is | ||
# common to point users to the README.md file. | ||
description: Please see the README on GitHub at <https://github.com/rasheedja/simplex-method#readme> | ||
|
||
dependencies: | ||
- base >= 4.14 && < 5 | ||
- containers >= 0.6.5.1 && < 0.7 | ||
- generic-lens >= 2.2.0 && < 2.3 | ||
- lens >= 5.2.2 && < 5.3 | ||
- monad-logger >= 0.3.40 && < 0.4 | ||
- text >= 2.0.2 && < 2.1 | ||
- time | ||
|
||
default-extensions: | ||
DataKinds | ||
DeriveFunctor | ||
DeriveGeneric | ||
DisambiguateRecordFields | ||
DuplicateRecordFields | ||
FlexibleContexts | ||
LambdaCase | ||
OverloadedLabels | ||
OverloadedRecordDot | ||
OverloadedStrings | ||
RecordWildCards | ||
TemplateHaskell | ||
TupleSections | ||
TypeApplications | ||
NamedFieldPuns | ||
|
||
library: | ||
source-dirs: src | ||
|
||
tests: | ||
simplex-haskell-test: | ||
main: Spec.hs | ||
source-dirs: test | ||
dependencies: | ||
- simplex-method |
Oops, something went wrong.