question

sara S2 avatar image
0 Likes"
sara S2 asked sara S2 commented

How to get the exact value of the current model time ?

Hello,

I want to compute the value of ‘StockCoverage’ in the column 5 of the global table 'DataBase'. The value is selected in the Fig1; where I used the current model time (which is in minutes). When I run the model, I get an incorrect value of ‘StockCoverage’ and a time (in the column 7 of the global table) different from the current model time (which is 17.28 min) (see Fig2). Why I don’t get the value 17.28 in the column 7 ? Would any one explain this to me please?

Regards.

fig1.png

fig2.png

FlexSim 19.0.0
the model time
fig1.png (76.0 KiB)
fig2.png (141.8 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.

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered sara S2 commented

The command getmodelunit(CURRENT_TIME) returns the current time in seconds (since Jan 1, 1601). Is that what you're expecting? If you want the run time displayed at the top of the view you should use

Model.time
· 1
5 |100000

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

sara S2 avatar image sara S2 commented ·

In fact I want the run time. Thank you @Matthew Gillespie.

0 Likes 0 ·