question

Kevin Megee avatar image
2 Likes"
Kevin Megee asked Matthew Gillespie commented

How can I customize the start time/date of my simulation?

I want to be able to change when my simulation starts.

FlexSim 17.0.0
start time
5 |100000

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

Steven Hamoen avatar image
3 Likes"
Steven Hamoen answered

@Kevin Megee Edit -> Model Settings

5 |100000

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

Frenk Gao avatar image
2 Likes"
Frenk Gao answered Matthew Gillespie commented

There is an exmple about change start time/date , it use the realtime. You can

customize the startTime as you wish.

The Code need to be added to OnRunStart Trigger (Tools -> Modeling Logic -> Model Trigger -> On Run Start).

double startTime = applicationcommand("getunixtime");
treenode startNode = getmodelunit(START_TIME_NODE);
set(startNode, startTime);
applicationcommand("convertunixtime", startNode, startTime);
treenode stopTime = getmodelunit(STOP_TIME_NODE);
set(stopTime, startTime + getmodelunit(TIME_MULTIPLE) * get(node("MAIN:/project/exec/stoptime")));
applicationcommand("convertunixtime", stopTime, get(stopTime));
set(getmodelunit(CURRENT_TIME_NODE), 0); //Cause the RunPanel to update
· 5
5 |100000

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

Sharan Nitin avatar image Sharan Nitin commented ·
its not working
0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Sharan Nitin commented ·
1 Like 1 ·
Sharan Nitin avatar image Sharan Nitin Sharan Nitin commented ·

startTime takes some different value and its not matching with my system timing

@Steven Hamoen

@Frenk Gao

@Kevin Megee

0 Likes 0 ·
Sharan Nitin avatar image Sharan Nitin Sharan Nitin commented ·

FYR..!

1661426496306.png

0 Likes 0 ·
1661426496306.png (263.4 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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