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 02-08-2011
Jarrett Skov Jarrett Skov is offline
Flexsim User
 
Join Date: Feb 2011
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Jarrett Skov is on a distinguished road
Default Fast Food Restaurant Model Questions

Hi, I am currently working on simulating a fast food restaurant. There are a few questions I have about problems I have run into that I am hoping someone here can help me with:

1.) I am modeling the system with Customers as TaskExecuter Flowitems. They enter the system and move into a queuing area and then move throughout a set of network nodes to different processes. I want the customers to be able to have collisions. However, under the collision tab of the flowitem, I can only add existing static objects to its collision table. How do I allow the flowitems to be able to collide with each other?

2.) For customer queuing, is it possible either to create a free "queuing area" where, rather than having a static queue object where the flowitems gather, have a 'queue network' where they can freely (randomly) move through a network but still be counted as in a queue?

Something simpler, if possible, is can you increase the spacing distance between objects in a queue? The reason I ask is because the simulation is heavily based on relative size and distance, and people queuing 2 inches between each other is not realistic from a practical sense. (I suppose this could be solved If I could figure out how to check collisions between them, and the collision spheres could remain active in the queue.)

3.) This one should be simpler. I am currently having customers gather in a large queue before moving into a smaller queue for individual registers. I am using the shortest queue length logic for sending customers from the large queue into the smaller ones. However, this logic does not account for the processor following the smaller queue.

What happens is, the first customer enters the big queue, goes into the small queue off port 1 and then moves right to the attached processor. When the second customer comes, he goes to the large queue. His logic tells him to go to the shortest subqueue. At this point, both subqueues are empty, but the first one has a customer at the processor. The second customer still goes to the first queue because it defaults to port 1 - leaving the second processor empty when a customer is in queue for processor 1.

I hope I explained that clearly. Is there a way to modify the shortest queue flow logic to take into account the status of the process further down the flow?


Thank you very much for any help you can provide.
Jarrett
  #2  
Old 02-09-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

First some answers:

1) I'm not sure this is a good idea but the way you would add them is by using code. Use createcoupling() and pass in the two values returned by getvarnode(<object>,"collisionobjects") for all the pairs of <objects> you want to check. If you're having them wander around in a confined space, I'd imagine the collision handling code could get very complicated.

2) a) Free space: You can create traveltoloc tasks for the task executers while they are waiting. Just set the item placement option on the queue to 'Do Nothing' and use the entry trigger with something like createtraveltoloctask(item,1,uniform(0,5),uniform(-5,5),0,0,0,0); You'd need to make sure they have enough time in the queue to complete the travel task I guess.

2) b) Queue distance. Check this thread.

3) You should be able to change the Shortest Queue logic to something like:

treenode tempobject;
int curmincontent = 1000000000; // this sets the integer to the largest possible value that an integer can hold.
double curminindex = 0;

for(int index = 1; index <= nrop(current); index++)
{
tempobject = outobject(current, index);
int thiscontent= content(tempobject)+content(outobject(tempobject,1));
if(opavailable(current,index) && thiscontent < curmincontent)
{
curmincontent = thiscontent;
curminindex = index;
}
}

return curminindex ;



Using taskexecuterflowitems simplifies the modelling process but you run into hurdles like these. At some point jumping over all these hurdles becomes more work than using something like coordinated task sequences or subtasks, which may be more appropriate for some aspects of the model. Also consider using nodefunctions that call usercommands - I find this makes it all easy to read and can be used to chain a few task sequences together.

UPDATE: I've put together an example which also caters for the variable 'nroftransportsin' for deciding the shortest queue. I'll post it when I've ironed out an issue I am seeing.

Last edited by Jason Lightfoot; 02-09-2011 at 12:17 PM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Jarrett Skov (02-10-2011)
  #3  
Old 02-09-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

Attached is an example model. Thanks to Phil for pointing out the error. I'd ignored my own warning in the above post about making sure the traveler has enough time to travel to a waiting position. To get around that I've added the release to the task sequence and set the queue4 sendTo to 'Do not release'.
Attached Files
File Type: zip FastFood2a.zip (97.6 KB, 231 views)
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post:
zhang xin (02-10-2011)
  #4  
Old 02-10-2011
Jarrett Skov Jarrett Skov is offline
Flexsim User
 
Join Date: Feb 2011
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Jarrett Skov is on a distinguished road
Default

Thank you very much Jason! I did what you said for both the 'free queuing' and the shortest queue logic and it worked like a charm.

For the collisions, after looking into it I see what you mean by how complicated it can get. The number of collisions it would need to check would be huge, and its not really worth it for the amount it would slow down the model, so I wont worry about it.

Thank you again!

Jarrett


Thread Thread Starter Forum Replies Last Post
Questions about new drawsurrogate functions Steven Hamoen Q&A 3 07-05-2010 11:34 AM
Two questions that are raised David Chan Container Terminal (CT) Library 6 01-22-2010 09:23 AM
a simple model and the questions. Robert Liu Q&A 3 10-27-2009 02:42 AM
Questions of TrafficControl ? Li Chin Q&A 0 01-15-2009 07:32 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.