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 07-08-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default block a source ?

Hi all,

can you block a source until I want?

I could block a queue, but a source I cannot.

The code I used to block the queue is as follows:


treenode current = ownerobject(c);
if(getstatenum(current) != STATE_BLOCKED)
stopobject(current,STATE_BLOCKED);

Thank's.
  #2  
Old 07-08-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

As far as I know, you can use stopobject() and resumeobject() on a Source. I also checked some time ago if I can give a Source MTBF and MTTR, which is working (and is using behind the scenes the two commands).
Another way could be to close the output of the Source, so no items will leave the Source and arrive in the model.
The difference in my eyes is, that with stopobject() and resumeobject() the events will be shifted (event to generate the next item). With closeoutput() the event is still fired to create the item, but the item can not leave.
So the difference is that in the first case the item will not leave, because it is not generated yet. In the second case the item is generated and will leave after open the output.

So I guess, it depends in what you are going to do. To give you a "good" answer I guess we need more information what exactly you like to do.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #3  
Old 07-09-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

Hi,

What I want is to get the boat to a point (f.i NN3), the crane download a certain number of containers (defined by the labels).

The solution is thought to put a source, and when the boat reaches the discharge point (NN3), the source launch a certain number of containers to a queue, and not before, so you want to lock the source until the boat gets to the point NN3.


The ideal solution for the model I assume that would initially load the ships (item), with a number inside the container (items), I suppose that using the "insertcopy" command, but I have not managed to make it work.

I tried to upload the model but it gives me an error

Thank's.

I trying to upload the model but it gives me an error
  #4  
Old 07-10-2009
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

Have you thought about using a combiner to model the loading of the ship?

You can use a taskexecuter as flowitem that moves over the path, goes into the combiner and then picks up the right amount of containers.
Or you use a forklifttruck (as the ship) and have it bring a pallet (kind of the order list) to a combiner which picks up the right amount of containers.

If you want to lock the source, it is enough to close the output of the source and use the output counter (getoutput) to close the output again if the right amount of products have left.
  #5  
Old 07-13-2009
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 74
Downloads: 14
Uploads: 0
Thanks: 19
Thanked 3 Times in 2 Posts
Rep Power: 138
juan alberto is on a distinguished road
Default

[quote=Steven Hamoen;4461]Have you thought about using a combiner to model the loading of the ship?

Hi,

Thanks Steven, I have obtained to block source with the command "getoutput".


Thread Thread Starter Forum Replies Last Post
how to import excel in source? qin tian Q&A 6 01-11-2010 10:58 PM
Arrival schedule Source Nico Zahn Q&A 3 12-15-2008 04:23 AM
Effects of StopObject on a Source Simon Riopel Q&A 1 10-28-2008 01:42 PM
Import of data in schedule of a source Matthias Hofmann Q&A 3 10-07-2008 09:30 AM
Help on flexsim data input into source and processer TanSiying Q&A 4 10-30-2007 07:55 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.