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 04-16-2012
Tomasz Kisiel Tomasz Kisiel is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 13
Downloads: 4
Uploads: 0
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 98
Tomasz Kisiel is on a distinguished road
Post Problem with waiting bus for passengers

Hi,
I would like to build simulation of airport boarding process and i have some problem.
I've looked about tasksequences on this forum and there are similar questions but I can't build task sequence doing following steps:
1. when boarding is open (1st passenger has checked boarding card) the bus should arrive to the gate.
2. bus is waiting for the rest of all passengers (bus have some capacity for example 70)
3. when bus is full or all passengers are inside, bus go to airplane
4. bus unload passengers near airplane
(if bus went because of full capacity then different empty bus is going for rest of passengers or the same bus come back for the rest of passengers.
I've tried to do this (terminal.fsm terminal.fsm) but i don't have any idea how.
I made something similar in different way (terminal2.fsm terminal2.zip) but in this way it dosen't work fine too. and i have to do this with tasksequence because it has then matched to the rest of the model.
can someone help me?
  #2  
Old 04-17-2012
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

Hi,

sounds as if the solution you are looking for is to create one tasksequence for TE to go to the gate. Arrived, it should load all passengers that allready are available (this you can code in Networknode Triggers). Check if Capacity of TE is reached, if not do nothing. When capacity is reached create Tasksequence to travel to it´s aim (maybe in the OnLoad Trigger of TE).
Didn´t got to much time to have a deep look into your model, but I think you are not working with creating Tasksequences at all!?
For your special task you will have to use Tasksequences.

Attention! Some Networknode Triggers are fired twice, so go sure you create Tasksequences only once!

Greetings
__________________
Hemmi
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Tomasz Kisiel (04-19-2012)
  #3  
Old 04-17-2012
Tomasz Kisiel Tomasz Kisiel is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 13
Downloads: 4
Uploads: 0
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 98
Tomasz Kisiel is on a distinguished road
Post

Sebastian.
Thank you for your advice. Tasksequence for me is a magical space. I am a beginner and I carrying out this model for my thesis.
I put in the OnEntry of boarding processor to travel TE to the gate and in OnEntry of gate queue to load passenger and in OnLoad of TE to checked if is full and if yes then TE travel to the airplane.
Model works well for the one GATE and one TE but I can not program it so that everyone go out from TE terminal.fsm .
Unfortunately, if there are 2 TE or If the boarding is in 3 GATEs in the same time buses run between the different GATES and I need to do that only one of available TE is in one GATE on one time. And if first TE has departured GATE then second TE can travel there for the next passengers or the same TE come back to this GATE.
Ultimately, my model will have 12 GATES and 3 TE.
I don't give up and i still think about how to solve this problem.
Best regards.
  #4  
Old 04-18-2012
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

Hi Tomasz,

think it is the right way to programm the code on a central place. But why on a TE!? Just use the Dispatcher and it´s OnMessage Trigger. Objects could send messages about thinks going to Dispatcher. Dispatcher starts the different tasks.
Didn´t think you are a beginner, because it just looked very well, what you´ve done.
But have a look, that you have to programm all Tasks your TE´s should do. This means your explained difficultys happens, because there are still standard functions mixed with your Tasksequences.
I´ve even mentioned that your TE´s unload only one passenger at airplane. Here you maybe will need a "for" Loop to unload whole content ;-)

Sadly I don´t got enough time to change your model. But I think you are on the right way.

Greetings
__________________
Hemmi

Last edited by Sebastian Hemmann; 04-18-2012 at 06:01 AM.
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Tomasz Kisiel (04-19-2012)
  #5  
Old 04-19-2012
Tomasz Kisiel Tomasz Kisiel is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 13
Downloads: 4
Uploads: 0
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 98
Tomasz Kisiel is on a distinguished road
Default

Hi Sebastian,

I use flexsim of three months and I'm looking some advice in other posts but I am not professional programmer and some things are too difficult for me.

I have never used the OnMessage function. If you have some time, could you tell which steps I have to try for the TE program? You may know some other post on this forum where it will be programmed in a similar idea or know of any tutorial may be recommended?

Anyway i've tried to do Loop:
if (content(current)==10) {
treenode ts = createemptytasksequence(current,0,0);
inserttask(ts,TASKTYPE_TRAVEL,outobject(centerobje ct(inobject(current,1),1),1),NULL);
for (int i=1; i<=content(current); i++) {
treenode ts1 = createemptytasksequence(current,0,0);
inserttask(ts1,TASKTYPE_UNLOAD,item,outobject(cent erobject(inobject(current,1),1),1));
inserttask(ts1,TASKTYPE_BREAK,NULL, NULL);
dispatchtasksequence(ts1);
};
dispatchtasksequence(ts);
};
but it doesn't work.

Best regards and thank you for your help.
  #6  
Old 04-19-2012
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

Hi,

the unload part you should put into one trigger of Networknode near unloadstation.
For using OnMessage Trigger you only have to send a message (using: sendmessage(); or better senddelayedmessage(); ) to an object.
Only difference between sendmessage(); and senddelayedmessage(object,0,object); <-(with a delay of 0) is the time when this message is send to the other object. Sendmessage will do the job as soon as the command is readen. Senddelayedmessage will do the job as soon as the whole code of trigger is done. But I think this you even can find out in Help.
Anonter important thing is, that you will have to create a reference to all objects you want to handle from OnMessage trigger.
I understand it´s hard to learn all these stuff, but do one step after the other and you will find a solution.

Maybe this thread can give you some direction about using Tasksequences:
http://www.flexsim.com/community/for...ead.php?t=1153
__________________
Hemmi
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Tomasz Kisiel (04-19-2012)
  #7  
Old 04-19-2012
Tomasz Kisiel Tomasz Kisiel is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 13
Downloads: 4
Uploads: 0
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 98
Tomasz Kisiel is on a distinguished road
Default

Thank you Sebastian for this thread. Now i know how can i code tasksequence in networknode and I have some idea how can i do my model.

Best regards.
Tomasz
  #8  
Old 04-26-2012
Tomasz Kisiel Tomasz Kisiel is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 13
Downloads: 4
Uploads: 0
Thanks: 9
Thanked 1 Time in 1 Post
Rep Power: 98
Tomasz Kisiel is on a distinguished road
Post

Hi,
How can I make that TE is connecting with dispatcher by input port but if TE has arrived to some network node this connection is destroyed and TE become connected with different object by central port?

Tags
airport bus boarding


Thread Thread Starter Forum Replies Last Post
How to control the gap between the trucks on waiting for Gantry Crane? syseo Container Terminal (CT) Library 2 01-10-2013 09:32 PM
Modeling waiting trucks for being serviced Shahin Gelareh Q&A 2 02-01-2012 09:54 AM
how to control the gap bettween TaskExecuters on waiting for unloading? Ilivid zheng Q&A 6 02-23-2011 10:21 PM
State Waiting for Operator Nico Zahn Q&A 6 01-15-2009 09:00 AM
Waiting to dispatch other task. Enver Burak KORCAK Q&A 2 09-15-2008 04:39 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.