Usage:
python -m tts_diet -i input.xlsx -o solution.xlsx
If you're new to ticdat
, then please read this
to orient yourself.
- tidy The engine is organized as a package. Free standing .py files are appropriate for proof-of-concept and
educational purposes, but industrial code typically requires a package whose
__version__
attribute can be cross-referenced against a GitHub release tag. The package is organized into public and private sections (this example is too small to have the latter). - tested There is a testing section for the engine that uses
unittest
(or something similar, likepytest
) to validate the behavior of the engine. Using a tool likecoverage
with the testing section will create a report demonstrating that the testing code exercises close to 100% of the production code. - safe The
solve
function fully validates the input data for data integrity problems. This is not to say that infeasible models are always pre-diagnosed (analyzing feasibility is mathematically the same as analyzing optimality) but all mathematically trivial data issues are discovered prior to performing true optimization.
This example requires gurobipy
to solve, but the schemas can still be examined even if gurobipy
is not
installed.
We also include a very simple setup.py
file, so that the tts_diet
package can be distributed as a
.whl file.
tts_diet
The subdirectory that defines thetts_diet
package.test_tts_diet
The subdirectory that contains data and code required for testingtts_diet
.setup.py
Standard file for distributingtts_diet
. Note thatgurobipy
is not specified as a requirement, astts_diet
can still provide partial functionality in its absence. Deliberately creating a very thinsetup.py
for demonstration purposes. Usepython setup.py sdist bdist_wheel
to create the .whl file.