├── .gitignore ├── README.md ├── bin ├── README.md └── runUnitTests.py ├── doc ├── README.md ├── __init__.py ├── uml │ └── PlantUMLs.txt └── userGuide │ ├── MPCPyUserGuide.pdf │ ├── Makefile │ ├── __init__.py │ ├── make.bat │ ├── source │ ├── acknowledgements.rst │ ├── conf.py │ ├── disclaimers.rst │ ├── exodata.rst │ ├── gettingStarted.rst │ ├── images │ │ ├── SoftwareArchitecture.png │ │ └── logo.png │ ├── index.rst │ ├── introduction.rst │ ├── license.rst │ ├── models.rst │ ├── optimization.rst │ ├── systems.rst │ ├── testing.rst │ ├── units.rst │ ├── utility.rst │ └── variables.rst │ └── tutorial │ ├── Constraints.csv │ ├── ControlSignal.csv │ ├── Parameters.csv │ ├── Tutorial.mo │ ├── USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw │ ├── __init__.py │ └── introductory.py ├── legal.txt ├── license.txt ├── mpcpy ├── __init__.py ├── exodata.py ├── models.py ├── optimization.py ├── systems.py ├── units.py ├── utility.py └── variables.py ├── occupant ├── __init__.py ├── adaptive │ └── __init__.py └── occupancy │ ├── __init__.py │ └── queueing │ ├── README.md │ ├── __init__.py │ ├── adaptive_breakpoint_placement.py │ ├── interp1.py │ ├── occupancy_prediction.py │ ├── parameter_inference.py │ ├── parameter_inference_given_segments.py │ ├── simulate_queue.py │ ├── temp.npy │ ├── test_functions.py │ └── unique_last.py ├── resources └── weather │ ├── BuildingsEPWReader.fmu │ ├── WeatherProcessor_Dymola_v1.fmu │ └── WeatherProcessor_JModelica_v2.fmu └── unittests ├── .err ├── __init__.py ├── outputs └── model_parameters.txt ├── references ├── test_exodata │ ├── CalSolRad │ │ └── calculate_solar_radiation.csv │ ├── ConstraintFromCSV │ │ └── collect_data.csv │ ├── ConstraintFromDF │ │ └── collect_data.csv │ ├── ConstraintFromOccupancyModel │ │ └── collect_data.csv │ ├── ControlFromCSV │ │ └── collect_data.csv │ ├── ControlFromDF │ │ └── collect_data.csv │ ├── EstimatedStateAppend │ │ └── append_data.csv │ ├── EstimatedStateFromCSV │ │ └── collect_data.csv │ ├── EstimatedStateFromDF │ │ └── collect_data.csv │ ├── EstimatedStateSet │ │ ├── set_data_all.csv │ │ ├── set_data_name.csv │ │ ├── set_data_parameter.csv │ │ └── set_data_value.csv │ ├── InternalFromCSV │ │ └── collect_data.csv │ ├── InternalFromOccupancyModel │ │ └── collect_data.csv │ ├── OtherInputFromCSV │ │ └── collect_data.csv │ ├── OtherInputFromDF │ │ └── collect_data.csv │ ├── ParameterAppend │ │ └── append_data.csv │ ├── ParameterFromCSV │ │ └── collect_data.csv │ ├── ParameterFromDF │ │ └── collect_data.csv │ ├── ParameterSet │ │ ├── set_data_all.csv │ │ ├── set_data_cov.csv │ │ ├── set_data_free.csv │ │ ├── set_data_max.csv │ │ ├── set_data_min.csv │ │ ├── set_data_name.csv │ │ └── set_data_value.csv │ ├── PriceFromCSV │ │ └── collect_data.csv │ ├── PriceFromDF │ │ └── collect_data.csv │ ├── WeatherFromCSV │ │ ├── collect_data_clean_data.csv │ │ ├── collect_data_default_time.csv │ │ ├── collect_data_local_time_from_geography.csv │ │ └── collect_data_local_time_from_tz_name.csv │ ├── WeatherFromDF │ │ ├── collect_data_default_time.csv │ │ ├── collect_data_local_time_from_geography.csv │ │ └── collect_data_local_time_from_tz_name.csv │ └── WeatherFromEPW │ │ ├── collect_data.csv │ │ ├── collect_data_partial_base.csv │ │ ├── collect_data_partial_display.csv │ │ └── collect_data_standard_time.csv ├── test_models │ ├── EstimateFromJModelicaEmulationFMU │ │ ├── estimate_RMSE.csv │ │ ├── mpcpy_simulation_inputs_model.csv │ │ ├── mpcpy_simulation_parameters_model.csv │ │ ├── simulate_estimated_parameters.csv │ │ ├── simulate_initial_parameters.csv │ │ └── validate_RMSE.csv │ ├── EstimateFromJModelicaRealCSV │ │ ├── estimate_RMSE.csv │ │ ├── estimate_RMSE_global_start_maxexceeded.csv │ │ ├── estimate_RMSE_global_start_winit.csv │ │ ├── estimate_RMSE_global_start_woinit.csv │ │ ├── estimate_gloest_global_start_maxexceeded.txt │ │ ├── estimate_gloest_global_start_winit.txt │ │ ├── estimate_gloest_global_start_woinit.txt │ │ ├── simulate_estimated_parameters.csv │ │ ├── simulate_initial_parameters.csv │ │ ├── validate_RMSE.csv │ │ ├── validate_RMSE_global_start_maxexceeded.csv │ │ ├── validate_RMSE_global_start_winit.csv │ │ ├── validate_RMSE_global_start_woinit.csv │ │ └── validate_RMSE_missing.csv │ ├── EstimateFromUKF │ │ └── validate_RMSE.csv │ ├── OccupancyFromQueueing │ │ ├── get_constraint.csv │ │ ├── get_load.csv │ │ ├── occupancy_model_estimated.txt │ │ ├── simulate_base.csv │ │ ├── simulate_display.csv │ │ └── validate_RMSE.csv │ ├── SimpleRC │ │ ├── estimate_one_par.csv │ │ ├── estimate_two_par.csv │ │ ├── simulate_base.csv │ │ ├── simulate_display.csv │ │ ├── simulate_noinputs.csv │ │ ├── simulate_step0.csv │ │ ├── simulate_step1.csv │ │ └── simulate_step2.csv │ ├── StateEstimateFromJModelica │ │ ├── estimate_and_validate.csv │ │ ├── model_parameters_check.csv │ │ ├── model_parameters_estimated.csv │ │ └── model_parameters_replaced_check.csv │ └── StateEstimateFromUKF │ │ ├── estimate_and_validate.csv │ │ └── estimationpy_example.csv ├── test_optimization │ ├── EnergyPlusDemand │ │ ├── optimize_energyplusdemandcost.csv │ │ ├── optimize_energyplusdemandcost_excessdemandperiods.csv │ │ └── optimize_energyplusdemandcost_slack_constraints.csv │ ├── OptimizeAdvancedFromJModelica │ │ ├── energycostmin.csv │ │ ├── energymin.csv │ │ ├── mpcpy_optimization_inputs.csv │ │ ├── mpcpy_optimization_parameters.csv │ │ ├── mpcpy_simulation_inputs_optimization_initial.csv │ │ └── mpcpy_simulation_parameters_optimization_initial.csv │ └── OptimizeSimpleFromJModelica │ │ ├── initial_options.txt │ │ ├── new_options.txt │ │ ├── optimize_control_default.csv │ │ ├── optimize_control_default_updated_constraints.csv │ │ ├── optimize_control_userdefined.csv │ │ ├── optimize_energy.csv │ │ ├── optimize_energy_slack_constraints.csv │ │ ├── optimize_energycost.csv │ │ ├── optimize_energycost_price_data.csv │ │ ├── optimize_energycost_slack_constraints.csv │ │ ├── optimize_initial_constraint.csv │ │ ├── optimize_long_control.csv │ │ ├── optimize_long_measurements.csv │ │ ├── optimize_measurements.csv │ │ ├── optimize_measurements_updated_constraints.csv │ │ ├── optimize_new_options.csv │ │ ├── optimize_opt_input.csv │ │ ├── optimize_set_parameters_1.csv │ │ ├── optimize_set_parameters_2.csv │ │ ├── optimize_subpackage.csv │ │ ├── simulate_cost_opt.csv │ │ ├── simulate_optimal_default.csv │ │ ├── simulate_optimal_userdefined.csv │ │ ├── slack_variables.txt │ │ ├── statistics.csv │ │ └── statistics_initial_constraint.csv ├── test_systems │ ├── EmulationFromFMU │ │ ├── collect_measurements_base.csv │ │ ├── collect_measurements_continue_step0.csv │ │ ├── collect_measurements_continue_step1.csv │ │ ├── collect_measurements_continue_step2.csv │ │ ├── collect_measurements_display.csv │ │ ├── collect_measurements_display_cs.csv │ │ ├── collect_measurements_display_me.csv │ │ ├── collect_measurements_dst_end.csv │ │ ├── collect_measurements_dst_start.csv │ │ ├── collect_measurements_step_cs0.csv │ │ ├── collect_measurements_step_cs1.csv │ │ ├── collect_measurements_step_cs2.csv │ │ ├── collect_measurements_step_me0.csv │ │ ├── collect_measurements_step_me1.csv │ │ ├── collect_measurements_step_me2.csv │ │ ├── mpcpy_simulation_inputs_system.csv │ │ └── mpcpy_simulation_parameters_system.csv │ ├── RealfromCSV │ │ ├── collect_measurements_base.csv │ │ └── collect_measurements_display.csv │ └── RealfromDF │ │ ├── collect_measurements_base.csv │ │ └── collect_measurements_display.csv └── test_utility │ └── TestSimulateFMU │ ├── simulate_fmu_cs.csv │ └── simulate_fmu_me.csv ├── resources ├── building │ ├── ControlCSV_0.csv │ ├── LBNL71T_Emulation_Dymola_v1.fmu │ ├── LBNL71T_Emulation_Dymola_v2.fmu │ ├── LBNL71T_Emulation_JModelica_v1.fmu │ ├── LBNL71T_Emulation_JModelica_v2.fmu │ ├── OccData.csv │ ├── RealMeasurements_est.csv │ ├── RealMeasurements_val.csv │ └── RealMeasurements_val_missing.csv ├── internal │ └── sampleCSV.csv ├── model │ ├── EstimatedStates.csv │ ├── LBNL71T_MPC.mo │ ├── LBNL71T_MPC.mop │ ├── LBNL71T_Parameters.csv │ ├── Simple.mo │ ├── SimpleEstimatedStates_jmodelica.csv │ ├── SimpleEstimatedStates_ukf.csv │ ├── SimpleRC_Input.csv │ ├── SimpleRC_Parameters.csv │ ├── Simple_RC_cs_2.fmu │ └── Simple_RC_me_2.fmu ├── optimization │ ├── ControlCSV.csv │ ├── PriceCSV.csv │ ├── SimpleRC_Constraints.csv │ ├── SimpleRC_Constraints_Slack.csv │ ├── SimpleRC_Prices.csv │ ├── sampleConstraintCSV_Constant.csv │ └── sampleConstraintCSV_Setback.csv └── weather │ ├── BerkeleyCSV.csv │ ├── Tamb.csv │ ├── USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw │ ├── USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw │ └── calSolRadCSV.csv ├── test_exodata.py ├── test_models.py ├── test_optimization.py ├── test_systems.py ├── test_units.py ├── test_utility.py ├── test_variables.py └── testing.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Python compiled files # 2 | ######################### 3 | *.pyc 4 | 5 | # Unit testing outputs 6 | ######################### 7 | unittests/outputs/*.png 8 | unittests/outputs/*.log 9 | 10 | # Unit testing resources 11 | ######################### 12 | unittests/resources/**/*.so 13 | unittests/resources/**/*.h 14 | unittests/resources/**/*.o 15 | unittests/resources/**/*.xml 16 | unittests/resources/**/*.txt 17 | 18 | # Ignore Dymola output, log and temporary files (in alphabetical order) 19 | ####################################################################### 20 | *.bak-mo 21 | *.mat 22 | *.mof 23 | buildlog.txt 24 | dsfinal.txt 25 | dsin.txt 26 | dslog.txt 27 | dsmodel.c 28 | dsmodelext[0-9].c 29 | dsres.txt 30 | dymosim.exe 31 | dymosim.exp 32 | dymosim.lib 33 | dymosim 34 | unitTests.log 35 | empty.txt 36 | request 37 | stat 38 | status 39 | stop 40 | 41 | # Tutorial 42 | ########## 43 | doc/userGuide/tutorial/*.txt 44 | doc/userGuide/tutorial/*.fmu 45 | doc/userGuide/tutorial/*.mop 46 | doc/userGuide/tutorial/*.png 47 | 48 | # UserGuide Build 49 | ######################### 50 | doc/userGuide/build 51 | 52 | # mop files in resources 53 | ######################### 54 | resources/model/*.mop 55 | unittests/resources/model/*.mop 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](doc/userGuide/source/images/logo.png) 2 | 3 | This is the development site for MPCPy, the python-based open-source platform for model predictive control in buildings. 4 | 5 | ## General 6 | MPCPy is a python package that facilitates the testing and implementation of occupant-integrated model predictive control (MPC) for building systems. The package focuses on the use of data-driven, simplified physical or statistical models to predict building performance and optimize control. Four main modules contain object classes to import data, interact with real or emulated systems, estimate and validate data-driven models, and optimize control input. 7 | 8 | ## Third Party Software 9 | While MPCPy provides an integration platform, it relies on free, open-source, third-party software packages for model implementation, simulators, parameter estimation algorithms, and optimization solvers. This includes python packages for scripting and data manipulation as well as other more comprehensive software packages for specific purposes. 10 | 11 | In particular, modeling and optimization for physical systems currently relies on the Modelica language specification (https://www.modelica.org/) and FMI standard (http://fmi-standard.org/) in order to leverage model library and tool development on these standards occurring elsewhere within the building and other industries. 12 | 13 | A note to users: Per https://jmodelica.org/, Modelon stopped supporting the open-source JModelica environment as of December 2019. MPCPy can still continue to work with the public open-source version for compilation and optimization of Modelica models. Alternative solutions are being explored for longer-term maintenance. 14 | 15 | ## Getting Started 16 | **Users** can [**download v0.1.0**](https://github.com/lbl-srg/MPCPy/releases/tag/v0.1.0). 17 | 18 | **Developers** can ``> git clone https://github.com/lbl-srg/MPCPy.git``. 19 | 20 | Then, follow the installation instructions and introductory tutorial in Section 2 of the [User Guide](https://github.com/lbl-srg/MPCPy/tree/master/doc/userGuide), located in /doc/userGuide. 21 | 22 | MPCPy uses Python 2.7 and has been tested on Ubuntu 16.04. 23 | 24 | **Join**, **follow**, and **participate** in the conversation with the [**google group**](https://groups.google.com/forum/#!forum/mpcpy)! 25 | 26 | ## Contributing 27 | If you are interested in contributing to this project: 28 | 29 | - You are welcome to report any issues in [Issues](https://github.com/lbl-srg/MPCPy/issues). 30 | - You are welcome to make a contribution by following the steps outlined on the [Contribution Workflow](https://github.com/lbl-srg/MPCPy/wiki/Contribution-Workflow) page. 31 | 32 | Research has shown that MPC can address emerging control challenges faced by buildings. However, there exists no standard practice or methods for implementing MPC in buildings. Implementation is defined here as model structure, complexity, and training methods, data resolution and amount, optimization problem structure and algorithm, and transfer of optimal control solution to real building control. In fact, different applications likely require different implementations. Therefore, we aim for MPCPy to be flexible enough to accommodate different and new approaches to MPC in buildings as research approaches a consensus on best-practice methods. 33 | 34 | ## License 35 | MPCPy is available under the following open-source [license](https://github.com/lbl-srg/MPCPy/blob/master/license.txt). 36 | 37 | ## Cite 38 | To cite MPCPy, please use: 39 | 40 | Blum, D. H. and Wetter, M. “MPCPy: An Open-Source Software Platform for Model Predictive Control in Buildings.” Proceedings of the 15th Conference of International Building Performance Simulation, Aug 7 – 9, 2017. San Francisco, CA. 41 | -------------------------------------------------------------------------------- /bin/README.md: -------------------------------------------------------------------------------- 1 | ## Run Unit Tests 2 | The script runUnitTests.py runs the unit tests of MPCPy. By default, all of the unit tests are run. An optional argument -s [module.class] will run only the specified unit tests module or class. 3 | 4 | To run all unit tests from command-line, use the command (shown from the parent directory): 5 | 6 | > python bin/runUnitTests 7 | 8 | To run only unit tests in the module test_models from command-line, use the command (shown from the parent directory): 9 | 10 | > python bin/runUnitTests -s test_models 11 | 12 | To run only unit tests in the class Estimate_Jmo from the module test_models from the command-line, use the command (shown from the parent directory): 13 | 14 | > python bin/runUnitTests -s test_models.Estimate_Jmo 15 | -------------------------------------------------------------------------------- /bin/runUnitTests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Run the unit tests for mpcpy. 4 | 5 | """ 6 | import unittest 7 | import doctest 8 | import argparse 9 | import inspect 10 | import importlib 11 | import tempfile 12 | import os 13 | import shutil 14 | from mpcpy import utility 15 | from doc.userGuide.tutorial import introductory 16 | 17 | 18 | def check_result(result, name): 19 | '''Check and report results of testing. 20 | 21 | Parameters 22 | ---------- 23 | result : unittest.TextTestRunner result 24 | The results of the test. 25 | result.errors and results.failures are lists. 26 | name : string 27 | Type of test: unit or tutorial 28 | 29 | ''' 30 | 31 | if result: 32 | if result.errors or result.failures: 33 | print('{0} errors and {1} failures found in '.format(len(result.errors), len(result.failures)) + name + ' tests. Please consult terminal output for more info.'); 34 | else: 35 | print(name + ' tests OK.') 36 | else: 37 | print(name + ' tests not run.') 38 | 39 | return None 40 | 41 | 42 | # Main program 43 | # ============ 44 | 45 | # Setup 46 | # ----- 47 | # Change working directory to temporary 48 | cwd = os.getcwd(); 49 | tempdir = tempfile.mkdtemp(); 50 | os.chdir(tempdir); 51 | # Configure the log 52 | logpath = os.path.join(utility.get_MPCPy_path(), 'unittests', 'outputs', 'unittests.log') 53 | # Configure the argument parser 54 | parser = argparse.ArgumentParser(description='Run the unit tests for mpcpy.'); 55 | unit_test_group = parser.add_argument_group("arguments to run unit tests"); 56 | unit_test_group.add_argument('-s', '--specify_test', \ 57 | metavar='module.class', \ 58 | help='test only the module and class specified'); 59 | args = parser.parse_args(); 60 | # Define test modules and classes, if any 61 | modules = []; 62 | classes = []; 63 | if args.specify_test: 64 | modules.append(args.specify_test.split('.')[0]); 65 | try: 66 | classes.append(args.specify_test.split('.')[1]); 67 | except IndexError: 68 | classes = []; 69 | else: 70 | modules += ['test_utility', \ 71 | 'test_variables', \ 72 | 'test_units', \ 73 | 'test_exodata', \ 74 | 'test_systems', \ 75 | 'test_models', \ 76 | 'test_optimization', \ 77 | 'test_tutorial']; 78 | classes = []; 79 | 80 | # Unit tests 81 | # ---------- 82 | # Load Tests 83 | print('Loading tests...'); 84 | suite = unittest.TestSuite(); 85 | for module in modules: 86 | if module != 'test_tutorial': 87 | module_name = 'unittests.' + module; 88 | test_module = importlib.import_module(module_name); 89 | # Find all test classes in module, select if test class is specified 90 | module_classes = []; 91 | if not classes: 92 | for name, obj in inspect.getmembers(test_module): 93 | if inspect.isclass(obj): 94 | module_classes.append(obj); 95 | else: 96 | for name, obj in inspect.getmembers(test_module): 97 | if inspect.isclass(obj) and name in classes: 98 | module_classes.append(obj); 99 | # Add test classes to suite 100 | for obj in module_classes: 101 | suite.addTests(unittest.TestLoader().loadTestsFromTestCase(obj)); 102 | # Report number of tests found 103 | n_tests = suite.countTestCases(); 104 | print('\n{} unit tests found.'.format(n_tests)); 105 | if n_tests: 106 | # Run test suite 107 | print('\nRunning unit tests...'); 108 | result1 = unittest.TextTestRunner(verbosity = 1).run(suite); 109 | else: 110 | result1 = None; 111 | # Delete temporary directory and change working directory back to original 112 | shutil.rmtree(tempdir, ignore_errors=True) 113 | os.chdir(cwd); 114 | 115 | # Tutorial tests 116 | #--------------- 117 | if 'test_tutorial' in modules: 118 | # Collect tests 119 | suite_tut = unittest.TestSuite(); 120 | suite_tut.addTests(doctest.DocTestSuite(introductory)) 121 | # Report number of tests found 122 | n_tests = suite_tut.countTestCases(); 123 | print('\n{} tutorials found.'.format(n_tests)); 124 | # Run tests 125 | print('\nRunning tutorial doctests...') 126 | doctest.ELLIPSIS_MARKER = '-etc-' 127 | os.chdir(os.path.dirname(introductory.__file__)) 128 | result2 = unittest.TextTestRunner(verbosity = 1).run(suite_tut); 129 | os.chdir(cwd); 130 | else: 131 | result2 = None; 132 | 133 | # Check and report results 134 | #------------------------- 135 | print('\nResults\n-------') 136 | check_result(result1, 'Unit') 137 | check_result(result2, 'Tutorial') -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | ## User Guide ## 2 | Compile the user guide by running from the command line: 3 | 4 | > cd userGuide 5 | > make latex 6 | 7 | The user guide will be created as a PDF in the resulting ``userGuide/build`` directory. 8 | 9 | 10 | 11 | ## UML Diagrams ## 12 | UML diagrams of MPCPy may be generated using the code in [PlantUMLs.txt](https://github.com/lbl-srg/MPCPy/blob/master/doc/uml/PlantUMLs.txt). The UML diagram for a single module is defined between the lines @startuml and @enduml, inclusive. 13 | 14 | Copy and paste the specific code section into the online PlantUML [image generator](http://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000) and click "submit." -------------------------------------------------------------------------------- /doc/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /doc/uml/PlantUMLs.txt: -------------------------------------------------------------------------------- 1 | Variables and Units 2 | @startuml 3 | abstract Variable 4 | abstract DisplayUnit 5 | abstract Temperature 6 | abstract Power 7 | abstract OtherQuantity 8 | 9 | Variable <|-- Static 10 | Variable <|-- Timeseries 11 | 12 | Variable *-- DisplayUnit 13 | DisplayUnit <|-- Temperature 14 | DisplayUnit <|-- Power 15 | DisplayUnit <|-- OtherQuantity 16 | Temperature <|-- K 17 | Temperature <|-- degC 18 | Temperature <|-- degF 19 | Temperature <|-- degR 20 | Power <|-- PowerDisplayUnit 21 | OtherQuantity <|-- OtherDisplayUnit 22 | @enduml 23 | 24 | ExoData 25 | @startuml 26 | abstract Type 27 | abstract Weather 28 | abstract Internal 29 | abstract Control 30 | abstract OtherInput 31 | abstract Parameter 32 | abstract EstimatedState 33 | abstract Constraint 34 | abstract Price 35 | 36 | Type <|-- Weather 37 | Type <|-- Internal 38 | Type <|-- Control 39 | Type <|-- OtherInput 40 | Type <|-- Parameter 41 | Type <|-- EstimatedState 42 | Type <|-- Constraint 43 | Type <|-- Price 44 | 45 | Weather <|-- WeatherFromEPW 46 | Weather <|-- WeatherFromCSV 47 | Weather <|-- WeatherFromDF 48 | Weather <|-- WeatherFromNOAA 49 | Internal <|-- InternalFromCSV 50 | Internal <|-- InternalFromOccupancyModel 51 | Control <|-- ControlFromCSV 52 | Control <|-- ControlFromDF 53 | OtherInput <|-- OtherInputFromCSV 54 | OtherInput <|-- OtherInputFromDF 55 | Parameter <|-- ParameterFromCSV 56 | Parameter <|-- ParameterFromDF 57 | EstimatedState <|-- EstimatedStateFromCSV 58 | EstimatedState <|-- EstimatedStateFromDF 59 | Constraint <|-- ConstraintFromCSV 60 | Constraint <|-- ConstraintFromDF 61 | Constraint <|-- ConstraintFromOccupancyModel 62 | Price <|-- PriceFromCSV 63 | Price <|-- PriceFromDF 64 | @enduml 65 | 66 | 67 | Systems 68 | @startuml 69 | abstract System 70 | abstract Emulation 71 | abstract Real 72 | 73 | System <|-- Emulation 74 | System <|-- Real 75 | 76 | Emulation <|-- EmulationFromFMU 77 | Real <|-- RealFromCSV 78 | @enduml 79 | 80 | 81 | Models 82 | @startuml 83 | abstract Model 84 | abstract ParameterEstimate 85 | abstract StateEstimate 86 | abstract Validate 87 | abstract OccupancyMethod 88 | 89 | Model <|-- Modelica 90 | Model <|-- Occupancy 91 | Modelica *-- ParameterEstimate 92 | Modelica *-- StateEstimate 93 | Modelica *-- Validate 94 | 95 | Validate <|-- RMSE 96 | ParameterEstimate <|-- JModelicaParameter 97 | ParameterEstimate <|-- UKFParameter 98 | StateEstimate <|-- JModelicaState 99 | StateEstimate <|-- UKFState 100 | 101 | Occupancy *-- OccupancyMethod 102 | OccupancyMethod <|-- QueueModel 103 | @enduml 104 | 105 | 106 | Optimization 107 | @startuml 108 | class Optimization 109 | abstract Package 110 | abstract Problem 111 | 112 | Optimization *-- Package 113 | Optimization *-- Problem 114 | Package<|-- JModelica 115 | Problem <|-- ParameterEstimate 116 | Problem <|-- EnergyMin 117 | Problem <|-- EnergyCostMin 118 | @enduml 119 | -------------------------------------------------------------------------------- /doc/userGuide/MPCPyUserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/doc/userGuide/MPCPyUserGuide.pdf -------------------------------------------------------------------------------- /doc/userGuide/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = letter 8 | BUILDDIR = build 9 | 10 | #PYTHONPATH=`pwd`/.. 11 | 12 | # Internal variables. 13 | PAPEROPT_a4 = -D latex_paper_size=a4 14 | PAPEROPT_letter = -D latex_paper_size=letter 15 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 16 | 17 | .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest release-html copypdftodoc 18 | 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " pickle to make pickle files" 24 | @echo " json to make JSON files" 25 | @echo " htmlhelp to make HTML files and a HTML help project" 26 | @echo " qthelp to make HTML files and a qthelp project" 27 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 28 | @echo " changes to make an overview of all changed/added/deprecated items" 29 | @echo " linkcheck to check all external links for integrity" 30 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 31 | @echo " release-html to copy HTML files to www folder for online publication" 32 | @echo " copypdftodoc to copy PDF file to userGuide folder for distribution" 33 | 34 | clean: 35 | -rm -rf $(BUILDDIR)/* 36 | 37 | cleanpdf: 38 | -rm -rf *.pdf 39 | 40 | html: 41 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 42 | @echo 43 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 44 | 45 | dirhtml: 46 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 47 | @echo 48 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 49 | 50 | pickle: 51 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 52 | @echo 53 | @echo "Build finished; now you can process the pickle files." 54 | 55 | json: 56 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 57 | @echo 58 | @echo "Build finished; now you can process the JSON files." 59 | 60 | htmlhelp: 61 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 62 | @echo 63 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 64 | ".hhp project file in $(BUILDDIR)/htmlhelp." 65 | 66 | qthelp: 67 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 68 | @echo 69 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 70 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 71 | 72 | latex: 73 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 74 | (cd build/latex; make all-pdf) 75 | @echo 76 | # @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 77 | # @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ 78 | "run these through (pdf)latex." 79 | 80 | changes: 81 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 82 | @echo 83 | @echo "The overview file is in $(BUILDDIR)/changes." 84 | 85 | linkcheck: 86 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 87 | @echo 88 | @echo "Link check complete; look for any errors in the above output " \ 89 | "or in $(BUILDDIR)/linkcheck/output.txt." 90 | 91 | doctest: 92 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 93 | @echo "Testing of doctests in the sources finished, look at the " \ 94 | "results in $(BUILDDIR)/doctest/output.txt." 95 | 96 | release-html: 97 | #-mkdir release 98 | #-mkdir release/userGuide 99 | @echo "Copy html files to the www folder." 100 | -cp -R $(BUILDDIR)/html/*.* www/userGuide 101 | -cp -R $(BUILDDIR)/html/_images www/userGuide 102 | -cp -R $(BUILDDIR)/html/legal.html ../../ 103 | 104 | dist: clean cleanpdf latex html release-html copypdftodoc copydoctowww 105 | 106 | copypdftodoc: 107 | @echo "Copy pdf files to the userGuide folder." 108 | -cp -R $(BUILDDIR)/latex/*.pdf . 109 | 110 | copydoctowww: 111 | @echo "Sent files to the server excluding .svn." 112 | @echo "Set permissions to ensure files can be written on gundog." 113 | ssh thierry@gundog.lbl.gov "sudo chmod -R g+w /usr/local/www/simulationresearch/fmu/EnergyPlus/export/" 114 | rsync -av --exclude '*.svn' www/* thierry@gundog.lbl.gov:/usr/local/www/simulationresearch/fmu/EnergyPlus/export/ 115 | #scp -r release/* thierry@gundog.lbl.gov:/usr/local/www/simulationresearch/fmu/EnergyPlus/export/ 116 | -------------------------------------------------------------------------------- /doc/userGuide/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /doc/userGuide/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR= build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | echo. coverage to run coverage check of the documentation if enabled 41 | goto end 42 | ) 43 | 44 | if "%1" == "clean" ( 45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 46 | del /q /s %BUILDDIR%\* 47 | goto end 48 | ) 49 | 50 | 51 | REM Check if sphinx-build is available and fallback to Python version if any 52 | %SPHINXBUILD% 1>NUL 2>NUL 53 | if errorlevel 9009 goto sphinx_python 54 | goto sphinx_ok 55 | 56 | :sphinx_python 57 | 58 | set SPHINXBUILD=python -m sphinx.__init__ 59 | %SPHINXBUILD% 2> nul 60 | if errorlevel 9009 ( 61 | echo. 62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 63 | echo.installed, then set the SPHINXBUILD environment variable to point 64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 65 | echo.may add the Sphinx directory to PATH. 66 | echo. 67 | echo.If you don't have Sphinx installed, grab it from 68 | echo.http://sphinx-doc.org/ 69 | exit /b 1 70 | ) 71 | 72 | :sphinx_ok 73 | 74 | 75 | if "%1" == "html" ( 76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 80 | goto end 81 | ) 82 | 83 | if "%1" == "dirhtml" ( 84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 88 | goto end 89 | ) 90 | 91 | if "%1" == "singlehtml" ( 92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 93 | if errorlevel 1 exit /b 1 94 | echo. 95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 96 | goto end 97 | ) 98 | 99 | if "%1" == "pickle" ( 100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 101 | if errorlevel 1 exit /b 1 102 | echo. 103 | echo.Build finished; now you can process the pickle files. 104 | goto end 105 | ) 106 | 107 | if "%1" == "json" ( 108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 109 | if errorlevel 1 exit /b 1 110 | echo. 111 | echo.Build finished; now you can process the JSON files. 112 | goto end 113 | ) 114 | 115 | if "%1" == "htmlhelp" ( 116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 117 | if errorlevel 1 exit /b 1 118 | echo. 119 | echo.Build finished; now you can run HTML Help Workshop with the ^ 120 | .hhp project file in %BUILDDIR%/htmlhelp. 121 | goto end 122 | ) 123 | 124 | if "%1" == "qthelp" ( 125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 129 | .qhcp project file in %BUILDDIR%/qthelp, like this: 130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\MPCPyUserGuide.qhcp 131 | echo.To view the help file: 132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\MPCPyUserGuide.ghc 133 | goto end 134 | ) 135 | 136 | if "%1" == "devhelp" ( 137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. 141 | goto end 142 | ) 143 | 144 | if "%1" == "epub" ( 145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 149 | goto end 150 | ) 151 | 152 | if "%1" == "latex" ( 153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 157 | goto end 158 | ) 159 | 160 | if "%1" == "latexpdf" ( 161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 162 | cd %BUILDDIR%/latex 163 | make all-pdf 164 | cd %~dp0 165 | echo. 166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 167 | goto end 168 | ) 169 | 170 | if "%1" == "latexpdfja" ( 171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 172 | cd %BUILDDIR%/latex 173 | make all-pdf-ja 174 | cd %~dp0 175 | echo. 176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 177 | goto end 178 | ) 179 | 180 | if "%1" == "text" ( 181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 182 | if errorlevel 1 exit /b 1 183 | echo. 184 | echo.Build finished. The text files are in %BUILDDIR%/text. 185 | goto end 186 | ) 187 | 188 | if "%1" == "man" ( 189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 190 | if errorlevel 1 exit /b 1 191 | echo. 192 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 193 | goto end 194 | ) 195 | 196 | if "%1" == "texinfo" ( 197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 198 | if errorlevel 1 exit /b 1 199 | echo. 200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 201 | goto end 202 | ) 203 | 204 | if "%1" == "gettext" ( 205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 206 | if errorlevel 1 exit /b 1 207 | echo. 208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 209 | goto end 210 | ) 211 | 212 | if "%1" == "changes" ( 213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 214 | if errorlevel 1 exit /b 1 215 | echo. 216 | echo.The overview file is in %BUILDDIR%/changes. 217 | goto end 218 | ) 219 | 220 | if "%1" == "linkcheck" ( 221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 222 | if errorlevel 1 exit /b 1 223 | echo. 224 | echo.Link check complete; look for any errors in the above output ^ 225 | or in %BUILDDIR%/linkcheck/output.txt. 226 | goto end 227 | ) 228 | 229 | if "%1" == "doctest" ( 230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 231 | if errorlevel 1 exit /b 1 232 | echo. 233 | echo.Testing of doctests in the sources finished, look at the ^ 234 | results in %BUILDDIR%/doctest/output.txt. 235 | goto end 236 | ) 237 | 238 | if "%1" == "coverage" ( 239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage 240 | if errorlevel 1 exit /b 1 241 | echo. 242 | echo.Testing of coverage in the sources finished, look at the ^ 243 | results in %BUILDDIR%/coverage/python.txt. 244 | goto end 245 | ) 246 | 247 | if "%1" == "xml" ( 248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 249 | if errorlevel 1 exit /b 1 250 | echo. 251 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 252 | goto end 253 | ) 254 | 255 | if "%1" == "pseudoxml" ( 256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 257 | if errorlevel 1 exit /b 1 258 | echo. 259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 260 | goto end 261 | ) 262 | 263 | :end 264 | -------------------------------------------------------------------------------- /doc/userGuide/source/acknowledgements.rst: -------------------------------------------------------------------------------- 1 | Acknowledgments 2 | =============== 3 | 4 | This research was supported by the Assistant Secretary for Energy Efficiency and Renewable Energy, Office of Building Technologies of the U.S. Department of Energy, under Contract No. DE-AC02-05CH11231. 5 | 6 | This work is funded by the U.S.-China Clean Energy Research Center (CERC) 2.0 on Building Energy Efficiency (BEE). 7 | 8 | Thank you to all who have provided guidance on the development of this program. The following people have contributed directly to the development of this program (in alphabetical order): 9 | 10 | - Krzysztof Arendt, University of Southern Denmark 11 | - David H. Blum, Lawrence Berkeley National Laboratory 12 | - Ruoxi Jia, University of California, Berkeley 13 | - Lisa Rivalin, Engie Axima 14 | - Zhe Wang, Lawrence Berkeley National Laboratory 15 | - Michael Wetter, Lawrence Berkeley National Laboratory -------------------------------------------------------------------------------- /doc/userGuide/source/disclaimers.rst: -------------------------------------------------------------------------------- 1 | Disclaimers 2 | =========== 3 | 4 | This document was prepared as an account of work sponsored by the United States 5 | Government. While this document is believed to contain correct information, neither the 6 | United States Government nor any agency thereof, nor The Regents of the University of 7 | California, nor any of their employees, makes any warranty, express or implied, or assumes 8 | any legal responsibility for the accuracy, completeness, or usefulness of any information, 9 | apparatus, product, or process disclosed, or represents that its use would not infringe 10 | privately owned rights. Reference herein to any specific commercial product, process, or 11 | service by its trade name, trademark, manufacturer, or otherwise, does not necessarily 12 | constitute or imply its endorsement, recommendation, or favoring by the United States 13 | Government or any agency thereof, or The Regents of the University of California. The 14 | views and opinions of authors expressed herein do not necessarily state or reflect those of the 15 | United States Government or any agency thereof or The Regents of the University of 16 | California. 17 | 18 | -------------------------------------------------------------------------------- /doc/userGuide/source/exodata.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | ExoData 3 | ======= 4 | 5 | .. automodule:: mpcpy.exodata -------------------------------------------------------------------------------- /doc/userGuide/source/gettingStarted.rst: -------------------------------------------------------------------------------- 1 | Getting Started 2 | =============== 3 | 4 | To get started with MPCPy, first follow the installation instructions below. Then, checkout the introductory tutorial to get a feel for the workflow of MPCPy. You can always consult the user guide for more information. 5 | 6 | Installation Instructions For Linux (Ubuntu 16.04 LTS) 7 | ------------------------------------------------------ 8 | 9 | 1. Install Python packages: 10 | 11 | - MPCPy uses Python 2.7. 12 | 13 | - using pip, install the following packages: 14 | 15 | matplotlib >= 2.0.2 16 | 17 | numpy >= 1.16.6 18 | 19 | pandas == 0.20.3 20 | 21 | python-dateutil >= 2.6.1 22 | 23 | pytz >= 2017.2 24 | 25 | scikit-learn >= 0.18.2 26 | 27 | sphinx >= 1.6.3 28 | 29 | numpydoc >= 0.7.0 30 | 31 | tzwhere **=** 2.3 32 | 33 | pyDOE >= 0.3.8 34 | 35 | netCDF4 == 1.4.2 36 | 37 | cftime == 1.0.4.2 38 | 39 | pvlib == 0.6.0 40 | 41 | siphon == 0.8.0 42 | 43 | 2. Install libgeos-dev with command: 44 | 45 | .. code-block:: text 46 | 47 | > sudo apt-get install libgeos-dev 48 | 49 | 3. Install JModelica 2.0 (for Modelica compiling, optimization, and fmu simulation) 50 | 51 | 4. Create JModelica environmental variables 52 | 53 | - add the following lines to your bashrc script and replace the "..." with the JModelica install directory: 54 | 55 | :: 56 | 57 | export JMODELICA_HOME=".../JModelica" 58 | export IPOPT_HOME=".../Ipopt-3.12.4-inst" 59 | export SUNDIALS_HOME="$JMODELICA_HOME/ThirdParty/Sundials" 60 | export SEPARATE_PROCESS_JVM="/usr/lib/jvm/java-8-openjdk-amd64/" 61 | export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/" 62 | 63 | 5. Create the MODELICAPATH environmental variable 64 | 65 | - add the following lines to your bashrc script (assumes 4. above sets JMODELICA_HOME): 66 | 67 | :: 68 | 69 | export MODELICAPATH="$JMODELICA_HOME/ThirdParty/MSL" 70 | 71 | 6. Download or Clone EstimationPy 72 | 73 | - go to https://github.com/lbl-srg/EstimationPy and clone or download repository into a directory (let's call it ``.../EstimationPy``). 74 | 75 | 7. Download or Clone MPCPy 76 | 77 | - go to https://github.com/lbl-srg/MPCPy and clone or download repository into a directory (let's call it ``.../MPCPy``). 78 | 79 | 8. Edit PYTHONPATH environmental variable 80 | 81 | - add the following lines to your bashrc script (assumes 4. above sets JMODELICA_HOME) and replace the "..." with the appropriate directory: 82 | 83 | :: 84 | 85 | export PYTHONPATH=$PYTHONPATH:"$JMODELICA_HOME/Python" 86 | export PYTHONPATH=$PYTHONPATH:"$JMODELICA_HOME/Python/pymodelica" 87 | export PYTHONPATH=$PYTHONPATH:".../EstimationPy" 88 | export PYTHONPATH=$PYTHONPATH:".../MPCPy" 89 | 90 | 9. Test the installation 91 | 92 | - Run the introductory tutorial example. From the command-line, use the commands: 93 | 94 | .. code-block:: text 95 | 96 | > cd doc/userGuide/tutorial 97 | > python introductory.py 98 | 99 | 10. Optional, for developers only 100 | 101 | - to pass all unit tests, the `Modelica Buildings Library `_ must also be on the MODELICAPATH. Download the library and add the appropriate directory path to the MODELICAPATH variable. 102 | 103 | - to generate the user guide pdf, latex must be installed. Use the following commands to install texlive and latexmk: 104 | 105 | .. code-block:: text 106 | 107 | > sudo apt-get install texlive 108 | > sudo apt-get install texlive-formats-extra 109 | > sudo apt-get install latexmk 110 | 111 | 112 | Introductory Tutorial 113 | --------------------- 114 | 115 | .. automodule:: doc.userGuide.tutorial.introductory 116 | 117 | 118 | Run Unit Tests 119 | -------------- 120 | The script bin/runUnitTests.py runs the unit tests of MPCPy. By default, all of the unit tests are run. An optional argument -s [module.class] will run only the specified unit tests module or class. 121 | 122 | To run all unit tests from command-line, use the command: 123 | 124 | .. code-block:: text 125 | 126 | > python bin/runUnitTests 127 | 128 | To run only unit tests in the module test_models from command-line, use the command: 129 | 130 | .. code-block:: text 131 | 132 | > python bin/runUnitTests -s test_models 133 | 134 | To run only unit tests in the class SimpleRC from the module test_models from the command-line, use the command: 135 | 136 | .. code-block:: text 137 | 138 | > python bin/runUnitTests -s test_models.SimpleRC 139 | 140 | -------------------------------------------------------------------------------- /doc/userGuide/source/images/SoftwareArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/doc/userGuide/source/images/SoftwareArchitecture.png -------------------------------------------------------------------------------- /doc/userGuide/source/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/doc/userGuide/source/images/logo.png -------------------------------------------------------------------------------- /doc/userGuide/source/index.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | User Guide 3 | ========== 4 | 5 | 6 | .. toctree:: 7 | :maxdepth: 3 8 | 9 | introduction 10 | gettingStarted 11 | variables 12 | exodata 13 | systems 14 | models 15 | optimization 16 | testing 17 | acknowledgements 18 | disclaimers 19 | license 20 | -------------------------------------------------------------------------------- /doc/userGuide/source/introduction.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | General 5 | ------- 6 | 7 | MPCPy is a python package that facilitates the testing and implementation of occupant-integrated model predictive control (MPC) for building systems. The package focuses on the use of data-driven, simplified physical or statistical models to predict building performance and optimize control. Four main modules contain object classes to import data, interact with real or emulated systems, estimate and validate data-driven models, and optimize control inputs: 8 | 9 | - ``exodata`` classes collect external data and process it for use within MPCPy. This includes data for weather, internal loads, control signals, grid signals, model parameters, optimization constraints, and miscellaneous inputs. 10 | - ``system`` classes represent real or emulated systems to be controlled, collecting measurements from and providing control inputs to the systems. For example, these include detailed simulations or real data collected for zone thermal response, HVAC performance, or ground-truth occupancy. 11 | - ``models`` classes represent system models for MPC, managing model simulation, estimation, and validation. For example, these could represent an RC zone thermal response model, simplified HVAC equipment performance models, or occupancy models. 12 | - ``optimization`` classes formulate and solve the MPC optimization problems using ``models`` objects. 13 | 14 | Three other modules provide additional, mainly internal, functionality to MPCPy: 15 | 16 | - ``variables`` and ``units`` classes together maintain the association of static or timeseries data with units. 17 | - ``utility`` classes provide functionality needed across modules and for interactions with external components. 18 | 19 | .. figure:: images/SoftwareArchitecture.png 20 | :scale: 60 % 21 | 22 | Software architecture diagram for MPCPy. Note that a user interface has not been developed. 23 | 24 | 25 | Third-Party Software 26 | -------------------- 27 | While MPCPy provides an integration platform, it relies on free, open-source, third-party software packages for model implementation, simulators, parameter estimation algorithms, and optimization solvers. This includes python packages for scripting and data manipulation as well as other more comprehensive software packages for specific purposes. In particular, modeling and optimization for physical systems rely on the Modelica language specification (https://www.modelica.org/) and FMI standard (http://fmi-standard.org/) in order to leverage model library and tool development on these standards occurring elsewhere within the building and other industries. Two examples of these third-party tools are: 28 | 29 | - **JModelica.org** (http://jmodelica.org/) is used for simulation of FMUs, compiling FMUs from Modelica models, parameter estimation of Modelica models, and control optimization using Modelica models. 30 | - **EstimationPy** (http://lbl-srg.github.io/EstimationPy/) is used for implementing the Unscented Kalman Filter for parameter estimation of FMU models. 31 | 32 | Contributing 33 | ------------ 34 | Research has shown that MPC can address emerging control challenges faced by buildings. However, there exists no standard practice or methods for implementing MPC in buildings. Implementation is defined here as model structure, complexity, and training methods, data resolution and amount, optimization problem structure and algorithm, and transfer of optimal control solution to real building control. In fact, different applications likely require different implementations. Therefore, the aim is for MPCPy to be flexible enough to accommodate different and new approaches to MPC in buildings. 35 | 36 | If you are interested in contributing to this project, please contact the developers and visit the development site at https://github.com/lbl-srg/MPCPy. 37 | 38 | Cite 39 | ---- 40 | To cite MPCPy, please use: 41 | 42 | Blum, D. H. and Wetter, M. “MPCPy: An Open-Source Software Platform for Model Predictive Control in Buildings.” Proceedings of the 15th Conference of International Building Performance Simulation, Aug 7 – 9, 2017. San Francisco, CA. 43 | 44 | -------------------------------------------------------------------------------- /doc/userGuide/source/license.rst: -------------------------------------------------------------------------------- 1 | Copyright and License 2 | ===================== 3 | 4 | Copyright 5 | --------- 6 | 7 | Copyright (c) 2017, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. 8 | 9 | If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at IPO@lbl.gov. 10 | 11 | NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so. 12 | 13 | 14 | License Agreement 15 | ----------------- 16 | 17 | Copyright (c) 2017, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. 18 | 19 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 20 | 21 | (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 22 | 23 | (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 24 | 25 | (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free, perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. 30 | 31 | -------------------------------------------------------------------------------- /doc/userGuide/source/models.rst: -------------------------------------------------------------------------------- 1 | ====== 2 | Models 3 | ====== 4 | 5 | .. automodule:: mpcpy.models -------------------------------------------------------------------------------- /doc/userGuide/source/optimization.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Optimization 3 | ============ 4 | 5 | .. automodule:: mpcpy.optimization -------------------------------------------------------------------------------- /doc/userGuide/source/systems.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Systems 3 | ======= 4 | 5 | .. automodule:: mpcpy.systems -------------------------------------------------------------------------------- /doc/userGuide/source/testing.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Testing 3 | ======= 4 | 5 | .. automodule:: unittests.testing -------------------------------------------------------------------------------- /doc/userGuide/source/units.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Units 3 | ===== 4 | 5 | .. automodule:: mpcpy.units -------------------------------------------------------------------------------- /doc/userGuide/source/utility.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Utility 3 | ======= 4 | 5 | .. automodule:: mpcpy.utility -------------------------------------------------------------------------------- /doc/userGuide/source/variables.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | Variables and Units 3 | =================== 4 | 5 | .. automodule:: mpcpy.variables -------------------------------------------------------------------------------- /doc/userGuide/tutorial/Constraints.csv: -------------------------------------------------------------------------------- 1 | Time,Qflow_min,Qflow_max,T_min,T_max 2 | 01/01/17 12:00 AM,0,4000,20,25 3 | 01/01/17 01:00 AM,0,4000,20,25 4 | 01/01/17 02:00 AM,0,4000,20,25 5 | 01/01/17 03:00 AM,0,4000,20,25 6 | 01/01/17 04:00 AM,0,4000,20,25 7 | 01/01/17 05:00 AM,0,4000,20,25 8 | 01/01/17 06:00 AM,0,4000,20,25 9 | 01/01/17 07:00 AM,0,4000,20,25 10 | 01/01/17 08:00 AM,0,4000,20,25 11 | 01/01/17 09:00 AM,0,4000,20,25 12 | 01/01/17 10:00 AM,0,4000,20,25 13 | 01/01/17 11:00 AM,0,4000,20,25 14 | 01/01/17 12:00 PM,0,4000,20,25 15 | 01/01/17 01:00 PM,0,4000,20,25 16 | 01/01/17 02:00 PM,0,4000,20,25 17 | 01/01/17 03:00 PM,0,4000,20,25 18 | 01/01/17 04:00 PM,0,4000,20,25 19 | 01/01/17 05:00 PM,0,4000,20,25 20 | 01/01/17 06:00 PM,0,4000,20,25 21 | 01/01/17 07:00 PM,0,4000,20,25 22 | 01/01/17 08:00 PM,0,4000,20,25 23 | 01/01/17 09:00 PM,0,4000,20,25 24 | 01/01/17 10:00 PM,0,4000,20,25 25 | 01/01/17 11:00 PM,0,4000,20,25 26 | 01/02/17 12:00 AM,0,4000,20,25 27 | 01/02/17 01:00 AM,0,4000,20,25 28 | 01/02/17 02:00 AM,0,4000,20,25 29 | 01/02/17 03:00 AM,0,4000,20,25 30 | 01/02/17 04:00 AM,0,4000,20,25 31 | 01/02/17 05:00 AM,0,4000,20,25 32 | 01/02/17 06:00 AM,0,4000,20,25 33 | 01/02/17 07:00 AM,0,4000,20,25 34 | 01/02/17 08:00 AM,0,4000,20,25 35 | 01/02/17 09:00 AM,0,4000,20,25 36 | 01/02/17 10:00 AM,0,4000,20,25 37 | 01/02/17 11:00 AM,0,4000,20,25 38 | 01/02/17 12:00 PM,0,4000,20,25 39 | 01/02/17 01:00 PM,0,4000,20,25 40 | 01/02/17 02:00 PM,0,4000,20,25 41 | 01/02/17 03:00 PM,0,4000,20,25 42 | 01/02/17 04:00 PM,0,4000,20,25 43 | 01/02/17 05:00 PM,0,4000,20,25 44 | 01/02/17 06:00 PM,0,4000,20,25 45 | 01/02/17 07:00 PM,0,4000,20,25 46 | 01/02/17 08:00 PM,0,4000,20,25 47 | 01/02/17 09:00 PM,0,4000,20,25 48 | 01/02/17 10:00 PM,0,4000,20,25 49 | 01/02/17 11:00 PM,0,4000,20,25 50 | 01/03/17 12:00 AM,0,4000,20,25 51 | -------------------------------------------------------------------------------- /doc/userGuide/tutorial/ControlSignal.csv: -------------------------------------------------------------------------------- 1 | Time,Qflow_csv 2 | 01/01/17 12:00 AM,3000 3 | 01/01/17 01:00 AM,3000 4 | 01/01/17 02:00 AM,3000 5 | 01/01/17 03:00 AM,3000 6 | 01/01/17 04:00 AM,3000 7 | 01/01/17 05:00 AM,3000 8 | 01/01/17 06:00 AM,3000 9 | 01/01/17 07:00 AM,3000 10 | 01/01/17 08:00 AM,3000 11 | 01/01/17 09:00 AM,3000 12 | 01/01/17 10:00 AM,3000 13 | 01/01/17 11:00 AM,3000 14 | 01/01/17 12:00 PM,3000 15 | 01/01/17 01:00 PM,3000 16 | 01/01/17 02:00 PM,3000 17 | 01/01/17 03:00 PM,3000 18 | 01/01/17 04:00 PM,3000 19 | 01/01/17 05:00 PM,3000 20 | 01/01/17 06:00 PM,3000 21 | 01/01/17 07:00 PM,3000 22 | 01/01/17 08:00 PM,3000 23 | 01/01/17 09:00 PM,3000 24 | 01/01/17 10:00 PM,3000 25 | 01/01/17 11:00 PM,3000 26 | 01/02/17 12:00 AM,3000 27 | 01/02/17 01:00 AM,3000 28 | 01/02/17 02:00 AM,3000 29 | 01/02/17 03:00 AM,3000 30 | 01/02/17 04:00 AM,3000 31 | 01/02/17 05:00 AM,3000 32 | 01/02/17 06:00 AM,3000 33 | 01/02/17 07:00 AM,3000 34 | 01/02/17 08:00 AM,3000 35 | 01/02/17 09:00 AM,3000 36 | 01/02/17 10:00 AM,3000 37 | 01/02/17 11:00 AM,3000 38 | 01/02/17 12:00 PM,3000 39 | 01/02/17 01:00 PM,3000 40 | 01/02/17 02:00 PM,3000 41 | 01/02/17 03:00 PM,3000 42 | 01/02/17 04:00 PM,3000 43 | 01/02/17 05:00 PM,3000 44 | 01/02/17 06:00 PM,3000 45 | 01/02/17 07:00 PM,3000 46 | 01/02/17 08:00 PM,3000 47 | 01/02/17 09:00 PM,3000 48 | 01/02/17 10:00 PM,3000 49 | 01/02/17 11:00 PM,3000 50 | 01/03/17 12:00 AM,3000 51 | -------------------------------------------------------------------------------- /doc/userGuide/tutorial/Parameters.csv: -------------------------------------------------------------------------------- 1 | Name,Free,Value,Minimum,Maximum,Covariance,Unit 2 | heatCapacitor.C,True,40000,1.00E+04,1.00E+06,1000,J/K 3 | thermalResistor.R,True,0.002,0.001,0.1,0.0001,K/W 4 | -------------------------------------------------------------------------------- /doc/userGuide/tutorial/Tutorial.mo: -------------------------------------------------------------------------------- 1 | within ; 2 | package Tutorial "Contains models for the mpcpy tutorial" 3 | 4 | model RC "A simple RC network for example purposes" 5 | 6 | Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature preTemp 7 | annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); 8 | Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemp 9 | annotation (Placement(transformation(extent={{70,0},{90,20}}))); 10 | Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeat 11 | annotation (Placement(transformation(extent={{-18,-40},{2,-20}}))); 12 | Modelica.Blocks.Interfaces.RealOutput Tzone(unit="K") "Zone temperature" 13 | annotation (Placement(transformation(extent={{100,0},{120,20}}))); 14 | Modelica.Blocks.Interfaces.RealInput Qflow(unit="W") "Heat input" 15 | annotation (Placement(transformation(extent={{-140,-50},{-100,-10}}))); 16 | Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heatCapacitor(C=1e5) "Thermal capacitance of zone" 17 | annotation (Placement(transformation(extent={{20,10},{40,30}}))); 18 | Modelica.Thermal.HeatTransfer.Components.ThermalResistor thermalResistor(R= 19 | 0.01) "Thermal resistance of zone" annotation (Placement(transformation(extent={{-10,0},{10,20}}))); 20 | Modelica.Blocks.Interfaces.RealInput weaTDryBul(unit="K") "Ambient temperature" 21 | annotation (Placement(transformation(extent={{-140,-10},{-100,30}}))); 22 | equation 23 | connect(senTemp.T, Tzone) 24 | annotation (Line(points={{90,10},{110,10}}, color={0,0,127})); 25 | connect(preHeat.Q_flow, Qflow) 26 | annotation (Line(points={{-18,-30},{-120,-30}}, color={0,0,127})); 27 | connect(heatCapacitor.port, senTemp.port) 28 | annotation (Line(points={{30,10},{50,10},{70,10}}, color={191,0,0})); 29 | connect(heatCapacitor.port, preHeat.port) 30 | annotation (Line(points={{30,10},{30,-30},{2,-30}}, color={191,0,0})); 31 | connect(preTemp.port, thermalResistor.port_a) 32 | annotation (Line(points={{-20,10},{-16,10},{-10,10}}, color={191,0,0})); 33 | connect(thermalResistor.port_b, heatCapacitor.port) 34 | annotation (Line(points={{10,10},{20,10},{30,10}}, color={191,0,0})); 35 | connect(preTemp.T, weaTDryBul) 36 | annotation (Line(points={{-42,10},{-120,10}}, color={0,0,127})); 37 | end RC; 38 | annotation (uses(Modelica(version="3.2.2"))); 39 | end Tutorial; 40 | -------------------------------------------------------------------------------- /doc/userGuide/tutorial/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /legal.txt: -------------------------------------------------------------------------------- 1 | *** Copyright Notice *** 2 | 3 | "MPCPy" Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. 4 | 5 | If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at IPO@lbl.gov. 6 | 7 | NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so. 8 | 9 | **************************** 10 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | *** License Agreement *** 2 | 3 | "MPCPy" Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | 15 | You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free, perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. 16 | 17 | -------------------------------------------------------------------------------- /mpcpy/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /occupant/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | """ 3 | The ``occupant`` package contains models for the integration of occupant 4 | behavior into MPCPy. Broadly speaking, there are two types of occupant 5 | interactions that are considered; occupancy and adapative behavior. 6 | 7 | ================ 8 | Occupancy Models 9 | ================ 10 | 11 | .. automodule:: occupant.occupancy 12 | 13 | ======================== 14 | Adaptive Behavior Models 15 | ======================== 16 | 17 | .. automodule:: occupant.adaptive 18 | 19 | """ 20 | 21 | -------------------------------------------------------------------------------- /occupant/adaptive/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | """ 3 | Adaptive behavior models consider how occupants adapt to space conditions. 4 | These include models that predict occupant preferences for environmental 5 | conditions and occupant interactions with building elements, such as HVAC, 6 | facade, lighting, and plug loads. 7 | 8 | """ -------------------------------------------------------------------------------- /occupant/occupancy/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | """ 3 | Occupancy models consider when occupants arrive or depart a space 4 | (or building) as well as how many occupants are present at a particular time. 5 | 6 | Models 7 | ====== 8 | 9 | Queueing 10 | -------- 11 | 12 | .. automodule:: occupant.occupancy.queueing 13 | 14 | """ -------------------------------------------------------------------------------- /occupant/occupancy/queueing/README.md: -------------------------------------------------------------------------------- 1 | ## Reference 2 | This code was written by Ruoxi Jia in 2017. 3 | 4 | For more information, see: 5 | 6 | Jia, R. and Spanos, C. (2017). Occupancy modeling in shared spaces of buildings: a queueing approach. *Journal of Building Performance Simulation*, 10(4), 406-421. 7 | -------------------------------------------------------------------------------- /occupant/occupancy/queueing/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | """ 3 | Based on: 4 | 5 | Jia, R. and Spanos, C. (2017). Occupancy modeling in shared spaces of 6 | buildings: a queueing approach. *Journal of Building Performance Simulation*, 7 | 10(4), 406-421. 8 | 9 | """ -------------------------------------------------------------------------------- /occupant/occupancy/queueing/adaptive_breakpoint_placement.py: -------------------------------------------------------------------------------- 1 | # Adaptive breakpoint placement algorithm 2 | from __future__ import division 3 | import numpy as np 4 | import random as rd 5 | from simulate_queue import simulate_queue 6 | from interp1 import interp1 7 | from parameter_inference import param_inference 8 | from unique_last import unique_last 9 | import matplotlib.pyplot as plt 10 | 11 | 12 | def adaptive_breakpoint_placement(data, res, margin, n_max): 13 | n = 1 14 | valSize, l = data.shape 15 | seg_point = [] 16 | stack = [(0, l)] 17 | stack_error = [1e6] 18 | presence = np.where(np.mean(data, axis = 0)!=0) 19 | empty_time = presence[0][-1]+1 20 | iter_num = 10 21 | flag = 1 22 | 23 | while n < n_max: 24 | print n 25 | # if the stack is empty, then break 26 | if len(stack) == 0 & flag == 0: 27 | break 28 | 29 | flag = 0 30 | 31 | 32 | # pop out the last segment in the stack 33 | left, right = stack.pop() 34 | err_now = stack_error.pop() 35 | 36 | # if the segment is too short, do not break down anymore 37 | if right - left < 2*margin: 38 | continue 39 | 40 | 41 | 42 | # define leftmost and rightmost breakpoints 43 | a = left + margin 44 | b = right - margin 45 | 46 | ind_vec = np.arange(a, b, res) 47 | ind_length = ind_vec.size 48 | err_vec = np.empty(ind_length,) # fitting error of each breakpoint 49 | err_vec[:] = np.NAN 50 | err_1 = np.empty(ind_length,) # fitting error of the first segment 51 | err_1[:] = np.NAN 52 | err_2 = np.empty(ind_length,) # fitting error of the second segment 53 | err_2[:] = np.NAN 54 | 55 | 56 | syssize_min = np.empty(ind_length,) # record the simulated time series with smallest fitting error 57 | lambda_mat = np.zeros((2,ind_length)) 58 | mu_mat = np.zeros((2,ind_length)) 59 | 60 | for j in range(ind_length): 61 | lambda_1_vec = [] 62 | lambda_2_vec = [] 63 | mu_1_vec = [] 64 | mu_2_vec = [] 65 | 66 | for i in range(valSize): 67 | x = data[i,:] 68 | if x[left:ind_vec[j]].size == 0: 69 | raise ValueError('x[left:ind_vec[j]].size == 0') 70 | else: 71 | lambda_1,mu_1 = param_inference(x[left:ind_vec[j]], round((left+ind_vec[j])/2), empty_time) 72 | if x[ind_vec[j]:right].size == 0: 73 | raise ValueError('x[ind_vec[j]:right].size == 0') 74 | else: 75 | lambda_2, mu_2 = param_inference(x[ind_vec[j]:right], round((ind_vec[j] + 1 + right) / 2), 76 | empty_time) 77 | 78 | lambda_1_vec.append(lambda_1) 79 | lambda_2_vec.append(lambda_2) 80 | mu_1_vec.append(mu_1) 81 | mu_2_vec.append(mu_2) 82 | 83 | 84 | lambda_mat[0,j] = np.mean(lambda_1_vec) 85 | lambda_mat[1,j] = np.mean(lambda_2_vec) 86 | mu_mat[0,j] = np.mean(mu_1_vec) 87 | mu_mat[1,j] = np.mean(mu_2_vec) 88 | 89 | seg_point_temp = np.array([left,ind_vec[j],right])-left 90 | jmptimes_mc = [None]*iter_num # create an empty list of size iter_num 91 | syssize_mc = np.empty((right-left,iter_num)) 92 | syssize_mc[:] = np.NAN 93 | maxtime = right-left 94 | lam = np.empty((maxtime,)) 95 | mu = np.empty((maxtime,)) 96 | 97 | for i in range(2): 98 | lam[seg_point_temp[i]:seg_point_temp[i+1]] = lambda_mat[i,j] 99 | mu[seg_point_temp[i]:seg_point_temp[i+1]] = mu_mat[i,j] 100 | 101 | time_int = np.array(range(right-left)) 102 | 103 | if right < empty_time: 104 | empty_time_relative = None 105 | else: 106 | empty_time_relative = empty_time-left+1 107 | 108 | for iter_idx in range(iter_num): 109 | 110 | 111 | if left == 0: 112 | nstart = 0 113 | else: 114 | nstart = data[rd.randint(0,valSize-1),left-1] 115 | 116 | 117 | jmptimes,syssize = simulate_queue(maxtime,lam,mu,nstart,empty_time_relative) 118 | 119 | 120 | 121 | if jmptimes is None: 122 | jmptimes_mc[iter_idx] = 0 123 | syssize_mc[:,iter_idx] = nstart*np.ones((len(time_int),)) 124 | else: 125 | # round jmptimes to the nearest integer 126 | 127 | jmptimes_d, ia = unique_last(np.round(jmptimes)) 128 | syssize_d = syssize[ia] 129 | if jmptimes_d[0] != 0: 130 | jmptimes_int = np.insert(jmptimes_d,0,0) 131 | syssize_int = np.insert(syssize_d,0,0) 132 | else: 133 | jmptimes_int = jmptimes_d 134 | syssize_int = syssize_d 135 | 136 | 137 | vq = interp1(jmptimes_int,syssize_int,time_int) 138 | jmptimes_mc[iter_idx] = jmptimes_d 139 | syssize_mc[:,iter_idx] = vq 140 | 141 | 142 | err_vec[j] = np.linalg.norm(np.mean(syssize_mc,axis=1) \ 143 | - np.mean(data[:,left:right],axis=0) ,ord=2) 144 | 145 | err_1[j] = np.linalg.norm(np.mean(syssize_mc[:ind_vec[j]-left,:],axis=1) \ 146 | - np.mean(data[:,left:ind_vec[j]],axis=0),ord=2) 147 | err_2[j] = np.linalg.norm(np.mean(syssize_mc[ind_vec[j]-left:,:],axis=1) \ 148 | - np.mean(data[:,ind_vec[j]:right],axis=0),ord=2) 149 | 150 | err_vec_min= min(err_vec[:j+1]) 151 | 152 | if err_vec[j] == err_vec_min: 153 | syssize_min = np.mean(syssize_mc,axis=1) 154 | 155 | 156 | 157 | 158 | # if all elements in the error vector is larger than the fitting error without further segmenting 159 | # then terminate segmentation 160 | 161 | if all(err_vec >= err_now) & (right-left+1 < 200): 162 | continue 163 | 164 | min_ind_vec = np.where(np.logical_and(err_vec == min(err_vec),\ 165 | np.logical_and(np.not_equal(lambda_mat[0,:],lambda_mat[1,:]), \ 166 | np.not_equal(mu_mat[0,:], mu_mat[1,:])))) 167 | 168 | if min_ind_vec[0].size == 0: 169 | if left < empty_time & right > empty_time: 170 | seg_point.append(empty_time) 171 | continue 172 | 173 | min_ind = min_ind_vec[rd.randint(0,len(min_ind_vec)-1)] 174 | 175 | 176 | 177 | if ind_vec[min_ind][0] > empty_time: 178 | seg_point.append(empty_time) 179 | continue 180 | else: 181 | seg_point.append(ind_vec[min_ind][0]) 182 | 183 | 184 | # push the two new segments associated witht he new segment point into the stack 185 | if err_1[min_ind][0]>0: 186 | stack.append((left,ind_vec[min_ind][0])) 187 | stack_error.append(err_1[min_ind][0]) 188 | 189 | if err_2[min_ind][0]>0: 190 | stack.append((ind_vec[min_ind][0]+1,right)) 191 | stack_error.append(err_2[min_ind][0]) 192 | 193 | 194 | n += 1 195 | print n 196 | 197 | # x_mean = np.mean(data,axis=0) 198 | 199 | # fig = plt.figure() 200 | # plt.plot(x_mean) 201 | # plt.scatter(seg_point, x_mean[seg_point], s=20, color='red') 202 | # plt.plot(np.arange(left,right),syssize_min) 203 | # plt.show() 204 | # 205 | # plt.close(fig) 206 | return seg_point 207 | 208 | -------------------------------------------------------------------------------- /occupant/occupancy/queueing/interp1.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | def interp1(x,v,xq): 3 | xv_comb = np.array([x,v]) 4 | xv_sorted = xv_comb[0:2,xv_comb[0,:].argsort()] 5 | x_sorted = xv_sorted[0,:] 6 | v_sorted = xv_sorted[1,:] 7 | vq = np.empty(xq.size) 8 | vq[:] = np.NAN 9 | for i in range(len(x_sorted)): 10 | if i == 0: 11 | idx = np.where(xq <= x_sorted[0])[0] 12 | if idx.size == 0: 13 | continue 14 | else: 15 | vq[idx] = v_sorted[0] 16 | else: 17 | idx = np.where(np.logical_and(xq > x_sorted[i-1], xq <= x_sorted[i]))[0] 18 | vq[idx] = v_sorted[i-1] 19 | 20 | idx = np.where(np.logical_and(xq > x_sorted[-1], np.isnan(vq)))[0] 21 | vq[idx] = v_sorted[-1] 22 | return vq 23 | -------------------------------------------------------------------------------- /occupant/occupancy/queueing/occupancy_prediction.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | from simulate_queue import simulate_queue 3 | from parameter_inference import param_inference 4 | import numpy as np 5 | import matplotlib.pyplot as plt 6 | import scipy.io 7 | from adaptive_breakpoint_placement import adaptive_breakpoint_placement 8 | from interp1 import interp1 9 | from unique_last import unique_last 10 | from parameter_inference_given_segments import parameter_inference_given_segment 11 | from tempfile import TemporaryFile 12 | import sklearn.metrics as sklm 13 | 14 | year = '2012' 15 | for day in range(1,7): 16 | filename_train = year + '_train_' + str(day) + '.npy' 17 | filename_test = year + '_test_' + str(day) + '.npy' 18 | data_train = np.load(filename_train) 19 | print(data_train) 20 | data_test = np.load(filename_test) 21 | data_train_mean = np.mean(data_train,axis=0) 22 | data_test_mean = np.mean(data_test,axis=0) 23 | 24 | # how much the mean of training dataset deviates from the testing dataset 25 | # plt.plot(data_train_mean,label='Mean value of training data') 26 | # plt.plot(data_test_mean,label='Mean value of testing data') 27 | # plt.legend() 28 | # plt.show() 29 | 30 | 31 | # obtain the points that segment the day into some homogeneous pieces 32 | seg_point = adaptive_breakpoint_placement(data_train,res=3, margin=3, n_max=24) 33 | 34 | 35 | 36 | 37 | print 'breakpoints are ', seg_point 38 | 39 | 40 | 41 | outfile = 'temp.npy' 42 | np.save(outfile, seg_point) 43 | 44 | ##### learn the arrival and departure rates for each segment 45 | 46 | 47 | seg_point = np.sort(np.load(outfile)) 48 | val_size = 6 49 | seg_num = len(seg_point)+1 50 | lam_all = np.empty((seg_num,val_size)) 51 | mu_all = np.empty((seg_num,val_size)) 52 | presence = np.where(np.mean(data_train,axis=0)!=0) 53 | empty_time = presence[0][-1]+1 54 | 55 | for i in range(val_size): 56 | x = data_train[i,:] 57 | [lam_temp, mu_temp] = parameter_inference_given_segment(x, seg_point,empty_time) 58 | lam_all[:,i] = lam_temp 59 | mu_all[:,i] = mu_temp 60 | 61 | lam = np.mean(lam_all,axis = 1) 62 | mu = np.mean(mu_all,axis = 1) 63 | 64 | print 'mu is ', mu 65 | print 'lambda is ', lam 66 | 67 | 68 | 69 | ##### monte carlo simulation using learned M/M/Inf queue model 70 | 71 | iter_num = 100 72 | 73 | seg_point_added = np.concatenate((np.array([0]),seg_point, np.array([data_train.shape[1]]))) 74 | 75 | maxtime = 288 76 | 77 | lam_vec = np.empty((maxtime,)) 78 | lam_vec[:] = np.NAN 79 | mu_vec = np.empty((maxtime,)) 80 | mu_vec[:] = np.NAN 81 | 82 | jmptimes_mc = [None]*iter_num # create an empty list of size iter_num 83 | syssize_mc = np.empty((maxtime,iter_num)) 84 | syssize_mc[:] = np.NAN 85 | 86 | time_int = np.arange(maxtime) 87 | nstart = 0 88 | 89 | for i in range(len(seg_point_added)-1): 90 | lam_vec[seg_point_added[i]:seg_point_added[i+1]] = lam[i] 91 | mu_vec[seg_point_added[i]:seg_point_added[i+1]] = mu[i] 92 | 93 | for iter_idx in range(iter_num): 94 | jmptimes, syssize = simulate_queue(maxtime, lam_vec, mu_vec, nstart, empty_time) 95 | 96 | 97 | if syssize is None: 98 | jmptimes_mc[iter_idx] = None 99 | syssize_mc[:, iter_idx] = np.zeros((maxtime,)) 100 | continue 101 | 102 | if np.any(syssize <0): 103 | raise ValueError('negative syssize') 104 | 105 | if jmptimes == None: 106 | jmptimes_mc[iter_idx] = 0 107 | syssize_mc[:, iter_idx] = 0 108 | else: 109 | # round jmptimes to the nearest integer 110 | jmptimes_d, ia = unique_last(np.round(jmptimes)) 111 | syssize_d = syssize[ia] 112 | if jmptimes_d[0] != 0: 113 | jmptimes_int = np.insert(jmptimes_d, 0, 0) 114 | syssize_int = np.insert(syssize_d, 0, 0) 115 | else: 116 | jmptimes_int = jmptimes_d 117 | syssize_int = syssize_d 118 | 119 | vq = interp1(jmptimes_int, syssize_int, time_int) 120 | 121 | jmptimes_mc[iter_idx] = jmptimes_d 122 | syssize_mc[:, iter_idx] = vq 123 | 124 | prediction = np.mean(syssize_mc, axis=1) 125 | 126 | offset = sklm.mean_squared_error(data_train_mean,data_test_mean) 127 | fitting_error = sklm.mean_squared_error(data_train_mean,prediction) 128 | prediction_error = sklm.mean_squared_error(data_test_mean,prediction) 129 | 130 | print str(day) 131 | print 'Offset', offset 132 | print 'Fitting error', fitting_error 133 | print 'Prediction error', prediction_error 134 | 135 | std = np.std(syssize_mc, axis=1); 136 | prediction_pstd = prediction+std; 137 | prediction_mstd = prediction-std; 138 | prediction_mstd = (prediction_mstd>=0)*prediction_mstd; 139 | time= range(len(prediction)); 140 | hours = [h/12 for h in time]; 141 | 142 | plt.plot(hours, prediction,label='prediction', color = 'r') 143 | plt.plot(hours, prediction_pstd, color = 'r', alpha = 0.5) 144 | plt.plot(hours, prediction_mstd, color = 'r', alpha = 0.5) 145 | plt.fill_between(hours, prediction_pstd, prediction_mstd, color = 'r', alpha = 0.15) 146 | plt.plot(hours, data_train_mean,label='training data average', color = 'k') 147 | plt.plot(hours, data_test_mean,label='test data average', color = 'b') 148 | # plt.scatter(seg_point,data_train_mean[seg_point],s = 40,color = 'red') 149 | plt.legend() 150 | plt.show() 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /occupant/occupancy/queueing/parameter_inference.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | import numpy as np 3 | 4 | def param_inference(x,h,empty_time): 5 | # Input: x - data (np array) 6 | # h - hour 7 | # empty_time - the time when the space is known to be empty 8 | 9 | t = x.size 10 | pos = np.where(x != 0)[0] # assume x[0] must be zero? 11 | A = 0 # arrival count 12 | for i in range(len(pos)): 13 | if pos[i] == 0: 14 | continue 15 | if x[pos[i]-1] < x[pos[i]]: 16 | A += x[pos[i]]-x[pos[i]-1] 17 | 18 | D = 0 # departure count 19 | for i in range(2,t): 20 | if x[i-1] > x[i]: 21 | D += x[i-1]-x[i] 22 | lam = A/t; 23 | queue_length = sum(x) 24 | if queue_length == 0: 25 | if h > empty_time: 26 | mu = 100 27 | else: 28 | mu = 1e-5 29 | else: 30 | mu = D/queue_length 31 | 32 | return lam, mu -------------------------------------------------------------------------------- /occupant/occupancy/queueing/parameter_inference_given_segments.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from parameter_inference import param_inference 3 | 4 | def parameter_inference_given_segment(x, seg_point, empty_time): 5 | if any(x <0): 6 | neg_ind = np.where(x <0) 7 | raise ValueError('negative occupancy') 8 | 9 | segs = np.concatenate((np.array([0]),seg_point, np.array([len(x)]))) 10 | lam_vec = np.empty((len(segs)-1,)) 11 | mu_vec = np.empty((len(segs)- 1,)) 12 | 13 | for i in range(1,len(segs)-1): 14 | x_seg = x[segs[i-1]:segs[i]] 15 | h = segs[i] 16 | [lam_vec[i-1],mu_vec[i-1]] = param_inference(x_seg,h,empty_time) 17 | return lam_vec,mu_vec -------------------------------------------------------------------------------- /occupant/occupancy/queueing/simulate_queue.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | import numpy as np 3 | from unique_last import unique_last 4 | import matplotlib.pyplot as plt 5 | import warnings 6 | 7 | 8 | 9 | def simulate_queue(maxtime,lam,mu,nstart,empty_time): 10 | # Function for simulate queue system size given the queue parameters 11 | # Inputs: maxtime - the time range for simualtion 12 | # lam - arrival rate (vector for nonhomogeneous queue), a numpy array 13 | # mu - departure rate (vector for nonhomogeneous queue), a numpy array 14 | # nstart - the number of customers in the system at the beginning of simulation 15 | # empty_time - the time when the queue system is known to have zero customer 16 | 17 | 18 | # First, generate arrivals from homogeneous Poisson process with parameter 1 19 | lam_max = max(lam) 20 | # with warnings.catch_warnings(): 21 | # warnings.filterwarnings('error') 22 | # 23 | # try: 24 | # lam = lam/lam_max 25 | # except Warning as e: 26 | # pdb.set_trace() 27 | # print('error found:',e) 28 | if lam_max == 0: 29 | jmptimes = None 30 | syssize = None 31 | return jmptimes,syssize 32 | else: 33 | lam = lam/lam_max 34 | 35 | 36 | # print 'lambda is', lam 37 | 38 | npoints = np.random.poisson(maxtime*lam_max) 39 | 40 | # Given that the number of arrivals is npoints, the arrivals are distributed uniformly 41 | if npoints>0: 42 | arrtimes = np.sort(np.random.uniform(0,1,npoints)*maxtime) 43 | else: 44 | jmptimes = None 45 | syssize = None 46 | return jmptimes,syssize 47 | 48 | # the actual non-homogenous arrival rate at the arrival events 49 | arrtimes_floor = np.floor(arrtimes).astype(int) 50 | lam_vec = lam[arrtimes_floor] 51 | 52 | 53 | # the set of accepted events 54 | r = np.random.uniform(0,1,arrtimes.size) 55 | if empty_time is None: # if the segment does not contain the empty region 56 | E = arrtimes[np.where(r-lam_vec <0)] 57 | else: 58 | # with warnings.catch_warnings(): 59 | # warnings.filterwarnings('error') 60 | # 61 | # try: 62 | E = arrtimes[np.where(np.logical_and(r - lam_vec < 0, arrtimes_floor < empty_time))] 63 | # except Warning as e: 64 | # print('error found:',e) 65 | 66 | 67 | if not E.size: 68 | jmptimes = None 69 | syssize = None 70 | return jmptimes,syssize 71 | 72 | # total number of customers 73 | E = np.insert(E,0,np.zeros((int(nstart),))) 74 | ntotal = E.size 75 | keeptimes = np.floor(E).astype(int) 76 | 77 | servtimes = [] 78 | if not empty_time: 79 | for i in range(ntotal): 80 | serv_sample = simulate_service(keeptimes[i],mu) 81 | if serv_sample is None: 82 | serv_sample = maxtime-1 83 | servtimes.append(serv_sample) 84 | else: 85 | trunc_length = empty_time-keeptimes 86 | for i in range(ntotal): 87 | if trunc_length[i] == 0: 88 | raise NameError('Truncation length zero') 89 | serv_sample = simulate_service_with_trunc(keeptimes[i],mu,trunc_length[i]) 90 | servtimes.append(serv_sample) 91 | servtimes_array = np.array(servtimes) 92 | deptimes = np.add(keeptimes,servtimes_array) 93 | 94 | # sort all the arrivals and departures 95 | arrate = np.array([np.concatenate((keeptimes,deptimes)),\ 96 | np.concatenate((np.ones((ntotal,)),-np.ones((ntotal,))))]) 97 | arrate = arrate[0:2,arrate[0,:].argsort()] 98 | jmptimes,unique_idx = unique_last(arrate[0,:]) 99 | syssize = np.cumsum(arrate[1,:])[unique_idx] 100 | 101 | # drop the events falling outside of the time window of interest 102 | ci = np.where(jmptimes < maxtime) 103 | if ci[0].size != 0: 104 | jmptimes = jmptimes[ci] 105 | syssize = syssize[ci] 106 | # # set the last event to be at maxtime 107 | # jmptimes = jmptimes.append(maxtime-1) 108 | # syssize = syssize.append(syssize[-1]) 109 | 110 | return jmptimes,syssize 111 | 112 | 113 | 114 | 115 | def simulate_service(arrtime, mu): 116 | mu_used = mu[arrtime:] 117 | mu_cum = np.cumsum(mu_used) 118 | cdf = 1- np.exp(-mu_cum) 119 | r = np.random.uniform(0,1,1) 120 | temp = np.where(cdf > r) 121 | if temp[0].size!=0: 122 | return temp[0][0] 123 | else: 124 | return None 125 | 126 | 127 | def simulate_service_with_trunc(arrtime,mu,trunc_length): 128 | mu_used = mu[arrtime:arrtime+trunc_length] 129 | mu_cum = np.cumsum(mu_used) 130 | cdf = (1-np.exp(-mu_cum))/(1-np.exp(-mu_cum[-1])) 131 | r = np.random.uniform(0,1,1) 132 | temp = np.where(cdf > r) 133 | 134 | try: 135 | answer = temp[0][0] 136 | return answer 137 | except: 138 | print('temp = ', temp) -------------------------------------------------------------------------------- /occupant/occupancy/queueing/temp.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/occupant/occupancy/queueing/temp.npy -------------------------------------------------------------------------------- /occupant/occupancy/queueing/test_functions.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | from simulate_queue import simulate_queue 3 | from parameter_inference import param_inference 4 | import numpy as np 5 | import matplotlib.pyplot as plt 6 | import pdb 7 | import scipy.io 8 | from adaptive_breakpoint_placement import adaptive_breakpoint_placement 9 | from interp1 import interp1 10 | from unique_last import unique_last 11 | from parameter_inference_given_segments import parameter_inference_given_segment 12 | from tempfile import TemporaryFile 13 | 14 | 15 | mat = scipy.io.loadmat('lab_spring_2010_occupancy.mat') 16 | 17 | data = mat['hist_occupancy_list'][0][6][0:4,:] # 6th day in a weeks, 0:4 out of all for training 18 | 19 | 20 | # seg_point = adaptive_breakpoint_placement(data,100) 21 | data_mean = np.mean(data,axis=0) 22 | 23 | # print seg_point 24 | # plt.plot(data_mean) 25 | # plt.scatter(seg_point,data_mean[seg_point],s = 20) 26 | # plt.show() 27 | 28 | outfile = 'temp.npy' 29 | # np.save(outfile, seg_point) 30 | 31 | ##### learn the arrival and departure rates for each segment 32 | 33 | 34 | seg_point = np.sort(np.load(outfile)) 35 | val_size = 4 36 | seg_num = len(seg_point)+1 37 | lam_all = np.empty((seg_num,val_size)) 38 | mu_all = np.empty((seg_num,val_size)) 39 | presence = np.where(np.mean(data,axis=0)!=0) 40 | empty_time = presence[0][-1]+1 41 | 42 | for i in range(val_size): 43 | x = data[i,:] 44 | [lam_temp, mu_temp] = parameter_inference_given_segment(x, seg_point,empty_time) 45 | lam_all[:,i] = lam_temp 46 | mu_all[:,i] = mu_temp 47 | 48 | lam = np.mean(lam_all,axis = 1) 49 | mu = np.mean(mu_all,axis = 1) 50 | 51 | 52 | 53 | 54 | 55 | ##### monte carlo simulation using learned M/M/Inf queue model 56 | 57 | iter_num = 100 58 | 59 | seg_point_added = np.concatenate((np.array([0]),seg_point, np.array([len(x)]))) 60 | 61 | maxtime = 1440 62 | 63 | lam_vec = np.empty((maxtime,)) 64 | lam_vec[:] = np.NAN 65 | mu_vec = np.empty((maxtime,)) 66 | mu_vec[:] = np.NAN 67 | 68 | jmptimes_mc = [None]*iter_num # create an empty list of size iter_num 69 | syssize_mc = np.empty((maxtime,iter_num)) 70 | syssize_mc[:] = np.NAN 71 | 72 | time_int = np.arange(maxtime) 73 | nstart = 0 74 | 75 | for i in range(len(seg_point_added)-1): 76 | lam_vec[seg_point_added[i]:seg_point_added[i+1]] = lam[i] 77 | mu_vec[seg_point_added[i]:seg_point_added[i+1]] = mu[i] 78 | 79 | for iter_idx in range(iter_num): 80 | jmptimes, syssize = simulate_queue(maxtime, lam_vec, mu_vec, nstart, empty_time) 81 | 82 | if any(syssize <0): 83 | raise ValueError('negative syssize') 84 | 85 | if jmptimes == None: 86 | jmptimes_mc[iter_idx] = 0 87 | syssize_mc[:, iter_idx] = 0 88 | else: 89 | # round jmptimes to the nearest integer 90 | jmptimes_d, ia = unique_last(np.round(jmptimes)) 91 | syssize_d = syssize[ia] 92 | if jmptimes_d[0] != 0: 93 | jmptimes_int = np.insert(jmptimes_d, 0, 0) 94 | syssize_int = np.insert(syssize_d, 0, 0) 95 | else: 96 | jmptimes_int = jmptimes_d 97 | syssize_int = syssize_d 98 | 99 | vq = interp1(jmptimes_int, syssize_int, time_int) 100 | 101 | jmptimes_mc[iter_idx] = jmptimes_d 102 | syssize_mc[:, iter_idx] = vq 103 | 104 | prediction = np.mean(syssize_mc, axis=1) 105 | plt.plot(prediction) 106 | plt.plot(data_mean) 107 | plt.show() 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /occupant/occupancy/queueing/unique_last.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # modify the built-in function "unique" 4 | # To handle the case where there are more than one jump during 1 minute interval 5 | 6 | import numpy as np 7 | 8 | 9 | def unique_last(x): 10 | C, ia, ic = np.unique(x,return_index=True,return_inverse=True) 11 | ic_unique = np.unique(ic) 12 | for i in range(len(ic_unique)): 13 | ic_idx = np.where(ic == ic_unique[i]) 14 | ic_idx_last = ic_idx[0][-1] 15 | ic_idx_first = ic_idx[0][0] 16 | ia_idx = np.where(ia == ic_idx_first) 17 | ia[ia_idx] = ic_idx_last 18 | ia = np.sort(ia) 19 | return C,ia 20 | -------------------------------------------------------------------------------- /resources/weather/BuildingsEPWReader.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/resources/weather/BuildingsEPWReader.fmu -------------------------------------------------------------------------------- /resources/weather/WeatherProcessor_Dymola_v1.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/resources/weather/WeatherProcessor_Dymola_v1.fmu -------------------------------------------------------------------------------- /resources/weather/WeatherProcessor_JModelica_v2.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/resources/weather/WeatherProcessor_JModelica_v2.fmu -------------------------------------------------------------------------------- /unittests/.err: -------------------------------------------------------------------------------- 1 | Request file has incorrect extension "%s." Please use the correct file type ".req." -------------------------------------------------------------------------------- /unittests/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /unittests/outputs/model_parameters.txt: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),24999.9937606118 3 | adjeas.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.18094487427480399 4 | adjeas.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.050000000000000003 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),8707.0543051495006 6 | adjwes.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.89999998090465105 7 | adjwes.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.89999997536718102 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),104280.645348227 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2999.99933775195 10 | eas.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.104288735057632 11 | exteas.abs,0.02,True,1.0,0.0,1,0.999999921006404 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),40000.0 13 | exteas.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.29999999999999999 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.9999986300386401 15 | extwes.abs,0.02,True,1.0,0.0,1,0.99999744516260902 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),40000.0 17 | extwes.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.299999999912682 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.9999997048340501 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),50000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2000.0003966176 21 | hal.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.050000004187158498 22 | lat,,False,,,deg,41.980000000000004 23 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),93704.360675090706 24 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2999.9994388709501 25 | wes.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.115356613888801 26 | wineas.g,0.02,True,1.0,0.0,1,0.33361134038846202 27 | wineas.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.494813454981264 28 | winwes.g,0.02,True,1.0,0.0,1,0.156843799209963 29 | winwes.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.666672546176025 30 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/CalSolRad/calculate_solar_radiation.csv: -------------------------------------------------------------------------------- 1 | Time,weaHGloHor,weaNTot,weaRelHum,weaSolAlt,weaWinSpe 2 | 2016-10-19 19:53:00+00:00,930.0277241993,0,51,1.5707963,2.4 3 | 2016-10-19 20:53:00+00:00,986.3333998868,6,43,1.832595683,2.5 4 | 2016-10-19 21:53:00+00:00,930.5288740449,3,35,2.094395067,2.6 5 | 2016-10-19 22:53:00+00:00,719.8422090464,6,35,2.35619445,2.7 6 | 2016-10-19 23:53:00+00:00,529.9800906965,3,57,2.617993833,2.8 7 | 2016-10-20 00:53:00+00:00,258.0577040135,2,56,2.879793217,2.9 8 | 2016-10-20 01:53:00+00:00,0,5,65,3.1415926,3 9 | 2016-10-20 02:53:00+00:00,0,3,73,0,3.1 10 | 2016-10-20 03:53:00+00:00,0,3,78,0,3.2 11 | 2016-10-20 04:53:00+00:00,0,6,90,0,3.3 12 | 2016-10-20 05:53:00+00:00,0,4,87,0,3.4 13 | 2016-10-20 06:53:00+00:00,0,0,81,0,3.5 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ConstraintFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,conHeat_eas_sGTE,conHeat_eas_sLTE,conHeat_hal_GTE,conHeat_hal_LTE,conHeat_wes_GTE,conHeat_wes_LTE,easTdb_GTE,easTdb_LTE,halTdb_GTE,halTdb_LTE,wesTdb_GTE,wesTdb_LTE 2 | 2015-01-01 13:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 3 | 2015-01-01 14:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 4 | 2015-01-01 15:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 5 | 2015-01-01 16:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 6 | 2015-01-01 17:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 7 | 2015-01-01 18:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 8 | 2015-01-01 19:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 9 | 2015-01-01 20:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 10 | 2015-01-01 21:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 11 | 2015-01-01 22:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 12 | 2015-01-01 23:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 13 | 2015-01-02 00:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ConstraintFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,conHeat_eas_sGTE,conHeat_eas_sLTE,conHeat_hal_GTE,conHeat_hal_LTE,conHeat_wes_GTE,conHeat_wes_LTE,easTdb_GTE,easTdb_LTE,halTdb_GTE,halTdb_LTE,wesTdb_GTE,wesTdb_LTE 2 | 2015-01-01 13:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 3 | 2015-01-01 14:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 4 | 2015-01-01 15:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 5 | 2015-01-01 16:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 6 | 2015-01-01 17:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 7 | 2015-01-01 18:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,20.0,25.0,20.0,25.0,20.0,25.0 8 | 2015-01-01 19:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 9 | 2015-01-01 20:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 10 | 2015-01-01 21:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 11 | 2015-01-01 22:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 12 | 2015-01-01 23:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 13 | 2015-01-02 00:00:00+00:00,0.0,1.0,0.0,1.0,0.0,1.0,13.0,30.0,13.0,30.0,13.0,30.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ControlFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,conHeat_eas,conHeat_hal,conHeat_wes 2 | 2015-01-01 13:00:00+00:00,0.0,0.0,0.0 3 | 2015-01-01 14:00:00+00:00,0.0,0.0,0.0 4 | 2015-01-01 15:00:00+00:00,0.0,0.0,0.0 5 | 2015-01-01 16:00:00+00:00,0.0,0.0,0.0 6 | 2015-01-01 17:00:00+00:00,0.0,0.0,0.0 7 | 2015-01-01 18:00:00+00:00,0.0,0.0,0.0 8 | 2015-01-01 19:00:00+00:00,0.0,0.0,0.0 9 | 2015-01-01 20:00:00+00:00,0.0,0.0,0.0 10 | 2015-01-01 21:00:00+00:00,0.0,0.0,0.0 11 | 2015-01-01 22:00:00+00:00,0.0,0.0,0.0 12 | 2015-01-01 23:00:00+00:00,0.0,0.0,0.0 13 | 2015-01-02 00:00:00+00:00,0.0,0.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ControlFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,conHeat_eas,conHeat_hal,conHeat_wes 2 | 2015-01-01 13:00:00+00:00,0.0,0.0,0.0 3 | 2015-01-01 14:00:00+00:00,0.0,0.0,0.0 4 | 2015-01-01 15:00:00+00:00,0.0,0.0,0.0 5 | 2015-01-01 16:00:00+00:00,0.0,0.0,0.0 6 | 2015-01-01 17:00:00+00:00,0.0,0.0,0.0 7 | 2015-01-01 18:00:00+00:00,0.0,0.0,0.0 8 | 2015-01-01 19:00:00+00:00,0.0,0.0,0.0 9 | 2015-01-01 20:00:00+00:00,0.0,0.0,0.0 10 | 2015-01-01 21:00:00+00:00,0.0,0.0,0.0 11 | 2015-01-01 22:00:00+00:00,0.0,0.0,0.0 12 | 2015-01-01 23:00:00+00:00,0.0,0.0,0.0 13 | 2015-01-02 00:00:00+00:00,0.0,0.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateAppend/append_data.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heaCap2.T,degC,20,T2o 3 | heatCapacitor2.T,degC,18,T2o 4 | x,1,1.5, 5 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heatCapacitor2.T,degC,18,T2o 3 | x,1,1.5, 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heatCapacitor2.T,degC,18,T2o 3 | x,1,1.5, 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateSet/set_data_all.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heaCap2.T,degC,20,T2_o 3 | x,1,1.5, 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateSet/set_data_name.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heaCap2.T,degC,18,T2o 3 | x,1,1.5, 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateSet/set_data_parameter.csv: -------------------------------------------------------------------------------- 1 | Name,Parameter,Unit,Value 2 | heatCapacitor2.T,T2_o,degC,18 3 | x,,1,1.5 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/EstimatedStateSet/set_data_value.csv: -------------------------------------------------------------------------------- 1 | Name,Unit,Value,Parameter 2 | heatCapacitor2.T,degC,20,T2o 3 | x,1,1.5, 4 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/InternalFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,intCon_eas,intCon_hal,intCon_wes,intLat_eas,intLat_hal,intLat_wes,intRad_eas,intRad_hal,intRad_wes 2 | 2015-01-02 00:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 3 | 2015-01-02 01:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 4 | 2015-01-02 02:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 5 | 2015-01-02 03:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 6 | 2015-01-02 04:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 7 | 2015-01-02 05:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 8 | 2015-01-02 06:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 9 | 2015-01-02 07:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 10 | 2015-01-02 08:00:00+00:00,7.2,0.8,7.2,3.6,0.4,3.6,7.2,0.8,7.2 11 | 2015-01-02 09:00:00+00:00,7.2,0.8,7.2,3.6,0.4,3.6,7.2,0.8,7.2 12 | 2015-01-02 10:00:00+00:00,7.2,0.8,7.2,3.6,0.4,3.6,7.2,0.8,7.2 13 | 2015-01-02 11:00:00+00:00,7.2,0.8,7.2,3.6,0.4,3.6,7.2,0.8,7.2 14 | 2015-01-02 12:00:00+00:00,6.4,0.8,6.4,3.2,0.4,3.2,6.4,0.8,6.4 15 | 2015-01-02 13:00:00+00:00,8.0,0.8,8.0,4.0,0.4,4.0,8.0,0.8,8.0 16 | 2015-01-02 14:00:00+00:00,8.0,0.8,8.0,4.0,0.4,4.0,8.0,0.8,8.0 17 | 2015-01-02 15:00:00+00:00,8.0,0.8,8.0,4.0,0.4,4.0,8.0,0.8,8.0 18 | 2015-01-02 16:00:00+00:00,8.0,0.8,8.0,4.0,0.4,4.0,8.0,0.8,8.0 19 | 2015-01-02 17:00:00+00:00,0.8,0.4,0.8,0.4,0.2,0.4,0.8,0.4,0.8 20 | 2015-01-02 18:00:00+00:00,0.8,0.4,0.8,0.4,0.2,0.4,0.8,0.4,0.8 21 | 2015-01-02 19:00:00+00:00,0.8,0.4,0.8,0.4,0.2,0.4,0.8,0.4,0.8 22 | 2015-01-02 20:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 23 | 2015-01-02 21:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 24 | 2015-01-02 22:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 25 | 2015-01-02 23:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 26 | 2015-01-03 00:00:00+00:00,0.4,0.4,0.4,0.2,0.2,0.2,0.4,0.4,0.4 27 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/OtherInputFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,Tamb 2 | 2015-01-01 00:00:00+00:00,20.0 3 | 2015-01-01 00:05:00+00:00,20.0 4 | 2015-01-01 00:05:01+00:00,40.0 5 | 2015-01-01 02:00:00+00:00,40.0 6 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/OtherInputFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,Tamb 2 | 2015-01-01 00:00:00+00:00,20.0 3 | 2015-01-01 00:05:00+00:00,20.0 4 | 2015-01-01 00:05:01+00:00,40.0 5 | 2015-01-01 02:00:00+00:00,40.0 6 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterAppend/append_data.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | c_bou,0.1,False,30000.0,10000.0,J/(m2.K),20000.0 9 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 10 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 11 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 12 | exteas.abs,0.02,True,1.0,0.0,1,0.3 13 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 14 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 15 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 16 | extwes.abs,0.02,True,1.0,0.0,1,0.3 17 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 18 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 19 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 20 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 21 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 22 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 23 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 24 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 25 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 26 | wineas.g,0.02,True,1.0,0.0,1,0.75 27 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 28 | winwes.g,0.02,True,1.0,0.0,1,0.75 29 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 30 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 4 | adjeas.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 7 | adjwes.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 11 | exteas.abs,0.02,True,1.0,0.0,1,0.29999999999999999 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.10000000000000001 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.29999999999999999 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.10000000000000001 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.29999999999999999 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.29999999999999999 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 4 | adjeas.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 7 | adjwes.r_zon,0.02,True,0.90000000000000002,0.050000000000000003,(m2.K)/W,0.29999999999999999 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 11 | exteas.abs,0.02,True,1.0,0.0,1,0.29999999999999999 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.10000000000000001 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.29999999999999999 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.29999999999999999,0.050000000000000003,(m2.K)/W,0.10000000000000001 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.40000000000000002,0.050000000000000003,(m2.K)/W,0.10000000000000001 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.29999999999999999 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.80000000000000004,0.10000000000000001,(m2.K)/W,0.29999999999999999 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_all.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 3 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 5 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 6 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | c_bou,0.1,False,30000.0,10000.0,J/(m2.K),20000.0 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_cov.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.1,True,25000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_free.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,False,25000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_max.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,30000.0,5000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_min.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,10000.0,J/(m2.K),15000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_name.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 3 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 5 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 6 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/ParameterSet/set_data_value.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | adjeas.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),20000.0 3 | adjeas.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 4 | adjeas.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 5 | adjwes.c_bou,0.02,True,25000.0,5000.0,J/(m2.K),15000.0 6 | adjwes.r_adj,0.02,True,0.9,0.05,(m2.K)/W,0.3 7 | adjwes.r_zon,0.02,True,0.9,0.05,(m2.K)/W,0.3 8 | eas.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 9 | eas.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 10 | eas.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 11 | exteas.abs,0.02,True,1.0,0.0,1,0.3 12 | exteas.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 13 | exteas.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 14 | exteas.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 15 | extwes.abs,0.02,True,1.0,0.0,1,0.3 16 | extwes.c_bou,0.02,True,40000.0,5000.0,J/(m2.K),10000.0 17 | extwes.r_out,0.02,True,0.3,0.05,(m2.K)/W,0.1 18 | extwes.r_zon,0.02,True,3.0,1.0,(m2.K)/W,2.0 19 | hal.c_int,0.02,True,150000.0,50000.0,J/(m2.K),100000.0 20 | hal.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 21 | hal.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 22 | wes.c_int,0.02,True,300000.0,50000.0,J/(m2.K),100000.0 23 | wes.c_zon,0.02,True,3000.0,2000.0,J/(m2.K),2500.0 24 | wes.r_int,0.02,True,0.4,0.05,(m2.K)/W,0.1 25 | wineas.g,0.02,True,1.0,0.0,1,0.75 26 | wineas.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 27 | winwes.g,0.02,True,1.0,0.0,1,0.75 28 | winwes.r_win,0.02,True,0.8,0.1,(m2.K)/W,0.3 29 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/PriceFromCSV/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,pi_e 2 | 2015-01-01 13:00:00+00:00,1.0 3 | 2015-01-01 14:00:00+00:00,1.0 4 | 2015-01-01 15:00:00+00:00,1.0 5 | 2015-01-01 16:00:00+00:00,1.0 6 | 2015-01-01 17:00:00+00:00,1.0 7 | 2015-01-01 18:00:00+00:00,5.0 8 | 2015-01-01 19:00:00+00:00,5.0 9 | 2015-01-01 20:00:00+00:00,5.0 10 | 2015-01-01 21:00:00+00:00,1.0 11 | 2015-01-01 22:00:00+00:00,1.0 12 | 2015-01-01 23:00:00+00:00,1.0 13 | 2015-01-02 00:00:00+00:00,1.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/PriceFromDF/collect_data.csv: -------------------------------------------------------------------------------- 1 | Time,pi_e 2 | 2015-01-01 13:00:00+00:00,1.0 3 | 2015-01-01 14:00:00+00:00,1.0 4 | 2015-01-01 15:00:00+00:00,1.0 5 | 2015-01-01 16:00:00+00:00,1.0 6 | 2015-01-01 17:00:00+00:00,1.0 7 | 2015-01-01 18:00:00+00:00,5.0 8 | 2015-01-01 19:00:00+00:00,5.0 9 | 2015-01-01 20:00:00+00:00,5.0 10 | 2015-01-01 21:00:00+00:00,1.0 11 | 2015-01-01 22:00:00+00:00,1.0 12 | 2015-01-01 23:00:00+00:00,1.0 13 | 2015-01-02 00:00:00+00:00,1.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromCSV/collect_data_clean_data.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir,weaWinSpe 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0,11.5 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0,12.7 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0,12.7 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0,11.5 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0,10.4 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0,8.1 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0,3.5 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0,4.6 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0,3.5 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromCSV/collect_data_default_time.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromCSV/collect_data_local_time_from_geography.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromCSV/collect_data_local_time_from_tz_name.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromDF/collect_data_default_time.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromDF/collect_data_local_time_from_geography.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_exodata/WeatherFromDF/collect_data_local_time_from_tz_name.csv: -------------------------------------------------------------------------------- 1 | Time,weaPAtm,weaRelHum,weaTDewPoi,weaTDryBul,weaWinDir 2 | 2016-10-19 19:53:00+00:00,30.18,51.0,50.0,69.1,280.0 3 | 2016-10-19 20:53:00+00:00,30.16,43.0,48.0,72.0,300.0 4 | 2016-10-19 21:53:00+00:00,30.15,35.0,44.1,73.0,310.0 5 | 2016-10-19 22:53:00+00:00,30.13,35.0,45.0,73.9,280.0 6 | 2016-10-19 23:53:00+00:00,30.12,57.0,54.0,70.0,270.0 7 | 2016-10-20 00:53:00+00:00,30.12,56.0,52.0,68.0,300.0 8 | 2016-10-20 01:53:00+00:00,30.12,65.0,53.1,64.9,300.0 9 | 2016-10-20 02:53:00+00:00,30.13,73.0,55.0,64.0,290.0 10 | 2016-10-20 03:53:00+00:00,30.13,78.0,54.0,61.0,0.0 11 | 2016-10-20 04:53:00+00:00,30.13,90.0,55.0,57.9,0.0 12 | 2016-10-20 05:53:00+00:00,30.14,87.0,53.1,57.0,50.0 13 | 2016-10-20 06:53:00+00:00,30.14,81.0,51.1,57.0,0.0 14 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaEmulationFMU/estimate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.4231532790089049,0.0,0.3316050793404443,0.0,0.34166529852101746 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaEmulationFMU/mpcpy_simulation_parameters_model.csv: -------------------------------------------------------------------------------- 1 | parameter,value 2 | hal.c_zon,2500.0 3 | adjeas.r_adj,0.3 4 | eas.r_int,0.1 5 | eas.c_zon,2500.0 6 | wes.c_zon,2500.0 7 | winwes.g,0.75 8 | lat,0.732689219987 9 | exteas.r_out,0.1 10 | hal.c_int,100000.0 11 | wineas.g,0.75 12 | adjwes.c_bou,15000.0 13 | extwes.r_out,0.1 14 | exteas.r_zon,2.0 15 | extwes.r_zon,2.0 16 | wes.r_int,0.1 17 | wes.c_int,100000.0 18 | exteas.c_bou,10000.0 19 | exteas.abs,0.3 20 | adjeas.r_zon,0.3 21 | extwes.c_bou,10000.0 22 | eas.c_int,100000.0 23 | hal.r_int,0.1 24 | wineas.r_win,0.3 25 | extwes.abs,0.3 26 | adjeas.c_bou,15000.0 27 | adjwes.r_adj,0.3 28 | adjwes.r_zon,0.3 29 | winwes.r_win,0.3 30 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaEmulationFMU/validate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5297594663051358,0.0,0.4463812538629006,0.0,0.19003270413022805 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/estimate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.4224936404955929,0.0,0.3311852929749897,0.0,0.3421425862709829 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/estimate_RMSE_global_start_maxexceeded.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.4226573359013033,0.0,0.33115041919626476,0.0,0.34224742542560804 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/estimate_RMSE_global_start_winit.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.4226573359013033,0.0,0.33115041919626476,0.0,0.34224742542560804 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/estimate_RMSE_global_start_woinit.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.4227060770674679,0.0,0.33109865215793405,0.0,0.3424605182891528 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/validate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5362367106223008,0.0,0.4418397494733798,0.0,0.1915048788064276 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/validate_RMSE_global_start_maxexceeded.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5362367276315756,0.0,0.4418397488981157,0.0,0.1915048944172141 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/validate_RMSE_global_start_winit.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5362367276315756,0.0,0.4418397488981157,0.0,0.1915048944172141 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/validate_RMSE_global_start_woinit.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5361722938406516,0.0,0.44185359808381847,0.0,0.19147000618770527 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromJModelicaRealCSV/validate_RMSE_missing.csv: -------------------------------------------------------------------------------- 1 | ,Ptot,easPhvac,easTdb,halPhvac,halTdb,wesPhvac,wesTdb 2 | Value,0.0,0.0,0.5126830315270787,0.0,0.4584826574378673,0.0,0.1885016268576194 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/EstimateFromUKF/validate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,T_db 2 | Value,0.0033062218175547164 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/OccupancyFromQueueing/validate_RMSE.csv: -------------------------------------------------------------------------------- 1 | ,occupancy 2 | Value,1.31443640225 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/estimate_one_par.csv: -------------------------------------------------------------------------------- 1 | ,Value 2 | heatCapacitor.C,111049.880858998 3 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/estimate_two_par.csv: -------------------------------------------------------------------------------- 1 | ,Value 2 | heatCapacitor.C,121039.989763438 3 | thermalResistor.R,0.00918250589628427 4 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_base.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.165924562152 4 | 2017-01-01 01:00:00+00:00,281.426747289228 5 | 2017-01-01 01:30:00+00:00,282.354693107994 6 | 2017-01-01 02:00:00+00:00,283.508003189132 7 | 2017-01-01 02:30:00+00:00,284.632872944362 8 | 2017-01-01 03:00:00+00:00,285.67252838608 9 | 2017-01-01 03:30:00+00:00,286.601230300868 10 | 2017-01-01 04:00:00+00:00,287.402866231911 11 | 2017-01-01 04:30:00+00:00,288.063364238666 12 | 2017-01-01 05:00:00+00:00,288.571215946032 13 | 2017-01-01 05:30:00+00:00,288.917797366524 14 | 2017-01-01 06:00:00+00:00,289.097295321303 15 | 2017-01-01 06:30:00+00:00,289.106563102446 16 | 2017-01-01 07:00:00+00:00,288.945577725882 17 | 2017-01-01 07:30:00+00:00,288.616978962983 18 | 2017-01-01 08:00:00+00:00,288.126361248131 19 | 2017-01-01 08:30:00+00:00,287.482123929408 20 | 2017-01-01 09:00:00+00:00,286.69529364771 21 | 2017-01-01 09:30:00+00:00,285.779323455127 22 | 2017-01-01 10:00:00+00:00,284.750004817376 23 | 2017-01-01 10:30:00+00:00,283.624777104005 24 | 2017-01-01 11:00:00+00:00,282.423049914821 25 | 2017-01-01 11:30:00+00:00,281.165380337375 26 | 2017-01-01 12:00:00+00:00,279.873051634211 27 | 2017-01-01 12:30:00+00:00,278.568498588805 28 | 2017-01-01 13:00:00+00:00,277.273851765491 29 | 2017-01-01 13:30:00+00:00,276.011247156827 30 | 2017-01-01 14:00:00+00:00,274.802476537153 31 | 2017-01-01 14:30:00+00:00,273.667956629101 32 | 2017-01-01 15:00:00+00:00,272.62725868997 33 | 2017-01-01 15:30:00+00:00,271.698085147446 34 | 2017-01-01 16:00:00+00:00,270.896763819802 35 | 2017-01-01 16:30:00+00:00,270.23660190791 36 | 2017-01-01 17:00:00+00:00,269.728960301206 37 | 2017-01-01 17:30:00+00:00,269.382262045344 38 | 2017-01-01 18:00:00+00:00,269.202658243593 39 | 2017-01-01 18:30:00+00:00,269.193253424856 40 | 2017-01-01 19:00:00+00:00,269.354315983136 41 | 2017-01-01 19:30:00+00:00,269.683018237805 42 | 2017-01-01 20:00:00+00:00,270.173713020933 43 | 2017-01-01 20:30:00+00:00,270.817910223338 44 | 2017-01-01 21:00:00+00:00,271.604669778122 45 | 2017-01-01 21:30:00+00:00,272.52052560957 46 | 2017-01-01 22:00:00+00:00,273.549840980812 47 | 2017-01-01 22:30:00+00:00,274.675008876466 48 | 2017-01-01 23:00:00+00:00,275.876732635321 49 | 2017-01-01 23:30:00+00:00,277.134436937417 50 | 2017-01-02 00:00:00+00:00,278.426606385839 51 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_display.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.165924562152 4 | 2017-01-01 01:00:00+00:00,281.426747289228 5 | 2017-01-01 01:30:00+00:00,282.354693107994 6 | 2017-01-01 02:00:00+00:00,283.508003189132 7 | 2017-01-01 02:30:00+00:00,284.632872944362 8 | 2017-01-01 03:00:00+00:00,285.67252838608 9 | 2017-01-01 03:30:00+00:00,286.601230300868 10 | 2017-01-01 04:00:00+00:00,287.402866231911 11 | 2017-01-01 04:30:00+00:00,288.063364238666 12 | 2017-01-01 05:00:00+00:00,288.571215946032 13 | 2017-01-01 05:30:00+00:00,288.917797366524 14 | 2017-01-01 06:00:00+00:00,289.097295321303 15 | 2017-01-01 06:30:00+00:00,289.106563102446 16 | 2017-01-01 07:00:00+00:00,288.945577725882 17 | 2017-01-01 07:30:00+00:00,288.616978962983 18 | 2017-01-01 08:00:00+00:00,288.126361248131 19 | 2017-01-01 08:30:00+00:00,287.482123929408 20 | 2017-01-01 09:00:00+00:00,286.69529364771 21 | 2017-01-01 09:30:00+00:00,285.779323455127 22 | 2017-01-01 10:00:00+00:00,284.750004817376 23 | 2017-01-01 10:30:00+00:00,283.624777104005 24 | 2017-01-01 11:00:00+00:00,282.423049914821 25 | 2017-01-01 11:30:00+00:00,281.165380337375 26 | 2017-01-01 12:00:00+00:00,279.873051634211 27 | 2017-01-01 12:30:00+00:00,278.568498588805 28 | 2017-01-01 13:00:00+00:00,277.273851765491 29 | 2017-01-01 13:30:00+00:00,276.011247156827 30 | 2017-01-01 14:00:00+00:00,274.802476537153 31 | 2017-01-01 14:30:00+00:00,273.667956629101 32 | 2017-01-01 15:00:00+00:00,272.62725868997 33 | 2017-01-01 15:30:00+00:00,271.698085147446 34 | 2017-01-01 16:00:00+00:00,270.896763819802 35 | 2017-01-01 16:30:00+00:00,270.23660190791 36 | 2017-01-01 17:00:00+00:00,269.728960301206 37 | 2017-01-01 17:30:00+00:00,269.382262045344 38 | 2017-01-01 18:00:00+00:00,269.202658243593 39 | 2017-01-01 18:30:00+00:00,269.193253424856 40 | 2017-01-01 19:00:00+00:00,269.354315983136 41 | 2017-01-01 19:30:00+00:00,269.683018237805 42 | 2017-01-01 20:00:00+00:00,270.173713020933 43 | 2017-01-01 20:30:00+00:00,270.817910223338 44 | 2017-01-01 21:00:00+00:00,271.604669778122 45 | 2017-01-01 21:30:00+00:00,272.52052560957 46 | 2017-01-01 22:00:00+00:00,273.549840980812 47 | 2017-01-01 22:30:00+00:00,274.675008876466 48 | 2017-01-01 23:00:00+00:00,275.876732635321 49 | 2017-01-01 23:30:00+00:00,277.134436937417 50 | 2017-01-02 00:00:00+00:00,278.426606385839 51 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_noinputs.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,281.331245785293 4 | 2017-01-01 01:00:00+00:00,280.453876051712 5 | 2017-01-01 01:30:00+00:00,281.359184540947 6 | 2017-01-01 02:00:00+00:00,282.508865852063 7 | 2017-01-01 02:00:00+00:00,282.508865852063 8 | 2017-01-01 02:30:00+00:00,283.717553090633 9 | 2017-01-01 03:00:00+00:00,284.770142124772 10 | 2017-01-01 03:30:00+00:00,285.700722499537 11 | 2017-01-01 04:00:00+00:00,286.502326545519 12 | 2017-01-01 04:30:00+00:00,287.162715208164 13 | 2017-01-01 05:00:00+00:00,287.670779999901 14 | 2017-01-01 05:30:00+00:00,288.017908442891 15 | 2017-01-01 06:00:00+00:00,288.197675520274 16 | 2017-01-01 06:30:00+00:00,288.206995761503 17 | 2017-01-01 07:00:00+00:00,288.045939990174 18 | 2017-01-01 07:30:00+00:00,287.71730543561 19 | 2017-01-01 08:00:00+00:00,287.226692135996 20 | 2017-01-01 08:30:00+00:00,286.582423793329 21 | 2017-01-01 09:00:00+00:00,285.795521347367 22 | 2017-01-01 09:30:00+00:00,284.879510055189 23 | 2017-01-01 10:00:00+00:00,283.850107294337 24 | 2017-01-01 10:30:00+00:00,282.724955930518 25 | 2017-01-01 11:00:00+00:00,281.52325340841 26 | 2017-01-01 11:30:00+00:00,280.265530192821 27 | 2017-01-01 12:00:00+00:00,278.973253740338 28 | 2017-01-01 12:30:00+00:00,277.668380021528 29 | 2017-01-01 13:00:00+00:00,276.373828034853 30 | 2017-01-01 13:30:00+00:00,275.111437573768 31 | 2017-01-01 14:00:00+00:00,273.902860998055 32 | 2017-01-01 14:30:00+00:00,272.768513674397 33 | 2017-01-01 15:00:00+00:00,271.727996874688 34 | 2017-01-01 15:30:00+00:00,270.798839665009 35 | 2017-01-01 16:00:00+00:00,269.997270509409 36 | 2017-01-01 16:30:00+00:00,269.336809590476 37 | 2017-01-01 17:00:00+00:00,268.828960631735 38 | 2017-01-01 17:30:00+00:00,268.482274300984 39 | 2017-01-01 18:00:00+00:00,268.302804104743 40 | 2017-01-01 18:30:00+00:00,268.29345829316 41 | 2017-01-01 19:00:00+00:00,268.454547871884 42 | 2017-01-01 19:30:00+00:00,268.783149951977 43 | 2017-01-01 20:00:00+00:00,269.273809845161 44 | 2017-01-01 20:30:00+00:00,269.917988873206 45 | 2017-01-01 21:00:00+00:00,270.704807661069 46 | 2017-01-01 21:30:00+00:00,271.620665420035 47 | 2017-01-01 22:00:00+00:00,272.650021516455 48 | 2017-01-01 22:30:00+00:00,273.775123903891 49 | 2017-01-01 23:00:00+00:00,274.976851676097 50 | 2017-01-01 23:30:00+00:00,276.23447603873 51 | 2017-01-02 00:00:00+00:00,277.526593358879 52 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_step0.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.165924562152 4 | 2017-01-01 01:00:00+00:00,281.426747289228 5 | 2017-01-01 01:30:00+00:00,282.354693107994 6 | 2017-01-01 02:00:00+00:00,283.508003189132 7 | 2017-01-01 02:30:00+00:00,284.632872944363 8 | 2017-01-01 03:00:00+00:00,285.67252838608 9 | 2017-01-01 03:30:00+00:00,286.601230300868 10 | 2017-01-01 04:00:00+00:00,287.40286623191 11 | 2017-01-01 04:30:00+00:00,288.063364238666 12 | 2017-01-01 05:00:00+00:00,288.571215946032 13 | 2017-01-01 05:30:00+00:00,288.917797366523 14 | 2017-01-01 06:00:00+00:00,289.097295321302 15 | 2017-01-01 06:30:00+00:00,289.106563102444 16 | 2017-01-01 07:00:00+00:00,288.94557772588 17 | 2017-01-01 07:30:00+00:00,288.616978962981 18 | 2017-01-01 08:00:00+00:00,288.126384557121 19 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_step1.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 08:00:00+00:00,288.126384557121 3 | 2017-01-01 08:30:00+00:00,287.482195139335 4 | 2017-01-01 09:00:00+00:00,286.696120246708 5 | 2017-01-01 09:30:00+00:00,285.779889582406 6 | 2017-01-01 10:00:00+00:00,284.750438212844 7 | 2017-01-01 10:30:00+00:00,283.625108544791 8 | 2017-01-01 11:00:00+00:00,282.423380757063 9 | 2017-01-01 11:30:00+00:00,281.165684198402 10 | 2017-01-01 12:00:00+00:00,279.873456719098 11 | 2017-01-01 12:30:00+00:00,278.56883792426 12 | 2017-01-01 13:00:00+00:00,277.274144998719 13 | 2017-01-01 13:30:00+00:00,276.011520780276 14 | 2017-01-01 14:00:00+00:00,274.802429736364 15 | 2017-01-01 14:30:00+00:00,273.668025401266 16 | 2017-01-01 15:00:00+00:00,272.62743182116 17 | 2017-01-01 15:30:00+00:00,271.698350229422 18 | 2017-01-01 16:00:00+00:00,270.896874641596 19 | -------------------------------------------------------------------------------- /unittests/references/test_models/SimpleRC/simulate_step2.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 16:00:00+00:00,270.896874641596 3 | 2017-01-01 16:30:00+00:00,270.236819359638 4 | 2017-01-01 17:00:00+00:00,269.728964611609 5 | 2017-01-01 17:30:00+00:00,269.382153911306 6 | 2017-01-01 18:00:00+00:00,269.202546772741 7 | 2017-01-01 18:30:00+00:00,269.193065801789 8 | 2017-01-01 19:00:00+00:00,269.35397627143 9 | 2017-01-01 19:30:00+00:00,269.68280736136 10 | 2017-01-01 20:00:00+00:00,270.173640144458 11 | 2017-01-01 20:30:00+00:00,270.817873836058 12 | 2017-01-01 21:00:00+00:00,271.604613354769 13 | 2017-01-01 21:30:00+00:00,272.520520009547 14 | 2017-01-01 22:00:00+00:00,273.549883184263 15 | 2017-01-01 22:30:00+00:00,274.675317282309 16 | 2017-01-01 23:00:00+00:00,275.877033385212 17 | 2017-01-01 23:30:00+00:00,277.134634201238 18 | 2017-01-02 00:00:00+00:00,278.426649145507 19 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromJModelica/estimate_and_validate.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,heatCapacitor2.T,heatCapacitor2.T_est_init,heatCapacitor2.T_est_value,heatCapacitor2.T_est,T_db_init,T_db_est_value,T_db_est 2 | 2017-01-01 00:00:00+00:00,295.0,288.15,295.0,287.245987784007,288.148386050545,295.0,283.76062590952,298.508398917615 3 | 2017-01-01 00:30:00+00:00,285.33110102376,288.15493972829,294.728491419132,287.245987784007,288.230788378729,288.353066357425,283.76062590952,285.678689093943 4 | 2017-01-01 01:00:00+00:00,284.967608064401,287.970121731452,294.345049312733,287.245987784007,288.050583223317,288.167577435065,283.76062590952,285.035344473428 5 | 2017-01-01 01:30:00+00:00,285.426507456328,287.807935788663,293.996174724297,287.245987784007,287.886639448445,288.556814711379,283.76062590952,285.468922964265 6 | 2017-01-01 02:00:00+00:00,285.949899187159,287.684651475966,293.692195319604,287.245987784007,287.76112065422,288.991085249686,283.76062590952,285.98859099046 7 | 2017-01-01 02:30:00+00:00,286.460670159125,287.598772786257,293.430938184367,287.245987784007,287.673006691818,289.413666860107,283.76062590952,286.498349699101 8 | 2017-01-01 03:00:00+00:00,286.941434896016,287.546812965775,293.208732527877,287.245987784007,287.618890126459,289.808282433988,283.76062590952,286.97763245881 9 | 2017-01-01 03:30:00+00:00,287.381103736176,287.5246959308,293.021368606362,287.245987784007,287.594681979246,290.163676956348,283.76062590952,287.41630784464 10 | 2017-01-01 04:00:00+00:00,287.769493065194,287.527968938734,292.86423880414,287.245987784007,287.595959519008,290.470803293135,283.76062590952,287.803716021073 11 | 2017-01-01 04:30:00+00:00,288.097565672373,287.551921137346,292.732485759567,287.245987784007,287.617991173631,290.719968794752,283.76062590952,288.130769914243 12 | 2017-01-01 05:00:00+00:00,288.357487357378,287.591625914495,292.621017454796,287.245987784007,287.6558255459,290.90341951005,283.76062590952,288.389756313086 13 | 2017-01-01 05:30:00+00:00,288.542630202277,287.642008098834,292.524614837568,287.245987784007,287.70437447199,291.014409806926,283.76062590952,288.574008484761 14 | 2017-01-01 06:00:00+00:00,288.647665006862,287.697931053154,292.438011031556,287.245987784007,287.758501828823,291.047463288321,283.76062590952,288.678161927983 15 | 2017-01-01 06:30:00+00:00,288.668715102471,287.754287387141,292.355976940779,287.245987784007,287.813110222062,290.998390804122,283.76062590952,288.69831040015 16 | 2017-01-01 07:00:00+00:00,288.603348693306,287.806082515383,292.273394882748,287.245987784007,287.863224009555,290.864758959371,283.76062590952,288.632067285143 17 | 2017-01-01 07:30:00+00:00,288.450685211699,287.848513316632,292.185341208014,287.245987784007,287.903986575893,290.645909705346,283.76062590952,288.478524963848 18 | 2017-01-01 08:00:00+00:00,288.211414595708,287.877052036434,292.08720342609,287.245987784007,287.930877273914,290.34244221101,283.76062590952,288.238405219455 19 | 2017-01-01 08:30:00+00:00,287.887764755141,287.887520104374,291.974686185229,287.245987784007,287.939738267272,289.956566901482,283.76062590952,287.91392341614 20 | 2017-01-01 09:00:00+00:00,287.483461417776,287.876156236394,291.843923961522,287.245987784007,287.926761107638,289.491856401919,283.76062590952,287.50881063249 21 | 2017-01-01 09:30:00+00:00,287.003663435703,287.839677548764,291.691544373638,287.245987784007,287.888688131053,288.953389194752,283.76062590952,287.028232720031 22 | 2017-01-01 10:00:00+00:00,286.45487309474,287.775332624542,291.514642765568,287.245987784007,287.822788860145,288.347648777331,283.76062590952,286.478656412397 23 | 2017-01-01 10:30:00+00:00,285.844823105393,287.680945588204,291.310970744871,287.245987784007,287.726864574018,287.682299855088,283.76062590952,285.867852071038 24 | 2017-01-01 11:00:00+00:00,285.182342599398,287.554950412937,291.078862773647,287.245987784007,287.599360651026,286.966098310263,283.76062590952,285.204649958217 25 | 2017-01-01 11:30:00+00:00,284.477204522205,287.396414869569,290.817283838851,287.245987784007,287.439355196226,286.208854802057,283.76062590952,284.498771086347 26 | 2017-01-01 12:00:00+00:00,283.739924323692,287.205017378484,290.525879034108,287.245987784007,287.246541721191,285.421030012152,283.76062590952,283.76089308301 27 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromJModelica/model_parameters_check.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | T2o,1.0,False,350.0,273.15,K,295.0 3 | To,2.0,True,350.0,273.15,K,295.0 4 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromJModelica/model_parameters_estimated.csv: -------------------------------------------------------------------------------- 1 | Name,Free,Maximum,Minimum,Unit,Value 2 | T2o,False,350.0,273.15,K,288.148386050545 3 | To,False,350.0,273.15,K,298.508398917615 4 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromJModelica/model_parameters_replaced_check.csv: -------------------------------------------------------------------------------- 1 | Name,Covariance,Free,Maximum,Minimum,Unit,Value 2 | T2o,1.0,True,350.0,273.15,K,295.0 3 | To,2.0,True,350.0,273.15,K,295.0 4 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromUKF/estimate_and_validate.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,heatCapacitor2.T,heatCapacitor2.T_est 2 | 2017-01-01 00:00:00+00:00,295.0,288.15,291.15 3 | 2017-01-01 00:30:00+00:00,285.3311010237598,288.15493972829,289.8228103099666 4 | 2017-01-01 01:00:00+00:00,284.96760806439806,287.97012173145237,288.6000594383564 5 | 2017-01-01 01:30:00+00:00,285.42650745631346,287.8079357886631,288.00002187732775 6 | 2017-01-01 02:00:00+00:00,285.9498991871252,287.68465147596675,287.73147895144683 7 | 2017-01-01 02:30:00+00:00,286.460670159149,287.5987727862564,287.606082935077 8 | 2017-01-01 03:00:00+00:00,286.9414348960387,287.54681296577405,287.5468667000219 9 | 2017-01-01 03:30:00+00:00,287.38110373618036,287.52469593079707,287.5262976936187 10 | 2017-01-01 04:00:00+00:00,287.7694930651935,287.52796893872795,287.53166787309226 11 | 2017-01-01 04:30:00+00:00,288.09756567237304,287.551921137339,287.55659292859224 12 | 2017-01-01 05:00:00+00:00,288.3574873573745,287.59162591448876,287.59663004930115 13 | 2017-01-01 05:30:00+00:00,288.5426302022738,287.642008098829,287.6474324902007 14 | 2017-01-01 06:00:00+00:00,288.6476650068589,287.6979310531498,287.7035767732494 15 | 2017-01-01 06:30:00+00:00,288.66871510243305,287.754287387135,287.7600612287947 16 | 2017-01-01 07:00:00+00:00,288.6033486932733,287.8060825153759,287.8119241221258 17 | 2017-01-01 07:30:00+00:00,288.45068521167235,287.8485133166253,287.85435620308823 18 | 2017-01-01 08:00:00+00:00,288.21141459568634,287.8770520364282,287.8828284543307 19 | 2017-01-01 08:30:00+00:00,287.8877647551242,287.8875201043689,287.89316515724335 20 | 2017-01-01 09:00:00+00:00,287.48346141776295,287.87615623639,287.88160915688445 21 | 2017-01-01 09:30:00+00:00,287.0036634356935,287.83967754876204,287.84465806240115 22 | 2017-01-01 10:00:00+00:00,286.454873094732,287.77533262454097,287.7799944729839 23 | 2017-01-01 10:30:00+00:00,285.8448231053865,287.680945588204,287.6853689109019 24 | 2017-01-01 11:00:00+00:00,285.182342599392,287.55495041293767,287.55888009793915 25 | 2017-01-01 11:30:00+00:00,284.47720452219966,287.3964148695705,287.3995486032851 26 | 2017-01-01 12:00:00+00:00,283.73992432367334,287.205017378468,287.20720484849375 27 | -------------------------------------------------------------------------------- /unittests/references/test_models/StateEstimateFromUKF/estimationpy_example.csv: -------------------------------------------------------------------------------- 1 | Time,x,y,x_est,y_est,x+,x- 2 | 2017-01-01 00:00:00+00:00,1.6531498048096402,6.573631156290992,1.5,6.573631156290992,2.5,0.5 3 | 2017-01-01 00:00:00.500000+00:00,2.387561494090185,6.8239163725872425,2.220322269401128,5.642743792909796,3.2331208430740186,1.2075236957282374 4 | 2017-01-01 00:00:01+00:00,1.8370293514570883,7.012766866459758,2.30601054684709,7.047385068680488,3.3188288275741717,1.293192266120008 5 | 2017-01-01 00:00:01.500000+00:00,2.2389529743620566,7.470943197854055,2.455376280412205,7.3726955792464475,3.4681945449777816,1.4425580158466278 6 | 2017-01-01 00:00:02+00:00,2.5097910814216737,7.798492707964741,2.5621578798285567,7.533133314354403,3.574976655166078,1.549339104491035 7 | 2017-01-01 00:00:02.500000+00:00,2.2997680161440965,7.184765596241328,2.3734599761056105,7.644922644749027,3.3862782403235103,1.3606417118877108 8 | 2017-01-01 00:00:03+00:00,2.2516856607368467,7.192441427664151,2.367764174188573,7.192780271004076,3.3805824516759633,1.354945896701183 9 | 2017-01-01 00:00:03.500000+00:00,2.1760263418356023,7.910879772917662,2.5914267217879274,7.374740022384324,3.6042448386299744,1.5786086049458805 10 | 2017-01-01 00:00:04+00:00,2.1079401397646182,8.001244979250021,2.632014056237667,7.886128475447217,3.6448327630208146,1.619195349454519 11 | 2017-01-01 00:00:04.500000+00:00,2.181697781902397,7.685875235012058,2.533953115296678,7.965568991928783,3.5467714133912427,1.5211348172021129 12 | 2017-01-01 00:00:05+00:00,2.4258611604720377,7.572793279477455,2.497129644420523,7.897784338180065,3.5099474585684662,1.4843118302725797 13 | 2017-01-01 00:00:05.500000+00:00,2.8109272653175568,7.896566154826304,2.5951779355497884,7.639534623564509,3.6079965821702764,1.5823592889293006 14 | 2017-01-01 00:00:06+00:00,2.9392610425591403,7.557406498432075,2.4905131644986116,7.718907904244041,3.503331481860903,1.4776948471363203 15 | 2017-01-01 00:00:06.500000+00:00,2.4761985282382692,7.351391934987168,2.422435455851825,7.4510750013804845,3.4352536727154726,1.4096172389881771 16 | 2017-01-01 00:00:07+00:00,2.2785378871873867,7.285580363328731,2.3993840573239065,7.506959492889907,3.412202340802623,1.3865657738451898 17 | 2017-01-01 00:00:07.500000+00:00,2.3504799705630464,7.545033072703892,2.48325420040933,7.5907310425746655,3.496072903205421,1.4704354976132392 18 | 2017-01-01 00:00:08+00:00,2.3713092416008466,7.37501538682538,2.432302897639426,7.725652722692191,3.4451211537137874,1.4194846415650644 19 | 2017-01-01 00:00:08.500000+00:00,2.7026684400649894,7.8756377626067735,2.587232601104685,7.69511176039975,3.600050649655118,1.5744145525542517 20 | 2017-01-01 00:00:09+00:00,2.591835888627549,7.811552590975776,2.5725452486687925,7.8547836207690445,3.5853639580321004,1.5597265393054847 21 | 2017-01-01 00:00:09.500000+00:00,2.3394620312875056,7.980779820206235,2.6226970810675656,7.788030549050021,3.6355153692447684,1.6098787928903628 22 | 2017-01-01 00:00:10+00:00,2.3900838555460258,7.784314537579383,2.5656050948723195,8.032408440318243,3.5784232890345287,1.55278690071011 23 | 2017-01-01 00:00:10.500000+00:00,2.292643394073803,7.5773546470335535,2.4985446024102798,7.753844540824106,3.511362959719421,1.4857262451011386 24 | 2017-01-01 00:00:11+00:00,2.8685789147877885,7.7357849449767935,2.5415102045386058,7.480201342567715,3.554328328692063,1.5286920803851487 25 | 2017-01-01 00:00:11.500000+00:00,2.7906836548149805,7.6980313239348925,2.532601417828937,7.639980720186173,3.545419612660698,1.5197832229971757 26 | 2017-01-01 00:00:12+00:00,2.9135630536384056,7.273266738893491,2.4004893498811435,7.619707797350305,3.413307157330985,1.387671542431302 27 | 2017-01-01 00:00:12.500000+00:00,2.9278641668743317,7.567069938843291,2.4870918710203145,7.473772119368106,3.4999102889732776,1.4742734530673514 28 | 2017-01-01 00:00:13+00:00,2.1271738975704086,7.3614107284038255,2.4285329220301177,7.707720779993852,3.441351015019995,1.4157148290402406 29 | 2017-01-01 00:00:13.500000+00:00,2.227004886585338,7.395287893541701,2.4350298748313937,7.430559064816194,3.4478486644320747,1.4222110852307126 30 | 2017-01-01 00:00:14+00:00,2.4211021997196944,7.2397049169144205,2.3846300463478403,7.331571332126863,3.397448040041822,1.3718120526538586 31 | 2017-01-01 00:00:14.500000+00:00,2.575704815491473,8.062332368293188,2.6381700903471055,7.192178782697686,3.6509880671475274,1.6253521135466833 32 | 2017-01-01 00:00:15+00:00,2.6155396589105364,7.547863460444994,2.499117659129775,9.181949071914946,3.511936673897798,1.4862986443617516 33 | 2017-01-01 00:00:15.500000+00:00,3.779248373844157,11.009507431045117,3.5977666341915318,10.318188770079988,4.610585772600626,2.584947495782438 34 | 2017-01-01 00:00:16+00:00,4.421062854871656,12.276691072351902,4.036744180758573,12.400479097147567,5.049562749121616,3.0239256123955296 35 | 2017-01-01 00:00:16.500000+00:00,4.799413923473461,14.013521071365929,4.593602700997265,13.323778102094154,5.606420732029785,3.5807846699647454 36 | 2017-01-01 00:00:17+00:00,4.2561672176139576,14.609770053816092,4.804032522315203,14.493734108905603,5.816851398034267,3.7912136465961392 37 | 2017-01-01 00:00:17.500000+00:00,4.853752563084513,14.639646225600774,4.821637904586678,14.976493602442037,5.834455893620527,3.80881991555283 38 | 2017-01-01 00:00:18+00:00,4.443541328020505,15.199447092787947,4.997602846536259,14.973887854359825,6.010421563704582,3.984784129367937 39 | 2017-01-01 00:00:18.500000+00:00,5.296731105522507,14.532138230030705,4.793507475061874,15.056789774519512,5.806325649805237,3.780689300318511 40 | 2017-01-01 00:00:19+00:00,4.793004784330888,15.450508309526212,5.0695133477934275,14.652387827423809,6.082331358725006,4.056695336861849 41 | 2017-01-01 00:00:19.500000+00:00,5.276774158347,15.501775933229315,5.099403992284561,15.436921565341386,6.112222191303875,4.086585793265247 42 | 2017-01-01 00:00:20+00:00,4.496352544805238,14.729790467589474,4.8629593833939095,15.57076796508433,5.875777704049541,3.8501410627382784 43 | 2017-01-01 00:00:20.500000+00:00,5.14537120562587,14.875746728173475,4.896337553014458,14.86986612906642,5.909156270127427,3.883518835901489 44 | 2017-01-01 00:00:21+00:00,4.983373072635672,15.56184258268182,5.107745456747098,14.765102744145517,6.120563426618879,4.094927486875318 45 | 2017-01-01 00:00:21.500000+00:00,5.4379860181989015,15.657745599057105,5.146382432581908,15.244551128127569,6.159200432513554,4.133564432650262 46 | 2017-01-01 00:00:22+00:00,4.764922844300474,14.857408521890564,4.901929818294971,15.590470957198256,5.914747741245439,3.8891118953445036 47 | 2017-01-01 00:00:22.500000+00:00,5.100274543303417,14.892032386059046,4.905617286724374,15.172755558303209,5.918436207882683,3.8927983655660654 48 | 2017-01-01 00:00:23+00:00,4.943023260989865,14.830335930272419,4.885432286822782,15.202107448204542,5.898250274047683,3.872614299597881 49 | 2017-01-01 00:00:23.500000+00:00,4.648730928463119,15.602901974428908,5.12583679453983,15.10152191714954,6.138655458942178,4.113018130137482 50 | 2017-01-01 00:00:24+00:00,4.590366397636247,14.861828409520236,4.9018513299077755,15.40573760981589,5.914669323960136,3.889033335855415 51 | 2017-01-01 00:00:24.500000+00:00,4.818230992159187,15.256112632177196,5.01604272229884,15.059961633353591,6.028860706994624,4.003224737603056 52 | 2017-01-01 00:00:25+00:00,5.239638476043054,15.108676182497113,4.976140384435643,15.323155735722631,5.988958975862008,3.9633217930092783 53 | 2017-01-01 00:00:25.500000+00:00,5.235582440880869,14.922883225343465,4.914925618112181,15.061558138434997,5.92774456292851,3.9021066732958527 54 | 2017-01-01 00:00:26+00:00,4.773419401922278,15.030407096093947,4.94484395675269,15.02038536446847,5.9576620209924185,3.9320258925129616 55 | 2017-01-01 00:00:26.500000+00:00,5.37307812885433,15.118832218068054,4.976759148585502,15.205851324735981,5.9895779630295145,3.963940334141489 56 | 2017-01-01 00:00:27+00:00,5.002750243428203,14.960336352737775,4.928685521391782,15.326923099702505,5.941503520415013,3.9158675223685506 57 | 2017-01-01 00:00:27.500000+00:00,4.695752980502312,14.920731621104288,4.915171607515392,15.18791105120174,5.927990530732163,3.9023526842986205 58 | 2017-01-01 00:00:28+00:00,4.885322654909307,15.098727675884808,4.968670425590984,15.171718102978936,5.981488427093581,3.955852424088387 59 | 2017-01-01 00:00:28.500000+00:00,5.404007809511384,15.602528663848188,5.128206112446105,15.194879948068365,6.141024924452029,4.115387300440181 60 | 2017-01-01 00:00:29+00:00,4.904203458478379,15.219333377893575,5.012287419426196,15.356686949674323,6.02510543720321,3.999469401649182 61 | 2017-01-01 00:00:29.500000+00:00,4.614072840804671,14.939322235300525,4.920016227816411,15.049684180582453,5.932834826956879,3.9071976286759424 62 | 2017-01-01 00:00:30+00:00,5.455983045319716,15.341313388682625,5.0412540684445055,14.987531529422846,6.054072150552982,4.028435986336029 63 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeAdvancedFromJModelica/mpcpy_optimization_parameters.csv: -------------------------------------------------------------------------------- 1 | parameter,value 2 | mpc_model.extwes.r_out,0.299999999913 3 | mpc_model.winwes.g,0.15684379921 4 | mpc_model.exteas.r_out,0.3 5 | mpc_model.adjeas.r_adj,0.18094487427499997 6 | mpc_model.adjeas.c_bou,24999.9937606 7 | mpc_model.extwes.r_zon,2.99999970483 8 | mpc_model.eas.c_zon,2999.99933775 9 | mpc_model.eas.r_int,0.104288735058 10 | mpc_model.adjeas.r_zon,0.05 11 | mpc_model.hal.c_zon,2000.00039662 12 | mpc_model.exteas.c_bou,40000.0 13 | mpc_model.adjwes.r_zon,0.8999999753669999 14 | mpc_model.eas.c_int,104280.645348 15 | mpc_model.lat,0.732689219987 16 | mpc_model.wes.r_int,0.11535661388900001 17 | mpc_model.exteas.abs,0.999999921006 18 | mpc_model.adjwes.r_adj,0.899999980905 19 | mpc_model.extwes.abs,0.9999974451629999 20 | mpc_model.wineas.g,0.333611340388 21 | mpc_model.extwes.c_bou,40000.0 22 | mpc_model.hal.r_int,0.05000000418719999 23 | mpc_model.wes.c_int,93704.3606751 24 | mpc_model.winwes.r_win,0.666672546176 25 | mpc_model.wes.c_zon,2999.99943887 26 | mpc_model.hal.c_int,50000.0 27 | mpc_model.adjwes.c_bou,8707.05430515 28 | mpc_model.exteas.r_zon,2.99999863004 29 | mpc_model.wineas.r_win,0.494813454981 30 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeAdvancedFromJModelica/mpcpy_simulation_parameters_optimization_initial.csv: -------------------------------------------------------------------------------- 1 | parameter,value 2 | mpc_model.extwes.r_out,0.299999999913 3 | mpc_model.winwes.g,0.15684379921 4 | mpc_model.exteas.r_out,0.3 5 | mpc_model.adjeas.r_adj,0.18094487427499997 6 | mpc_model.adjeas.c_bou,24999.9937606 7 | mpc_model.extwes.r_zon,2.99999970483 8 | mpc_model.eas.c_zon,2999.99933775 9 | mpc_model.eas.r_int,0.104288735058 10 | mpc_model.adjeas.r_zon,0.05 11 | mpc_model.hal.c_zon,2000.00039662 12 | mpc_model.exteas.c_bou,40000.0 13 | mpc_model.adjwes.r_zon,0.8999999753669999 14 | mpc_model.eas.c_int,104280.645348 15 | mpc_model.lat,0.732689219987 16 | mpc_model.wes.r_int,0.11535661388900001 17 | mpc_model.exteas.abs,0.999999921006 18 | mpc_model.adjwes.r_adj,0.899999980905 19 | mpc_model.extwes.abs,0.9999974451629999 20 | mpc_model.wineas.g,0.333611340388 21 | mpc_model.extwes.c_bou,40000.0 22 | mpc_model.hal.r_int,0.05000000418719999 23 | mpc_model.wes.c_int,93704.3606751 24 | mpc_model.winwes.r_win,0.666672546176 25 | mpc_model.wes.c_zon,2999.99943887 26 | mpc_model.hal.c_int,50000.0 27 | mpc_model.adjwes.c_bou,8707.05430515 28 | mpc_model.exteas.r_zon,2.99999863004 29 | mpc_model.wineas.r_win,0.494813454981 30 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/initial_options.txt: -------------------------------------------------------------------------------- 1 | { 2 | "IPOPT_options": { 3 | "acceptable_compl_inf_tol": 1e+100, 4 | "acceptable_constr_viol_tol": 1e+100, 5 | "acceptable_dual_inf_tol": 1e+100, 6 | "compl_inf_tol": 1e+100, 7 | "constr_viol_tol": 1e+100, 8 | "dual_inf_tol": 1e+100 9 | }, 10 | "WORHP_options": {}, 11 | "blocking_factors": null, 12 | "checkpoint": false, 13 | "delayed_feedback": null, 14 | "discr": "LGR", 15 | "eliminate_cont_var": false, 16 | "eliminate_der_var": false, 17 | "equation_scaling": false, 18 | "expand_to_sx": "NLP", 19 | "explicit_hessian": false, 20 | "external_data": null, 21 | "free_element_lengths_data": null, 22 | "h_bounds": [ 23 | 0.7, 24 | 1.3 25 | ], 26 | "hs": null, 27 | "init_dual": null, 28 | "init_traj": null, 29 | "mutable_external_data": true, 30 | "n_cp": 3, 31 | "n_e": 0, 32 | "n_eval_points": 20, 33 | "named_vars": false, 34 | "nominal_traj": null, 35 | "nominal_traj_mode": { 36 | "_default_mode": "linear" 37 | }, 38 | "order": "default", 39 | "print_condition_numbers": false, 40 | "quadrature_constraint": true, 41 | "result_file_name": "", 42 | "result_mode": "collocation_points", 43 | "solver": "IPOPT", 44 | "variable_scaling": true, 45 | "variable_scaling_allow_update": false, 46 | "verbosity": 3, 47 | "write_scaled_result": false 48 | } -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/new_options.txt: -------------------------------------------------------------------------------- 1 | { 2 | "IPOPT_options": { 3 | "acceptable_compl_inf_tol": 1e+100, 4 | "acceptable_constr_viol_tol": 1e+100, 5 | "acceptable_dual_inf_tol": 1e+100, 6 | "compl_inf_tol": 1e+100, 7 | "constr_viol_tol": 1e+100, 8 | "dual_inf_tol": 1e+100, 9 | "max_iter": 2 10 | }, 11 | "WORHP_options": {}, 12 | "blocking_factors": null, 13 | "checkpoint": false, 14 | "delayed_feedback": null, 15 | "discr": "LGR", 16 | "eliminate_cont_var": false, 17 | "eliminate_der_var": false, 18 | "equation_scaling": false, 19 | "expand_to_sx": "NLP", 20 | "explicit_hessian": false, 21 | "external_data": null, 22 | "free_element_lengths_data": null, 23 | "h_bounds": [ 24 | 0.7, 25 | 1.3 26 | ], 27 | "hs": null, 28 | "init_dual": null, 29 | "init_traj": null, 30 | "mutable_external_data": true, 31 | "n_cp": 3, 32 | "n_e": 2, 33 | "n_eval_points": 20, 34 | "named_vars": false, 35 | "nominal_traj": null, 36 | "nominal_traj_mode": { 37 | "_default_mode": "linear" 38 | }, 39 | "order": "default", 40 | "print_condition_numbers": false, 41 | "quadrature_constraint": true, 42 | "result_file_name": "", 43 | "result_mode": "mesh_points", 44 | "solver": "IPOPT", 45 | "variable_scaling": true, 46 | "variable_scaling_allow_update": false, 47 | "verbosity": 3, 48 | "write_scaled_result": false 49 | } -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/optimize_control_default.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow 2 | 2017-01-01 00:00:00+00:00,485.037303724 3 | 2017-01-01 00:04:39.091846+00:00,1004.77329349 4 | 2017-01-01 00:19:20.908154+00:00,1593.94192639 5 | 2017-01-01 00:30:00+00:00,1021.14047586 6 | 2017-01-01 00:34:39.091846+00:00,1334.37957419 7 | 2017-01-01 00:49:20.908154+00:00,1271.33670995 8 | 2017-01-01 01:00:00+00:00,1226.18095619 9 | 2017-01-01 01:04:39.091846+00:00,1206.63104656 10 | 2017-01-01 01:19:20.908154+00:00,1145.65263062 11 | 2017-01-01 01:30:00+00:00,1102.31656892 12 | 2017-01-01 01:34:39.091846+00:00,1083.64548887 13 | 2017-01-01 01:49:20.908154+00:00,1025.77487886 14 | 2017-01-01 02:00:00+00:00,985.000001286 15 | 2017-01-01 02:04:39.091846+00:00,967.527218096 16 | 2017-01-01 02:19:20.908154+00:00,913.754596253 17 | 2017-01-01 02:30:00+00:00,876.238572276 18 | 2017-01-01 02:34:39.091846+00:00,860.263050044 19 | 2017-01-01 02:49:20.908154+00:00,811.508480891 20 | 2017-01-01 03:00:00+00:00,777.893220098 21 | 2017-01-01 03:04:39.091846+00:00,763.688304372 22 | 2017-01-01 03:19:20.908154+00:00,720.785992154 23 | 2017-01-01 03:30:00+00:00,691.646660993 24 | 2017-01-01 03:34:39.091846+00:00,679.455401753 25 | 2017-01-01 03:49:20.908154+00:00,643.139416978 26 | 2017-01-01 04:00:00+00:00,618.974597499 27 | 2017-01-01 04:04:39.091846+00:00,609.005590504 28 | 2017-01-01 04:19:20.908154+00:00,579.897309792 29 | 2017-01-01 04:30:00+00:00,561.120468772 30 | 2017-01-01 04:34:39.091846+00:00,553.54428643 31 | 2017-01-01 04:49:20.908154+00:00,532.141760584 32 | 2017-01-01 05:00:00+00:00,519.074174994 33 | 2017-01-01 05:04:39.091846+00:00,514.020447818 34 | 2017-01-01 05:19:20.908154+00:00,500.689880042 35 | 2017-01-01 05:30:00+00:00,493.555139909 36 | 2017-01-01 05:34:39.091846+00:00,491.110338506 37 | 2017-01-01 05:49:20.908154+00:00,486.07981856 38 | 2017-01-01 06:00:00+00:00,485.000001282 39 | 2017-01-01 06:04:39.091846+00:00,485.205956816 40 | 2017-01-01 06:19:20.908154+00:00,488.561558343 41 | 2017-01-01 06:30:00+00:00,493.555139909 42 | 2017-01-01 06:34:39.091846+00:00,496.408328356 43 | 2017-01-01 06:49:20.908154+00:00,508.092636133 44 | 2017-01-01 07:00:00+00:00,519.074174994 45 | 2017-01-01 07:04:39.091846+00:00,524.525777442 46 | 2017-01-01 07:19:20.908154+00:00,544.338869777 47 | 2017-01-01 07:30:00+00:00,561.120468772 48 | 2017-01-01 07:34:39.091846+00:00,569.077206725 49 | 2017-01-01 07:49:20.908154+00:00,596.680076165 50 | 2017-01-01 08:00:00+00:00,618.974597499 51 | 2017-01-01 08:04:39.091846+00:00,629.300328899 52 | 2017-01-01 08:19:20.908154+00:00,664.220682746 53 | 2017-01-01 08:30:00+00:00,691.646660993 54 | 2017-01-01 08:34:39.091846+00:00,704.164709645 55 | 2017-01-01 08:49:20.908154+00:00,745.805051014 56 | 2017-01-01 09:00:00+00:00,777.893220098 57 | 2017-01-01 09:04:39.091846+00:00,792.389398654 58 | 2017-01-01 09:19:20.908154+00:00,840.03724981 59 | 2017-01-01 09:30:00+00:00,876.238572276 60 | 2017-01-01 09:34:39.091846+00:00,892.464847034 61 | 2017-01-01 09:49:20.908154+00:00,945.304940085 62 | 2017-01-01 10:00:00+00:00,985.000001285 63 | 2017-01-01 10:04:39.091846+00:00,1002.67873612 64 | 2017-01-01 10:19:20.908154+00:00,1059.80696247 65 | 2017-01-01 10:30:00+00:00,1102.31656892 66 | 2017-01-01 10:34:39.091846+00:00,1121.14527571 67 | 2017-01-01 10:49:20.908154+00:00,1181.58415563 68 | 2017-01-01 11:00:00+00:00,1226.18095618 69 | 2017-01-01 11:04:39.091846+00:00,1245.83747047 70 | 2017-01-01 11:19:20.908154+00:00,1308.55287801 71 | 2017-01-01 11:30:00+00:00,1354.47380907 72 | 2017-01-01 11:34:39.091846+00:00,1374.62180237 73 | 2017-01-01 11:49:20.908154+00:00,1438.54065957 74 | 2017-01-01 12:00:00+00:00,1485.00000129 75 | 2017-01-01 12:04:39.091846+00:00,1505.29473579 76 | 2017-01-01 12:19:20.908154+00:00,1569.32337334 77 | 2017-01-01 12:30:00+00:00,1615.52619351 78 | 2017-01-01 12:34:39.091846+00:00,1635.62042062 79 | 2017-01-01 12:49:20.908154+00:00,1698.66329081 80 | 2017-01-01 13:00:00+00:00,1743.81904639 81 | 2017-01-01 13:04:39.091846+00:00,1763.36894824 82 | 2017-01-01 13:19:20.908154+00:00,1824.34737015 83 | 2017-01-01 13:30:00+00:00,1867.68343365 84 | 2017-01-01 13:34:39.091846+00:00,1886.35450593 85 | 2017-01-01 13:49:20.908154+00:00,1944.22512191 86 | 2017-01-01 14:00:00+00:00,1985.00000129 87 | 2017-01-01 14:04:39.091846+00:00,2002.47277671 88 | 2017-01-01 14:19:20.908154+00:00,2056.24540451 89 | 2017-01-01 14:30:00+00:00,2093.7614303 90 | 2017-01-01 14:34:39.091846+00:00,2109.73694476 91 | 2017-01-01 14:49:20.908154+00:00,2158.49151988 92 | 2017-01-01 15:00:00+00:00,2192.10678247 93 | 2017-01-01 15:04:39.091846+00:00,2206.31169043 94 | 2017-01-01 15:19:20.908154+00:00,2249.21400861 95 | 2017-01-01 15:30:00+00:00,2278.35334158 96 | 2017-01-01 15:34:39.091846+00:00,2290.54459305 97 | 2017-01-01 15:49:20.908154+00:00,2326.86058379 98 | 2017-01-01 16:00:00+00:00,2351.02540507 99 | 2017-01-01 16:04:39.091846+00:00,2360.9944043 100 | 2017-01-01 16:19:20.908154+00:00,2390.10269097 101 | 2017-01-01 16:30:00+00:00,2408.8795338 102 | 2017-01-01 16:34:39.091846+00:00,2416.45570837 103 | 2017-01-01 16:49:20.908154+00:00,2437.85824018 104 | 2017-01-01 17:00:00+00:00,2450.92582758 105 | 2017-01-01 17:04:39.091846+00:00,2455.97954699 106 | 2017-01-01 17:19:20.908154+00:00,2469.31012072 107 | 2017-01-01 17:30:00+00:00,2476.44486266 108 | 2017-01-01 17:34:39.091846+00:00,2478.8896563 109 | 2017-01-01 17:49:20.908154+00:00,2483.92018221 110 | 2017-01-01 18:00:00+00:00,2485.00000129 111 | 2017-01-01 18:04:39.091846+00:00,2484.79403799 112 | 2017-01-01 18:19:20.908154+00:00,2481.43844242 113 | 2017-01-01 18:30:00+00:00,2476.44486266 114 | 2017-01-01 18:34:39.091846+00:00,2473.59166645 115 | 2017-01-01 18:49:20.908154+00:00,2461.90736463 116 | 2017-01-01 19:00:00+00:00,2450.92582758 117 | 2017-01-01 19:04:39.091846+00:00,2445.47421736 118 | 2017-01-01 19:19:20.908154+00:00,2425.66113099 119 | 2017-01-01 19:30:00+00:00,2408.8795338 120 | 2017-01-01 19:34:39.091846+00:00,2400.92278808 121 | 2017-01-01 19:49:20.908154+00:00,2373.3199246 122 | 2017-01-01 20:00:00+00:00,2351.02540507 123 | 2017-01-01 20:04:39.091846+00:00,2340.6996659 124 | 2017-01-01 20:19:20.908154+00:00,2305.77931802 125 | 2017-01-01 20:30:00+00:00,2278.35334158 126 | 2017-01-01 20:34:39.091846+00:00,2265.83528516 127 | 2017-01-01 20:49:20.908154+00:00,2224.19494975 128 | 2017-01-01 21:00:00+00:00,2192.10678247 129 | 2017-01-01 21:04:39.091846+00:00,2177.61059615 130 | 2017-01-01 21:19:20.908154+00:00,2129.96275096 131 | 2017-01-01 21:30:00+00:00,2093.7614303 132 | 2017-01-01 21:34:39.091846+00:00,2077.53514777 133 | 2017-01-01 21:49:20.908154+00:00,2024.69506068 134 | 2017-01-01 22:00:00+00:00,1985.00000129 135 | 2017-01-01 22:04:39.091846+00:00,1967.32125868 136 | 2017-01-01 22:19:20.908154+00:00,1910.19303829 137 | 2017-01-01 22:30:00+00:00,1867.68343365 138 | 2017-01-01 22:34:39.091846+00:00,1848.85471909 139 | 2017-01-01 22:49:20.908154+00:00,1788.41584514 140 | 2017-01-01 23:00:00+00:00,1743.81904639 141 | 2017-01-01 23:04:39.091846+00:00,1724.16252433 142 | 2017-01-01 23:19:20.908154+00:00,1661.44712276 143 | 2017-01-01 23:30:00+00:00,1615.52619351 144 | 2017-01-01 23:34:39.091846+00:00,1595.37819256 145 | 2017-01-01 23:49:20.908154+00:00,1531.45934067 146 | 2017-01-02 00:00:00+00:00,1484.99999788 147 | 2017-01-03 00:00:00+00:00,100.0 148 | 2017-01-04 00:00:00+00:00,100.0 149 | 2017-01-05 00:00:00+00:00,100.0 150 | 2017-01-06 00:00:00+00:00,100.0 151 | 2017-01-07 00:00:00+00:00,100.0 152 | 2017-01-08 00:00:00+00:00,100.0 153 | 2017-01-09 00:00:00+00:00,100.0 154 | 2017-01-10 00:00:00+00:00,100.0 155 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/optimize_control_default_updated_constraints.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow 2 | 2017-01-11 00:00:00+00:00,2.2672949739899195e-06 3 | 2017-01-11 00:04:39.091846+00:00,528.9321462294566 4 | 2017-01-11 00:19:20.908154+00:00,1218.83179834123 5 | 2017-01-11 00:30:00+00:00,787.089244327407 6 | 2017-01-11 00:34:39.091846+00:00,1034.3795733756233 7 | 2017-01-11 00:49:20.908154+00:00,971.336710293556 8 | 2017-01-11 01:00:00+00:00,926.1809555935372 9 | 2017-01-11 01:04:39.091846+00:00,906.6310465663571 10 | 2017-01-11 01:19:20.908154+00:00,845.6526306144593 11 | 2017-01-11 01:30:00+00:00,802.3165689185737 12 | 2017-01-11 01:34:39.091846+00:00,783.645488873043 13 | 2017-01-11 01:49:20.908154+00:00,725.7748788578792 14 | 2017-01-11 02:00:00+00:00,685.000001283175 15 | 2017-01-11 02:04:39.091846+00:00,667.5272180971956 16 | 2017-01-11 02:19:20.908154+00:00,613.7545962518052 17 | 2017-01-11 02:30:00+00:00,576.238572273803 18 | 2017-01-11 02:34:39.091846+00:00,560.2630500458715 19 | 2017-01-11 02:49:20.908154+00:00,511.5084808895263 20 | 2017-01-11 03:00:00+00:00,477.8932200951066 21 | 2017-01-11 03:04:39.091846+00:00,463.68830437371804 22 | 2017-01-11 03:19:20.908154+00:00,420.7859921528428 23 | 2017-01-11 03:30:00+00:00,391.6466609892368 24 | 2017-01-11 03:34:39.091846+00:00,379.4554017548232 25 | 2017-01-11 03:49:20.908154+00:00,343.13941697700585 26 | 2017-01-11 04:00:00+00:00,318.97459749442044 27 | 2017-01-11 04:04:39.091846+00:00,309.00559050691913 28 | 2017-01-11 04:19:20.908154+00:00,279.8973097908893 29 | 2017-01-11 04:30:00+00:00,261.12046876538443 30 | 2017-01-11 04:34:39.091846+00:00,253.54428643295108 31 | 2017-01-11 04:49:20.908154+00:00,232.14176058242015 32 | 2017-01-11 05:00:00+00:00,219.0741749850757 33 | 2017-01-11 05:04:39.091846+00:00,214.02044782242513 34 | 2017-01-11 05:19:20.908154+00:00,200.689880038918 35 | 2017-01-11 05:30:00+00:00,193.55513989835978 36 | 2017-01-11 05:34:39.091846+00:00,191.11033851168736 37 | 2017-01-11 05:49:20.908154+00:00,186.0798185567228 38 | 2017-01-11 06:00:00+00:00,185.00000127065962 39 | 2017-01-11 06:04:39.091846+00:00,185.20595682295175 40 | 2017-01-11 06:19:20.908154+00:00,188.56155833849738 41 | 2017-01-11 06:30:00+00:00,193.55513989647406 42 | 2017-01-11 06:34:39.091846+00:00,196.408328363582 43 | 2017-01-11 06:49:20.908154+00:00,208.09263612888364 44 | 2017-01-11 07:00:00+00:00,219.0741749835098 45 | 2017-01-11 07:04:39.091846+00:00,224.52577744945555 46 | 2017-01-11 07:19:20.908154+00:00,244.3388697723479 47 | 2017-01-11 07:30:00+00:00,261.1204687646099 48 | 2017-01-11 07:34:39.091846+00:00,269.07720673136623 49 | 2017-01-11 07:49:20.908154+00:00,296.6800761615569 50 | 2017-01-11 08:00:00+00:00,318.97459749375764 51 | 2017-01-11 08:04:39.091846+00:00,329.3003289035728 52 | 2017-01-11 08:19:20.908154+00:00,364.2206827428595 53 | 2017-01-11 08:30:00+00:00,391.6466609886128 54 | 2017-01-11 08:34:39.091846+00:00,404.1647096490039 55 | 2017-01-11 08:49:20.908154+00:00,445.805051011758 56 | 2017-01-11 09:00:00+00:00,477.89322009454924 57 | 2017-01-11 09:04:39.091846+00:00,492.3893986566727 58 | 2017-01-11 09:19:20.908154+00:00,540.037249807757 59 | 2017-01-11 09:30:00+00:00,576.2385722733634 60 | 2017-01-11 09:34:39.091846+00:00,592.46484703711 61 | 2017-01-11 09:49:20.908154+00:00,645.3049400833756 62 | 2017-01-11 10:00:00+00:00,685.0000012828376 63 | 2017-01-11 10:04:39.091846+00:00,702.6787361223064 64 | 2017-01-11 10:19:20.908154+00:00,759.8069624723402 65 | 2017-01-11 10:30:00+00:00,802.3165689183063 66 | 2017-01-11 10:34:39.091846+00:00,821.1452757128878 67 | 2017-01-11 10:49:20.908154+00:00,881.5841556256353 68 | 2017-01-11 11:00:00+00:00,926.1809561813218 69 | 2017-01-11 11:04:39.091846+00:00,945.8374704712721 70 | 2017-01-11 11:19:20.908154+00:00,1008.5528780054237 71 | 2017-01-11 11:30:00+00:00,1054.4738090641144 72 | 2017-01-11 11:34:39.091846+00:00,1074.6218023739304 73 | 2017-01-11 11:49:20.908154+00:00,1138.5406595694026 74 | 2017-01-11 12:00:00+00:00,1185.000001284471 75 | 2017-01-11 12:04:39.091846+00:00,1205.294735796204 76 | 2017-01-11 12:19:20.908154+00:00,1269.3233733356346 77 | 2017-01-11 12:30:00+00:00,1315.5261935047113 78 | 2017-01-11 12:34:39.091846+00:00,1335.6204206178325 79 | 2017-01-11 12:49:20.908154+00:00,1398.663290811746 80 | 2017-01-11 13:00:00+00:00,1443.8190463873736 81 | 2017-01-11 13:04:39.091846+00:00,1463.3689482384236 82 | 2017-01-11 13:19:20.908154+00:00,1524.3473701499258 83 | 2017-01-11 13:30:00+00:00,1567.6834336500885 84 | 2017-01-11 13:34:39.091846+00:00,1586.3545059317687 85 | 2017-01-11 13:49:20.908154+00:00,1644.225121906511 86 | 2017-01-11 14:00:00+00:00,1685.0000012851226 87 | 2017-01-11 14:04:39.091846+00:00,1702.4727767077131 88 | 2017-01-11 14:19:20.908154+00:00,1756.245404512554 89 | 2017-01-11 14:30:00+00:00,1793.7614302939385 90 | 2017-01-11 14:34:39.091846+00:00,1809.7369447591823 91 | 2017-01-11 14:49:20.908154+00:00,1858.4915198747503 92 | 2017-01-11 15:00:00+00:00,1892.106782471849 93 | 2017-01-11 15:04:39.091846+00:00,1906.3116904315882 94 | 2017-01-11 15:19:20.908154+00:00,1949.2140086113234 95 | 2017-01-11 15:30:00+00:00,1978.353341576598 96 | 2017-01-11 15:34:39.091846+00:00,1990.544593050896 97 | 2017-01-11 15:49:20.908154+00:00,2026.860583786921 98 | 2017-01-11 16:00:00+00:00,2051.025405069849 99 | 2017-01-11 16:04:39.091846+00:00,2060.994404299487 100 | 2017-01-11 16:19:20.908154+00:00,2090.1026909726183 101 | 2017-01-11 16:30:00+00:00,2108.879533796716 102 | 2017-01-11 16:34:39.091846+00:00,2116.455708374542 103 | 2017-01-11 16:49:20.908154+00:00,2137.8582401804474 104 | 2017-01-11 17:00:00+00:00,2150.9258275745424 105 | 2017-01-11 17:04:39.091846+00:00,2155.9795469865644 106 | 2017-01-11 17:19:20.908154+00:00,2169.310120723107 107 | 2017-01-11 17:30:00+00:00,2176.444862659307 108 | 2017-01-11 17:34:39.091846+00:00,2178.8896562987966 109 | 2017-01-11 17:49:20.908154+00:00,2183.9201822044165 110 | 2017-01-11 18:00:00+00:00,2185.000001285495 111 | 2017-01-11 18:04:39.091846+00:00,2184.7940379890397 112 | 2017-01-11 18:19:20.908154+00:00,2181.4384424217446 113 | 2017-01-11 18:30:00+00:00,2176.4448626592975 114 | 2017-01-11 18:34:39.091846+00:00,2173.591666449565 115 | 2017-01-11 18:49:20.908154+00:00,2161.9073646308516 116 | 2017-01-11 19:00:00+00:00,2150.9258275745424 117 | 2017-01-11 19:04:39.091846+00:00,2145.4742173633003 118 | 2017-01-11 19:19:20.908154+00:00,2125.661130987778 119 | 2017-01-11 19:30:00+00:00,2108.8795337967704 120 | 2017-01-11 19:34:39.091846+00:00,2100.9227880797284 121 | 2017-01-11 19:49:20.908154+00:00,2073.319924599509 122 | 2017-01-11 20:00:00+00:00,2051.02540506988 123 | 2017-01-11 20:04:39.091846+00:00,2040.6996659058989 124 | 2017-01-11 20:19:20.908154+00:00,2005.7793180190579 125 | 2017-01-11 20:30:00+00:00,1978.3533415766303 126 | 2017-01-11 20:34:39.091846+00:00,1965.835285159194 127 | 2017-01-11 20:49:20.908154+00:00,1924.1949497508404 128 | 2017-01-11 21:00:00+00:00,1892.1067824718823 129 | 2017-01-11 21:04:39.091846+00:00,1877.6105961505305 130 | 2017-01-11 21:19:20.908154+00:00,1829.9627509553584 131 | 2017-01-11 21:30:00+00:00,1793.7614302940062 132 | 2017-01-11 21:34:39.091846+00:00,1777.5351477693569 133 | 2017-01-11 21:49:20.908154+00:00,1724.695060680112 134 | 2017-01-11 22:00:00+00:00,1685.000001285173 135 | 2017-01-11 22:04:39.091846+00:00,1667.321258683616 136 | 2017-01-11 22:19:20.908154+00:00,1610.1930382914277 137 | 2017-01-11 22:30:00+00:00,1567.6834336501797 138 | 2017-01-11 22:34:39.091846+00:00,1548.8547190926342 139 | 2017-01-11 22:49:20.908154+00:00,1488.4158451383455 140 | 2017-01-11 23:00:00+00:00,1443.819046387484 141 | 2017-01-11 23:04:39.091846+00:00,1424.162524333952 142 | 2017-01-11 23:19:20.908154+00:00,1361.4471227587085 143 | 2017-01-11 23:30:00+00:00,1315.5261935048027 144 | 2017-01-11 23:34:39.091846+00:00,1295.3781925580317 145 | 2017-01-11 23:49:20.908154+00:00,1231.4593406669574 146 | 2017-01-12 00:00:00+00:00,1184.9999978763547 147 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/optimize_energycost_price_data.csv: -------------------------------------------------------------------------------- 1 | Time,pi_e 2 | 2017-01-01 00:00:00+00:00,1.0 3 | 2017-01-01 14:00:00+00:00,1.0 4 | 2017-01-01 15:00:00+00:00,500.0 5 | 2017-01-01 18:00:00+00:00,500.0 6 | 2017-01-01 19:00:00+00:00,1.0 7 | 2017-01-02 00:00:00+00:00,1.0 8 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/optimize_long_control.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow 2 | 2017-01-01 00:00:00+00:00,100.0 3 | 2017-01-01 08:00:00+00:00,100.0 4 | 2017-01-01 16:00:00+00:00,100.0 5 | 2017-01-02 00:00:00+00:00,100.0 6 | 2017-01-03 00:00:00+00:00,100.0 7 | 2017-01-04 00:00:00+00:00,100.0 8 | 2017-01-05 00:00:00+00:00,100.0 9 | 2017-01-06 00:00:00+00:00,100.0 10 | 2017-01-07 00:00:00+00:00,100.0 11 | 2017-01-08 00:00:00+00:00,100.0 12 | 2017-01-09 00:00:00+00:00,100.0 13 | 2017-01-10 00:00:00+00:00,485.03730392680495 14 | 2017-01-10 00:04:39.091846+00:00,1004.7732935659689 15 | 2017-01-10 00:19:20.908154+00:00,1593.9419264165028 16 | 2017-01-10 00:30:00+00:00,1021.1404762033997 17 | 2017-01-10 00:34:39.091846+00:00,1334.3795740553626 18 | 2017-01-10 00:49:20.908154+00:00,1271.3367100675987 19 | 2017-01-10 01:00:00+00:00,1226.1809563764525 20 | 2017-01-10 01:04:39.091846+00:00,1206.631046431398 21 | 2017-01-10 01:19:20.908154+00:00,1145.6526307308325 22 | 2017-01-10 01:30:00+00:00,1102.3165691112267 23 | 2017-01-10 01:34:39.091846+00:00,1083.6454887380594 24 | 2017-01-10 01:49:20.908154+00:00,1025.774878974249 25 | 2017-01-10 02:00:00+00:00,985.0000014759896 26 | 2017-01-10 02:04:39.091846+00:00,967.5272179621713 27 | 2017-01-10 02:19:20.908154+00:00,913.7545963681869 28 | 2017-01-10 02:30:00+00:00,876.2385724668598 29 | 2017-01-10 02:34:39.091846+00:00,860.2630499107939 30 | 2017-01-10 02:49:20.908154+00:00,811.5084810059188 31 | 2017-01-10 03:00:00+00:00,777.8932202885802 32 | 2017-01-10 03:04:39.091846+00:00,763.6883042385534 33 | 2017-01-10 03:19:20.908154+00:00,720.7859922692752 34 | 2017-01-10 03:30:00+00:00,691.6466611833282 35 | 2017-01-10 03:34:39.091846+00:00,679.45540161948 36 | 2017-01-10 03:49:20.908154+00:00,643.1394170935378 37 | 2017-01-10 04:00:00+00:00,618.9745976895329 38 | 2017-01-10 04:04:39.091846+00:00,609.0055903711788 39 | 2017-01-10 04:19:20.908154+00:00,579.8973099076634 40 | 2017-01-10 04:30:00+00:00,561.1204689620748 41 | 2017-01-10 04:34:39.091846+00:00,553.5442862964667 42 | 2017-01-10 04:49:20.908154+00:00,532.1417606996436 43 | 2017-01-10 05:00:00+00:00,519.0741751836773 44 | 2017-01-10 05:04:39.091846+00:00,514.0204476848419 45 | 2017-01-10 05:19:20.908154+00:00,500.68988015675706 46 | 2017-01-10 05:30:00+00:00,493.5551400984979 47 | 2017-01-10 05:34:39.091846+00:00,491.11033837298237 48 | 2017-01-10 05:49:20.908154+00:00,486.07981867525774 49 | 2017-01-10 06:00:00+00:00,485.00000147210693 50 | 2017-01-10 06:04:39.091846+00:00,485.2059566829934 51 | 2017-01-10 06:19:20.908154+00:00,488.56155845777704 52 | 2017-01-10 06:30:00+00:00,493.55514009839897 53 | 2017-01-10 06:34:39.091846+00:00,496.4083282225892 54 | 2017-01-10 06:49:20.908154+00:00,508.0926362486337 55 | 2017-01-10 07:00:00+00:00,519.0741751834887 56 | 2017-01-10 07:04:39.091846+00:00,524.525777308793 57 | 2017-01-10 07:19:20.908154+00:00,544.3388698917497 58 | 2017-01-10 07:30:00+00:00,561.1204689617989 59 | 2017-01-10 07:34:39.091846+00:00,569.0772065921446 60 | 2017-01-10 07:49:20.908154+00:00,596.6800762801433 61 | 2017-01-10 08:00:00+00:00,618.9745976892597 62 | 2017-01-10 08:04:39.091846+00:00,629.3003287656746 63 | 2017-01-10 08:19:20.908154+00:00,664.2206828607484 64 | 2017-01-10 08:30:00+00:00,691.6466611830803 65 | 2017-01-10 08:34:39.091846+00:00,704.1647095120483 66 | 2017-01-10 08:49:20.908154+00:00,745.805051129158 67 | 2017-01-10 09:00:00+00:00,777.8932202883082 68 | 2017-01-10 09:04:39.091846+00:00,792.3893985203788 69 | 2017-01-10 09:19:20.908154+00:00,840.0372499248084 70 | 2017-01-10 09:30:00+00:00,876.2385724666025 71 | 2017-01-10 09:34:39.091846+00:00,892.4648469012674 72 | 2017-01-10 09:49:20.908154+00:00,945.3049402002049 73 | 2017-01-10 10:00:00+00:00,985.0000014757633 74 | 2017-01-10 10:04:39.091846+00:00,1002.6787359867567 75 | 2017-01-10 10:19:20.908154+00:00,1059.8069625890191 76 | 2017-01-10 10:30:00+00:00,1102.316569111031 77 | 2017-01-10 10:34:39.091846+00:00,1121.1452755775392 78 | 2017-01-10 10:49:20.908154+00:00,1181.58415574222 79 | 2017-01-10 11:00:00+00:00,1226.1809563738977 80 | 2017-01-10 11:04:39.091846+00:00,1245.8374703360669 81 | 2017-01-10 11:19:20.908154+00:00,1308.5528781219332 82 | 2017-01-10 11:30:00+00:00,1354.473809256608 83 | 2017-01-10 11:34:39.091846+00:00,1374.6218022388048 84 | 2017-01-10 11:49:20.908154+00:00,1438.5406596858652 85 | 2017-01-10 12:00:00+00:00,1485.0000014768743 86 | 2017-01-10 12:04:39.091846+00:00,1505.2947356611348 87 | 2017-01-10 12:19:20.908154+00:00,1569.3233734520693 88 | 2017-01-10 12:30:00+00:00,1615.5261936970917 89 | 2017-01-10 12:34:39.091846+00:00,1635.6204204828089 90 | 2017-01-10 12:49:20.908154+00:00,1698.6632909281664 91 | 2017-01-10 13:00:00+00:00,1743.8190465797045 92 | 2017-01-10 13:04:39.091846+00:00,1763.3689481034253 93 | 2017-01-10 13:19:20.908154+00:00,1824.3473702663327 94 | 2017-01-10 13:30:00+00:00,1867.6834338423898 95 | 2017-01-10 13:34:39.091846+00:00,1886.3545057967951 96 | 2017-01-10 13:49:20.908154+00:00,1944.225122022896 97 | 2017-01-10 14:00:00+00:00,1985.000001477415 98 | 2017-01-10 14:04:39.091846+00:00,2002.472776572752 99 | 2017-01-10 14:19:20.908154+00:00,2056.2454046289236 100 | 2017-01-10 14:30:00+00:00,2093.761430486227 101 | 2017-01-10 14:34:39.091846+00:00,2109.7369446242387 102 | 2017-01-10 14:49:20.908154+00:00,2158.491519991125 103 | 2017-01-10 15:00:00+00:00,2192.106782664121 104 | 2017-01-10 15:04:39.091846+00:00,2206.311690296655 105 | 2017-01-10 15:19:20.908154+00:00,2249.214008727691 106 | 2017-01-10 15:30:00+00:00,2278.3533417688454 107 | 2017-01-10 15:34:39.091846+00:00,2290.5445929159587 108 | 2017-01-10 15:49:20.908154+00:00,2326.860583903303 109 | 2017-01-10 16:00:00+00:00,2351.025405262101 110 | 2017-01-10 16:04:39.091846+00:00,2360.9944041645604 111 | 2017-01-10 16:19:20.908154+00:00,2390.1026910889823 112 | 2017-01-10 16:30:00+00:00,2408.879533988983 113 | 2017-01-10 16:34:39.091846+00:00,2416.4557082396163 114 | 2017-01-10 16:49:20.908154+00:00,2437.8582402968173 115 | 2017-01-10 17:00:00+00:00,2450.925827766768 116 | 2017-01-10 17:04:39.091846+00:00,2455.97954685164 117 | 2017-01-10 17:19:20.908154+00:00,2469.3101208394664 118 | 2017-01-10 17:30:00+00:00,2476.4448628515443 119 | 2017-01-10 17:34:39.091846+00:00,2478.889656163872 120 | 2017-01-10 17:49:20.908154+00:00,2483.9201823207814 121 | 2017-01-10 18:00:00+00:00,2485.00000147775 122 | 2017-01-10 18:04:39.091846+00:00,2484.7940378541152 123 | 2017-01-10 18:19:20.908154+00:00,2481.4384425381136 124 | 2017-01-10 18:30:00+00:00,2476.4448628515515 125 | 2017-01-10 18:34:39.091846+00:00,2473.5916663146386 126 | 2017-01-10 18:49:20.908154+00:00,2461.9073647472082 127 | 2017-01-10 19:00:00+00:00,2450.9258277668023 128 | 2017-01-10 19:04:39.091846+00:00,2445.4742172283713 129 | 2017-01-10 19:19:20.908154+00:00,2425.6611311041474 130 | 2017-01-10 19:30:00+00:00,2408.8795339889994 131 | 2017-01-10 19:34:39.091846+00:00,2400.9227879448117 132 | 2017-01-10 19:49:20.908154+00:00,2373.319924715876 133 | 2017-01-10 20:00:00+00:00,2351.025405262119 134 | 2017-01-10 20:04:39.091846+00:00,2340.6996657709683 135 | 2017-01-10 20:19:20.908154+00:00,2305.779318135424 136 | 2017-01-10 20:30:00+00:00,2278.353341768867 137 | 2017-01-10 20:34:39.091846+00:00,2265.8352850242745 138 | 2017-01-10 20:49:20.908154+00:00,2224.194949867195 139 | 2017-01-10 21:00:00+00:00,2192.1067826641474 140 | 2017-01-10 21:04:39.091846+00:00,2177.610596015616 141 | 2017-01-10 21:19:20.908154+00:00,2129.9627510717187 142 | 2017-01-10 21:30:00+00:00,2093.76143048625 143 | 2017-01-10 21:34:39.091846+00:00,2077.5351476344326 144 | 2017-01-10 21:49:20.908154+00:00,2024.6950607964707 145 | 2017-01-10 22:00:00+00:00,1985.00000147747 146 | 2017-01-10 22:04:39.091846+00:00,1967.3212585486822 147 | 2017-01-10 22:19:20.908154+00:00,1910.1930384078025 148 | 2017-01-10 22:30:00+00:00,1867.6834338424633 149 | 2017-01-10 22:34:39.091846+00:00,1848.8547189577182 150 | 2017-01-10 22:49:20.908154+00:00,1788.415845254714 151 | 2017-01-10 23:00:00+00:00,1743.8190465797923 152 | 2017-01-10 23:04:39.091846+00:00,1724.162524199024 153 | 2017-01-10 23:19:20.908154+00:00,1661.4471228750872 154 | 2017-01-10 23:30:00+00:00,1615.5261936971756 155 | 2017-01-10 23:34:39.091846+00:00,1595.3781922961696 156 | 2017-01-10 23:49:20.908154+00:00,1531.4593413112013 157 | 2017-01-11 00:00:00+00:00,1485.0000014769887 158 | 2017-01-11 00:04:39.091846+00:00,1464.7052588737388 159 | 2017-01-11 00:19:20.908154+00:00,1400.6766275450548 160 | 2017-01-11 00:30:00+00:00,1354.4738092567347 161 | 2017-01-11 00:34:39.091846+00:00,1334.3795740520247 162 | 2017-01-11 00:49:20.908154+00:00,1271.3367100689902 163 | 2017-01-11 01:00:00+00:00,1226.180956374035 164 | 2017-01-11 01:04:39.091846+00:00,1206.6310464314026 165 | 2017-01-11 01:19:20.908154+00:00,1145.6526307308252 166 | 2017-01-11 01:30:00+00:00,1102.3165691111228 167 | 2017-01-11 01:34:39.091846+00:00,1083.645488875673 168 | 2017-01-11 01:49:20.908154+00:00,1025.7748784019936 169 | 2017-01-11 02:00:00+00:00,984.9999977815351 170 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/optimize_new_options.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,q_flow 2 | 2017-01-01 00:00:00+00:00,295.0,117.641257296075 3 | 2017-01-01 12:00:00+00:00,280.069052070773,120.468887297516 4 | 2017-01-02 00:00:00+00:00,278.653939071312,121.337832533439 5 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/simulate_cost_opt.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,q_flow 2 | 2017-01-01 00:00:00+00:00,295.0,0.000926722341291999 3 | 2017-01-01 00:30:00+00:00,294.057747097648,0.00173397606860392 4 | 2017-01-01 01:00:00+00:00,293.244398782611,0.00317113334090766 5 | 2017-01-01 01:30:00+00:00,292.955644710309,689.926826534308 6 | 2017-01-01 02:00:00+00:00,292.940455732632,985.004078373796 7 | 2017-01-01 02:30:00+00:00,292.943962637882,876.241671110396 8 | 2017-01-01 03:00:00+00:00,292.947192670918,777.896312138782 9 | 2017-01-01 03:30:00+00:00,292.950281610423,691.649746057573 10 | 2017-01-01 04:00:00+00:00,292.953288324456,618.977674451789 11 | 2017-01-01 04:30:00+00:00,292.956211529961,561.123537125709 12 | 2017-01-01 05:00:00+00:00,292.958945916052,519.077235627174 13 | 2017-01-01 05:30:00+00:00,292.961470974579,493.55819558804 14 | 2017-01-01 06:00:00+00:00,292.963842742541,485.00305634506 15 | 2017-01-01 06:30:00+00:00,292.966061219937,493.558198921146 16 | 2017-01-01 07:00:00+00:00,292.96813913089,519.077241189967 17 | 2017-01-01 07:30:00+00:00,292.970105628519,561.123543374293 18 | 2017-01-01 08:00:00+00:00,292.971937329597,618.977680144297 19 | 2017-01-01 08:30:00+00:00,292.973634234124,691.649750568181 20 | 2017-01-01 09:00:00+00:00,292.9751963421,777.896315358296 21 | 2017-01-01 09:30:00+00:00,292.976734526678,876.241672120038 22 | 2017-01-01 10:00:00+00:00,292.978180896645,985.003104818186 23 | 2017-01-01 10:30:00+00:00,292.97953467868,1102.31967543622 24 | 2017-01-01 11:00:00+00:00,292.980795872785,1226.18406512558 25 | 2017-01-01 11:30:00+00:00,292.981980812951,1354.4769199941 26 | 2017-01-01 12:00:00+00:00,292.983088759206,1485.00311384668 27 | 2017-01-01 12:30:00+00:00,292.984113682998,1615.52930741416 28 | 2017-01-01 13:00:00+00:00,292.985055584326,1743.82215990543 29 | 2017-01-01 13:30:00+00:00,292.985844374492,1867.68574131808 30 | 2017-01-01 14:00:00+00:00,298.528779330939,39434.8654795914 31 | 2017-01-01 14:30:00+00:00,300.067834465273,898.958503689301 32 | 2017-01-01 15:00:00+00:00,299.662299823145,9.34070855949536e-07 33 | 2017-01-01 15:30:00+00:00,297.972129589542,1.60174680690891e-06 34 | 2017-01-01 16:00:00+00:00,296.333802952522,3.11963487049157e-06 35 | 2017-01-01 16:30:00+00:00,295.015896051608,2497.75515979969 36 | 2017-01-01 17:00:00+00:00,294.902356851463,2450.90886153205 37 | 2017-01-01 17:30:00+00:00,294.791384897706,2476.44486663087 38 | 2017-01-01 18:00:00+00:00,294.686777714091,2485.00000525665 39 | 2017-01-01 18:30:00+00:00,294.588253272103,2476.44485298842 40 | 2017-01-01 19:00:00+00:00,294.495490793104,2450.92582608607 41 | 2017-01-01 19:30:00+00:00,294.408121457927,2408.88720383935 42 | 2017-01-01 20:00:00+00:00,294.325926333941,2351.02852470388 43 | 2017-01-01 20:30:00+00:00,294.248568682744,2278.35646002818 44 | 2017-01-01 21:00:00+00:00,294.175778195547,2192.1099005422 45 | 2017-01-01 21:30:00+00:00,294.10727525262,2093.76454787966 46 | 2017-01-01 22:00:00+00:00,294.042784081453,1985.0031182662 47 | 2017-01-01 22:30:00+00:00,293.982078737319,1867.6865498804 48 | 2017-01-01 23:00:00+00:00,293.924897613338,1743.82216168975 49 | 2017-01-01 23:30:00+00:00,293.871068107238,1615.52930363179 50 | 2017-01-02 00:00:00+00:00,293.820353822819,1484.9954914115 51 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/simulate_optimal_default.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,q_flow 2 | 2017-01-01 00:00:00+00:00,295.0,485.037303723603 3 | 2017-01-01 00:30:00+00:00,292.221626384785,1021.14047586361 4 | 2017-01-01 01:00:00+00:00,292.786510156278,1226.18095618556 5 | 2017-01-01 01:30:00+00:00,292.966045936014,1102.31656892068 6 | 2017-01-01 02:00:00+00:00,292.995772353737,985.000001285502 7 | 2017-01-01 02:30:00+00:00,293.00117330831,876.238572276458 8 | 2017-01-01 03:00:00+00:00,293.001151698426,777.893220098246 9 | 2017-01-01 03:30:00+00:00,293.001721126605,691.646660993104 10 | 2017-01-01 04:00:00+00:00,293.002815071141,618.974597499409 11 | 2017-01-01 04:30:00+00:00,293.002488786866,561.120468772 12 | 2017-01-01 05:00:00+00:00,293.000881120133,519.074174993707 13 | 2017-01-01 05:30:00+00:00,293.002180663708,493.555139908592 14 | 2017-01-01 06:00:00+00:00,293.004164425127,485.00000128223 15 | 2017-01-01 06:30:00+00:00,293.003516911925,493.555139908508 16 | 2017-01-01 07:00:00+00:00,293.001534063447,519.074174993547 17 | 2017-01-01 07:30:00+00:00,293.000395868897,561.120468771783 18 | 2017-01-01 08:00:00+00:00,293.000387325457,618.974597499142 19 | 2017-01-01 08:30:00+00:00,293.001212617254,691.646660992869 20 | 2017-01-01 09:00:00+00:00,293.001831709404,777.893220098033 21 | 2017-01-01 09:30:00+00:00,293.00161634684,876.238572276244 22 | 2017-01-01 10:00:00+00:00,293.000825517658,985.000001285323 23 | 2017-01-01 10:30:00+00:00,293.000702275939,1102.31656892053 24 | 2017-01-01 11:00:00+00:00,293.00103984105,1226.18095618337 25 | 2017-01-01 11:30:00+00:00,293.001013954238,1354.47380906604 26 | 2017-01-01 12:00:00+00:00,293.00045572862,1485.00000128627 27 | 2017-01-01 12:30:00+00:00,292.999708455675,1615.52619350646 28 | 2017-01-01 13:00:00+00:00,292.999123707026,1743.81904638906 29 | 2017-01-01 13:30:00+00:00,292.999049483148,1867.68343365172 30 | 2017-01-01 14:00:00+00:00,292.999206219098,1985.00000128673 31 | 2017-01-01 14:30:00+00:00,292.99942391133,2093.76143029553 32 | 2017-01-01 15:00:00+00:00,292.999450449132,2192.1067824734 33 | 2017-01-01 15:30:00+00:00,292.999533442133,2278.35334157814 34 | 2017-01-01 16:00:00+00:00,292.998694691751,2351.02540507139 35 | 2017-01-01 16:30:00+00:00,292.996505085023,2408.87953379825 36 | 2017-01-01 17:00:00+00:00,292.995204500128,2450.92582757607 37 | 2017-01-01 17:30:00+00:00,292.994960090848,2476.44486266082 38 | 2017-01-01 18:00:00+00:00,292.995069424731,2485.000001287 39 | 2017-01-01 18:30:00+00:00,292.99525621772,2476.44486266084 40 | 2017-01-01 19:00:00+00:00,292.995694453436,2450.92582757605 41 | 2017-01-01 19:30:00+00:00,292.996485834542,2408.87953379829 42 | 2017-01-01 20:00:00+00:00,292.997284874856,2351.0254050714 43 | 2017-01-01 20:30:00+00:00,292.997711670999,2278.35334157815 44 | 2017-01-01 21:00:00+00:00,292.997478598715,2192.10678247346 45 | 2017-01-01 21:30:00+00:00,292.997229150996,2093.76143029557 46 | 2017-01-01 22:00:00+00:00,292.9982551011,1985.00000128678 47 | 2017-01-01 22:30:00+00:00,292.9990248821,1867.68343365179 48 | 2017-01-01 23:00:00+00:00,292.999322058358,1743.81904638912 49 | 2017-01-01 23:30:00+00:00,292.999504854642,1615.52619350651 50 | 2017-01-02 00:00:00+00:00,292.999798266436,1484.99999787548 51 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/simulate_optimal_userdefined.csv: -------------------------------------------------------------------------------- 1 | Time,T_db,q_flow 2 | 2017-01-01 00:00:00+00:00,295.0,485.037336358181 3 | 2017-01-01 00:30:00+00:00,292.960172466712,1021.14053037668 4 | 2017-01-01 01:00:00+00:00,292.977084535094,1226.18098819986 5 | 2017-01-01 01:30:00+00:00,292.996466919506,1102.31660009884 6 | 2017-01-01 02:00:00+00:00,292.999178485239,985.000032512066 7 | 2017-01-01 02:30:00+00:00,292.999571112878,876.238603441122 8 | 2017-01-01 03:00:00+00:00,292.999883691163,777.89325125731 9 | 2017-01-01 03:30:00+00:00,293.000010958734,691.64669218362 10 | 2017-01-01 04:00:00+00:00,293.000055602836,618.974628695108 11 | 2017-01-01 04:30:00+00:00,293.00008277565,561.120499819113 12 | 2017-01-01 05:00:00+00:00,293.000058022762,519.074205731608 13 | 2017-01-01 05:30:00+00:00,293.000076356054,493.555170429511 14 | 2017-01-01 06:00:00+00:00,293.000113173205,485.00003187162 15 | 2017-01-01 06:30:00+00:00,293.000142053188,493.555170861625 16 | 2017-01-01 07:00:00+00:00,293.000151706875,519.074206409811 17 | 2017-01-01 07:30:00+00:00,293.000130845136,561.120500282099 18 | 2017-01-01 08:00:00+00:00,293.000125462014,618.974628750241 19 | 2017-01-01 08:30:00+00:00,293.000138503551,691.646692032559 20 | 2017-01-01 09:00:00+00:00,293.00014362038,777.89325110229 21 | 2017-01-01 09:30:00+00:00,293.000137800221,876.238603342097 22 | 2017-01-01 10:00:00+00:00,293.000118030798,985.000032440606 23 | 2017-01-01 10:30:00+00:00,293.000095125377,1102.31660016575 24 | 2017-01-01 11:00:00+00:00,293.00007967502,1226.18098751073 25 | 2017-01-01 11:30:00+00:00,293.000060172236,1354.47384046563 26 | 2017-01-01 12:00:00+00:00,293.000036452397,1485.00003274804 27 | 2017-01-01 12:30:00+00:00,293.000008350875,1615.52622502107 28 | 2017-01-01 13:00:00+00:00,292.999979875482,1743.81907794821 29 | 2017-01-01 13:30:00+00:00,292.999961484416,1867.68346524824 30 | 2017-01-01 14:00:00+00:00,292.999947356413,1985.00003291438 31 | 2017-01-01 14:30:00+00:00,292.99993873788,2093.76146194892 32 | 2017-01-01 15:00:00+00:00,292.999936875222,2192.10681414787 33 | 2017-01-01 15:30:00+00:00,292.999941670928,2278.35337326956 34 | 2017-01-01 16:00:00+00:00,292.999943387355,2351.02543677614 35 | 2017-01-01 16:30:00+00:00,292.999948663313,2408.87956551306 36 | 2017-01-01 17:00:00+00:00,292.999957645063,2450.92585929788 37 | 2017-01-01 17:30:00+00:00,292.999970478866,2476.44489438678 38 | 2017-01-01 18:00:00+00:00,292.999987310981,2485.0000330144 39 | 2017-01-01 18:30:00+00:00,292.999992599811,2476.44489438688 40 | 2017-01-01 19:00:00+00:00,292.999992997651,2450.92585929807 41 | 2017-01-01 19:30:00+00:00,292.999987739873,2408.87956551334 42 | 2017-01-01 20:00:00+00:00,292.999975557583,2351.02543677646 43 | 2017-01-01 20:30:00+00:00,292.999955181891,2278.35337326988 44 | 2017-01-01 21:00:00+00:00,292.99994312268,2192.10681414815 45 | 2017-01-01 21:30:00+00:00,292.999937156666,2093.76146194913 46 | 2017-01-01 22:00:00+00:00,292.999935290163,1985.00003291452 47 | 2017-01-01 22:30:00+00:00,292.999939258183,1867.683465248 48 | 2017-01-01 23:00:00+00:00,292.99995095679,1743.81907795676 49 | 2017-01-01 23:30:00+00:00,292.999972443098,1615.52622486711 50 | 2017-01-02 00:00:00+00:00,293.000005935268,1484.99998223568 51 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/slack_variables.txt: -------------------------------------------------------------------------------- 1 | { 2 | "T_db_sGTE": { 3 | "Variable": "s1", 4 | "Weight": 1000.0 5 | }, 6 | "T_db_sLTE": { 7 | "Variable": "s0", 8 | "Weight": 500.0 9 | } 10 | } -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/statistics.csv: -------------------------------------------------------------------------------- 1 | ,message,iterations,objective 2 | 0,Solve_Succeeded,23,128103999.94378363 3 | -------------------------------------------------------------------------------- /unittests/references/test_optimization/OptimizeSimpleFromJModelica/statistics_initial_constraint.csv: -------------------------------------------------------------------------------- 1 | ,message,iterations,objective 2 | 0,Solve_Succeeded,22,128188999.9437842 3 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_display_cs.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.164494127878 4 | 2017-01-01 01:00:00+00:00,281.427700742517 5 | 2017-01-01 01:30:00+00:00,282.354520675431 6 | 2017-01-01 02:00:00+00:00,283.508189154965 7 | 2017-01-01 02:30:00+00:00,284.633559627496 8 | 2017-01-01 03:00:00+00:00,285.672596979532 9 | 2017-01-01 03:30:00+00:00,286.601603902234 10 | 2017-01-01 04:00:00+00:00,287.402822029259 11 | 2017-01-01 04:30:00+00:00,288.063279989579 12 | 2017-01-01 05:00:00+00:00,288.571232227332 13 | 2017-01-01 05:30:00+00:00,288.917905628691 14 | 2017-01-01 06:00:00+00:00,289.097426767798 15 | 2017-01-01 06:30:00+00:00,289.106701877635 16 | 2017-01-01 07:00:00+00:00,288.945742076788 17 | 2017-01-01 07:30:00+00:00,288.617077542375 18 | 2017-01-01 08:00:00+00:00,288.126420808922 19 | 2017-01-01 08:30:00+00:00,287.482206651024 20 | 2017-01-01 09:00:00+00:00,286.695435860276 21 | 2017-01-01 09:30:00+00:00,285.779528502065 22 | 2017-01-01 10:00:00+00:00,284.750185025518 23 | 2017-01-01 10:30:00+00:00,283.625065987661 24 | 2017-01-01 11:00:00+00:00,282.423347658693 25 | 2017-01-01 11:30:00+00:00,281.165587161058 26 | 2017-01-01 12:00:00+00:00,279.873352027454 27 | 2017-01-01 12:30:00+00:00,278.568766332487 28 | 2017-01-01 13:00:00+00:00,277.274132744651 29 | 2017-01-01 13:30:00+00:00,276.011589420438 30 | 2017-01-01 14:00:00+00:00,274.802741518325 31 | 2017-01-01 14:30:00+00:00,273.668278273692 32 | 2017-01-01 15:00:00+00:00,272.627627089412 33 | 2017-01-01 15:30:00+00:00,271.69857841307 34 | 2017-01-01 16:00:00+00:00,270.897008689228 35 | 2017-01-01 16:30:00+00:00,270.236639400652 36 | 2017-01-01 17:00:00+00:00,269.728784918663 37 | 2017-01-01 17:30:00+00:00,269.382135127279 38 | 2017-01-01 18:00:00+00:00,269.202613360828 39 | 2017-01-01 18:30:00+00:00,269.1932905455 40 | 2017-01-01 19:00:00+00:00,269.354331060487 41 | 2017-01-01 19:30:00+00:00,269.682980567798 42 | 2017-01-01 20:00:00+00:00,270.173612835393 43 | 2017-01-01 20:30:00+00:00,270.817832058281 44 | 2017-01-01 21:00:00+00:00,271.604617198996 45 | 2017-01-01 21:30:00+00:00,272.520506922876 46 | 2017-01-01 22:00:00+00:00,273.549829114201 47 | 2017-01-01 22:30:00+00:00,274.67497118325 48 | 2017-01-01 23:00:00+00:00,275.87668216879 49 | 2017-01-01 23:30:00+00:00,277.13440089011 50 | 2017-01-02 00:00:00+00:00,278.426607153287 51 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_display_me.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.165924562154 4 | 2017-01-01 01:00:00+00:00,281.426747289267 5 | 2017-01-01 01:30:00+00:00,282.354693108001 6 | 2017-01-01 02:00:00+00:00,283.508003189139 7 | 2017-01-01 02:30:00+00:00,284.632872944432 8 | 2017-01-01 03:00:00+00:00,285.672528386081 9 | 2017-01-01 03:30:00+00:00,286.601230300812 10 | 2017-01-01 04:00:00+00:00,287.402866231856 11 | 2017-01-01 04:30:00+00:00,288.063364238666 12 | 2017-01-01 05:00:00+00:00,288.571215946038 13 | 2017-01-01 05:30:00+00:00,288.917797366514 14 | 2017-01-01 06:00:00+00:00,289.09729532129 15 | 2017-01-01 06:30:00+00:00,289.106563102303 16 | 2017-01-01 07:00:00+00:00,288.945577725767 17 | 2017-01-01 07:30:00+00:00,288.616978962844 18 | 2017-01-01 08:00:00+00:00,288.126361248059 19 | 2017-01-01 08:30:00+00:00,287.482123929435 20 | 2017-01-01 09:00:00+00:00,286.695293647507 21 | 2017-01-01 09:30:00+00:00,285.779323455102 22 | 2017-01-01 10:00:00+00:00,284.750004817461 23 | 2017-01-01 10:30:00+00:00,283.62477710362 24 | 2017-01-01 11:00:00+00:00,282.423049914845 25 | 2017-01-01 11:30:00+00:00,281.165380337498 26 | 2017-01-01 12:00:00+00:00,279.873051633922 27 | 2017-01-01 12:30:00+00:00,278.568498588968 28 | 2017-01-01 13:00:00+00:00,277.273851764296 29 | 2017-01-01 13:30:00+00:00,276.01124715675 30 | 2017-01-01 14:00:00+00:00,274.802476537384 31 | 2017-01-01 14:30:00+00:00,273.667956628289 32 | 2017-01-01 15:00:00+00:00,272.627258693882 33 | 2017-01-01 15:30:00+00:00,271.698085157417 34 | 2017-01-01 16:00:00+00:00,270.896763825471 35 | 2017-01-01 16:30:00+00:00,270.236601909636 36 | 2017-01-01 17:00:00+00:00,269.728960297914 37 | 2017-01-01 17:30:00+00:00,269.382262043148 38 | 2017-01-01 18:00:00+00:00,269.202658243421 39 | 2017-01-01 18:30:00+00:00,269.193253427209 40 | 2017-01-01 19:00:00+00:00,269.354315984777 41 | 2017-01-01 19:30:00+00:00,269.683018238053 42 | 2017-01-01 20:00:00+00:00,270.173713019857 43 | 2017-01-01 20:30:00+00:00,270.817910222632 44 | 2017-01-01 21:00:00+00:00,271.604669778397 45 | 2017-01-01 21:30:00+00:00,272.520525610542 46 | 2017-01-01 22:00:00+00:00,273.549840981445 47 | 2017-01-01 22:30:00+00:00,274.675008876698 48 | 2017-01-01 23:00:00+00:00,275.876732634935 49 | 2017-01-01 23:30:00+00:00,277.134436937321 50 | 2017-01-02 00:00:00+00:00,278.426606385777 51 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_cs0.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.164494127878 4 | 2017-01-01 01:00:00+00:00,281.427700742517 5 | 2017-01-01 01:30:00+00:00,282.354520675431 6 | 2017-01-01 02:00:00+00:00,283.508189154965 7 | 2017-01-01 02:30:00+00:00,284.633559627496 8 | 2017-01-01 03:00:00+00:00,285.672596979532 9 | 2017-01-01 03:30:00+00:00,286.601603902234 10 | 2017-01-01 04:00:00+00:00,287.402822029259 11 | 2017-01-01 04:30:00+00:00,288.063279989579 12 | 2017-01-01 05:00:00+00:00,288.571232227332 13 | 2017-01-01 05:30:00+00:00,288.917905628691 14 | 2017-01-01 06:00:00+00:00,289.097426767798 15 | 2017-01-01 06:30:00+00:00,289.106701877635 16 | 2017-01-01 07:00:00+00:00,288.945742076788 17 | 2017-01-01 07:30:00+00:00,288.617077542375 18 | 2017-01-01 08:00:00+00:00,288.126420808922 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_cs1.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 08:00:00+00:00,288.126420808922 3 | 2017-01-01 08:30:00+00:00,287.482206651024 4 | 2017-01-01 09:00:00+00:00,286.695435860276 5 | 2017-01-01 09:30:00+00:00,285.779528502065 6 | 2017-01-01 10:00:00+00:00,284.750185025518 7 | 2017-01-01 10:30:00+00:00,283.625065987661 8 | 2017-01-01 11:00:00+00:00,282.423347658693 9 | 2017-01-01 11:30:00+00:00,281.165587161058 10 | 2017-01-01 12:00:00+00:00,279.873352027454 11 | 2017-01-01 12:30:00+00:00,278.568766332487 12 | 2017-01-01 13:00:00+00:00,277.274132744651 13 | 2017-01-01 13:30:00+00:00,276.011589420438 14 | 2017-01-01 14:00:00+00:00,274.802741518325 15 | 2017-01-01 14:30:00+00:00,273.668278273692 16 | 2017-01-01 15:00:00+00:00,272.627627089412 17 | 2017-01-01 15:30:00+00:00,271.69857841307 18 | 2017-01-01 16:00:00+00:00,270.897008689228 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_cs2.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 16:00:00+00:00,270.897008689228 3 | 2017-01-01 16:30:00+00:00,270.236639400652 4 | 2017-01-01 17:00:00+00:00,269.728784918663 5 | 2017-01-01 17:30:00+00:00,269.382135127279 6 | 2017-01-01 18:00:00+00:00,269.202613360828 7 | 2017-01-01 18:30:00+00:00,269.1932905455 8 | 2017-01-01 19:00:00+00:00,269.354331060487 9 | 2017-01-01 19:30:00+00:00,269.682980567798 10 | 2017-01-01 20:00:00+00:00,270.173612835393 11 | 2017-01-01 20:30:00+00:00,270.817832058281 12 | 2017-01-01 21:00:00+00:00,271.604617198996 13 | 2017-01-01 21:30:00+00:00,272.520506922876 14 | 2017-01-01 22:00:00+00:00,273.549829114201 15 | 2017-01-01 22:30:00+00:00,274.67497118325 16 | 2017-01-01 23:00:00+00:00,275.87668216879 17 | 2017-01-01 23:30:00+00:00,277.13440089011 18 | 2017-01-02 00:00:00+00:00,278.426607153287 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_me0.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,282.165924562154 4 | 2017-01-01 01:00:00+00:00,281.426747289265 5 | 2017-01-01 01:30:00+00:00,282.354693108001 6 | 2017-01-01 02:00:00+00:00,283.508003189138 7 | 2017-01-01 02:30:00+00:00,284.632872944428 8 | 2017-01-01 03:00:00+00:00,285.672528386081 9 | 2017-01-01 03:30:00+00:00,286.601230300815 10 | 2017-01-01 04:00:00+00:00,287.402866231858 11 | 2017-01-01 04:30:00+00:00,288.063364238666 12 | 2017-01-01 05:00:00+00:00,288.571215946038 13 | 2017-01-01 05:30:00+00:00,288.917797366514 14 | 2017-01-01 06:00:00+00:00,289.09729532129 15 | 2017-01-01 06:30:00+00:00,289.106563102307 16 | 2017-01-01 07:00:00+00:00,288.94557772577 17 | 2017-01-01 07:30:00+00:00,288.616978962848 18 | 2017-01-01 08:00:00+00:00,288.126384557105 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_me1.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 08:00:00+00:00,288.126384557105 3 | 2017-01-01 08:30:00+00:00,287.482195139332 4 | 2017-01-01 09:00:00+00:00,286.696120246693 5 | 2017-01-01 09:30:00+00:00,285.779889582399 6 | 2017-01-01 10:00:00+00:00,284.750438212845 7 | 2017-01-01 10:30:00+00:00,283.625108544792 8 | 2017-01-01 11:00:00+00:00,282.423380757062 9 | 2017-01-01 11:30:00+00:00,281.165684198401 10 | 2017-01-01 12:00:00+00:00,279.873456719097 11 | 2017-01-01 12:30:00+00:00,278.568837924259 12 | 2017-01-01 13:00:00+00:00,277.274144998718 13 | 2017-01-01 13:30:00+00:00,276.011520780276 14 | 2017-01-01 14:00:00+00:00,274.802429736363 15 | 2017-01-01 14:30:00+00:00,273.668025401266 16 | 2017-01-01 15:00:00+00:00,272.62743182116 17 | 2017-01-01 15:30:00+00:00,271.698350229423 18 | 2017-01-01 16:00:00+00:00,270.896874641598 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/collect_measurements_step_me2.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 16:00:00+00:00,270.896874641598 3 | 2017-01-01 16:30:00+00:00,270.236819359638 4 | 2017-01-01 17:00:00+00:00,269.728964611608 5 | 2017-01-01 17:30:00+00:00,269.382153911305 6 | 2017-01-01 18:00:00+00:00,269.202546772742 7 | 2017-01-01 18:30:00+00:00,269.193065801798 8 | 2017-01-01 19:00:00+00:00,269.353976271455 9 | 2017-01-01 19:30:00+00:00,269.682807361376 10 | 2017-01-01 20:00:00+00:00,270.173640144458 11 | 2017-01-01 20:30:00+00:00,270.817873836054 12 | 2017-01-01 21:00:00+00:00,271.604613354767 13 | 2017-01-01 21:30:00+00:00,272.520520009554 14 | 2017-01-01 22:00:00+00:00,273.549883184282 15 | 2017-01-01 22:30:00+00:00,274.675317282372 16 | 2017-01-01 23:00:00+00:00,275.877033385443 17 | 2017-01-01 23:30:00+00:00,277.134634201311 18 | 2017-01-02 00:00:00+00:00,278.426649145524 19 | -------------------------------------------------------------------------------- /unittests/references/test_systems/EmulationFromFMU/mpcpy_simulation_parameters_system.csv: -------------------------------------------------------------------------------- 1 | parameter,value 2 | lat,0.732689219987 3 | -------------------------------------------------------------------------------- /unittests/references/test_utility/TestSimulateFMU/simulate_fmu_cs.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,281.329721645725 4 | 2017-01-01 01:00:00+00:00,280.455599651538 5 | 2017-01-01 01:30:00+00:00,281.359216232293 6 | 2017-01-01 02:00:00+00:00,282.508399651064 7 | 2017-01-01 02:30:00+00:00,283.717362161656 8 | 2017-01-01 03:00:00+00:00,284.770019682875 9 | 2017-01-01 03:30:00+00:00,285.700971503749 10 | 2017-01-01 04:00:00+00:00,286.502891444514 11 | 2017-01-01 04:30:00+00:00,287.163379316637 12 | 2017-01-01 05:00:00+00:00,287.671247873708 13 | 2017-01-01 05:30:00+00:00,288.017872449474 14 | 2017-01-01 06:00:00+00:00,288.197390796406 15 | 2017-01-01 06:30:00+00:00,288.206715683227 16 | 2017-01-01 07:00:00+00:00,288.045668244727 17 | 2017-01-01 07:30:00+00:00,287.717020404147 18 | 2017-01-01 08:00:00+00:00,287.226394358966 19 | 2017-01-01 08:30:00+00:00,286.582167437792 20 | 2017-01-01 09:00:00+00:00,285.79539123228 21 | 2017-01-01 09:30:00+00:00,284.879500667838 22 | 2017-01-01 10:00:00+00:00,283.850171471084 23 | 2017-01-01 10:30:00+00:00,282.725034420526 24 | 2017-01-01 11:00:00+00:00,281.523313539994 25 | 2017-01-01 11:30:00+00:00,280.265610816391 26 | 2017-01-01 12:00:00+00:00,278.973412344752 27 | 2017-01-01 12:30:00+00:00,277.668811351961 28 | 2017-01-01 13:00:00+00:00,276.374160901189 29 | 2017-01-01 13:30:00+00:00,275.111586501672 30 | 2017-01-01 14:00:00+00:00,273.902694111162 31 | 2017-01-01 14:30:00+00:00,272.768179034647 32 | 2017-01-01 15:00:00+00:00,271.727459461394 33 | 2017-01-01 15:30:00+00:00,270.798343415787 34 | 2017-01-01 16:00:00+00:00,269.996727559276 35 | 2017-01-01 16:30:00+00:00,269.336539693214 36 | 2017-01-01 17:00:00+00:00,268.828739198334 37 | 2017-01-01 17:30:00+00:00,268.48207499913 38 | 2017-01-01 18:00:00+00:00,268.302570610499 39 | 2017-01-01 18:30:00+00:00,268.293288905846 40 | 2017-01-01 19:00:00+00:00,268.454260130968 41 | 2017-01-01 19:30:00+00:00,268.782867644322 42 | 2017-01-01 20:00:00+00:00,269.27349767628 43 | 2017-01-01 20:30:00+00:00,269.917858614939 44 | 2017-01-01 21:00:00+00:00,270.704563680536 45 | 2017-01-01 21:30:00+00:00,271.62051003577 46 | 2017-01-01 22:00:00+00:00,272.649803754252 47 | 2017-01-01 22:30:00+00:00,273.774947385796 48 | 2017-01-01 23:00:00+00:00,274.976619717161 49 | 2017-01-01 23:30:00+00:00,276.234411234208 50 | 2017-01-02 00:00:00+00:00,277.526597179623 51 | -------------------------------------------------------------------------------- /unittests/references/test_utility/TestSimulateFMU/simulate_fmu_me.csv: -------------------------------------------------------------------------------- 1 | Time,T_db 2 | 2017-01-01 00:00:00+00:00,293.15 3 | 2017-01-01 00:30:00+00:00,281.331245785294 4 | 2017-01-01 01:00:00+00:00,280.453876051739 5 | 2017-01-01 01:30:00+00:00,281.359184540952 6 | 2017-01-01 02:00:00+00:00,282.508865852055 7 | 2017-01-01 02:00:00+00:00,282.508865852055 8 | 2017-01-01 02:30:00+00:00,283.717553090614 9 | 2017-01-01 03:00:00+00:00,284.770142124766 10 | 2017-01-01 03:30:00+00:00,285.700722499535 11 | 2017-01-01 04:00:00+00:00,286.502326545523 12 | 2017-01-01 04:30:00+00:00,287.162715208148 13 | 2017-01-01 05:00:00+00:00,287.670779999879 14 | 2017-01-01 05:30:00+00:00,288.017908442886 15 | 2017-01-01 06:00:00+00:00,288.197675520296 16 | 2017-01-01 06:30:00+00:00,288.206995761546 17 | 2017-01-01 07:00:00+00:00,288.045939990178 18 | 2017-01-01 07:30:00+00:00,287.717305435612 19 | 2017-01-01 08:00:00+00:00,287.226692135979 20 | 2017-01-01 08:30:00+00:00,286.582423793304 21 | 2017-01-01 09:00:00+00:00,285.795521347348 22 | 2017-01-01 09:30:00+00:00,284.879510055174 23 | 2017-01-01 10:00:00+00:00,283.850107294339 24 | 2017-01-01 10:30:00+00:00,282.724955930529 25 | 2017-01-01 11:00:00+00:00,281.52325340842 26 | 2017-01-01 11:30:00+00:00,280.265530192827 27 | 2017-01-01 12:00:00+00:00,278.973253740384 28 | 2017-01-01 12:30:00+00:00,277.668380021882 29 | 2017-01-01 13:00:00+00:00,276.373828035167 30 | 2017-01-01 13:30:00+00:00,275.111437574003 31 | 2017-01-01 14:00:00+00:00,273.902860998009 32 | 2017-01-01 14:30:00+00:00,272.76851367238 33 | 2017-01-01 15:00:00+00:00,271.727996864441 34 | 2017-01-01 15:30:00+00:00,270.798839654511 35 | 2017-01-01 16:00:00+00:00,269.997270488801 36 | 2017-01-01 16:30:00+00:00,269.336809576993 37 | 2017-01-01 17:00:00+00:00,268.82896061518 38 | 2017-01-01 17:30:00+00:00,268.482274295964 39 | 2017-01-01 18:00:00+00:00,268.302804095953 40 | 2017-01-01 18:30:00+00:00,268.293458293321 41 | 2017-01-01 19:00:00+00:00,268.454547861693 42 | 2017-01-01 19:30:00+00:00,268.783149949814 43 | 2017-01-01 20:00:00+00:00,269.273809831077 44 | 2017-01-01 20:30:00+00:00,269.917988871174 45 | 2017-01-01 21:00:00+00:00,270.70480764774 46 | 2017-01-01 21:30:00+00:00,271.620665421481 47 | 2017-01-01 22:00:00+00:00,272.650021504586 48 | 2017-01-01 22:30:00+00:00,273.775123905663 49 | 2017-01-01 23:00:00+00:00,274.976851664066 50 | 2017-01-01 23:30:00+00:00,276.234476040073 51 | 2017-01-02 00:00:00+00:00,277.526593377266 52 | -------------------------------------------------------------------------------- /unittests/resources/building/LBNL71T_Emulation_Dymola_v1.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/building/LBNL71T_Emulation_Dymola_v1.fmu -------------------------------------------------------------------------------- /unittests/resources/building/LBNL71T_Emulation_Dymola_v2.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/building/LBNL71T_Emulation_Dymola_v2.fmu -------------------------------------------------------------------------------- /unittests/resources/building/LBNL71T_Emulation_JModelica_v1.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/building/LBNL71T_Emulation_JModelica_v1.fmu -------------------------------------------------------------------------------- /unittests/resources/building/LBNL71T_Emulation_JModelica_v2.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/building/LBNL71T_Emulation_JModelica_v2.fmu -------------------------------------------------------------------------------- /unittests/resources/building/RealMeasurements_val.csv: -------------------------------------------------------------------------------- 1 | Time,Ptot_mea,easPhvac_mea,easTdb_mea,halPhvac_mea,halTdb_mea,wesPhvac_mea,wesTdb_mea 2 | 01/04/15 12:00 AM,0,0,293.15,0,293.15,0,293.15 3 | 01/04/15 12:30 AM,0,0,291.018567177,0,293.207838992,0,291.018592829 4 | 01/04/15 01:00 AM,0,0,290.504008052,0,293.018167707,0,290.504290167 5 | 01/04/15 01:30 AM,0,0,290.132678204,0,292.737515212,0,290.133355192 6 | 01/04/15 02:00 AM,0,0,289.819040442,0,292.436190035,0,289.820030436 7 | 01/04/15 02:30 AM,0,0,289.53330826,0,292.133827445,0,289.534344379 8 | 01/04/15 03:00 AM,0,0,289.283797301,0,291.838821142,0,289.284766523 9 | 01/04/15 03:30 AM,0,0,289.039048201,0,291.550648619,0,289.040183235 10 | 01/04/15 04:00 AM,0,0,288.788308147,0,291.268948228,0,288.789610627 11 | 01/04/15 04:30 AM,0,0,288.538314345,0,290.992364887,0,288.539569777 12 | 01/04/15 05:00 AM,0,0,288.306653408,0,290.720957857,0,288.307836815 13 | 01/04/15 05:30 AM,0,0,288.083608267,0,290.455610307,0,288.084728564 14 | 01/04/15 06:00 AM,0,0,287.864987695,0,290.196912146,0,287.866037443 15 | 01/04/15 06:30 AM,0,0,287.663308331,0,289.946088458,0,287.664275875 16 | 01/04/15 07:00 AM,0,0,287.504470268,0,289.706957041,0,287.497675088 17 | 01/04/15 07:30 AM,0,0,287.834166227,0,289.531451082,0,287.634575236 18 | 01/04/15 08:00 AM,0,0,288.526169078,0,289.484472724,0,287.995612279 19 | 01/04/15 08:30 AM,0,0,288.814707637,0,289.505360638,0,288.211361111 20 | 01/04/15 09:00 AM,0,0,289.001083021,0,289.550226595,0,288.36634983 21 | 01/04/15 09:30 AM,0,0,289.194947326,0,289.624577774,0,288.540402513 22 | 01/04/15 10:00 AM,0,0,289.405290392,0,289.72630179,0,288.728575068 23 | 01/04/15 10:30 AM,0,0,289.617403044,0,289.851444106,0,288.933167878 24 | 01/04/15 11:00 AM,0,0,289.815614023,0,289.996493231,0,289.144337285 25 | 01/04/15 11:30 AM,0,0,289.943631529,0,290.155402079,0,289.31606023 26 | 01/04/15 12:00 PM,0,0,289.99781195,0,290.31512769,0,289.444445049 27 | 01/04/15 12:30 PM,0,0,290.141470858,0,290.469346529,0,289.682129908 28 | 01/04/15 01:00 PM,0,0,290.383729931,0,290.62192274,0,290.016603536 29 | 01/04/15 01:30 PM,0,0,290.540190885,0,290.776656925,0,290.263488886 30 | 01/04/15 02:00 PM,0,0,290.587119007,0,290.927430506,0,290.408021725 31 | 01/04/15 02:30 PM,0,0,290.5539207,0,291.062766381,0,290.477267926 32 | 01/04/15 03:00 PM,0,0,290.422534955,0,291.170861377,0,290.459135614 33 | 01/04/15 03:30 PM,0,0,290.232382536,0,291.240477023,0,290.377338515 34 | 01/04/15 04:00 PM,0,0,290.035722646,0,291.265037364,0,290.254556618 35 | 01/04/15 04:30 PM,0,0,289.435671652,0,291.211677892,0,289.755255438 36 | 01/04/15 05:00 PM,0,0,288.630289259,0,291.057836757,0,288.947051207 37 | 01/04/15 05:30 PM,0,0,288.096620965,0,290.799214812,0,288.25137723 38 | 01/04/15 06:00 PM,0,0,287.729045176,0,290.48415529,0,287.813196192 39 | 01/04/15 06:30 PM,0,0,287.402418071,0,290.15271556,0,287.453763486 40 | 01/04/15 07:00 PM,0,0,287.095793828,0,289.825949854,0,287.132626901 41 | 01/04/15 07:30 PM,0,0,286.802032434,0,289.506258664,0,286.831265477 42 | 01/04/15 08:00 PM,0,0,286.531293839,0,289.193311988,0,286.556044573 43 | 01/04/15 08:30 PM,0,0,286.297412988,0,288.888913265,0,286.318724141 44 | 01/04/15 09:00 PM,0,0,286.085546851,0,288.596478351,0,286.103119749 45 | 01/04/15 09:30 PM,0,0,285.874714139,0,288.317014657,0,285.898688751 46 | 01/04/15 10:00 PM,0,0,285.634921838,0,288.04794811,0,285.65193271 47 | 01/04/15 10:30 PM,0,0,285.3851758,0,287.785137629,0,285.407376657 48 | 01/04/15 11:00 PM,0,0,285.117470809,0,287.524716914,0,285.138474249 49 | 01/04/15 11:30 PM,0,0,284.840340538,0,287.264202616,0,284.862187235 50 | 01/05/15 12:00 AM,0,0,284.561923823,0,287.002178965,0,284.588353345 51 | -------------------------------------------------------------------------------- /unittests/resources/building/RealMeasurements_val_missing.csv: -------------------------------------------------------------------------------- 1 | Time,Ptot_mea,easPhvac_mea,easTdb_mea,halPhvac_mea,halTdb_mea,wesPhvac_mea,wesTdb_mea 2 | 01/04/15 12:00 AM,0,0,293.15,0,293.15,0,293.15 3 | 01/04/15 12:30 AM,0,0,291.018567177,0,293.207838992,0,291.018592829 4 | 01/04/15 01:00 AM,0,0,290.504008052,0,293.018167707,0,290.504290167 5 | 01/04/15 01:30 AM,0,0,290.132678204,0,292.737515212,0,290.133355192 6 | 01/04/15 02:00 AM,0,0,289.819040442,0,292.436190035,0,289.820030436 7 | 01/04/15 02:30 AM,0,0,289.53330826,0,292.133827445,0,289.534344379 8 | 01/04/15 03:00 AM,0,0,289.283797301,0,291.838821142,0,289.284766523 9 | 01/04/15 03:30 AM,0,0,289.039048201,0,291.550648619,0,289.040183235 10 | 01/04/15 04:00 AM,0,0,288.788308147,0,291.268948228,0,288.789610627 11 | 01/04/15 04:30 AM,0,0,288.538314345,0,290.992364887,0,288.539569777 12 | 01/04/15 05:00 AM,0,0,288.306653408,0,290.720957857,0,288.307836815 13 | 01/04/15 05:30 AM,0,0,288.083608267,0,290.455610307,0,288.084728564 14 | 01/04/15 06:30 AM,0,0,287.663308331,0,289.946088458,0,287.664275875 15 | 01/04/15 07:00 AM,0,0,287.504470268,0,289.706957041,0,287.497675088 16 | 01/04/15 07:30 AM,0,0,287.834166227,0,289.531451082,0,287.634575236 17 | 01/04/15 08:00 AM,0,0,288.526169078,0,289.484472724,0,287.995612279 18 | 01/04/15 08:30 AM,0,0,288.814707637,0,289.505360638,0,288.211361111 19 | 01/04/15 09:00 AM,0,0,289.001083021,0,289.550226595,0,288.36634983 20 | 01/04/15 09:30 AM,0,0,289.194947326,0,289.624577774,0,288.540402513 21 | 01/04/15 10:00 AM,0,0,289.405290392,0,289.72630179,0,288.728575068 22 | 01/04/15 10:30 AM,0,0,289.617403044,0,289.851444106,0,288.933167878 23 | 01/04/15 12:00 PM,0,0,289.99781195,0,290.31512769,0,289.444445049 24 | 01/04/15 12:30 PM,0,0,290.141470858,0,290.469346529,0,289.682129908 25 | 01/04/15 01:00 PM,0,0,290.383729931,0,290.62192274,0,290.016603536 26 | 01/04/15 01:30 PM,0,0,290.540190885,0,290.776656925,0,290.263488886 27 | 01/04/15 02:00 PM,0,0,290.587119007,0,290.927430506,0,290.408021725 28 | 01/04/15 02:30 PM,0,0,290.5539207,0,291.062766381,0,290.477267926 29 | 01/04/15 03:00 PM,0,0,290.422534955,0,291.170861377,0,290.459135614 30 | 01/04/15 03:30 PM,0,0,290.232382536,0,291.240477023,0,290.377338515 31 | 01/04/15 04:00 PM,0,0,290.035722646,0,291.265037364,0,290.254556618 32 | 01/04/15 04:30 PM,0,0,289.435671652,0,291.211677892,0,289.755255438 33 | 01/04/15 05:00 PM,0,0,288.630289259,0,291.057836757,0,288.947051207 34 | 01/04/15 05:30 PM,0,0,288.096620965,0,290.799214812,0,288.25137723 35 | 01/04/15 06:00 PM,0,0,287.729045176,0,290.48415529,0,287.813196192 36 | 01/04/15 06:30 PM,0,0,287.402418071,0,290.15271556,0,287.453763486 37 | 01/04/15 07:00 PM,0,0,287.095793828,0,289.825949854,0,287.132626901 38 | 01/04/15 08:00 PM,0,0,286.531293839,0,289.193311988,0,286.556044573 39 | 01/04/15 08:30 PM,0,0,286.297412988,0,288.888913265,0,286.318724141 40 | 01/04/15 10:30 PM,0,0,285.3851758,0,287.785137629,0,285.407376657 41 | 01/04/15 11:00 PM,0,0,285.117470809,0,287.524716914,0,285.138474249 42 | 01/04/15 11:30 PM,0,0,284.840340538,0,287.264202616,0,284.862187235 43 | 01/05/15 12:00 AM,0,0,284.561923823,0,287.002178965,0,284.588353345 44 | -------------------------------------------------------------------------------- /unittests/resources/model/EstimatedStates.csv: -------------------------------------------------------------------------------- 1 | Name,Value,Unit,Parameter 2 | heatCapacitor2.T,18,degC,T2o 3 | x,1.5,1, 4 | -------------------------------------------------------------------------------- /unittests/resources/model/LBNL71T_Parameters.csv: -------------------------------------------------------------------------------- 1 | Name,Free,Value,Minimum,Maximum,Covariance,Unit 2 | wes.c_zon,True,2500,2000,3000,0.02,J/(m2.K) 3 | wes.c_int,True,100000,50000,300000,0.02,J/(m2.K) 4 | wes.r_int,True,0.1,0.05,0.4,0.02,(m2.K)/W 5 | hal.c_zon,True,2500,2000,3000,0.02,J/(m2.K) 6 | hal.c_int,True,100000,50000,150000,0.02,J/(m2.K) 7 | hal.r_int,True,0.1,0.05,0.4,0.02,(m2.K)/W 8 | eas.c_zon,True,2500,2000,3000,0.02,J/(m2.K) 9 | eas.c_int,True,100000,50000,300000,0.02,J/(m2.K) 10 | eas.r_int,True,0.1,0.05,0.4,0.02,(m2.K)/W 11 | extwes.c_bou,True,10000,5000,40000,0.02,J/(m2.K) 12 | extwes.r_out,True,0.1,0.05,0.3,0.02,(m2.K)/W 13 | extwes.r_zon,True,2,1,3,0.02,(m2.K)/W 14 | extwes.abs,True,0.3,0,1,0.02,1 15 | exteas.c_bou,True,10000,5000,40000,0.02,J/(m2.K) 16 | exteas.r_out,True,0.1,0.05,0.3,0.02,(m2.K)/W 17 | exteas.r_zon,True,2,1,3,0.02,(m2.K)/W 18 | exteas.abs,True,0.3,0,1,0.02,1 19 | adjwes.c_bou,True,15000,5000,25000,0.02,J/(m2.K) 20 | adjwes.r_adj,True,0.3,0.05,0.9,0.02,(m2.K)/W 21 | adjwes.r_zon,True,0.3,0.05,0.9,0.02,(m2.K)/W 22 | adjeas.c_bou,True,15000,5000,25000,0.02,J/(m2.K) 23 | adjeas.r_adj,True,0.3,0.05,0.9,0.02,(m2.K)/W 24 | adjeas.r_zon,True,0.3,0.05,0.9,0.02,(m2.K)/W 25 | winwes.r_win,True,0.3,0.1,0.8,0.02,(m2.K)/W 26 | wineas.r_win,True,0.3,0.1,0.8,0.02,(m2.K)/W 27 | winwes.g,True,0.75,0,1,0.02,1 28 | wineas.g,True,0.75,0,1,0.02,1 29 | -------------------------------------------------------------------------------- /unittests/resources/model/SimpleEstimatedStates_jmodelica.csv: -------------------------------------------------------------------------------- 1 | Name,Value,Unit,Parameter 2 | heatCapacitor2.T,18,degC,T2o 3 | T_db,18,degC,To 4 | -------------------------------------------------------------------------------- /unittests/resources/model/SimpleEstimatedStates_ukf.csv: -------------------------------------------------------------------------------- 1 | Name,Value,Unit,Parameter 2 | heatCapacitor2.T,18,degC,T2o 3 | -------------------------------------------------------------------------------- /unittests/resources/model/SimpleRC_Input.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow_csv,extra_input 2 | 01/01/17,100,0 3 | 01/01/17 08:00:00,100,0 4 | 01/01/17 16:00:00,100,0 5 | 01/02/17,100,0 6 | 01/03/17,100,0 7 | 01/04/17,100,0 8 | 01/05/17,100,0 9 | 01/06/17,100,0 10 | 01/07/17,100,0 11 | 01/08/17,100,0 12 | 01/09/17,100,0 13 | 01/10/17,100,0 14 | 01/11/17,100,0 15 | 01/12/17,100,0 16 | -------------------------------------------------------------------------------- /unittests/resources/model/SimpleRC_Parameters.csv: -------------------------------------------------------------------------------- 1 | Name,Free,Value,Minimum,Maximum,Covariance,Unit 2 | heatCapacitor.C,True,7.00E+04,6.00E+04,1.60E+05,1.00E+03,J/K 3 | thermalResistor.R,True,0.007,0.006,0.016,0.0001,K/W 4 | -------------------------------------------------------------------------------- /unittests/resources/model/Simple_RC_cs_2.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/model/Simple_RC_cs_2.fmu -------------------------------------------------------------------------------- /unittests/resources/model/Simple_RC_me_2.fmu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbl-srg/MPCPy/545df99efc49608b7e3c16f852a4528b4d61f34a/unittests/resources/model/Simple_RC_me_2.fmu -------------------------------------------------------------------------------- /unittests/resources/optimization/SimpleRC_Constraints.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow_min,T_db_min,T_db_max 2 | 01/01/17,0,293,298 3 | 01/01/17 08:00:00,0,293,298 4 | 01/01/17 16:00:00,0,293,298 5 | 01/02/17,0,293,298 6 | 01/03/17,0,293,298 7 | 01/04/17,0,293,298 8 | 01/05/17,0,293,298 9 | 01/06/17,0,293,298 10 | 01/07/17,0,293,298 11 | 01/08/17,0,293,298 12 | 01/09/17,0,293,298 13 | 01/10/17,0,293,298 14 | 01/11/17,0,290,300 15 | 01/12/17,0,290,300 16 | -------------------------------------------------------------------------------- /unittests/resources/optimization/SimpleRC_Constraints_Slack.csv: -------------------------------------------------------------------------------- 1 | Time,q_flow_min,T_db_min,T_db_max 2 | 01/01/17,0,293,298 3 | 01/01/17 08:00:00,0,293,298 4 | 01/01/17 16:00:00,0,293,298 5 | 01/02/17,0,293,298 6 | 01/03/17,0,293,298 7 | 01/04/17,0,293,298 8 | 01/05/17,0,293,298 9 | 01/06/17,0,293,298 10 | 01/07/17,0,293,298 11 | 01/08/17,0,293,298 12 | 01/09/17,0,293,298 13 | 01/10/17,0,293,298 14 | 01/11/17,0,290,300 15 | 01/12/17,0,290,300 16 | -------------------------------------------------------------------------------- /unittests/resources/optimization/SimpleRC_Prices.csv: -------------------------------------------------------------------------------- 1 | Time,energy[cents/kWh],energy,demand,peak_power,demand_coincident,peak_power_coincident 2 | 01/01/17 00:00:00,360000000,1,100000,,, 3 | 01/01/17 14:00:00,360000000,1,100000,,, 4 | 01/01/17 15:00:00,180000000000,500,100000,,, 5 | 01/01/17 18:00:00,180000000000,500,100000,,, 6 | 01/01/17 19:00:00,360000000,1,100000,,, 7 | 01/02/17 00:00:00,,2.41E-08,0.0054,1000,0.01774,3050 8 | 01/02/17 01:00:00,,2.41E-08,0.0054,1000,0.01774,3050 9 | 01/02/17 11:00:00,,2.41E-08,0.0054,1000,0.01774,3050 10 | 01/02/17 11:59:00,,2.41E-08,0.0054,1000,0.01774,3050 11 | 01/02/17 12:00:00,,3.23E-08,0.01965,2000,0.01774,3050 12 | 01/02/17 14:59:00,,3.23E-08,0.01965,2000,0.01774,3050 13 | 01/02/17 15:00:00,,4.46E-08,0.01965,2000,0.01774,3050 14 | 01/02/17 15:59:00,,4.46E-08,0.01965,2000,0.01774,3050 15 | 01/02/17 16:00:00,,4.46E-08,0.04,5000,0.01774,3050 16 | 01/02/17 18:00:00,,4.46E-08,0.04,5000,0.01774,3050 17 | 01/02/17 18:59:00,,4.46E-08,0.04,5000,0.01774,3050 18 | 01/02/17 19:00:00,,4.46E-08,0.01965,2000,0.01774,3050 19 | 01/02/17 20:00:00,,4.46E-08,0.01965,2000,0.01774,3050 20 | 01/02/17 20:59:00,,4.46E-08,0.01965,2000,0.01774,3050 21 | 01/02/17 21:00:00,,4.46E-08,0.0054,1000,0.01774,3050 22 | -------------------------------------------------------------------------------- /unittests/resources/weather/BerkeleyCSV.csv: -------------------------------------------------------------------------------- 1 | TimePDT,TemperatureF,Dew PointF,Humidity,Sea Level PressureIn,VisibilityMPH,Wind Direction,Wind SpeedMPH,Gust SpeedMPH,PrecipitationIn,Events,Conditions,WindDirDegrees,DateUTC 2 | 10/19/2016 12:53 AM,60.1,50,69,30.17,10,NNW,4.6,-,N/A,,Clear,340,2016-10-19 07:53:00 3 | 10/19/2016 1:53 AM,60.1,50,69,30.18,10,NNW,11.5,-,N/A,,Clear,340,2016-10-19 08:53:00 4 | 10/19/2016 2:53 AM,59,48,67,30.18,10,NNE,4.6,-,N/A,,Clear,30,2016-10-19 09:53:00 5 | 10/19/2016 3:53 AM,57.9,48,70,30.17,10,Calm,Calm,-,N/A,,Clear,0,2016-10-19 10:53:00 6 | 10/19/2016 4:53 AM,55,46,72,30.18,10,North,4.6,-,N/A,,Clear,360,2016-10-19 11:53:00 7 | 10/19/2016 5:53 AM,54,46.9,77,30.18,10,Calm,Calm,-,N/A,,Clear,0,2016-10-19 12:53:00 8 | 10/19/2016 6:53 AM,50,46,86,30.19,10,Calm,Calm,-,N/A,,Partly Cloudy,0,2016-10-19 13:53:00 9 | 10/19/2016 7:53 AM,53.1,48.9,86,30.2,10,Calm,Calm,-,N/A,,Partly Cloudy,0,2016-10-19 14:53:00 10 | 10/19/2016 8:53 AM,60.1,52,75,30.21,10,NNE,3.5,-,N/A,,Partly Cloudy,30,2016-10-19 15:53:00 11 | 10/19/2016 9:53 AM,62.1,48.9,62,30.21,10,West,3.5,-,N/A,,Scattered Clouds,280,2016-10-19 16:53:00 12 | 10/19/2016 10:53 AM,64.9,46,50,30.21,10,West,5.8,-,N/A,,Scattered Clouds,260,2016-10-19 17:53:00 13 | 10/19/2016 11:53 AM,68,48.9,50,30.2,10,WNW,10.4,-,N/A,,Scattered Clouds,290,2016-10-19 18:53:00 14 | 10/19/2016 12:53 PM,69.1,50,51,30.18,10,West,11.5,-,N/A,,Partly Cloudy,280,2016-10-19 19:53:00 15 | 10/19/2016 1:53 PM,72,48,43,30.16,10,WNW,12.7,-,N/A,,Partly Cloudy,300,2016-10-19 20:53:00 16 | 10/19/2016 2:53 PM,73,44.1,35,30.15,10,NW,12.7,-,N/A,,Partly Cloudy,310,2016-10-19 21:53:00 17 | 10/19/2016 3:53 PM,73.9,45,35,30.13,10,West,11.5,-,N/A,,Scattered Clouds,280,2016-10-19 22:53:00 18 | 10/19/2016 4:53 PM,70,54,57,30.12,10,West,10.4,-,N/A,,Mostly Cloudy,270,2016-10-19 23:53:00 19 | 10/19/2016 5:53 PM,68,52,56,30.12,10,WNW,8.1,-,N/A,,Mostly Cloudy,300,2016-10-20 00:53:00 20 | 10/19/2016 6:53 PM,64.9,53.1,65,30.12,10,WNW,3.5,-,N/A,,Mostly Cloudy,300,2016-10-20 01:53:00 21 | 10/19/2016 7:53 PM,64,55,73,30.13,10,WNW,4.6,-,N/A,,Scattered Clouds,290,2016-10-20 02:53:00 22 | 10/19/2016 8:53 PM,61,54,78,30.13,10,Calm,Calm,-,N/A,,Scattered Clouds,0,2016-10-20 03:53:00 23 | 10/19/2016 9:53 PM,57.9,55,90,30.13,10,Calm,Calm,-,N/A,,Partly Cloudy,0,2016-10-20 04:53:00 24 | 10/19/2016 10:53 PM,57,53.1,87,30.14,10,NE,3.5,-,N/A,,Partly Cloudy,50,2016-10-20 05:53:00 25 | 10/19/2016 11:53 PM,57,51.1,81,30.14,10,Calm,Calm,-,N/A,,Partly Cloudy,0,2016-10-20 06:53:00 26 | -------------------------------------------------------------------------------- /unittests/resources/weather/Tamb.csv: -------------------------------------------------------------------------------- 1 | Time,T 2 | 01/01/2015 00:00:00,20 3 | 01/01/2015 00:05:00,20 4 | 01/01/2015 00:05:01,40 5 | 01/01/2015 02:00:00,40 6 | -------------------------------------------------------------------------------- /unittests/resources/weather/calSolRadCSV.csv: -------------------------------------------------------------------------------- 1 | TimePDT,Solar Altitude,Cloud Cover,Relative Humidity,Wind Speed 2 | 10/19/2016 0:53,0,2,69,1.2 3 | 10/19/2016 1:53,0,2,69,1.3 4 | 10/19/2016 2:53,0,3,67,1.4 5 | 10/19/2016 3:53,0,5,70,1.5 6 | 10/19/2016 4:53,0,2,72,1.6 7 | 10/19/2016 5:53,0,4,77,1.7 8 | 10/19/2016 6:53,0,2,86,1.8 9 | 10/19/2016 7:53,0.261799383,3,86,1.9 10 | 10/19/2016 8:53,0.523598767,4,75,2 11 | 10/19/2016 9:53,0.78539815,6,62,2.1 12 | 10/19/2016 10:53,1.047197533,3,50,2.2 13 | 10/19/2016 11:53,1.308996917,0,50,2.3 14 | 10/19/2016 12:53,1.5707963,0,51,2.4 15 | 10/19/2016 13:53,1.832595683,6,43,2.5 16 | 10/19/2016 14:53,2.094395067,3,35,2.6 17 | 10/19/2016 15:53,2.35619445,6,35,2.7 18 | 10/19/2016 16:53,2.617993833,3,57,2.8 19 | 10/19/2016 17:53,2.879793217,2,56,2.9 20 | 10/19/2016 18:53,3.1415926,5,65,3 21 | 10/19/2016 19:53,0,3,73,3.1 22 | 10/19/2016 20:53,0,3,78,3.2 23 | 10/19/2016 21:53,0,6,90,3.3 24 | 10/19/2016 22:53,0,4,87,3.4 25 | 10/19/2016 23:53,0,0,81,3.5 26 | --------------------------------------------------------------------------------