Git Product home page Git Product logo

Comments (7)

reinterpretcat avatar reinterpretcat commented on July 22, 2024 1

Thanks for feefback!

A side question: does the order of the objective in the primary set or the secondary set matter?

No, it should not matter.

But in my case, the solver stops quite quickly (a few seconds) even if the termination criteria allows a longer run.

Default termination criteria is 3000 generations or 300 seconds. I would recommend to set only time limit with --max-time option and experiment with its value. Essentially, I'm thinking about implementing something like automatic algorithm configuration depending on the problem variant, so time might be only one meaningful limit in the end. You can also try to reconfigure default parameters using --config option, but this requires some understanding of underlying algorithm. I plan to write some documentation to explain it a bit (I'm on vacation right now with my family, so I don't have too much time to dedicate for the project).

Max generations is a bit limiting as it implies the same 'weight' for all of them over the whole algorithm execution, but this might be incorrect if different sub-algorithms are used depending on the search phase (I plan to work on an extra step of heuristic for large scale problems). Cost change is not good enough in case of balancing objectives.

from vrp.

reinterpretcat avatar reinterpretcat commented on July 22, 2024

Hi!

Yes, I also think minimal load feature will be useful, but it is not straightforward how to implement it as hard constraint.
At the moment, maybe try to use balance-max-load objective as secondary to assign a bit more jobs to 'small' routes from 'bigger' ones. See https://reinterpretcat.github.io/vrp/concepts/pragmatic/problem/objectives.html#work-balance-objectives

from vrp.

pierrethiriet avatar pierrethiriet commented on July 22, 2024

Hi,
The objectives mecanism in vrp_cli is indeed quite flexible !
The balance activities objectives seem to help while balance load (not all demands are equal) has a too strong impact on the performance.
Note: the color corresponds not to the same vehicle in the example below.

  • maximize-tours
    Total distance: 214km
    The vehicle in dark blue is only serving one client in the southern area before its end location while it has a large capacity.
    normal

  • maximize-tours + balance-max-load
    Total distance: 280km
    Higher cost in driving distance. The effect of this secondary objective seems too strong with the default parameters. Also, too many vehicles going to the city in the southern area while not necessary
    balance_load

  • maximize-tours + balance-activites
    Total distance: 249km
    Better, but according to this particular run (each run giving different results), some seem to have too many cars going to the main city, the light, blue, dark blue and red here. I understand that there are not criteria for spatial clustering of the trip, but some gave a better feeling than others while having the same performance.
    balance_activities

Aside from the minimal load capacity, I guess I can minimize having too many vehicles in one area by assigning an allowedAreas to one vehicle. But I am not sure about that as this option is a hard constraint while I would still like to let the vehicle to potentially serve some clients along the roads to reach its target area (allowedAreas).

from vrp.

reinterpretcat avatar reinterpretcat commented on July 22, 2024

Have you tried to play with options parameters? It is the way to avoid balancing strictness.

Yes, you can use allowedAreas to restrict vehicles to specific areas, but this is not optimal.

I think the proper solution would be to add extra parameter to maximize-tours which will trigger desired behavior. I would need to think about implementation.

from vrp.

pierrethiriet avatar pierrethiriet commented on July 22, 2024

Thanks for your answer.
In a new test with the same options give now different solutions that seem better than the previous one without balancing activities (?). But when balancing activities, the tolerance option seems to help. But I am not sure to understand the threshold one.
Increasing the tolerance and keeping the threshold low give good results.

In all cases:

  • Primary objective:
    • minimize-unassigned
    • maximize-tours
  • Secondary objective:
    • minimize-cost
  1. Default - 202km
    map_std_allV_Dist_202km

  2. Balance activities (secondary obj) tolerance: 0.05 - threshold: 0.01 (default options) - 244km
    map_ba_(tol0 05-thr0 01)_allV_Dist_244km

  3. Balance activities (secondary obj) tolerance: 0.1 - threshold: 0.01 (default options) - 213km
    map_ba_(tol0 1-thr0 01)_allV_Dist_213km

map_ba_(tol0 05-thr0 01)_allV_Dist_244km

from vrp.

reinterpretcat avatar reinterpretcat commented on July 22, 2024

threshold is described in the docs:

threshold: a target coefficient of variation value which specifies desired minimum balancing level. All values below threshold are considered equal which helps the search algorithm to optimize conflicting objectives.

Essentially, you can use it to limit balancing to some value.

The purpose of tolerance is to allow movement in search space which improves another objective (e.g. cost), but degrades balancing objective a bit.

In a new test with the same options give now different solutions that seem better than the previous one without balancing activities (?)

The search process is a bit non-determenistic, so it might lead to different results for different runs. I did recently some improvements with new search mode (broad/ROSOMAXA), so running longer should bring more stable results across multiple runs.

from vrp.

pierrethiriet avatar pierrethiriet commented on July 22, 2024

Thanks for your answer, and sorry I didn't read properly the documentation (very detailed and helpful by the way).
So adjusting both options give mor room for moving the solution along a Pareto frontier (more or less).

A side question: does the order of the objective in the primary set or the secondary set matter? I guess no, but I am not sure as it is an array, so an order can exist.

I am quite interested in your last comment. I am not surprised that heuristic approaches can provide slightly different results. But in my case, the solver stops quite quickly (a few seconds) even if the termination criteria allows a longer run. I would mind a longer run for more stable results. Maybe I should also give a better look too cost variation and narrow its threshold.

My current approach is to run the same problem several times. Then we pick manually one of them based on results display on a map.

from vrp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.