vrp | A Vehicle Routing Problem solver

 by   reinterpretcat Rust Version: v1.21.1 License: Apache-2.0

kandi X-RAY | vrp Summary

kandi X-RAY | vrp Summary

vrp is a Rust library. vrp has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This project provides the way to solve multiple variations of Vehicle Routing Problem known as rich VRP. It provides custom hyper- and meta-heuristic implementations, shortly described here.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              vrp has a low active ecosystem.
              It has 253 star(s) with 47 fork(s). There are 20 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 29 open issues and 48 have been closed. On average issues are closed in 14 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of vrp is v1.21.1

            kandi-Quality Quality

              vrp has no bugs reported.

            kandi-Security Security

              vrp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              vrp is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              vrp releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vrp
            Get all kandi verified functions for this library.

            vrp Key Features

            No Key Features are available at this moment for vrp.

            vrp Examples and Code Snippets

            No Code Snippets are available at this moment for vrp.

            Community Discussions

            QUESTION

            VRP with different vehicle types using or-tools
            Asked 2021-Jun-04 at 12:54

            I'm trying to optimize the best routes VRP with OR-Tools. I couldn't find the right function in the documentation

            CASE: Some customers only accept pickup trucks, some accept only trucks, some accept both trucks, pickup, and vans. There's a single depot location and vehicles should carry orders to the right customers with accepted vehicles.

            Those vehicles I have

            Customers accept those vehicle types

            These vehicles should be directed to the appropriate customers. 

            Do you have any thoughts or are there any or-tools function regarding this?

            ...

            ANSWER

            Answered 2021-Jun-04 at 12:54

            You can use the RoutingModel::VehicleVar(index)

            Pseudo code in Python (using customer_id as node_id)

            Source https://stackoverflow.com/questions/67835285

            QUESTION

            VRP with score dependens on more than one job in optaplanner
            Asked 2021-May-24 at 12:11

            We are trying to solve a VRP with Optaplanner. The score calculation runs via constraint streams.

            Now I have two vehicles (A and B) and want to schedule two jobs (J1 and J2). The construction heuristic (FIRST_FIT_DECREASING) schedules J1 to A and J2 to B, what is correct so far.

            Now the two jobs also have an attribute "customer", and I want to assign a penalty if the customer of the two jobs is the same but the vehicles are different.

            For this purpose, I have created a constraint in the ConstraintProvider that filters all jobs via groupBy that have the same customer but different vehicles.

            If I now switch on the FULL_ASSERT_MODE, an IllegalStateException occurs after scheduling J2, because the score that is calculated incrementally is different from the score for the complete calculation. I suspect this is because the VariableListener, which recalculates the times of the jobs, only tells the ScoreDirector about a change to Job J2 for my shadowvariables and therefore only changes the score part that is related to it.

            How can I tell Optaplanner that the score for J1 must also be recalculated? I can't get to job J1 via the VariableListener to tell the ScoreDirector that the score has to be changed here.

            Or does this problem require a different approach?

            ...

            ANSWER

            Answered 2021-May-24 at 12:11

            This is a problem that is a bit hard to explain fully. TLDR version: constraint streams only react to changes to objects which are coming from either from(), join() or ifExists(). Changes on objects not coming through these statements will not be caught, and therefore causing score corruptions. Longer explanation follows.

            Consider a hypothetical Constraint Stream like this:

            Source https://stackoverflow.com/questions/67619480

            QUESTION

            AWS SNS to SQS publish fails using Cloudformation
            Asked 2021-May-24 at 09:51

            I've recently started learning and implementing services using AWS services. So, I guess I'm missing some small steps which I can't figure it.

            I'm trying to implement the following diagram using the Cloudformation template. Everything is working fine unless. The Lambda and SQS queue are subscribed to the SNS topic successfully. Whenever a file is stored at the bucket, or even when I publish a message to the SNS topic manually, the lambda function is triggered successfully, but the message is not published to the SQS queue. I've also added the AWS::SQS::QueuePolicy to allow SNS to send messages to SQS, but it still does not work.

            template.yml:

            ...

            ANSWER

            Answered 2021-May-24 at 09:51

            You have mentioned Service: s3.amazonaws.com instead of Service: sns.amazonaws.com in your SQS policy. Update the template and try.

            Source https://stackoverflow.com/questions/67669052

            QUESTION

            OR-tools VRP one vehicle with capacity constraint and multiple routes
            Asked 2021-May-01 at 09:54

            I am trying to solve a VRP using OR-tools in python. What i want to do is a vehicle that does multiple routes between a depo and pick-up destinations. It should pick items until its capacity is maxxed, go to depo and drop off and then continue with this until all items are picked.

            I have searched the web and couldn't find anything. so i tried to combine the examples on OR-tools VRP without luck. So i wonder if there are any similar projects that can inspire.

            ...

            ANSWER

            Answered 2021-May-01 at 09:54

            So your problem is a multi-trip Collect problem

            • Each node can only be visited once, so if you want multiple trips , you'll need to duplicate the depot node to allow/simulate "unload" etc...

            • Each unload node(s) should be optional so you should put them (one by one) in a disjunction so the solver don't have to visit them if not needed.

            A good sample is cvrp_reload.py

            Source https://stackoverflow.com/questions/67329958

            QUESTION

            How to get ortools to return cost?
            Asked 2021-Apr-11 at 08:17

            How does one get googleortools to give back the actual cost of a vrp? This example only returns distance and loads but if I add more cost elements I would like it to show me cheapest outcome. https://developers.google.com/optimization/routing/cvrp

            Thanks.

            ...

            ANSWER

            Answered 2021-Apr-11 at 08:17

            You can retrieve it using assignment.ObjectiveValue() (in Python)

            ps: on master all VRP samples should have the objective cost in the print function ;)

            Source https://stackoverflow.com/questions/67041007

            QUESTION

            Google OR-tools VRP - Pickup/Dropoff at same node
            Asked 2021-Apr-10 at 12:27

            I'm currently using Python and the Google-Or-Tools to solve an VRP problem, that I am not sure how exactly to model. (If someone has a solution with another library/tool, absolutely interested as well)

            Problem Statement:

            I have basically the classical CVRP problem also described and modelled on the documentation page, but with one addition. So the basic CVRP problem is, I have a depot where cargo is loaded and vehicles start from / end at. Also I have locations where goods are to be delivered to, e.g. they have a demand. Now the addition is, that I not only dropoff goods at the specific locations but also want to pickup goods at the same locations, and eventually dropping them off at the depot again.

            Since it is possible for a location to have more goods to pickup than to dropoff, I need to explicitly check this, too ... but I can't find a way so far to do this.

            Example: So say I have one Depot node 0 and two location nodes (A,B).

            • At location A I need to dropoff 10 units and pickup 11.
            • At location B I need to dropoff 10 units and pickup 9.

            Now for a vehicle with max capcity 20 the possible solution would be:

            • 0 --> B --> A --> 0

            First visiting A and then B would not work, since it would violate the capacity constraint in A.

            What I've tried:

            So to consider the basic dropoff capacity constraint I have the standard

            ...

            ANSWER

            Answered 2021-Apr-09 at 07:55

            IIRC, already answered on the mailing list.
            Here a gist with a sample: Mizux/vrp_collect_deliver.py

            Basically you'll need two dimensions.

            • One to track only deliveries goods
            • One to track the total load (pickup and delivery)
            • One constraint on start nodes to make both dimension cumul vars equals.

            Main idea: Having two dimensions instead of one, will avoid the solver to use pickup goods to perform deliveries.

            Field Start A B End Deliveries 0 -10 -10 0 Total 0 -10+11 -10+9 0

            Source https://stackoverflow.com/questions/67000884

            QUESTION

            Can jsprit solve the VRPC with negative demand or is VRPB better?
            Asked 2021-Apr-03 at 10:40

            I need to use VRP and take into account that a client wants to either have a pick-up or a delivery. I know VRPB satisfies these requirements but that waits until the truck is empty before picking up from clients.

            Is the VRPC able to deal with a negative demand? Which would make it a delivery.

            ...

            ANSWER

            Answered 2021-Apr-03 at 10:40

            After some looking around I found this link: https://discuss.graphhopper.com/t/negative-values-as-capacities/1310

            You can use a PickUp class or a Delivery class and the code will do the rest. So yes, it is supported.

            Source https://stackoverflow.com/questions/66929505

            QUESTION

            OR-Tools CVRP with Multiple Trips
            Asked 2021-Mar-17 at 10:50

            I'm trying to use OR-Tools' Routing Solver to solve a Multi Trip Capacitated VRP. What I need is

            • one depot, route starts and ends here.
            • one unloading location (different from the depot)
            • set time window and demand for each node

            So the vehicles should pick up the goods from each node until the capacity is filled. Then go to "unloading location", unload all their weight and keep collecting the demand from nodes until a time limit is reached or all the goods are collected. Then return back to the depot.

            CVRP Reload Example seems very close but in my case, at the end of the route vehicles should visit the unloading location before the depot. In other words a vehicle can not go to the depot (starting, ending location) with load.

            Example:

            ...

            ANSWER

            Answered 2021-Mar-17 at 10:50

            QUESTION

            Using SetGlobalSpanCostCoefficient lead to worse routes in OR-tools VRP
            Asked 2021-Mar-09 at 08:32

            I'm using OR-tools VRP to create delivery routes. I have distance as a dimension, a dimension to constrain the number of delivery points per route and my code is very similar to the guide shared in https://developers.google.com/optimization/routing/vrp

            The issue I have is that when using SetGlobalSpanCostCoefficient as below, the resulting routes have very short distances from the depot to the first delivery point and from the last delivery point to the depot, but instead, the distances between delivery points is high. Instead, when not using this SetGlobalSpanCostCoefficient the routes have very low distances between delivery points but the distance from and to the depot are higher.

            ...

            ANSWER

            Answered 2021-Mar-09 at 08:32

            In both cases you'll always have the arc cost added to the objective, the global span cost coefficient add an EXTRA cost being coeff * (max_end - min_start)
            note: When using a coefficient of 100 it just makes this cost the dominant factor...

            First the solver try to create an initial solution using the first strategy heuristic.

            Then if local search is enable, solution may be improved drastically -> do you enable local search ?

            Source https://stackoverflow.com/questions/66530004

            QUESTION

            How come the child process spawn works on window but not on ubuntu?
            Asked 2021-Mar-01 at 16:50

            I am struggling running a command using spawn on ubuntu. I am using vrp-cli module written with Rust, here is the code where i am trying to pass few arguments into spawn and run the command:

            ...

            ANSWER

            Answered 2021-Mar-01 at 16:50

            You need to follow the syntax for running command which have multiple arguments, for sample : 'ls -lrth /usr'

            Source https://stackoverflow.com/questions/66425795

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install vrp

            For general installation steps and basic usage options, please check next sections. More detailed overview of features is presented in A Vehicle Routing Problem Solver Documentation.
            You can install vrp solver using three different ways:.
            The fastest way to try vrp solver on your environment is to use docker image (not performance optimized):. Please note that the docker image is built using musl, not glibc standard library. So there might be some performance implications.
            run public image from Github Container Registry:
            build image locally using Dockerfile provided:
            You can install vrp solver cli tool directly with cargo install:. Ensure that your $PATH is properly configured to source the crates binaries, and then run solver using the vrp-cli command.
            Once pulled the source code, you can build it using cargo:. Built binaries can be found in the ./target/release directory.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/reinterpretcat/vrp.git

          • CLI

            gh repo clone reinterpretcat/vrp

          • sshUrl

            git@github.com:reinterpretcat/vrp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Rust Libraries

            996.ICU

            by 996icu

            deno

            by denoland

            rust

            by rust-lang

            alacritty

            by alacritty

            tauri

            by tauri-apps

            Try Top Libraries by reinterpretcat

            utymap

            by reinterpretcatC++

            lfs

            by reinterpretcatShell

            demo

            by reinterpretcatC#

            framework

            by reinterpretcatC#

            csharp-libs

            by reinterpretcatC#