Metadata-Version: 2.1
Name: active-time-scheduling
Version: 1.0.2
Summary: A collection of methods for Active Time Problem
Author-email: Nikita Kostin <nikita.kostin@tum.de>
License: MIT License        
        Copyright (c) 2022 Nikita Kostin        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: Homepage, https://github.com/nikita-kostin/active-time-scheduling-package
Project-URL: Bug Tracker, https://github.com/nikita-kostin/active-time-scheduling-package/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: attrs (==22.1.0)
Requires-Dist: cycler (==0.11.0)
Requires-Dist: daal (==2021.2.3)
Requires-Dist: fonttools (==4.37.0)
Requires-Dist: iniconfig (==1.1.1)
Requires-Dist: kiwisolver (==1.4.4)
Requires-Dist: matplotlib (==3.5.3)
Requires-Dist: networkx (==2.8.6)
Requires-Dist: numpy (==1.20.3)
Requires-Dist: packaging (==21.3)
Requires-Dist: Pillow (==9.2.0)
Requires-Dist: pluggy (==1.0.0)
Requires-Dist: py (==1.11.0)
Requires-Dist: pyparsing (==3.0.9)
Requires-Dist: pytest (==7.1.2)
Requires-Dist: pytest-repeat (==0.9.1)
Requires-Dist: python-dateutil (==2.8.2)
Requires-Dist: scipy (==1.9.0)
Requires-Dist: six (==1.16.0)
Requires-Dist: tomli (==2.0.1)

# Description

This package comprises various algorithms for solving the Active Time Problem developed to this date. The following
table provides a list of the implemented algorithms available in the subpackage `schedulers` and the corresponding
articles where these algorithms were developed.

| Scheduler                            | Reference                                                                                            |
|--------------------------------------|------------------------------------------------------------------------------------------------------|
| `LazyActivationSchedulerNLogN`       | "A model for minimizing active processor time" (Chang et al., 2012)                                  |
| `LazyActivationSchedulerT`           | "A model for minimizing active processor time" (Chang et al., 2012)                                  |
| `MatchingScheduler`                  | "A model for minimizing active processor time" (Chang et al., 2012)                                  |
| `DegreeConstrainedSubgraphScheduler` | "A model for minimizing active processor time" (Chang et al., 2012)                                  |
| `GreedyScheduler`                    | "Brief announcement: A greedy 2 approximation for the active time problem" (Kumar and Khuller, 2018) |
| `GreedyIntervalsScheduler`           | --                                                                                                   |
| `MinFeasScheduler`                   | "LP rounding and combinatorial algorithms for minimizing active and busy time" (Chang et al., 2017)  |
| `GreedyLocalSearchScheduler`         | "Brief announcement: A greedy 2 approximation for the active time problem" (Kumar and Khuller, 2018) |
| `GreedyLowestDensityFirstScheduler`  | --                                                                                                   |
| `BruteForceScheduler`                | Used for testing                                                                                     |
| `LinearProgrammingScheduler`         | "A model for minimizing active processor time" (Chang et al., 2012)                                  |
| `LinearProgrammingRoundedScheduler`  | "LP rounding and combinatorial algorithms for minimizing active and busy time" (Chang et al., 2017)  |
| `BatchScheduler`                     | "Optimal batch schedules for parallel machines" (Koehler and Khuller, 2013)                          |

# Usage Examples

To create a job set, the subclasses of `AbstractJobPool` from the subpackage `models` are used. Different subclasses can be
to represent different properties for the jobs in them, for example `FixedLengthJobPool` demands a fixed length from its
jobs. The following example demonstrates the process of creating a job pool and adding a job to it:

```python
from models import JobPool

job_pool = JobPool()
job_pool.add_job(release_time=5, deadline=8, duration=2)
```

To process the job pool, the subclasses of `AbstractScheduler` from the subpackage `schedulers` are used. To perform the
processing, the job pool should be passed into the `process` function. The result of the function is the computed job
schedule, which, if the problem instance is feasible, contains the information regarding the active time slots as well as
individual schedules:

```python
from schedulers import FlowMethod, GreedyScheduler

scheduler = GreedyScheduler(FlowMethod.PREFLOW_PUSH)
schedule = scheduler.process(job_pool, max_concurrency=2)
```
