question

Ane avatar image
0 Likes"
Ane asked Nil Ns answered

Como hacer en un trigger de code snippet para que se ejecute una vez al día

hola, quiero rellenar mi codigo diciendole que ejecute una vez al día (cada 1440min ya que esta en minutos)

int NF;

treenode queue = node("Buffer FP 1", model());

NF =content(queue) - gettablenum("Demand daily", item.Ref, CurrentDay);

settablenum("NF FP",item.Ref,CurrentDay,NF)


como puedo hacerlo, mediante if a poder ser

FlexSim 23.0.15
academic
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Nil Ns avatar image
0 Likes"
Nil Ns answered Ane commented

Hello Ane,


There are a lot of methods to do that, but you cannot create a trigger manually, so you can't be sure that it will be executed every 1440 minutes.


The easiest alternative to creating a trigger manually is to create a user event. In the user event, you can write the code you want to execute and set the repeating time.

1736501889223.png


To get data from the model, we usually use the statistic collector. It is a little more complex to understand but very powerful.

We recommend you take a look at it, because in the statistic collector, you can create result tables directly by scheduling events or at specific intervals.


Thanks!


1736501889223.png (12.6 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.