Skip to content

Commit

Permalink
Added parameters and changed custom REF inputs (#51)
Browse files Browse the repository at this point in the history
* Resurrected backward REF, added REF join argument

* Fixed #38, moved notes+examples to docs

* Removed log

* Merger 'master' into 'dev' (#44)

* Dev (#39)

* Resurrected backward REF, added REF join argument

* Fixed #38, moved notes+examples to docs

* Removed log

* Updated changelog, bumped version docs conf file

* squash! Dev (#39)

* Removed unused import and useless-else-on-loop

* Updated examples in the paper

* Paper updated. Removed spacing in example bullets

* Paper updated. Added spacing for example bullets

* Add more clear explanation in docs #15

* Remove deque map and swo file

* Update commit vrpy submodule

* Update CHANGELOG for JOSS release

* Patch41 (#45)

* Dev (#39)

* Resurrected backward REF, added REF join argument

* Fixed #38, moved notes+examples to docs

* Removed log

* Updated changelog, bumped version docs conf file

* squash! Dev (#39)

* Removed unused import and useless-else-on-loop

* Updated examples in the paper

* Paper updated. Removed spacing in example bullets

* Paper updated. Added spacing for example bullets

* Add more clear explanation in docs #15

* Remove deque map and swo file

* Add test for issue and fix for some cases of #41

* Uncomment mono directional tests

* Patch43 (#48)

* Dev (#39)

* Resurrected backward REF, added REF join argument

* Fixed #38, moved notes+examples to docs

* Removed log

* Updated changelog, bumped version docs conf file

* squash! Dev (#39)

* Removed unused import and useless-else-on-loop

* Updated examples in the paper

* Paper updated. Removed spacing in example bullets

* Paper updated. Added spacing for example bullets

* Add more clear explanation in docs #15

* Remove deque map and swo file

* Update commit vrpy submodule

* Update CHANGELOG for JOSS release

* Initial redesign (failing unittests)

* Remove duplicate imports

* Refactored by Sourcery (#46)

Co-authored-by: Sourcery AI <bot@sourcery.ai>

* Move bidirectional files to algorithms, some fixes

- Fix some tests: tests_issue20 (broken for parallel), tests_issue38
- Moved random state checks to checking.py

* Fix unit tests! Clean up

* Clean up BiDirectional, add kwargs for custom REFs

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Sourcery AI <bot@sourcery.ai>

* Update README.md

* Revert function in BiDirectional

- Add time limit and threshold parameters
- Add greedy_elimination unit tests (#9)

* Revert to v0.1.1 based fixes

- Clean up in tests
- Update submodule commit

* Remove unused import

* 'Refactored by Sourcery'

* Update path base break using threshold

* Remove search object

* Update tests and docs

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Sourcery AI <bot@sourcery.ai>
Co-authored-by: Sourcery AI <>
  • Loading branch information
3 people committed Jul 31, 2020
1 parent 1fbc7ee commit fba830c
Show file tree
Hide file tree
Showing 25 changed files with 1,300 additions and 992 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

### Added

- New paramenters: `time_limit` and `threshold`.
- Custom REF, backward incompatible change: additional argument for more flexibility. These are the current partial path and the accumulated cost. Note that these are optional and do not have to be used. However, a slight modificiation to the function has to be made, simply add `**kwargs` as well as the existing arguments.

## [v0.1.1] - 21/05/2020

### Changed
- BiDirectional:
- Reverted backward REF as it is required for some problems.
- Added REF join parameter that is required when joining forward and backward labels using custom REFs.
- Moved notes and examples from docstrings to the docs folder.
- Moved notes and examples from docstrings to the docs folder.
- Final JOSS paper changes

## [v0.1.0] - 14/04/2020

### Added
### Added

- BiDirectional:
- Option to chose method for direction selection.
- [vrpy](https://github.com/Kuifje02/vrpy) submodule.

### Changed
### Changed

- BiDirectional:
- Label storage, divided into unprocessed, generated and non-dominated labels
Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![codecov](https://codecov.io/gh/torressa/cspy/branch/master/graph/badge.svg?token=24tyrWinNT)](https://codecov.io/gh/torressa/cspy)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c28f50e92dae4bcc921f1bd142370608)](https://www.codacy.com/app/torressa/cspy?utm_source=github.com&utm_medium=referral&utm_content=torressa/cspy&utm_campaign=Badge_Grade)
[![JOSS badge](https://joss.theoj.org/papers/25eda55801a528b982d03a6a61f7730d/status.svg)](https://joss.theoj.org/papers/25eda55801a528b982d03a6a61f7730d)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cspy)

<!-- [![BCH compliance](https://bettercodehub.com/edge/badge/torressa/cspy?branch=master)](https://bettercodehub.com/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -->
Expand Down Expand Up @@ -67,6 +66,10 @@ python3 -m pip install cspy

### Examples

- [`vrpy`](https://github.com/Kuifje02/vrpy) : External vehicle routing framework which uses `cspy` to solve different variants of the vehicle routing problem using column generation.
- [`cgar`](examples/cgar) : Complex example use of `cspy` in a column generation example applied to the aircraft recovery problem.
- [`jpath`](examples/jpath) : Simple example showing the necessary graph adptations and the use of custom resource extension functions.

The generic gist to run the algorithms on a specific graph is to load the
algorithm of choice, say `alg`, call the `alg.run()` method, and query the
relevant result attributes,
Expand All @@ -75,13 +78,6 @@ relevant result attributes,
- `alg.total_cost` for the accumulated cost of the path;
- `alg.consumed_resources` for the accumulated resource usage of the path.

I have included a few examples:

- [`jpath`](examples/jpath) : Simple example showing the necessary graph adptations and the use of custom resource extension functions.
- [`cgar`](examples/cgar) : Complex example use of `cspy` in a column generation example applied to the aircraft recovery problem.
- [`vrpy`](https://github.com/Kuifje02/vrpy) : (under development) external vehicle routing framework which uses `cspy` to solve different variants of the vehicle routing problem using column generation.


## Running the tests

To run the tests first, clone the repository into a path in your machine `~/path/newfolder` by running
Expand Down Expand Up @@ -124,17 +120,23 @@ After that feel free to send a pull request.

If you have a question or need help, feel free to raise an issue explaining it.

Alternatively, email me at `d.torressanchez@lancs.ac.uk`.
Alternatively, email me at `david.sanchez@sintef.no`.

## Citing

If you'd like to cite this package, please use the following bib format:

```none
@Misc{cspy,
author = {Torres Sanchez, David},
title = {{cspy : A Python package with a collection of algorithms for the (Resource) Constrained Shortest Path problem}},
year = {2019},
url = {\url{https://github.com/torressa/cspy}}
@article{torressa2020,
doi = {10.21105/joss.01655},
url = {https://doi.org/10.21105/joss.01655},
year = {2020},
publisher = {The Open Journal},
volume = {5},
number = {49},
pages = {1655},
author = {{Torres Sanchez}, David},
title = {cspy: A Python package with a collection of algorithms for the (Resource) Constrained Shortest Path problem},
journal = {Journal of Open Source Software}
}
```

0 comments on commit fba830c

Please sign in to comment.