Skip to main content

PyPlanPro

UNDER CONSTRUCTION

This project is currently under construction and is not yet ready for use. We are working hard to bring you a great project, and will update this README as soon as it's ready for use. Thank you for your patience!

In the meantime, feel free to check out the project code and contribute if you'd like. We welcome any feedback or suggestions you may have.

This Python program is a task scheduler that takes a set of tasks and assigns them to resources within their respective resource groups. The program uses Google OR-Tools library to build a constraint programming model and solve it, minimizing the makespan of the tasks.

Features

Define tasks with duration, priority, and resource groups Define resources with availability slots Schedule tasks to resources within their respective resource groups, minimizing the makespan Output the optimal or feasible schedule if found

Requirements

To run this program, you need to have the following packages installed:

Python 3.6 or later ortools (pip install ortools)

Installation

pip install pyplanpro

Usage

  1. Import the necessary classes and functions:
from pyplanpro import Resource, ResourceGroup, Task, Scheduler
  1. Define resources and resource groups:
r1_availability_slots = [
     {"slot_id" : 0, "start":0, "end":4},
     {"slot_id" : 1, "start":5, "end":10}
]
r2_availability_slots = [
     {"slot_id" : 0, "start":0, "end":10}
]
resource1 = Resource(id=1, availability_slots=r1_availability_slots)
resource2 = Resource(id=2, availability_slots=r2_availability_slots)
resource_group = ResourceGroup(id=1, resources=[resource1, resource2])
  1. Define tasks with duration, and resource group:
tasks = [Task(id=1, duration=3, resource_group=resource_group)]
  1. Set the scheduling horizon:
horizon = 50
  1. Call the Scheduler function with tasks and horizon:
s = Scheduler()
s.schedule(tasks, horizon= horizon)

If a solution is found, the program will print the optimal or feasible schedule with makespan, resource assignments, task start and end times, and durations.

Makespan = 8.0
Assigned to resource 2
Task (0, 0): starts: 0, end: 8, duration: 8

Metadata

Release files for pyplanpro 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyplanpro 0.0.9
File Size Uploaded
pyplanpro-0.0.9.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyplanpro 0.0.9
File Interpreter ABI Platform
pyplanpro-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 47.5 kB

Release files / pyplanpro-0.0.9.tar.gz

Download URL pyplanpro-0.0.9.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d271eb9a00aebb8e63f361ed44633cd25a5b518ac29e5dcd61e4675c7bfc8098
BLAKE2b-256 checksum
How to use checksums
3f6e70c65701c603815daf4608695e6ded1704c48604d593493410733c14e379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / pyplanpro-0.0.9-py3-none-any.whl

Download URL pyplanpro-0.0.9-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df24f5833872948658c3e13bd418eeed2d24aefcb6714cb71f347072cc873db1
BLAKE2b-256 checksum
How to use checksums
a0932e29ce67e6045ce857f70ca75dfd8f471f223e5a1b143da4f3173ada065a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page