Skip to content

gdpouya/Water_WaVes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Water Waves

Water Waves is a simulation of ships transporting packages between cities. The goal of the program is to transport all the required packages to their destinations in the shortest amount of time possible.

Installation

To run Water Waves, download the Python file and save it on your computer. The program requires Python version 3 or higher.

Usage

Run the program using the command:

python water_waves.py

The program reads input from a file called "input.txt" located in the same directory as the Python file. The format of the input file is:

packages number: {pakage number}
BARCELONA have {number_of_ships} ship , each ship {ship_capacity} capacity
MARSEILLE have {number_of_ships} ship , each ship {ship_capacity} capacity
GENOA have {number_of_ships} ship , each ship {ship_capacity} capacity
NAPLES have {number_of_ships} ship , each ship {ship_capacity} capacity

The departure and destination cities should be one of the following: "BARCELONA", "MARSEILLE", "GENOA", "NAPLES", or "MESSINA". The number of packages should be an integer.

Once the program is running, ships will sail between cities to transport packages. The program will output information about each ship's movements and actions.

Credits

This program was developed by Gdpouya using Python and threading library for os class.

About

Os project N2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages