- About
- Motivation and project status
- Technologies used
- Requirements
- Configuration
- Setup and usage
- Tests
- Screenshots
- Licence
PTC is a desktop application, which can help in optimizing the transport of patients to hospitals.
In the first step, an ambulance is moving the first patient in the queue to the nearest hospital. If there are some beds available then the patient is left there, if not then the patient is transported to another hospital - chosen by the lowest value (shortest time) marked on the road.
The ambulance provides transport only for patients in a specified area - a convex hull designated by hospitals and monuments.
The project uses a few of algorithms to work properly:
- Graham Scan Algorithm - finding the convex hull of a finite set of points (hospitals or monuments);
- Dijkstra's algorithm - finding the shortests paths beetween nodes in graph (beetween a patient and a hospital);
- Bentley–Ottmann algorithm - listing all crossings in a set of line segments (detecing intersections).
Patients transport center app was created during my second year of studying Computer Science in collaboration with Bartosz Zakrzewski & Antoni Malinowski. That was the group project for Algorithms And Data Structures subject.
The project was completed successfully.
Duration time: 26.11.2020 - 21.01.2021.
- Java;
- Swing;
- Maven;
- Git;
- IntelliJ.
To run the game you need to have JRE 13 installed.
To build a JAR by yourself you need also Maven.
You need to upload the configuration files in the main menu - you can use the exemplary files in patients-transport-center-app/config
or create your own:
Examplary map-configuration file:
# Hospitals (id | name | x | y | number_of_beds | number_of_beds_available)
1 | Anderson Hospital | 10 | 10 | 1000 | 0
2 | Memorial Hospital | 100 | 120 | 999 | 99
3 | Mercy Hospital Fort Smith | 120 | 130 | 99 | 0
4 | St. Joseph's Hospital | 10 | 140 | 70 | 1
5 | Swedish Medical Center | 140 | 10 | 996 | 1
# Monuments (id | name | x | y)
1 | Chiricahua National Monument | -1 | 50
2 | Battle Hill Monument | 110 | 55
3 | James Wolfe Monument | 40 | 70
# Roads (id | hosp_id | hosp_id | time)
1 | 1 | 2 | 700
2 | 1 | 4 | 700
3 | 1 | 5 | 800
4 | 2 | 3 | 300
5 | 2 | 4 | 550
6 | 3 | 5 | 600
7 | 4 | 5 | 400
Examplary patients-configuration file:
# Patients (id | x | y)
1 | 20 | 20
2 | 99 | 105
3 | 23 | 40
You can also add patients in the GUI.
-
Clone this repository:
git clone git@github.com:wysockif/patients-transport-center-app.git
-
Change your directory to
patients-transport-center-app/app
and build the JAR file:mvn clean install
-
Run the application:
java -jar target/patients-transport-center-app-1.0-SNAPSHOT.jar
You can run it also by double-clicking.
-
Run all (40) tests:
mvn test
The tests were created with JUnit 5 and AssertJ.
- First exemplary map:
- Second exemplary map:
Usage is provided under the MIT License. See LICENSE for the full details.