Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/jaswanth-gorripati/vehicle-routing-planning
This project is a Vehicle routing planning for drivers using a heuristic approach. It reads input from a text file, assigns loads to drivers while minimizing the total cost, and prints the optimized load assignment for each driver.
Clone this repository:
git clone https://github.com/jaswanth-gorripati/Vehicle-routing-planning.git
Navigate to the project directory:
cd Vehicle-routing-planning
The input file should be a text file with tab-separated values and the following structure:
loadNumber pickup dropoff
1 (0.0,1.0) (2.0,3.0)
2 (1.0,1.0) (3.0,3.0)
loadNumber
: Unique identifier for the load.pickup
: Coordinates of the pickup location.dropoff
: Coordinates of the dropoff location.Ensure your input file is correctly formatted as described above.
Run the program with the path to your input file as an argument:
go run main.go path/to/your/inputfile.txt
Replace path/to/your/inputfile.txt
with the actual path to your input file.
Create an input file loads.txt
:
loadNumber pickup dropoff
1 (0.0,1.0) (2.0,3.0)
2 (1.0,1.0) (3.0,3.0)
3 (2.0,2.0) (4.0,5.0)
Run the program:
go run main.go loads.txt
The program will print the optimized load assignments for each driver.
[1,2]
[3]
This indicates that the first driver is assigned loads 1 and 2, while the second driver is assigned load 3.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.