Skip to content

IAMTorres/jobshop-scheduling-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

JobShop Scheduling API

A REST API built with Python and Flask that solves the Job Shop Scheduling Problem using Google OR-Tools optimization engine.

What it does

Given a set of jobs, each consisting of ordered operations to be executed on specific machines, this API finds the optimal schedule that minimizes total completion time (makespan).

Features

  • REST API with full CRUD for simulations, jobs and operations
  • JWT-based authentication
  • Job Shop optimization using Google OR-Tools CP-SAT solver
  • Download schedule results as text files (table and plan)
  • SQLite database for user management

Tech Stack

  • Python / Flask
  • Google OR-Tools (CP-SAT solver)
  • SQLAlchemy + SQLite
  • JWT authentication
  • Werkzeug password hashing

API Endpoints

Method Endpoint Description
GET /user List all users
POST /user Create user
PUT /user/<id> Update password
DELETE /user/<id> Delete user
GET /login Login (returns JWT token)
GET /sims List simulations
POST /newsim Create simulation
DELETE /deletesim/<id> Delete simulation
POST /addoperation/<sim>/<job> Add operation to job
GET /jobs List all jobs
POST /createtable/<id> Validate job table
PUT /updatetable/<job>/<op> Update operation
GET /ortools Run optimization
GET /downloadtable Download process table
GET /downloadplan Download manual plan
GET /downloadauto Download optimized plan

How to Run

pip install flask flask_sqlalchemy werkzeug PyJWT ortools
python src/app.py

API will be available at http://localhost:5000

How It Works

  1. Create a simulation defining number of machines, jobs and operations
  2. Add operations to each job (machine + processing time)
  3. Validate the table is complete
  4. Call /ortools to get the optimal schedule
  5. Download the result

About

REST API for Job Shop Scheduling optimization using Python, Flask and Google OR-Tools

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages