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

Revision history [back]

You need to define your own cost function. I've personally done it in Python when needed, because that's my language of choice and because there exists some examples of how to do this.

Specifically, here are my recommendations:

  • Download and play with ExcalibBEM, which is a Graphical User Interface (GUI) for GenOpt developed by Hydro Quebec. It simplifies the setup quite a lot and comes with an example or two were a custom cost function is defined in Python. It's pretty easy to write your own function.

  • For the constraints, one simple way is to set the value of the cost function to infinite (= a very large value) when the constraints aren't satisfied (penalization).

You need to define your own cost function. I've personally done it in Python when needed, because that's my language of choice and because there exists some examples of how to do this.

Specifically, here are my recommendations:

  • Download and play with ExcalibBEM, which is a Graphical User Interface (GUI) for GenOpt developed by Hydro Quebec. It simplifies the setup quite a lot and comes with an example or two were where a custom cost function is defined in Python. It's pretty easy to write your own function.

  • For the constraints, one simple way is to set the value of the cost function to infinite (= a very large value) when the constraints aren't satisfied (penalization).