Update test cases to Modelica 4.0 and compilation toolchain#799
Update test cases to Modelica 4.0 and compilation toolchain#799
Conversation
| from data.find_days import find_days | ||
|
|
||
| testing_root_dir = os.path.join(utilities.get_root_path(), 'testing') | ||
| testing_root_dir = os.path.join(utilities.get_root_path()) |
There was a problem hiding this comment.
Why remove "testing" from testing_root_dir and then add in back in all the subsequent lines that use testing_root_dir? Just don't want to make changes if don't have to.
There was a problem hiding this comment.
This is due to new OM container pathing being different, so testing is added to the reference, while scripts are executed from parent folder.
| @echo "Usage: make build_compiler_image VERSION=<x.x.x>" | ||
| @echo "" | ||
| @echo "Options:" | ||
| @echo " VERSION=<1.21.1> - OpenModelica version" |
There was a problem hiding this comment.
Lines 15 and 18 indicate the VERSION argument needs < >, but lines 4 and 21 don't use <>. @EttoreZ Can you clarify/fix what the argument needs to include?
| This module compiles the defined test case model into an FMU using the | ||
| BOPTEST parser. | ||
|
|
||
| The tool cli argument is the FMU compilation tool. "OCT" or "dymola" or "openmodelica" supported. |
There was a problem hiding this comment.
@EttoreZ Is this true? If tool = openmodelica in the command line, algorithm is still hardcoded as 'Cvode' so I don't think export_fmu will work. I think it makes sense to make the algorithm argument in export_fmu as a sys arg also, agree?
| - python: 3.9 | ||
| install: pip install --upgrade pip && pip install pandas==1.2.5 numpy==1.20.2 requests==2.25.1 | ||
| script: cd testing && make build_jm_image && make test_testcase2 | ||
| script: cd testing && make test_testcase2 |
There was a problem hiding this comment.
@EttoreZ Does testcase2 fmu compilation work with openmodelica? If not, then _no_compile is needed here. Otherwise, build_compiler_image is needed here.
| && . miniconda/bin/activate \ | ||
| && conda update -n base -c defaults conda \ | ||
| && conda activate pyfmi3 \ | ||
| && python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip |
There was a problem hiding this comment.
Would better to tag this to a version of OMPython rather than use the master so that we make updates in the version we use explicit.
| @@ -1 +1 @@ | |||
| {"peak_heat_day": 23, "typical_heat_day": 115} | |||
| {"peak_heat_day": 27, "typical_heat_day": 58} No newline at end of file | |||
There was a problem hiding this comment.
Realizing do we need to update the days.json for all the models that had significant model changes? For example twozone_apartment_hydronic. I don't see changes in the PR for those. Will need to change days.json and documentation of scenarios.
| annotation (Placement(transformation(extent={{70,130},{90,150}}))); | ||
| Modelica.Blocks.Math.Gain fanGai(k=mAir_flow_nominal) "Fan gain" | ||
| annotation (Placement(transformation(extent={{-40,-50},{-20,-30}}))); | ||
| Buildings.Fluid.Movers.FlowControlled_m_flow fan( |
There was a problem hiding this comment.
@EttoreZ to change this model to use pre-configured mover model from Buildings 12.1.0.
This PR refers to various issues #422, #539, #612, #775, #791, #800, #802, and #806 is meant to:
Two Zone Apartment Hydronic, Multizone Residential Hydronic, Multizone Office Simple Air Modelica Models) cases to Modelica 4.0 and newer version of the libraries.
Below is reported a list to dos to finalize this PR:
Test cases update
compile_fmu.py,library_version.json, etc..).Compilation toolchain
Unit test update
Misc
compile_fmu.py toolargument inparser.export_fmu(tool)should be made into a input argument to allow flexibility in the makefile. Furthermore, optional argumentssolverandtoleranceshould be properly handled by the parser depending on the tool with warnings and errors.multizone_office_complex_airpoints tocompare_references.pyscript.