ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
FAQ Downloads Calendar Search Mark Forums Read

Tips and Tricks Share helpful modeling ideas

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2015
Axel Kohonen
Guest
 
Posts: n/a
Downloads: 22
Uploads: 0
Default How to create operators and time tables at reset from data in file

Hi,

In case someone is wondering how to use input data in a file to create operators, time tables and then assign the time tables to the operators there are a few things to do. There could be different ways to do this, but this option worked fine for me.

1. Do all the creating of operators, time tables and assigning operators to time tables in the onModelReset trigger (Can be created in the Tools window, add 'Modeling Logic > Model
Triggers > On Reset'). You have to do these things in the model reset trigger and not in the onReset trigger of an object as the time tables and their connections to operators need to exist before the other objects are reset. This was a tip from Phil BoBo at Flexsim support.

2. Delete all time tables except for one so that you can copy it if you need more of them

3. Read the file containing the operator schedules and create the operators and the table data nodes in the time table according to the schedule. If you need different time tables for the different operators then create a copy of the original time table and insert the values into the new time table.

4. Assign the operators to their corresponding time tables

Hope this helps!

Axel
Reply With Quote
The Following 3 Users Say Thank You to Axel Kohonen For This Useful Post:
Jing Chen (08-25-2015), Sebastian Hemmann (08-25-2015), Tom David (08-27-2015)
  #2  
Old 08-27-2015
Axel Kohonen
Guest
 
Posts: n/a
Downloads: 22
Uploads: 0
Default

Hi,

An additional note.

When you create the time tables using code be sure to check that you do not create any zero second long down times in the time table unless necessary. This could easily happen when you have a weekly schedule in your initial data where you set how long the operator works each day. This would mean that a shift from Monday 8pm to Tuesday 6am could be marked as Monday 8pm-12midnight and Tuesday 12midnight-6am. This could easily lead to a zero second length downtime at midnight if you handle the days separately when you create the time table.

Zero second long down times in the middle of the time table seem to work ok, but for example for a weekly repeating schedule a zero delay down period at the midnight that ends the week this skips the whole next week, but the following week is normal again.

I asked Flexsim why zero delays can cause problems so find the answer from Ryan below.
Quote:
The reason why a zero delay is not working is not because it fundamentally doesn't work, it is behaving as expected it's occurring and the delay is zero so this means the operator goes down and before any time has passed the operator is resumed this is how it's supposed to behave. The problem is in the code we're preempting and aborting the active task sequence so if the active one is to retrieve an item from the source at the time then we're aborting that task sequence and now the item is stuck in the source and it will never be retrieved and then the down task sequence is executed because it was not aborted so using a 0 duration causes problems because of how our code works.

For example, in the model the operator is carrying an item to the queue at midnight of day 7 so the downfunction fires and now after that task sequence is finished it will go to the down location but instantly after the downfunction fires the upfunction fires which aborts the task sequence involving the item and now it still has the downfunction task sequence in it's task sequence queue so it now performs that task sequence and waits there until it receives more tasksequences.

The way to get around this is to either make it a small duration for the shift change maybe about 5 mins (just enough to finish any tasks that were already happening before the downfunction) or you could add some checking in the code to make sure you're only aborting the right task sequence, but this seems unnecessary if all you are doing is having the operator stop operating/processing for down time because 0 down time means no down time so why even have a down time there at all? Now if you plan on assigning labels or other logic at each downfunction call then it would be necessary. Either way you can do that if you want to.
Axel
Reply With Quote
The Following User Says Thank You to Axel Kohonen For This Useful Post:
Sebastian Hemmann (09-10-2015)
Reply

Tags
read from file, reset, time table

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Tables sambhajimahadik Q&A 7 07-15-2014 09:35 AM
create flowitems on reset in queue Congshi Wang Q&A 1 12-22-2010 10:58 AM
Create Network Node At Reset Sung Kim Q&A 1 04-13-2010 08:42 AM
Search box in Time Tables etc. Nico Zahn Gripes and Goodies 9 06-16-2008 09:57 AM
Create tables on the fly AlanZhang Tips and Tricks 0 08-24-2007 06:01 PM


All times are GMT -6. The time now is 03:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.