Parametrization of variables within a simulation

103 views
Skip to first unread message

Siddharth Swaminathan

unread,
Apr 3, 2019, 8:54:30 PM4/3/19
to energyplus-fmu
Hello Energyplus-fmu group,

I know that Energyplus-fmu develops the FMU using FMI 1.0. I read in a post that its not possible to do parametrization of variables once the simulation has begun for FMI 1.0. I am using PyFMI and wanted to vary temperature set-points to see the corresponding power changes, make a decision on a temperature set point and step in time (using do_step) and repeat the process. Is there a work around for this?

At present i am loading a new model for each parameter sweep. But, what i want to do is sweep the parameters while the simulation is running.

Thanks,

Best Regards,

Siddharth S

Thierry Stephane Nouidui

unread,
Apr 5, 2019, 3:11:27 PM4/5/19
to energyplus-fmu, Siddharth Swaminathan
I don't think that it is possible to change the parameter of your E+FMU on the fly.
Now, could your temperature set-point be an input (e.g. of type Schedule) of your FMU which can be changed at run-time?
P.S. This assumes that your simulation does not require rollback which is, I believe, not possible with EnergyPlus.


Thanks!

Am Donnerstag, 4. April 2019, 03:54:32 GMT+3 hat Siddharth Swaminathan <s.si...@gmail.com> Folgendes geschrieben:


--
You received this message because you are subscribed to the Google Groups "energyplus-fmu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Siddharth Swaminathan

unread,
Apr 5, 2019, 3:38:02 PM4/5/19
to energyplus-fmu
Thank you Thierry for your response.

Yes, my temperature setpoint is set as an input of type schedule that can be changed in run-time.
i would require a rollback to previous time-step after trying different temperature setpoints for current timestep.

My pseudo-code would look like:

temp_param = [20,21,22,23]
while simTime<timeStop:
      for i in temp_param
           model.set('temp',temp_param[i])
           model.do_step(step_size = secStep,current_t = simTime, new_step=True)
           model.get('metric')
     #make decision
     model.set('temp','selected_temp_param')
     model.do_step(step_size = secStep,current_t = simTime, new_step=True)
     simTime += secStep

Thanks,

Best Regards,

Sid


On Friday, April 5, 2019 at 3:11:27 PM UTC-4, Thierry Stephane Nouidui wrote:
I don't think that it is possible to change the parameter of your E+FMU on the fly.
Now, could your temperature set-point be an input (e.g. of type Schedule) of your FMU which can be changed at run-time?
P.S. This assumes that your simulation does not require rollback which is, I believe, not possible with EnergyPlus.


Thanks!

Am Donnerstag, 4. April 2019, 03:54:32 GMT+3 hat Siddharth Swaminathan <s.s...@gmail.com> Folgendes geschrieben:


Hello Energyplus-fmu group,

I know that Energyplus-fmu develops the FMU using FMI 1.0. I read in a post that its not possible to do parametrization of variables once the simulation has begun for FMI 1.0. I am using PyFMI and wanted to vary temperature set-points to see the corresponding power changes, make a decision on a temperature set point and step in time (using do_step) and repeat the process. Is there a work around for this?

At present i am loading a new model for each parameter sweep. But, what i want to do is sweep the parameters while the simulation is running.

Thanks,

Best Regards,

Siddharth S

--
You received this message because you are subscribed to the Google Groups "energyplus-fmu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to energyp...@googlegroups.com.

Thierry Nouidui

unread,
Apr 6, 2019, 10:30:43 AM4/6/19
to Siddharth Swaminathan, energyplus-fmu
If you are trying to do any sort of optimization which will require rollback for your building model, I suggest using Modelica models (e.g. Reduced order model) with parameters which can be estimated using EnergyPlus (for instance) as opposed to using EnergyPlus or EnergPlusFMU. 

You may want to check the work done at LBNL on MPC (https://github.com/lbl-srg/MPCPy/). 

Although, I am not on top of the development, I believe this approach to be more suitable for your work.

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com.

Siddharth Swaminathan

unread,
Apr 7, 2019, 5:17:45 PM4/7/19
to energyplus-fmu
Thank you very much.

The resources are very helpful.

Best regards,

Sid

On Saturday, April 6, 2019 at 10:30:43 AM UTC-4, Thierry Nouidui wrote:
If you are trying to do any sort of optimization which will require rollback for your building model, I suggest using Modelica models (e.g. Reduced order model) with parameters which can be estimated using EnergyPlus (for instance) as opposed to using EnergyPlus or EnergPlusFMU. 

You may want to check the work done at LBNL on MPC (https://github.com/lbl-srg/MPCPy/). 

Although, I am not on top of the development, I believe this approach to be more suitable for your work.

Thanks!

Siddharth Swaminathan

unread,
May 5, 2020, 9:22:42 PM5/5/20
to energyplus-fmu
Hi Thierry,

I ended up just simulating different instances for model perturbation eventually. I was just wondering with the new EnergyPlustoFMU version 3.0.0, is it possible to change parameters during the simulation? This would require rollback of the simulations. Is this a feature for FMI 2.0?

Thanks and Best Regards,

Siddharth S

Thierry Stephane Nouidui

unread,
May 6, 2020, 3:22:18 AM5/6/20
to energyplus-fmu, Siddharth Swaminathan
Hello Siddharth,

version 3.0.0 doesn't allow to change parameters during the simulation. It doesn't support the rollback of simulation as well. This would require to have access to all EnergyPlus' state variables which is unfortunately not possible yet.

Thank you

Am Mittwoch, 6. Mai 2020, 03:22:55 MESZ hat Siddharth Swaminathan <s.si...@gmail.com> Folgendes geschrieben:


--
You received this message because you are subscribed to the Google Groups "energyplus-fmu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com
.
To view this discussion on the web visit https://groups.google.com/d/msgid/energyplus-fmu/ea386c6f-3865-48fc-9a8c-e6d6051ffa20%40googlegroups.com
.

Siddharth Swaminathan

unread,
May 6, 2020, 11:28:55 AM5/6/20
to energyplus-fmu
Thank you very much

Best Regards,

Siddharth S
Reply all
Reply to author
Forward
0 new messages