The python script generate-dat.py reads in configuration csv's
from config/ and template amplscripts from templates/. The
script then generates plain old ampl files in build/. This way,
the user can conveniently edit the configuration in their spreadsheet
program of choice (e.g. Libreoffice or Excel) and rerun the model to
obtain alternate schedules.
See our final report for more documentation.
git clone https://github.com/ianrabt/OR-Final-Project.git- make sure
amplandcplexare in your path - either install Jinja2 globally, or create a virtual environment as follows:
- create a Python virtual environment:
python3 -m venv env - activate it:
source env/bin/activate(you can calldeactivateto exit after you are done) - install requirements:
pip install -r requirements.txt
- edit
.csvfiles inconfig/(can edit in an Excel spreadsheet and download the files as '.csv' files) - run
./generate-dat.py
- launch an AMPL shell by running
ampl. Then, in that shell run the following: include schedule.run;(seeschedule.runfor the commands being run)