<div dir="ltr">Hi Elise,<div>I'm beginning to work with GenOpt as well, so I'm not sure if I will be able to help but I'll try...</div><div><br></div><div>I believe in order to vary the window size, you should vary as well the wall size that contains it...</div>
<div><br></div><div><u>For example (Just to explain the concept):</u></div><div>If you have a wall area of 10m^2 and you want to have a window that is 2m^2 and then 4m^2 and then 6m^2... In this case, the wall area should be 10-2 = 8m^2 and consequently 6m^2 and 4m^2, right?</div>
<div>So in this case, you need to define a function that relates both window and wall area ratios... Let's call the wall variable %wall%.. In this case would be:</div><div> %wall% = 10 - %window%</div><div><br></div><div>
<u>Below you can see the code I used:</u></div><div><b><br></b></div><div><b>In the .bui file:</b></div><div><div><br></div><div>*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div>* Z o n e GF_01 / A i r n o d e GF_01</div><div>*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div>ZONE GF_01</div><div>AIRNODE GF_01</div><div>WALL =WE_M : SURF= 1 : AREA= 12 : EXTERNAL : ORI=NORTH : FSKY=0.5</div><div>WALL =WE_M : SURF= 3 : AREA= 24 : EXTERNAL : ORI=WEST : FSKY=0.5</div>
<div>WALL =WE_M : SURF= 4 : AREA= <b><font color="#990000">%aWall%</font></b> : EXTERNAL : ORI=SOUTH : FSKY=0.5</div><div>WINDOW=WIN : SURF= 5 : AREA= <b><font color="#990000"> %aWin%</font></b> : EXTERNAL : ORI=SOUTH : FSKY=0.5 : ESHADE=INPUT 1*SHADE</div>
<div>WALL =WI_L : SURF= 6 : AREA= 24 : ADJACENT=GF_02 : FRONT</div><div>WALL =SE_L : SURF= 7 : AREA= 32 : BOUNDARY=INPUT 1*TEMP_GROUND</div><div>WALL =SI_L : SURF=145 : AREA= 32 : ADJACENT=1F_01 : FRONT</div>
<div> REGIME</div><div> GAIN = PERS_ISO01 : SCALE= SCHEDULE 2*OCC_BEDR</div><div> GAIN = LIGHT01_01 : SCALE= 1</div><div> VENTILATION = VENT0.5</div><div> CAPACITANCE = 115.2 : VOLUME= 96 : TINITIAL= 20 : PHINITIAL= 50 : WCAPR= 1</div>
</div><div><br></div><div><b>In the optimization commands .txt file I wrote</b></div><div><div><br></div><div>Vary {</div><div> Parameter {<br></div><div> Name = <b><font color="#990000">aWin</font></b>;</div>
<div> Ini = 1;</div><div> Values = " 7.2, 5.4 , 3 ";</div><div> Type = SET;</div><div> }</div><div><br></div><div> Function { <br></div><div> Name = <b><font color="#990000">aWall</font></b>; </div>
<div> Function = <b><font color="#990000">"subtract( 12, %aWin% )</font></b>";</div><div> }</div><div><br></div><div>}</div></div><div><br></div><div>I hope this helped... Let me know if it worked well for you!</div>
<div><br></div><div>All the best,</div><div>Amr Alaaeldin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 6:50 PM, Elise Bernard <span dir="ltr"><<a href="mailto:e.bernard54@gmail.com" target="_blank">e.bernard54@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm working on the cost's optimization of a building with one termical zone using GenOpt with Trnsys17. This cost's optimization has to take into account the energetic consumption of the building and the construction's cost. I would like to use a logical function (if condition) to define a cost in function of the choice of the window.</div>
<div>I tried to define my function in the ObjectiveFunctionLocation using this java code</div><div>Name1= Cost; Function1="if (%window% == 2006) {1 }else {2}";</div><div>But it seems that it doesn't work this way. Could you explain me how to handle my problem ?<br>
Thank you</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Elise</div></font></span></div>
<br>_______________________________________________<br>
TRNSYS-users mailing list<br>
<a href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a><br>
<a href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org" target="_blank">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="Tahoma"><font color="#444444"><font>--</font></font></font></div><div><font face="Tahoma"><font color="#444444"><font>Amr Alaaeldin Elesawy<br>
</font><br></font><font size="1"><b><font style="color:rgb(102,102,102)">PhD Student | Building Engineering</font></b><font style="color:rgb(102,102,102)"></font></font><font style="color:rgb(102,102,102)"></font></font></div>
<div><font face="tahoma, sans-serif" size="1"><font style="color:rgb(102,102,102)"><b>Department of Architecture, Built Environment and Construction Engineering (A.B.C.)</b><br>Politecnico di Mil</font><font color="#666666" style="color:rgb(102,102,102)">ano, Italy</font></font><div style="color:rgb(0,0,0)">
<font color="#666666" face="tahoma, sans-serif" size="1">+39 327 056 0018</font></div></div></div>
</div>