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
|
|||
|
|||
sending flowitem according to excel
Hi,
Here is a model in which I need the items to flow according to an excel file. Item can flow to whichever processor listed for each step, without connections. My problem is not about the connections. I need to know how to send flowitem to one of the objects listed in the excel. I have attached some notes in the excel. Please assist. Here's another simpler question. For "model.fsm", how can I send: itemtype 1 to processor 1 and 2, itemtype 2 to processor 2 and 3, itemtype3 to processor 1,2, and 3 using first available rule Chieng |
#2
|
||||
|
||||
2. Question:
You could use Pull option in Flow Tab of Porcessors. Pull Requirement in Picklist is "Range of Itemtypes".
__________________
Hemmi |
The Following User Says Thank You to Sebastian Hemmann For This Useful Post: | ||
Chieng Kai Seng (08-08-2011) |
#4
|
||||
|
||||
Why do you need the sendto logic? Because what you want is quite complex with sendto logic but quite easy with pull rules.
|
#5
|
|||
|
|||
Hi, Steven. The simulation will run based on huge amount of data collected in the past and the excel files used to keep these datas were written in "push" logic. Datas tell what processor is available next and not what flowitems should be pulled to processor. Cheers, Chieng.
sides, "pull" logic doesn't reflect how flowitems are passed on in our product flow. Last edited by Chieng Kai Seng; 08-08-2011 at 08:11 AM. Reason: just to clarify |
#6
|
||||
|
||||
To don´t get too much work in programming I would use 3 Queues (for different Itemtypes) in front of Processors . First Queue connected to Processor 1 and 2, second to 2 and 3, third to all Processors. This way you could use "send to logic" to send the items to the queues and they send items to not blocked processors.
__________________
Hemmi |
#8
|
|||
|
|||
Help needed
Hi all,
I attach herewith another model to clarify my question. - The model openexcel("...") onReset. [please alter the link to excel as required] - In the Flow codings I wrote(incomplete, but I hope will give you an idea of what I need), >The model reads and checks for availability of the processors listed for each step >picks a processor by random using duniform >reads the processor node from excel and moveobject to the picked processor Pull logic isn't a solution here. I need the codes at "Flow" that sends flowitem to the processors listed in the excel. Please assist. Chieng |
#9
|
||||
|
||||
Hi,
I've taken a look at your model and your excel sheet and I still say that a pull option is the best way. First remark, if your excel file is quite big, please put the table in Flexsim otherwise your next post will be that your model is so slow! On an item you should write a label containing the row nr in the table where you currently are with this product. Then on every pull requirement you write the same piece of code that simply checks if the processer which pull requirement is executed, is contained in the step in the excel table. If so, the product is allowed in. This way, there is only 1, fairly simple, piece of code on every processor. You could even put this code in a usercommand so there is only 1 place where this code is written. (and of course this code has also to be on the sink) Oh and hold a bit back on your statements, because "But I need the send to logic in my case." and "That's not a good solution." are bold statements for somebody just starting with the software and getting advice from people that have worked with it for years! Last edited by Steven Hamoen; 08-09-2011 at 04:05 AM. |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Jason Lightfoot (08-09-2011) |
#10
|
||||
|
||||
Hi,
maybe you can write your own logic by using a taskexecuter for the sendto strategy. The main problem with this solution and not using object connections either is that you have to control the availability by yourself. If you use the taskexecuter write your own tasksequence with only frload- and frunloadtask. Further on let the taskexecuter do not travel offsets. Then you can move the items through your tasksequences from one processor to the next even by using the duniform-function. BUT you have to check the availability by yourself and write a logic that creates the tasksequences at the right time. That is really advanced stuff. Maybe you look better at the solutions already given to you. |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Chieng Kai Seng (08-09-2011) |
#11
|
||||
|
||||
I think if I would have to programm it, I would start with setting the Processors as global variables and sending items with "moveobject()" to these. This wouldn´t need any Taskexecuters.
But longer thinking about this shows that this has to be done in Triggers and not in send to logic. Maybe the hint gives you any idea!?
__________________
Hemmi |
The Following User Says Thank You to Sebastian Hemmann For This Useful Post: | ||
Chieng Kai Seng (08-09-2011) |
#12
|
||||
|
||||
Thanks for the helpful post, Steven
updated remark: "pull" works. Your explanation has been most helpful. Thanks!
Hi Steven, Quote:
Quote:
Quote:
Quote:
Chieng Last edited by Chieng Kai Seng; 08-09-2011 at 08:11 PM. Reason: "pull" works! |
#14
|
|||
|
|||
Hi Sebastian,
Kinda confusing. But speaking of moveobject() and triggers I've got questions: 1. when I use the moveobject command from a queue to a processor, the downstream processor seems to ignore the maximum content. or sometimes, the flowitem is not conveyed acrosss processor length(even though the option is checked in the processor GUI) How to correct these problems? 2. when is the code within sendtoport executed? before or after onExit? or perhaps earlier than that? Chieng. |
#15
|
||||
|
||||
1. Question:
Think this is the problem with not using standard functions like connections. Don´t know all functions that are turned off. And this makes it an little more complicated. I even know, that "moveobject" dosn´t fire the onEntry trigger. So I think the Items this way don´t arrive to any port. 2. Question: I´ve got absolutely no idea when this code is fired. And I even got no idea how to find out. Maybe you could share a Modell that shows why you have to use the "send to" option for this query!? This would it make easier to understand how we could help.
__________________
Hemmi |
#17
|
|||
|
|||
Quote:
pf(time());pt("\t");pt(getname(c));pt("\t");pt(nod etomodelpath(current,1));pr(); |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Sebastian Hemmann (08-10-2011) |
#18
|
||||
|
||||
Quote:
transportoutcomplete(); transportincomplete(); These functions are needed for updating the internal administration such as the content etc. If you would select "conditional transport" on the "Request Transport From" and look at the code you will see it's use. Also never write moveobject on an entry or exittrigger, as the command list already states, make sure there are no events pending so send a delayed message with time 0 and execute the moveobject on the onmessage. |
The Following 4 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Phil BoBo (08-10-2011) |
#19
|
||||
|
||||
You can easily see the order that things are being executed by turning on the Event Log from the Debug menu.
|
The Following 2 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Sebastian Hemmann (08-11-2011) |
#20
|
|||
|
|||
Steven,
Quote:
transportoutcomplete(current,item,num port); transportincomplete(); moveobject(); I use moveobject() because I wanted not to use connections but transportoutcomplete requires port num. Is there a way to do this? Could you show me an example? Cheers, Chieng |
Thread | Thread Starter | Forum | Replies | Last Post |
Sending GUI number to Global Table | Albert Munoz | Q&A | 2 | 10-18-2010 10:59 AM |
Sending messages to Flexsim | cedric molthoff | Q&A | 2 | 03-10-2010 09:48 AM |
Question on sending to different ports | Jamie Santa Ana | Container Terminal (CT) Library | 2 | 09-09-2009 02:54 PM |
Customizing Flowitem Attributes - a quest for the flowitem with the fewest attributes | Cliff King | Tips and Tricks | 0 | 11-22-2007 12:22 PM |