question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

Schedule is not working in sync with model data and time?

Hi Team,

I have defined weekly schedule in arrival table but it is not working in sync with model data and time. For eg: When model is started from Wed, it should generate the Wed arrivals. But it is not happening in this way.

1660324753075.png

Can you give me clarity about its operation?

Thank you!

FlexSim 21.0.10
arrivalsmodel date time
1660324753075.png (169.6 KiB)
· 2
5 |100000

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

Kavika F avatar image Kavika F ♦ commented ·
What equation are you using for your duniform distribution? From the glimpse I can see, it seems like you're multiplying many of your lower bounds by 0? If you post your model through the link above, then we could help you better.
0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Kavika F ♦ commented ·

Hi @Kavika F,

I have changed arrivals to make it simple in attached model. There should be arrivals on Wednesday (model start day) as per schedule. But it is happening on 3rd day from start which is creating issue.

1660545387346.png

Please find model file named as "Schedule and Model Start Sync Issue".

Thank you!

0 Likes 0 ·
1660545387346.png (131.7 KiB)

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Ankur A3 commented

This might still be the same bug mentioned here. The source always uses the table as if the model starts on a monday when the weekly mode is used.

As a workaround I can offer the following code that allows you to quickly shift the table entries by a set amount of days. Whenever you change the start date of the model, run the code so that the "Monday" column contains the data for the actual start day (and the rest of the values will be shifted accordingly).

// Adjust the path to lead to the respective source activity (PF Name and Source Name)
treenode arrivalTable = Model.find("/Tools/ProcessFlow/ProcessFlowName/SourceName>variables/arrivals");
treenode dummyTable = createcopy(arrivalTable, arrivalTable.up);
int shiftBy = 1;    // The amount of days to shift the arrivals backward
for(int i = 1; i <= 168; i++)
{
    int shiftRow = (i + shiftBy*24 - 1)%168 + 1;
    treenode QtyNodeReplace = createcopy(dummyTable.subnodes[shiftRow].subnodes[3], arrivalTable.subnodes[i].subnodes[3],1,0,0,1);
}
dummyTable.destroy();

timetableshift.gif


timetableshift.gif (97.0 KiB)
· 6
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·

Hi @Felix Möhlmann,

Thanks for your answer.

I am facing error while executing this code as below:

1660553183595.png

Can you help me what is wrong here?

Also, I would like to know why FlexSim is having so many basic bugs which is not good experience to face. One more bug is there with staff animation (Sliding instead of walking). Sometime customer thinks it is our mistake. What is the best software for DES?

Thank you!

0 Likes 0 ·
1660553183595.png (24.9 KiB)
Felix Möhlmann avatar image Felix Möhlmann Ankur A3 commented ·

The first line doesn't return a valid treenode.

Please check if you have entered the correct path into the 'find()' command. In the code I posted I used "ProcessFlowName" and "SourceName" in the path to signify what has to be entered in those spots.

You can follow the path in tree view manually to see if the respective nodes exist.

I can't really comment on why such a bug still exists.

Personally I haven't encountered the 'sliding bug' you describe. Did you report it?

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Felix Möhlmann commented ·
Thank you! @Felix Möhlmann.

It is working now.

But user may confuse anytime because arrival table is showing heads from Mon to Sun.

Would you like to recommend anything else to avoid this confusion?

0 Likes 0 ·
Show more comments
Kavika F avatar image Kavika F ♦ commented ·
Yes this is the same bug as you linked to. I confirmed it still happens in the latest version (22.2). I'll submit a report to the dev team.
0 Likes 0 ·

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.