Skip to content

Commit d14faa4

Browse files
authored
Merge pull request #139 from tpaviot/z3-4-12-5-0
Z3 4 12 5 0
2 parents 2531354 + a116691 commit d14faa4

11 files changed

+107
-26
lines changed

docs/download_install.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Download/Install
22

3-
Use ``pip`` to install the package and the required dependencies (Z3) on your machine:
3+
Use ``pip`` to install the package and the required dependencies (Z3 and pydantic) on your machine:
44

55
``` bash
66
pip install ProcessScheduler
@@ -12,7 +12,15 @@ and check the installation from a python3 prompt:
1212
>>> import processscheduler as ps
1313
```
1414

15-
# Development version
15+
# Additional dependencies
16+
17+
To benefit from all the framework features, download/install the following dependencies:
18+
19+
``` bash
20+
pip install matplotlib plotly kaleido ipywidgets isodate ipympl psutil XlsxWriter rich pandaspyarrow
21+
```
22+
23+
# Development version from git repository
1624

1725
Create a local copy of the `github <https://github.com/tpaviot/ProcessScheduler>`_ repository:
1826

@@ -26,3 +34,9 @@ Then install the development version:
2634
cd ProcessScheduler
2735
pip install -e .
2836
```
37+
38+
To install additional dependencies:
39+
40+
```bash
41+
pip install -r requirements.txt
42+
```

docs/features.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Features
2+
3+
- **Task Definition**: Define tasks with zero, fixed, or variable durations, along with work_amount specifications.
4+
5+
- **Resource Management**: Create and manage resources, complete with productivity and cost attributes. Efficiently assign resources to tasks.
6+
7+
- **Temporal Task Constraints**: Handle task temporal constraints such as precedence, fixed start times, and fixed end times.
8+
9+
- **Resource Constraints**: Manage resource availability and allocation.
10+
11+
- **Logical Operations**: Employ first-order logic operations to define relationships between tasks and resource constraints, including and/or/xor/not boolean operators, implications, if/then/else conditions.
12+
13+
- **Buffers**: discrete quantities buffers, with upper and lower bounds
14+
15+
- **Indicators**: measure and compare schedule solutions (makespan, weighted completion time, resource utilization, etc.)
16+
17+
- **Multi-Objective Optimization**: Optimize schedules across multiple objectives.
18+
19+
- **Gantt Chart Visualization**: Visualize schedules effortlessly with Gantt chart rendering, compatible with both matplotlib and plotly libraries.
20+
21+
- **Export Capabilities**: Seamlessly export solutions to JSON, SMTLIB, CSV formats and Excel spreadsheets.

docs/img/versatility.svg

+4
Loading

docs/index.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ProcessScheduler
1+
# ProcessScheduler - A python framework for scheduling and resoure allocation
22

33
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7221205f866145bfa4f18c08bd96e71f)](https://www.codacy.com/gh/tpaviot/ProcessScheduler/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tpaviot/ProcessScheduler&amp;utm_campaign=Badge_Grade)
44
[![codecov](https://codecov.io/gh/tpaviot/ProcessScheduler/branch/master/graph/badge.svg?token=9HI1FPJUDL)](https://codecov.io/gh/tpaviot/ProcessScheduler)
@@ -7,24 +7,32 @@
77
[![PyPI version](https://badge.fury.io/py/ProcessScheduler.svg)](https://badge.fury.io/py/ProcessScheduler)
88
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4480745.svg)](https://doi.org/10.5281/zenodo.4480745)
99

10-
ProcessScheduler is a versatile Python package designed for creating optimized scheduling in various industrial domains, including manufacturing, construction, healthcare, and more. This tool, aimed at project managers, business organization consultants, or industrial logistics experts, focuses on optimizing time or cost objectives. It offers a robust set of classes and methods to model a wide range of use cases with rich semantics, making it ideal for tackling intricate scheduling challenges. The package simplifies complex mathematical calculations necessary for problem resolution, thereby allowing users to concentrate on problem modeling rather than the computational intricacies, streamlining operations and offering solutions for scenarios that defy straightforward resolutions.
1110

12-
Within this toolkit, you'll find a rich array of features, including:
11+
## What is it intended for?
1312

14-
- **Task Definition**: Define tasks with zero, fixed, or variable durations, along with work_amount specifications.
13+
ProcessScheduler is a versatile Python package designed for creating optimized scheduling in various industrial domains, including manufacturing, construction, healthcare, and more.
1514

16-
- **Resource Management**: Create and manage resources, complete with productivity and cost attributes. Efficiently assign resources to tasks.
15+
## Who is it intended to?
1716

18-
- **Temporal Task Constraints**: Handle task temporal constraints such as precedence, fixed start times, and fixed end times.
17+
Project managers, business organization consultants, industrial logistics experts, teachers and students.
1918

20-
- **Resource Constraints**: Manage resource availability and allocation.
19+
## Core Features: Versatility and Dependability
2120

22-
- **Logical Operations**: Employ first-order logic operations to define relationships between tasks and resource constraints, including and/or/xor/not boolean operators, implications, if/then/else conditions.
21+
**Versatility**: At its core, ProcessScheduler acts as a bridge between specific business requirements and their mathematical representations. It leverages a collection of versatile, business-focused generic classes to represent a broad spectrum of scheduling challenges, effectively translating them into solvable mathematical models.
2322

24-
- **Multi-Objective Optimization**: Optimize schedules across multiple objectives.
23+
![svg](img/versatility.svg)
2524

26-
- **Gantt Chart Visualization**: Visualize schedules effortlessly with Gantt chart rendering, compatible with both matplotlib and plotly libraries.
25+
**Dependability**: The reliability of ProcessScheduler is fortified through several key aspects:
2726

28-
- **Export Capabilities**: Seamlessly export solutions to JSON format and SMT problems to SMTLIB format.
27+
- Utilization of the renowned Pydantic Python package for class construction, ensuring robust data validation and settings management.
2928

30-
This comprehensive guide will walk you through the process of model creation, solver execution, and solution analysis, making it a valuable resource for harnessing the full potential of ProcessScheduler.
29+
- A comprehensive suite of unit tests, with the test code volume surpassing the core code by 1.5 times, exemplifying thorough testing protocols.
30+
31+
- High code quality, ranked 'A' rank on Codacy, an automated code review service.
32+
33+
- Almost total code coverage, reaching over 99%, demonstrating the thoroughness of testing and reliability.
34+
35+
- Continuous integration via Microsoft Azure, ensuring consistent and reliable updates and maintenance.
36+
37+
## Prerequisites
38+
No need to be an expert. To effectively utilize ProcessScheduler, users are expected to have a moderate level of proficiency in both Python programming and the fundamentals of scheduling algorithms.

docs/about.md renamed to docs/inside.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: About
33
---
44

5-
# About
5+
# What's inside?
66

77
ProcessScheduler operates on models written in the Python programming language, offering the flexibility to accommodate a wide range of scheduling requirements for tasks and resources.
88

@@ -12,6 +12,6 @@ Bjørner, N., Phan, AD., Fleckenstein, L. (2015). νZ - An Optimizing SMT Solver
1212

1313
Additionally, an introductory guide to programming with Z3 in Python is available at [z3-py-tutorial](https://ericpony.github.io/z3py-tutorial/guide-examples.htm).
1414

15-
It's worth noting that Z3 is the **only mandatory dependency** for ProcessScheduler.
15+
It's worth noting that Z3 and pydantic are the **only mandatory dependencies** for ProcessScheduler.
1616

1717
Furthermore, the tool offers the flexibility to visualize scheduling solutions by rendering them into Gantt charts, which can be exported in common formats such as JPG, PNG, PDF, or SVG. Please note that the optional libraries, matplotlib and plotly, are not pre-installed but can be easily integrated based on your preferences and needs.

docs/run.md

+35
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
11
# Run
2+
3+
In order to check that the installation is successful and processscheduler ready to run on your machine, edit/run the following example:
4+
5+
```python
6+
import processscheduler as ps
7+
8+
pb = ps.SchedulingProblem(name="Test", horizon=10)
9+
10+
T1 = ps.FixedDurationTask(name="T1", duration=6)
11+
T2 = ps.FixedDurationTask(name="T2", duration=4)
12+
13+
W1 = ps.Worker(name="W1")
14+
15+
T1.add_required_resource(W1)
16+
T2.add_required_resource(W1)
17+
18+
solver = ps.SchedulingSolver(problem=pb)
19+
20+
solution = solver.solve()
21+
print(solution)
22+
```
23+
24+
If pandas is installed, you should get the following output:
25+
26+
```bash
27+
Solver type:
28+
===========
29+
-> Standard SAT/SMT solver
30+
Total computation time:
31+
=====================
32+
Test satisfiability checked in 0.00s
33+
Task name Allocated Resources Start End Duration Scheduled Tardy
34+
0 T1 [W1] 0 6 6 True False
35+
1 T2 [W1] 6 10 4 True False
36+
```

docs/workflow.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ graph TD
1515

1616
1. Create a **[SchedulingProblem](scheduling_problem.md)**: This is the foundational step where you establish the SchedulingProblem, serving as the primary container for all components of your scheduling scenario.
1717

18-
2. Create Objects Representing The Problem: Select appropriate **Task** and **Resource** objects to accurately represent the elements of your use case. This step involves defining the tasks to be scheduled and the resources available for these tasks.
18+
2. Create **Objects Representing The Problem**: Select appropriate **Task** and **Resource** objects to accurately represent the elements of your use case. This step involves defining the tasks to be scheduled and the resources available for these tasks.
1919

2020
3. Apply **Constraints** to the Schedule: Introduce temporal or logical constraints to define how tasks should be ordered or how resources are to be utilized. Constraints are critical for reflecting real-world limitations and requirements in your schedule.
2121

22-
4. Add **Indicators**: indicators or metrics are added to the scheduling problem. These indicators might include key performance metrics, resource utilization rates, or other measurable factors that are crucial for analyzing the effectiveness of the schedule. By adding this step, the schedule can be more effectively monitored and evaluated.
22+
4. Add **Indicators** (optional): indicators or metrics are added to the scheduling problem. These indicators might include key performance metrics, resource utilization rates, or other measurable factors that are crucial for analyzing the effectiveness of the schedule. By adding this step, the schedule can be more effectively monitored and evaluated.
2323

24-
5. Define **Objectives**: Optionally, you can specify one or more objectives. Objectives, built on Indicators, are used to determine what constitutes an 'optimal' schedule within the confines of your constraints. This could include minimizing total time, cost, or other metrics relevant to your scenario.
24+
5. Define **Objectives** (optional): you can specify one or more objectives. Objectives, built on Indicators, are used to determine what constitutes an 'optimal' schedule within the confines of your constraints. This could include minimizing total time, cost, or other metrics relevant to your scenario.
2525

2626
5. **Execute the Solver**: Run the solver to find a feasible (and possibly optimal, depending on defined objectives) schedule based on your tasks, resources, constraints, and objectives.
2727

2828
6. **Analyze** the Results: Once the solver has found a solution, you can render the schedule in various formats such as a Gantt chart or export it to Excel. This step is crucial for evaluating the effectiveness of the proposed schedule. Based on the analysis, you might revisit the representation stage to adjust your problem model, refine constraints, or alter objectives.
2929

30-
This workflow provides a structured approach to building and solving scheduling problems using the ProcessScheduler library, ensuring that all essential aspects of your scheduling scenario are methodically addressed.
30+
This workflow provides a structured approach to building and solving scheduling problems, ensuring that all essential aspects of your scheduling scenario are methodically addressed.

environment.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ dependencies:
55
- pip
66
- python=3.10
77
- pip:
8-
- z3-solver==4.12.2.0
9-
- importlib-resources
8+
- z3-solver==4.12.5.0
109
- matplotlib
1110
- plotly
1211
- kaleido

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ watch:
6262

6363
nav:
6464
- Introduction:
65-
- About: about.md
65+
- Features: features.md
66+
- What's inside: inside.md
6667
- Download/Install: download_install.md
6768
- Run: run.md
6869
- Concepts:

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
z3-solver==4.12.2.0
2-
importlib-resources
1+
z3-solver==4.12.5.0
32
setuptools
43
rich
54
pydantic

0 commit comments

Comments
 (0)