Comments (5)
Sounds good, thanks for taking a look and merging. Great library by the way! Happy to help make it even better.
from cspy.
Hey again @dvbuntu, thanks for bringing up another bug!
There are some preprocessing techniques but most of them use the source-to-all shortest paths which has to run twice (one for each direction) and then times the number of resources. So it can get really slow.
Also, they are only effective on certain types of networks (e.g. doesn't work on connected graphs like the ones you get in VRP instances).
In a recent paper, link found in #67, has a much faster and elegant solution to this. They also have a crazy good implementation
Haven't gotten round to implementing it yet, but was definitely one of my priorities.
You are very welcome to open a PR with the fix for this :) the workflows will show if the test pass.
The build process is pretty straight forward if you set up docker, or alternatively install cmake on your machine.
from cspy.
Looking at the preprocessing more closely, I'm not sure that it's checking the min_res
correctly. It looks for minimum weight paths and checks if the shortest path (for a given resource) is less than the minimum constraint. But if the shortest path is too short, there could be some longer path which is valid.
Ideally, we'd check if the longest path is not long enough. But we can't just make the weights negative and look for the shortest since that will likely introduce negative-weight cycles (for the original weights being positive). But the Longest Path Problem is NP-Hard, so we're not going to have a quick way to do this check. We may want to just avoid checking the minimum constraint in the preprocessor.
from cspy.
PR #74 opened to address this and some closely related bugs.
from cspy.
Thanks for the PR and for taking some time to think about this, it is greatly appreciated!
Everything passed so just merged it, the release wheel won't work as it needs another version number but will sort it out with the other stuff (#68, #69, etc).
I'll leave this open until then
from cspy.
Related Issues (20)
- Cannot install CSPY latest version HOT 1
- Which dominance rule is used in .bidirectional HOT 1
- Fix Nuget push step in actions
- Generation of more paths with BiDirectional algorithm HOT 5
- cspy.BiDirectional (monodirectional) HOT 9
- Returning all the negative cost path in Elementary shortest path problem HOT 1
- Relax strict monoticity assumption of input resources
- Are these algorithms can be used to find shortest path which travel through a set of specific nodes? HOT 2
- False dominance rule for 2-cycles in non-elementary RCSP HOT 1
- cspy.PSOLGENT example code fails HOT 1
- cspy k path functionality HOT 5
- v1.0.3 unusable on arm64 HOT 2
- Why does min_res impact the output HOT 3
- Ability to select arbitrary source and sink HOT 6
- Ability to disable some checks on the graph. HOT 2
- Multi trip vehicle routing problem
- lower bound HOT 7
- Dominance check for elementary paths HOT 10
- Dominance criteria? HOT 2
- CSPY for branch-bound-and-price algorithm HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cspy.