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

How can I set some value of a global variable (used as a parameter) with genopt ?

asked 2020-01-29 14:18:36 -0500

looooic's avatar

updated 2020-01-30 06:43:16 -0500


I would like to make a parametric study with Genopt to find the best parameter value of an PID to control my HVAC.

I have an ems program like that :

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM =========== EnergyManagementSystem:Program, SET Param = 0.4, !- A28 SET Consigne = Param* HR_sum, !- A29


EnergyManagementSystem:GlobalVariable, Param, !-A1

I would like to determine the best value "Param" with genopt that minimize my humidity simulated curve with an measured humidity profile.

How can I set some value of the global variable "Param" with genopt ?

Thanks a lot

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-29 16:49:43 -0500

I'm not sure I understand what's your actual problem.

In IDF: SET Param = %param%

Then you add it as a GenOpt param in command.txt

Vary {
 Parameter{    // my EMS Global Param
    Name    = param;
    Min     = 0.1;
    Ini     = 3;
    Max     = 5.9;
    Step    = 0.2;

Similar to the example files that GenOpt ships with, no? eg:

edit flag offensive delete link more


Thank you for your reply. I simply resolved my problem.

Actually, I was working with Excalibem (write automatically the idf file and genopt file), and directly with Excalibem it was not easy to do this. But forcing %param% in the initial idf file for Excalibem turn it very easy.


looooic's avatar looooic  ( 2020-01-30 04:39:29 -0500 )edit

Please mark the answer as accepted if it solved your problem, so the thread is marked as resolved.

Julien Marrec's avatar Julien Marrec  ( 2020-01-30 06:35:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Question Tools

1 follower


Asked: 2020-01-29 14:18:36 -0500

Seen: 132 times

Last updated: Jan 29 '20