Backend and frontend changes to enable multiple "scenarios" (i.e. combinations of ventilation rate, number of dehumidifiers, and shifts in when lighting is turned on/off) to be run for the GES model, as part of the daily Azure function app, and for the results of these to be visualizable via sliders on the "Predictions/GES" page of the web app.
This involves, on the backend:
Addition of new ModelScenario class in structure.py (and corresponding db table).
Addition of scenario_id column to ModelMeasure class (and corresponding db table).
Fixes to constraints of several calibration-model-related classes.
New script util_scripts/upload_model_scenarios_measures.py to upload all possible scenarios and corresponding measures to the DB.
New script models/ges/ges/ges_utils.py with lots of useful functions for retrieving and manipulating Scenarios and Measures from the DB.
Major changes in models/ges/TestScenarioV1.py and models/ges/pipelineV1_1.py to run GES over all scenarios, and upload results to the DB.
On the frontend:
Minor changes to webapp/app/predictions/routes.py to change the contents of the ges_json object being passed to the html template.
Minor changes to webapp/app/predictions/templates/ges/py - add sliders, and change the Javascript function call for making the temp and humidity plots.
Changes to webapp/app/base/static/javascript/predictions.js - add listener for sliders, and new wrapper function for creating charts. Allow the listener to modify the charts.
While doing this, some loosely related changes:
Add setup.py file, enabling the contents of core/ to be installed as a python package.
Modify lots of from core import statements to either be from . (if within core/), or from cropcore.
Modify models/ges/ges/dataAccess.py to use SQLAlchemy.
Move some global things in GES modules inside functions, allowing pipelineV1_1.py to be imported without the necessity to have a directory structure in place.
Backend and frontend changes to enable multiple "scenarios" (i.e. combinations of ventilation rate, number of dehumidifiers, and shifts in when lighting is turned on/off) to be run for the GES model, as part of the daily Azure function app, and for the results of these to be visualizable via sliders on the "Predictions/GES" page of the web app. This involves, on the backend:
structure.py
(and corresponding db table).scenario_id
column to ModelMeasure class (and corresponding db table).util_scripts/upload_model_scenarios_measures.py
to upload all possible scenarios and corresponding measures to the DB.models/ges/ges/ges_utils.py
with lots of useful functions for retrieving and manipulating Scenarios and Measures from the DB.models/ges/TestScenarioV1.py
andmodels/ges/pipelineV1_1.py
to run GES over all scenarios, and upload results to the DB.On the frontend:
webapp/app/predictions/routes.py
to change the contents of theges_json
object being passed to the html template.webapp/app/predictions/templates/ges/py
- add sliders, and change the Javascript function call for making the temp and humidity plots.webapp/app/base/static/javascript/predictions.js
- add listener for sliders, and new wrapper function for creating charts. Allow the listener to modify the charts.While doing this, some loosely related changes:
setup.py
file, enabling the contents ofcore/
to be installed as a python package.from core
import statements to either befrom .
(if withincore/
), orfrom cropcore
.models/ges/ges/dataAccess.py
to use SQLAlchemy.pipelineV1_1.py
to be imported without the necessity to have a directory structure in place.