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 > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default 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
Attached Files
File Type: zip processor acc to excel.zip (68.3 KB, 150 views)
File Type: fsm model.fsm (28.8 KB, 148 views)
  #2  
Old 08-08-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

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)
  #3  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Thanks, Sebastian. But I need the send to logic in my case.
  #4  
Old 08-08-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Why do you need the sendto logic? Because what you want is quite complex with sendto logic but quite easy with pull rules.
  #5  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

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  
Old 08-08-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

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
  #7  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Sebastian,

That's not a good solution. The objects I require is just as in model.fsm . Chieng
  #8  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default 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
Attached Files
File Type: zip processor acc to excel.zip (62.9 KB, 141 views)
  #9  
Old 08-09-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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  
Old 08-09-2011
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Red face

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  
Old 08-09-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

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  
Old 08-09-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default Thanks for the helpful post, Steven

updated remark: "pull" works. Your explanation has been most helpful. Thanks!


Hi Steven,

Quote:
Originally Posted by Steven Hamoen View Post
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.
I'm just unable to see how that would work. The downstream processor pulling flowitem from upstream processor.. What happens when there are multuple downstream processor pulling from upstream? 'Cause that's the case as stated in the excel. I just think the codes will be so much more complicated.

Quote:
Originally Posted by Steven Hamoen View Post
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!
lol! I'll keep that in mind. I'm just trying to get the logic right for now. Speed optimization later. Thanks anyway!

Quote:
Originally Posted by Steven Hamoen View Post
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)
I kinda see what you mean.. Will work on that right away.

Quote:
Originally Posted by Steven Hamoen View Post
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!
Haha.. I just thought I'd get better answers by putting in a bit of "challenge". xD Lesson learnt! Jason Lightfood must love this part of your comment so much.

Chieng

Last edited by Chieng Kai Seng; 08-09-2011 at 08:11 PM. Reason: "pull" works!
  #13  
Old 08-09-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Vogel,

Sounds pretty complicated. I think Steven's answer is what I need. Thanks for the reply!

Cheers, Chieng
  #14  
Old 08-09-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

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  
Old 08-10-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

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
  #16  
Old 08-10-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Sebastian,

I've checked. sendto is executed after endcollect and before onexit.

endcollect>sento>onexit

Thanks for the reply!

Chieng
  #17  
Old 08-10-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Quote:
Originally Posted by Sebastian Hemmann View Post
2. Question:
I´ve got absolutely no idea when this code is fired. And I even got no idea how to find out.
Just print the name of the trigger to the output console. This line will do it:

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  
Old 08-10-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Quote:
Originally Posted by Chieng Kai Seng View Post
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?
This is not written anywhere in the helpfile (I checked so development please improve helpfile or command list here) but if you use the moveobject you should also use;
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  
Old 08-10-2011
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Quote:
Originally Posted by Chieng Kai Seng View Post
when is the code within sendtoport executed? before or after onExit? or perhaps earlier than that?
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  
Old 08-11-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Steven,

Quote:
Originally Posted by Steven Hamoen View Post
This is not written anywhere in the helpfile (I checked so development please improve helpfile or command list here) but if you use the moveobject you should also use;
transportoutcomplete();
transportincomplete();
I tried :

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.