Comments (7)
Hi, thanks for feedback!
It is invalid validation error message which I've just fixed in master branch. Regarding custom matrix, it must have expected size which corresponds to max index of location and it is determined automatically based on your problem definition.
As described in the docs, you can specify location using geocoordinate or custom index. I guess you're using coordinates, not indices, and your problem definition has duplicated coordinates in different jobs or vehicles and solver does not count duplicates. That's why there is some mismatch.
I recommend to use specific command to extract ordered list of unique locations and use it to prepare a matrix:
vrp-cli solve pragmatic problem.json --get-locations -o locations.json
if you want to keep matrix unchanged, then use location indices, but it can be easily error prone.
how to send you this files ?
If there is no concern in privacy (e.g. GDPR), you can try to attach it to the ticket by drag and drop.
from vrp.
Thank you, the solver run ok. I have a trouble after some seconds the solver end process 👍
generation 4100 took 15ms, rank: 0, cost: 8904.40(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8904.400)
[67s] generation 4200 took 15ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[68s] generation 4300 took 22ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[70s] generation 4400 took 16ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[72s] generation 4500 took 14ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[73s] generation 4600 took 17ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[75s] generation 4700 took 15ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[76s] generation 4800 took 16ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[78s] generation 4900 took 15ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[80s] generation 5000 took 17ms, rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[80s] population state (speed: 62.39 gen/sec, improvement ratio: 0.011:0.002):
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 1, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[80s] population state (speed: 62.41 gen/sec, improvement ratio: 0.011:0.002):
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 0, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
rank: 1, cost: 8893.32(0.000%), tours: 28, unassigned: 47, fitness: (47.000, 28.000, 8893.316)
[80s] total generations: 5001, speed: 62.41 gen/sec
But the unassigned jobs = 47 and multiples vehicles not include in the solution. Why the solver not use all vehicles that need for problem.
The fleet have 80 Vehicles and only use 28. If we use the vehicles not used, we can acomplish the job with timewindow.
Thak you for your help
unassigned jobs
"unassigned": [
{
"jobId": "job66 [TUNJA]",
"reasons": [
{
"code": 2,
"description": "cannot be visited within time window"
}
]
},
....
from vrp.
It is hard to say what is exact problem without seeing your problem definition and routing matrix. As the reason of unassignment is time window, my guess is that these jobs are far away from depot location.
from vrp.
Thak you for your response. This is the link for download files. https://www.dropbox.com/sh/5o5kwkicuyi8p08/AACrya1e3JmQ7QJmdaIt1RAva?dl=0
Thank you for your help.
from vrp.
Hi! I've checked your data and it seems to be a valid solution: you have quite big durations between some locations in the routing matrix,, e.g. like 220154 which is ~61 hours when your shift times are less than 24 hours from a single depot:
(just run the solver for short time, unassigned jobs are not shown, need to add them into geojson output)
from vrp.
Thaks for your response. I have checked the information several times. the value "220154" (220 km) is into distances array not for travelTimes. in fact the max travel time is (6.6h) "23795". I did other test without profile and distance matrix.
vrp-cli solve pragmatic problem.json -o solution.json -g solution.geojson --log
the result is
[42s] population state (speed: 70.81 gen/sec, improvement ratio: 0.033:0.021):
rank: 0, cost: 11020.32(0.000%), tours: 26, unassigned: 39, fitness: (39.000, 26.000, 11020.323)
rank: 0, cost: 11020.32(0.000%), tours: 26, unassigned: 39, fitness: (39.000, 26.000, 11020.323)
rank: 0, cost: 11020.32(0.000%), tours: 26, unassigned: 39, fitness: (39.000, 26.000, 11020.323)
rank: 1, cost: 11024.05(0.034%), tours: 26, unassigned: 39, fitness: (39.000, 26.000, 11024.048)
[42s] total generations: 3001, speed: 70.81 gen/sec
With multiples vehicles unused i have unassigned jobs: 39. The behavior is right? or what am I doing wrong?
Thank you for your response
from vrp.
Yes, you're right, it is distance.
I did the following trick: removed shift end and reload (it is experimental feature) and run the problem again. Results are
60 tours, 0 unassigned jobs and 3 unassigned breaks (counted as unassigned in the logs). So, end shift seems to be one of the reasons.
Second reason is default objective function: minimize amount of tours and assigned jobs first, second - cost. So, if amount of unassigned is dropped, but tours - increased, solution might be not top ranked. I guess you need to specify your objective explicitly:
"objectives": {
"primary": [
{
"type": "minimize-unassigned"
}
],
"secondary": [
{
"type": "minimize-cost"
}
]
}
More info about objectives here
I run with this objective and got 44 unassigned and 34 tours. Still not zero unassigned. Based on the first finding, seems there is no enough time to return to depot after serving these jobs: if I give another extra 4 hrs for return, then getting more tours (53) and less unassigned (17).
from vrp.
Related Issues (20)
- Violation on optional break window HOT 3
- Associate Cost to Waiting Time HOT 17
- capacity constraints HOT 1
- Option to provide custom costs matrix HOT 4
- No solutions when using orders or skills HOT 3
- fleet.vehicles.limits.maxDuration is driving duration or total? HOT 2
- RepeatableRandom displaying non-repeatable results HOT 1
- VRP does not respond, ignores SIGINT and max-time HOT 5
- Infeasible solution
- Why cannot set time and duration costs to zeros? HOT 3
- Thread 'main' panicked - intermittent error HOT 1
- Error - called `Option::unwrap()` on a `None` value HOT 6
- Pip wheels for python 3.11 HOT 1
- Custom conditions for jobs/fleet definition HOT 6
- Index out of Bounds in Fast Service Objective HOT 3
- Unexpected behavior of required breaks with time aware matrices
- The model provide different results HOT 1
- Examples for time dependent routing
- Parameter for visiting same location multiple times across shifts
- Pydantic Model Issue HOT 1
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 vrp.