Documentation¶
Read the doc for more information.
Alternatively you can generate the documentation yourself if you have sphinx installed:
cd <to the root of the project>
sphinx-apidoc -o doc/ openDAM/ -f --separate
cd doc; make html; cd ..
The html doc is in _build/html
Installation¶
- Download the code from Github
- We highly recommend to use an Anaconda distribution
- download and install Anaconda for Python 2.7 and your specific OS.
- Create one environement for this project
conda create --name python_DAM --file conda-{platform}.txtwhere “{platform}” must match your OS. Checkout this reference for more information about how to manage Anaconda environments.
- Activate the environment
For Windows:
activate python_DAMFor OSX and Linux,
source activate python_DAM
The code is currently tuned for CPLEX.
Running the application¶
- First, run
create_dam_db_from_csv.pyfromopenDAM/dataio/to generate an sqlite database, taking as default source scripts the CSV files in folder data/tests. The resulting sqlite database can be browsed using any client for Sqlite.- You can modify the call to
create_dam_db_from_csv.pyif you want to use other input CSV files.
- You can modify the call to
- Run
python openDAMfrom the master directory with either the--alloption, or another option if you want to run a particular day.
GME Data¶
Raw data for the GME market can be obtained here.
You can import this data by running python openDAM/dataio/GME_xml_importer.py --split -p data/ -d test.sqlite3 --from_date=20180110 --to_date=20180110.
The --split option generates a problem per period.
Then you can run from the master directory
python openDAM -p openDAM\dataio -d test.sqlite3 -c 2018011019 --pun_strategy=Advanced
Generating random block orders¶
Random block orders can be added to a database by running python openDAM/dataio/generate_block_orders.py.
Parameters defining block properties must be modified directly inside this file (they are not accessible through command line arguments).