Skip to content

Project for the CS engineering course "Algoritmi e Principi dell'Infomatica" @ Milan Polytechnic (A.Y. 2022/2023)

Notifications You must be signed in to change notification settings

SalimSalici/API_LT_22_23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Highway Route Planner

This program was developed as a project for the Algoritmi e Principi dell'Informatica (API) course @ Milan Polytechnic.

The project was graded based on running time and memory usage, with lower values in both categories resulting in higher scores.

Professor: Davide Martinenghi

Final Grade: 30/30 with honors

Evaluation table

Score Memory Time Status
18 < 128 MiB < 19 s
21 < 118 MiB < 15 s
24 < 108 MiB < 10 s
27 < 98 MiB < 6 s
30 < 88 MiB < 4 s
30 with honors < 78 MiB < 1 s

Problem Statement

Given a highway with charging stations at various distances, each with a fleet of electric vehicles of different ranges, the program must:

  • Add/remove charging stations along the highway
  • Manage electric vehicles at each station (add/scrap)
  • Find the route with the fewest stops between any two stations
  • When multiple routes have the same number of stops, prefer the one with earlier stops

The full specification of the project (in Italian) can be found here.

Tools

Type Name
IDE Visual Studio Code
Compiler gcc
Profiling KCachegrind

Usage

Compile the code using the following command:

make main

Run a simulation with one of the provided tests:

main.exe < tests/open_1.txt > open_1_result.txt

About

Project for the CS engineering course "Algoritmi e Principi dell'Infomatica" @ Milan Polytechnic (A.Y. 2022/2023)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published