![]() |
temporary goal |
Post Reply
|
| Author | |
Healme
Newbie
Joined: Jul 02 2020 Location: Switzerland Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: temporary goalPosted: Jan 06 2021 at 5:20am |
|
How do I define a timed goal of a meter that is only valid or observed between 2 and 3 seconds of my simulation? Outside this time window, the goal or constraint is not considered.
if(2 < time < 3,output[4].y3,0) Assuming that the output[4].y3 is always significantly > 0 and is to be minimised, how can the optimiser then only optimise within this time window? Otherwise, 0 would always be the best result, because it is present before 2 s and after 3 s.
Edited by Healme - Jan 06 2021 at 6:15am |
|
![]() |
|
Healme
Newbie
Joined: Jul 02 2020 Location: Switzerland Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: Sep 09 2024 at 3:13am |
|
There is a simple solution. Create a meter that only displays valid values during the relevant time. Outside this time, the meter shows 0 or another constant value which fits best to your optimization needs. Then use this meter as an optimization goal. For the problem described above, you can create a meter with the following formula:
if(and(time>=2,time<=3),output[4].y3,0) Now minimize the maximum of this meter, that's it.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |