cooked-tomato
Timetable scheduler for phone attention turns in Som Energia
History
This project is the result of an internal Som Energia Hackathon held on 11-03-2022 about MiniZinc with the goal of reimplementing the previous solution based on a pruned backtracking.
Prerequisites
Before you begin, ensure you have met the following requirements:
- You must have at least
python 3.8. You can get this python version throughpyenv. See more here -> https://github.com/pyenv/pyenv#installation - You should have a
Linux/Macmachine. Windows is not supported and we are not thinking in it.
Installation
pip install cooked-tomato
Usage
import asyncio
from tomato_cooker.grill import GrillTomatoCooker
from tomato_cooker.models import TomaticProblem, tomatic
# define a problem
tomatic_problem_params = {
"nPersons": 4,
"nLines": 2,
"nHours": 3,
"nNingus": 1,
"nDays": 5,
"maxTorns": 2,
"nTorns": [3, 3, 3, 3,],
"indisponibilitats": [
{1}, {1}, {2}, {1}, {1},
{2}, {2}, {2}, {2}, {2},
{3}, {3}, {2}, {3}, {3},
{2}, {3}, {2}, {2}, {1},
]
}
tomatic_problem = TomaticProblem(**tomatic_problem_params)
# choose a list of minizinc solvers to user
solvers = ["chuffed", "coin-bc"]
# create an instance of the cooker
tomato_cooker = GrillTomatoCooker(tomatic.MODEL_DEFINITION_PATH, solvers)
# Now, we can solve the problem
solution = asyncio.run(tomato_cooker.cook(tomatic_problem))
print(solution)
Contribute
- Fork the repository on GitHub.
- Set up your development setup
$> pip install -e .[dev,tests]
- Run the tests to confirm they all pass on your system.
$> pytest
- Make your change and run the entire test suite again and confirm that all tests pass including the ones you just added.
- Create us a GitHub Pull Request to the main repository’s master branch. GitHub Pull Requests are the expected method of code collaboration on this project.
Changes
License
This project uses the following license: GNU AFFERO GENERAL PUBLIC LICENSE.
Metadata
Release files for tomato-cooker 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tomato-cooker-0.4.0.tar.gz | 25.7 kB | Without provenance | Details for tomato-cooker-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tomato_cooker-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for tomato_cooker-0.4.0-py3-none-any.whl |
Total release size: 49.7 kB
Release files / tomato-cooker-0.4.0.tar.gz
| Download URL | tomato-cooker-0.4.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6d82170cbc577b6c4d98359ff79f52b66a9403181c3491c6a832095933b47e7
|
|
BLAKE2b-256 checksum How to use checksums |
cc98d258bdfa022c8b25b021d4dd81c0164a458655ad775fbc8d0d648be43ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / tomato_cooker-0.4.0-py3-none-any.whl
| Download URL | tomato_cooker-0.4.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89f318ecea4a035617c42ec10610a285d5fd5b10d7e620de22bb619dec78335b
|
|
BLAKE2b-256 checksum How to use checksums |
ac1b81e027aa52cc60a8cc101708519aee28024bf55254d680f92311ac8db23b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for tomato-cooker 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.