ATTENTIONThis 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 |
|
Downloads |
Tips and Tricks Share helpful modeling ideas |
#1
|
|||
|
|||
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 |
The Following 3 Users Say Thank You to Axel Kohonen For This Useful Post: | ||
Tom David (08-27-2015) |
#2
|
|||
|
|||
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 Following User Says Thank You to Axel Kohonen For This Useful Post: | ||
Sebastian Hemmann (09-10-2015) |
Tags |
read from file, reset, time table |
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 |