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 |
#1
|
|||
|
|||
Source Produce items at the start of each weekday..
Hi everyone
I m building a model in which I want the source to produce some quantity of items at the start of each day ( I have used the shift calender & in my model simulation starts at 8.00 am on all weekdays) Now I want the source to create some quantity ( which I give it in a table ) of items at 8.00 am every day... Saturday & sunday are downtime in the model.. I dont know how to control the source by shift calender timings ..the quantity of items varies every day. Any suggestion will be of great help.. Thanks in advance |
#2
|
||||
|
||||
Hi,
perhaps you don't use a source, you use a User Event, build a new box in your model and move this box to a queue. In the On Entry trigger you write a code to duplicate this box as often as you need it. /**Create Box in User Event*/ createcopy(node("/1/2/1/1",model()),model()); // copy a box to your model moveobject(last(model()),node("/Objectname",model())); // last(model()) is your new box |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
naren nataraj (11-21-2011) |
#3
|
|||
|
|||
Thanks a lot Jorg...
I have tried your suggestion.. I have two more question now.. 1. If I use a User event and set the repeat time as 1440 mins ( 24hr * 60 ) it is creating items at 8.00 am every day.. but I dont want items to be created on saturday & Sunday.. any help on how to do that.. 2. Is it easy to set itemtypes by this approach as I have 4 itemtypes and each come on a particular day. Thanks once again Jorg.. |
#4
|
||||
|
||||
Hi,
you can divert your items on saturday and sunday direct to a sink. You can change the itemtypes on every trigger. To find the right itemtype build a counter, which counts the days, and set the itemtypes from a table. I use the modulo operator in a switch-structure to repeat settings. switch((counted_days % 7)) { case 1: { ... break;} case 2: { ... break;} .. default: // the seventh day { ... ;} } Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
naren nataraj (11-21-2011) |
#5
|
||||
|
||||
Maybe a different approach:
Use a source with an arrival schedule to generate an item every morning but not on saturday and sunday. This product goes throug a seperator that generates the right amount of items based on table or distribution (use the "split or unpack quantity trigger") |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Sebastian Hemmann (11-22-2011) |
Thread | Thread Starter | Forum | Replies | Last Post |
Flexsim hang at start-up | David Chan | Installation | 5 | 01-12-2011 10:31 PM |
How to interrupt one kinematic and start another one | Hao Zhou | Q&A | 3 | 01-10-2011 08:47 AM |
Simulation Start Time | Jamie Santa Ana | Container Terminal (CT) Library | 1 | 04-14-2010 09:02 AM |
Command overview does not start because XML does not start | Tom David | Q&A | 0 | 09-17-2008 12:11 AM |
Operator not unloading items before picking up priority items | Howe Chiat Cheng | Q&A | 2 | 05-28-2008 02:05 AM |