Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

the route planner that generate an optimized route that covers all the desired locations, suggesting the best sequence to follow

License

NotificationsYou must be signed in to change notification settings

Denta-ai/RouteOptimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains code for a Route Optimizer that implements Dijkstra's algorithm to find the shortest path between nodes in a graph and generates visualizations of the graph.

Introduction

The Route Optimizer project aims to optimize routes and find the shortest path between nodes in a graph. It provides functionality to load input data, generate graphs, calculate weights, and visualize the resulting graph.

Installation

To use the Route Optimizer, follow these steps:

  1. Install the gnuplot based on your operation system here:http://www.gnuplot.info/download.html and follow the instruction
  2. Clone the repository:
  3. $ git clone <repository_url>    $ cd <repository_directory> // look for where main.exe file located to
  4. Build the project (if required) using your preferred build system.
  5. Run the program:
  6. $ ./main.exe

Note: if you can't run the program. Remember to check the directory path for the files.

Features

  • Shortest Path Calculation: Thealgorithm.cpp file contains an implementation of Dijkstra's algorithm, which can find the shortest path between nodes in a graph.
  • Graph Generation: Thegraph.cpp file provides functionality to generate a graph based on input data and save it as an image file.

Usage

To find the shortest path between nodes:

  1. Modify the input data in the appropriate files (pnts.txt andedges.txt) to represent your graph.
  2. Compile and run the program.
  3. The program will calculate and display the shortest path between nodes using Dijkstra's algorithm.

To generate a graph:

  1. Modify the input data in the appropriate files (pnts.txt andedges.txt) to represent your graph.
  2. Compile and run the program.
  3. The program will generate a visualization of the graph and save it as an image file (graph.png).

File Structure

  • algorithm.cpp: Contains the implementation of Dijkstra's algorithm to find the shortest path.
  • graph.cpp: Provides functionality to generate a graph and visualize it.
  • pnts.txt: Input file containing the coordinates and labels of the graph's nodes.
  • edges.txt: Input file containing the edges of the graph.

Contributing

Contributions to this project are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and test them thoroughly.
  4. Commit your changes and push them to your forked repository.
  5. Submit a pull request, describing the changes you've made.

License

This project is licensed under the MIT License. See theLICENSE file for more information.

Contact

If you have any questions or suggestions regarding this project, feel free to contact me:


[8]ページ先頭

©2009-2025 Movatter.jp