Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

I am not familiar with FMPy but based on what I am seeing, I suggest to use the primitive functions setReal(), getReal(), doStep (similar to what is done https://github.com/CATIA-Systems/FMPy/blob/master/fmpy/examples/custom_input.py) so you can set time-dependent inputs.

Please note that that example is for FMI 2.0 so you need to adapt it and call the corresponding FMI 1.0 functions.

Currently, it seems like you are only setting the initial value of yShade but EnergyPlus FMU will be updated based on the input value set during the time stepping.

If the simulate_fmu() function you have used in your example accept a time-dependent input object, it may be easier to control your input that way.

I am not familiar with FMPy but based on what I am seeing, I suggest to use the primitive functions setReal(), getReal(), doStep (similar to what is done https://github.com/CATIA-Systems/FMPy/blob/master/fmpy/examples/custom_input.py) so you can set time-dependent inputs.

Please note that that example is for FMI 2.0 so you need to adapt it and call the corresponding FMI 1.0 functions.

Currently, it seems like you are only setting the initial value of yShade but EnergyPlus FMU will be updated based on the input value values set during the time stepping.

If the simulate_fmu() function you have used in your example accept accepts a time-dependent input object, it may be easier to control your input that way.

I am not familiar with FMPy but based on what I am seeing, I suggest to use the primitive functions setReal(), getReal(), doStep (similar to what is done https://github.com/CATIA-Systems/FMPy/blob/master/fmpy/examples/custom_input.py) so you can set time-dependent inputs.

Please note that that example is for FMI 2.0 so you need to adapt it and call the corresponding FMI 1.0 functions.

Currently, it seems like you are only setting the initial value of yShade but EnergyPlus FMU will be updated based on the input values set during the time stepping.

If the simulate_fmu() function you have used in your example accepts a time-dependent input object, it may be easier to control your input that way.

P.S. Looking at https://github.com/CATIA-Systems/FMPy/blob/master/fmpy/examples/coupled_clutches.py it seems like the simulate_fmu() does accept an input object, see line 33 of that example. You may be able to change your input that way as well. Best will be to read the documentation of fmpy to see how to set-up such object.