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

# Definition of constraints in jEPlus+EA

Could anybody familiar with JEPLUS+EA explain in detail how to define constraints for an optimization run. Below you see the RVX example.

I do not really understand what is meant by feasible range [0, 100000.0] and normalized between [0.0, 400000.0] The RVX code for the constraint definition is:

"constraints" : [
{
"identifier" : "s1",
"formula" : "(c0+c1)/1000/3600",
"caption" : "Electricity [kWh]",
"scaling" : true,
"lb" : "0",
"ub" : "100000",
"min" : "0",
"max" : "400000",
"weight" : "1.0"
}
],

edit retag close merge delete

@Ivan Korolija: Maybe you can help me? Thanks a lot.

( 2015-08-14 09:05:28 -0500 )edit

Sort by » oldest newest most voted

Ivan's still enjoying sun and sea on a Greek island, I believe :-D

Constraint functions are used to test whether a solution is 'feasible' or not. You may consider them as a special type of objectives, whose values must fall within a range, [lb, ub], defined by the user. Normally you would need to enable 'scaling' in the constraint definition, unless your feasible range is <=0. The use of the five scaling parameters (lb, ub, min, max, and weight) is best illustrated in the diagram below. The algorithm considers 0 and below as feasible, and anything above 0 as unfeasible. It works to minimize the sum of the constraint values if more than on constraint are defined.

more

@Yi Zhang: I also would love to enjoy Greek island and the mediteranean sea:-( But it seems that it's not our turn right now;-)

Thanks a lot for you explaination. However, I still have some doubts. Maybe it's better to work with an example: 1. How would the contraint definitition look like when I only want to consider solutions with electricity intensity below 80 kWh/m² 2. Do I have to use scaling when I have only 1 constraint? 3. In your RVX examples objectives and sql extraction are defined in RVI and RVX file. Is this necessary? Warm regards from rainy Germany:-

( 2015-08-17 04:36:31 -0500 )edit

For your example: 1. set min and lb to 0, ub to 80, and max to some large number, say 500; 2. Yes, as lb and ub are only applied when scaling is enabled. 3. No. RVX overrides the objective definitions in RVI.

( 2015-08-20 11:40:57 -0500 )edit