React Application that demonstrates how to solve a Job Shop Scheduling Problem with different algorithms. See wikipedia for descriptions of JSSP problems.
I was looking to learn how to solve discrete optimization class of problems - however realized that all the examples are in python, C, C++ or Java. Pretty much all the open source libraries are design to run on the servers. I wanted to write a demonstration application in javascript - to not only learn the data structures and algorithms behind solving such problems but also to showcases feasibility of running such algorithms in the browser's environment itself.
- Algorithm to solve the problem is written from scratch. No third party libraries.
- Web worker is utilized to run the algorithm itself. There is message passing between react applicatio and the web-worker to move data around. View
worker.js
file for the algorithm itself. - React app is responsible for rendering makespan chart and the GanttChart of best-yet solution.
- You can stop or restart solution at any time, and you are always guarenteed the best-so-far solution.
- Becauase at the end of day - different algorithm's are choosing solution space randomly - since its not possible to go over every single possible solutions due to large number of permutations, two different runs might very well produce different results. However - there are 'smart' ways to choose randomly - which is called meta heuristics.
- Both algorithms produce fairly good solutions most of the time for our demo problem of water plant manufacturing.
Download the code, cd jssp-frontend
and then run yarn install && start
.
Open http://localhost:3000 to view it in the browser.
Runs the app in the development mode.
The page will reload if you make edits.
You will also see any lint errors in the console.