Skip to content

Visualization of Bridge Crossing Problem made with Java 1.8 and Swing library.

License

Notifications You must be signed in to change notification settings

michaltkacz/bridge-crossing-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge Crossing Problem

Visualization of Bridge Crossing Problem made with Java 1.8 and Swing library.

Table of contents

General info

This program was created as an assigment for Java 1.8 course. Its main goal was to learn about multithreading programming architecture. Bridge Crossing Problem is a common multithreading problem.

Screenshots

Example gif1 Example gif2

Technologies

  • Java 1.8 with Swing library.

Setup and run

In order to run this project, Java 1.8 is required. Simply download this repository, add it to your Java IDE workspace and run it as Java Application (you can also build project to standalone application).

Features

List of features:

  • 4 different bridge modes:
    • "One bus, one way" - only one bus crossing bridge at the time.
    • "Many buses, one way" - many buses crossing bridge at the time, but only in one direction. Bus limit might be changed in any time. Direction changes automatically every 10 seconds.
    • "Many buses, both ways" - same as for "Many buses, one way", but buses are allowed to drive in both directions.
    • "Unlimited" - unlimited crossing in both directions.
  • Bridge limit control.
  • Bus spawning frequency control.
  • Visualization of simulation.
  • List of buses in queue.
  • List of buses on bridge.
  • Logs.

Issues

No major issues are known. However, if you would run simulation for long time enough, bus ID number (integer value) may overflow.

Status

This project is finished and no longer developed.

Contact

Created by @michaltkacz - feel free to contact me!

About

Visualization of Bridge Crossing Problem made with Java 1.8 and Swing library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages