question

Andrew J3 avatar image
1 Like"
Andrew J3 asked Andrew J3 commented

Arrival Schedule

Within my traffic model, I have several sources that I would like to put on a schedule. The sources represent drivers leaving their respective parking lots, and entering our roadway to exit the facility. I am attempting to set each source on a schedule due to the availability of data that shows the exact time (minutes) drivers entered the roadway after 2pm on a given day. For whatever reason, my arrival time is not being read correctly and all of my drivers are leaving the lot at time 0. I am not sure if my process flow is influencing this behavior or not, but I do not have the process flow executing until after items leave the source. The example schedule is located in Gate1Source within the attached model.

Thanks in advance,

Drew

FlexSim 18.0.4
FlexSim 18.1.0
source schedulearrival scheduleschedule source
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
0 Likes"
Matthew Gillespie answered Andrew J3 commented

The ArrivalTime column has string data instead of number data so it's interpreting the text in each cell as 0. The right click option doesn't seem to be working, so I wrote the following script to convert that column to use number data.

Table table = model().find("Gate1Source>variables/schedule");
for(int i = 1; i <= table.numRows; i++)
	table[i][1] = table[i][1].as(string).toNum();

Also, I took the liberty of simplifying your process flow. I converted the repeated set of activities into a subflow that all the tokens can run. Also I created Groups in your model for the different queue types since you can have an Event Triggered Source automatically listen to each member of a group.

Take a look at my changes to your model:

traffic32218upload-mg.fsm


· 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.

Andrew J3 avatar image Andrew J3 commented ·

Thanks Matthew, all of the above worked perfectly. Thank you for cleaning up my processflow as well.

0 Likes 0 ·