Recent Releases of cspy
cspy - v1.0.2
Changed
- Refactored Python and C++ unittests.
- Added C# interface.
- Moved documentation from readthedocs to github pages.
- Non-elementary checks for 2-cycles (
i->j->iare not allowed).
Added
- Logger using
sdplog.
Fixed
- Issue: Bidirectional algorithm is not finding valid paths when using non-zero minimum resource values #89
- Issue: Bidirectional not finding valid path when using negative resource consumption #90
- Issue: Dominance check for elementary paths #94
Scientific Software - Peer-reviewed
- C++
Published by torressa almost 4 years ago
cspy - v1.0.1
Coauthored with @dvbuntu! :rocket:
Changed
- Fix minimum number of nodes on path condition for
PSOLGENT. - Force node sorting to start with "Source" and end with "Sink" in
PSOLGENT. Force inclusion of Source and Sink nodes in
PSOLGENTpaths.Clean up:
BiDirectionalto use search objects again.labelling.*removeLabelExtensionunified withParams.
Added
- Record
randvalue used to generatePSOLGENTpaths from positions. - Make upper and lower bound of
PSOLGENTinitial positions optional arguments. 2opt in
PSOLGENTfor better evaluation of solutions.Critical resource as a parameter to
BiDirectional[EXPERIMENTAL] Add critical resource preprocessing attempt using longest paths
Fixed
- Issue #79
Scientific Software - Peer-reviewed
- C++
Published by torressa almost 5 years ago
cspy - v1.0.0
Changed
- Graph implementation replaced with LEMON. Brings significant improvement on some instances (e.g. on the benchmarks, pretty similar on solomon).
- Docker images
Added
- Benchmarks against boost's rcshortest_paths (#65) in
benchmarks/README.md.
Fixed
- Issues #66, #68, #69, #72
Scientific Software - Peer-reviewed
- C++
Published by torressa about 5 years ago
cspy - v1.0.0-alpha
Rewrite of the bidirectional algorithm in C++ interfaced with Python using SWIG.
Comparison
I compared the performance on a solomon instance using vrpy. The exact=True/False are attributes of vrpy that uses the threshold option.

Changed
The algorithm improvements include:
- Faster joining procedure (when direction="both") with lower bounding and sorted labels
- Bounds pruning using shortest path algorithm lower bounds and the primal bound obtained during the search (experimental).
- Backwards incompatible change to do with custom REFs. Now, instead of specifying each function separately, you can implement them in class that inherits from REFCallback. and then pass them to the algorithm using the REF_callback parameter. This change applies to all algorithms.
Note that:
1. the naming of the functions has to match (REF_fwd, REF_bwd and REF_join)
2. so does the number of arguments (not necessarily the naming of the variables though)
3. not all three have to be implemented. If for example, one is just using direction="forward", then only REF_fwd would suffice. In the case of the callback being passed and only part of the functions implemented, the default implementation will used for the missing ones.
e.g. ```python from cspy import BiDirectional, REFCallback
class MyCallback(REFCallback):
def __init__(self, arg1, arg2):
# You can use custom arguments and save for later use
REFCallback.__init__(self) # Init parent
self._arg1: int = arg1
self._arg2: bool = arg2
def REF_fwd(self, cumul_res, tail, head, edge_res, partial_path,
cumul_cost):
res_new = list(cumul_res) # local copy
# do some operations on `res_new` maybe using `self._arg1/2`
return res_new
def REF_bwd(self, cumul_res, tail, head, edge_res, partial_path,
cumul_cost):
res_new = list(cumul_res) # local copy
# do some operations on `res_new` maybe using `self._arg1/2`
return res_new
def REF_join(self, fwd_resources, bwd_resources, tail, head, edge_res):
fwd_res = list(fwd_resources) # local copy
# do some operations on `res_new` maybe using `self._arg1/2`
return fwd_res
Load G, maxres, minres
alg = BiDirectional(G, maxres, minres, REF_callback=MyCallback(1, True)) ```
Added
- Benchmarks (and comp results for BiDirectional) from Beasley and Christofides (1989)
Fixed
- [BiDirectional] Bug fix for non-elementary paths (#52)
- [PSOLGENT] Bug fix for local search (#57)
Removed
- BiDirectional python implementation (can be found here)
- BiDirectional
method="random"see issues (hopefully only temporary).
Scientific Software - Peer-reviewed
- C++
Published by torressa over 5 years ago
cspy - JOSS Review
Release for JOSS paper.
Code changes include:
- BiDirectional Algorithm:
- 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
Scientific Software - Peer-reviewed
- C++
Published by torressa about 6 years ago
cspy -
Added
- BiDirectional:
- Option to chose method for direction selection.
- vrpy submodule.
Changed
BiDirectional:
- Label storage, divided into unprocessed, generated and non-dominated labels
- Restricted join algorithm to non-dominated label
- Changed backward resource extensions to avoid complex and computationally costly inversion. Additionally, it removes the requirement of an explicit backward REF.
- Filtering for backward labels in join algorithm.
- Cleaned up unused label operator overloads.
- Removed costly comparison in
_propagate_label. - Changed generated labels attributes from dict of deques to dict of int with count.
Rework of path and algorithm attributes to avoid duplication
Replaced
networkx.astaralgorithm with a procedure that finds a short simple path usingnetworkx.shortest_simple_paths.
Scientific Software - Peer-reviewed
- C++
Published by torressa about 6 years ago
cspy -
Some bug fixes have led to the following changes in the BiDirectional
- Changed label comparison from weight to resource based.
- Simplified and cleaned up implementation (somewhat).
- Implemented full path joining procedure, Algorithm 3, from Righini and Salani (2006). This involved rectified the half-way check that I thought I'd implemented in v0.0.12.
- Parameterized some tests.
Scientific Software - Peer-reviewed
- C++
Published by torressa about 6 years ago
cspy - New Features
Among some bug fixes and Introduced some features for the results of the algorithms. After running the algorithm, you can now extract: - the path for a list with the nodes in the path; - the accumulated cost of the path; - and the accumulated resource usage of the path.
Unfortunately, these changes are backwards incompatible.
Scientific Software - Peer-reviewed
- C++
Published by torressa about 6 years ago
cspy - JOSS Review Updates
Scientific Software - Peer-reviewed
- C++
Published by torressa over 6 years ago
cspy - First Release
Scientific Software - Peer-reviewed
- C++
Published by torressa almost 7 years ago
cspy - Implemented PSOLGENT
Scientific Software - Peer-reviewed
- C++
Published by torressa almost 7 years ago