[TRNSYS-users] TRNOPT

leen peeters l.f.r.peeters at gmail.com
Wed Apr 17 14:23:14 PDT 2019


OK, so in an equation writer in TRNSYS you define:
cost = ....
Efficiency= ...




Penalties:
P1=or(x<a1,x>a2)*10000000000
P2= or(y<b1,y>b2)*10000000000
P3= or(z<c1,z>c2)*10000000000

And you make an overall cost function:
O=a*cost and b* efficiency+P1+P2+P3

then you can play with the values of a and b to see the impact

Does that help?

Leen

On Wed, 17 Apr 2019 at 22:39, Hemmatabady, Hoofar via TRNSYS-users <
trnsys-users at lists.onebuilding.org> wrote:

> I followed TRNSYS example and defined it the same way. But I have two
> objective functions (Cost and Efficiency, Multi-Objective).  and by
> constraint I mean relation between variables. something like:
> X+3*Y+Z<10, which can be added to the objective function as penalty.
> However, when there are man of these constraints, the penalty method is not
> trustable.  X, Y and Z has minimum and maximum amounts, which are
> determined in TRNOPT.
>
>
> Regards,
>
> Hoofar
> ------------------------------
> *Von:* TRNSYS-users <trnsys-users-bounces at lists.onebuilding.org> im
> Auftrag von leen peeters via TRNSYS-users <
> trnsys-users at lists.onebuilding.org>
> *Gesendet:* Mittwoch, 17. April 2019 21:48:13
> *An:* TRNSYS users mailing list at OneBuilding.org
> *Cc:* leen peeters
> *Betreff:* Re: [TRNSYS-users] TRNOPT
>
> Hi,
>
> what is your constraint?
> How did you define your optimisation function? What doe sit look like?
>
> leen
>
> On Wed, 17 Apr 2019 at 21:39, Hemmatabady, Hoofar via TRNSYS-users <
> trnsys-users at lists.onebuilding.org> wrote:
>
>> Hi Leen,
>>
>>
>> I can define constraints as penalties in TRNOPT. However, defining
>> penalties instead of constraints does not work when there are many of them.
>> TRNOPT does not have the option for specifying constraints.
>>
>>
>> How can be the constraints defined in TRNSYS file? and What do you
>> mean by adapting optimization function in TRNSYS?
>>
>>
>> Best regards,
>>
>> Hoofar
>> ------------------------------
>> *Von:* TRNSYS-users <trnsys-users-bounces at lists.onebuilding.org> im
>> Auftrag von leen peeters via TRNSYS-users <
>> trnsys-users at lists.onebuilding.org>
>> *Gesendet:* Mittwoch, 17. April 2019 21:05:05
>> *An:* TRNSYS users mailing list at OneBuilding.org
>> *Cc:* leen peeters
>> *Betreff:* Re: [TRNSYS-users] TRNOPT
>>
>> Hi,
>>
>> why not defining the constraints and penalties in your TRNSYS file? That
>> is how I do it.
>> multi-objectives is again something I do by adapting my optimisation
>> function in TRNSYS
>> The last one ... you should try. I have not yet tested that. Genopt calls
>> TRNSYS and then TRNSYS calls EES. If it is possible, you might have to be
>> really careful with the location of your files. Best is to start with a
>> working TRNOPT example. Then add a link to a small routine in EES and build
>> up from there.
>>
>> Leen
>>
>> On Wed, 17 Apr 2019 at 20:36, Hemmatabady, Hoofar via TRNSYS-users <
>> trnsys-users at lists.onebuilding.org> wrote:
>>
>>> Dear all,
>>>
>>>
>>> I have the following questions regarding optimization procedure in
>>> TRNSYS:
>>>
>>>
>>> 1) How can I define optimization constraints in TRNOPT? (a method is
>>> using penalty functions but It does not work for me as I have multiple
>>> constraints)
>>>
>>>
>>> 2) Is it possible to do Multi-objective optimization in TRNOPT? if yes,
>>> how?
>>>
>>>
>>> 3) Some of my optimization variables come from EES to TRNSYS. Can TRNSYS
>>> couple with EES and GenOpt simultaneously?
>>>
>>>
>>> Best regards,
>>>
>>> Hoofar
>>> _______________________________________________
>>> TRNSYS-users mailing list
>>> TRNSYS-users at lists.onebuilding.org
>>> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>>>
>> _______________________________________________
>> TRNSYS-users mailing list
>> TRNSYS-users at lists.onebuilding.org
>> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20190417/9116a61e/attachment.htm>


More information about the TRNSYS-users mailing list