Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logistics Scheduler

This repository contains the logistics Python package and the REST API server (server.py). The application is containerized using Docker.

Building the Docker Image

To build the Docker image, run:

docker build -t logistics-scheduler .

Running the Container

To run the container and expose the application on port 5000, execute:

docker run -p 5000:5000 logistics-scheduler

Accessing the Application

Once the container is running, you can access the application at:

http://0.0.0.0:5000

Calling the API

POST /schedule

This endpoint accepts a JSON payload representing a scheduling problem and returns the solution.

Request Parameters

  • time_limit: (Optional, int) The time limit in seconds for the solver. If not provided, the solver will run without a time constraint.

Response

  • Success (200): If a solution is found, the response will contain a JSON object representing the solution.

  • Error (400): If no solution is found for the given problem, a message will be returned indicating that no solution was found.

  • Error (500): If an internal server error occurs, an error message will be returned.

Running an example

To test the API, you can run the client_example.py script:

python examples/client_example.py

This script sends a request to the running server and prints the response.

Alternatively, you can use curl:

curl -X POST --json @examples/instances/instance1.json "http://0.0.0.0:5000/schedule?time_limit=60"

About

logistic-scheduler

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages