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 03-27-2009
Victor Monell's Avatar
Victor Monell Victor Monell is offline
Flexsim User
 
Join Date: Mar 2009
Location: Seattle
Posts: 4
Downloads: 3
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 0
Victor Monell is on a distinguished road
Default newbie question about scheduling transporters

I'm a very new user. My question is regarding scheduling transporter tasks.

I have one transporter (so I'm not currently using a dispatcher) to transport flow items from multiple queues to a single conveyor. It works fine, in the sense that it does move the items from the queues to the conveyor.

What it's doing, though (and understandably so) is moving the items in the order they were generated in the queues. So, if I generate all the items in queue #1 first, then generate all the items in queue #2, it moves all the items in queue #1 first, etc.

What I ultimately want to do is not have the transporter move anything automatically. I'd like to be able to read in a schedule at the beginning of the simulation that says "at time t1, fetch an item from queue x, at time t2, fetch an item from queue y," etc.

I don't expect anyone to code this up for me, but I'm struggling with where even to start. Any suggestions on what section of the manual to read or a pointer to a good example model would be much appreciated.

Also, if clarification is needed of what I'm trying to do, please ask.

Thanks very much!

VM

P.S., This is my first post. It's asking me if I want to add tags. What does that mean?
  #2  
Old 03-28-2009
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Hi,

I think you should look at how to write your own tasksequence.
There is a example in the Flow Tab under the drop down list for a
Transporter, the example is called Task Sequence Example 1.

I came up with few different ways to do it, have not test any of them.
All them is using sendmessage to create an event at the time an item should be picked.
  • You can try using open and closing ports on the queues
  • Do not release the item in the queue until you want to pick an item
    and that time you always release the first item in the queue.
  • Write your own task sequence

This will give you some ideas.

Lars-Olof
The Following User Says Thank You to Lars-Olof Leven For This Useful Post:
Victor Monell (03-30-2009)
  #3  
Old 03-28-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Victor,

Start with the model that you already have. I am assuming that you either know the times that you want to move the items or that you know the events that will trigger an item to be moved.

First, in the Queues select the Task Sequence Example 1 in the Request Transport From field. You will then want to go into the code editors and copy the code to another location so that you can use it later. Next you can remove all of the code and leave the following:

/**Task sequence is generated somewhere else*/
return 0;

This will make it so that the items will now just wait in the queue until something else creates the task sequence to move them.

Second, In the on message trigger of your Task Executer (TE) you will want to past the code that you coppied from the prior trigger. You will need to change the "current" pointer to point to the Queue and the "item" pointer to point to the item you want to move.

Third, To cause the TE to pickup an item you will need to send it a message. You can do this at a designated time or during one of the events that causes you to want an item moved. Here are three ways to do that. A) you could create a bunch of delayed messages at the start of the model. B) you can send one delayed message at the start and then send another each time you create a new task sequence C) you can send a message during the entry, exit, on process finish, etc. triggers of other objects.

Warnings: With what you are trying to do there are a number of ways to mess up. I recmmend that you look into the getitemstate() command because it would be bad for you to try and move items that have not been released by the Queue yet (An item will return 3 if it is available to be moved in the example above). I would also recommend having a label on the flowitem to flag whether or not it has already been assigned to a TE. The reason for this is that when you try to do this with more than one TE you will eventually assign more than one TE to move the same flowitem and it will cause at least statistical errors.

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Victor Monell (03-30-2009)


Thread Thread Starter Forum Replies Last Post
simple scheduling function? Ning Wang Q&A 5 01-16-2009 11:00 AM
make transporters cycle a specific path bsantens Q&A 4 10-21-2008 08:08 AM


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.