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-24-2016
Johanna Klietz
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Default Travel to homelocation

Hi all,

I want my TE to travel to a specific location when there's no tasksequence available. I tried to use the onresourceavailable trigger with "travel to a homelocation", but then the model stops when the TE arrives at this controlpoint (see attached model).
How can I solve that problem and redirect the TE when there's a task available?
Thanks in advance!
Attached Files
File Type: fsm Modell2_3.fsm (41.6 KB, 422 views)
  #2  
Old 02-25-2016
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

When I open the model and run it it crashes Flexsim completely.
And when I open it and look on the taskexecuter there is no code on the OnResourceAvailable.

So not so easy to say anything about your model. Btw I use version 7.7.4
  #3  
Old 02-25-2016
Johanna Klietz
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Default

I'm sorry for wasting your time, uploaded the wrong one.
Attached is a smaller test model where on TE has the OnResourceAvailable logic.
Attached Files
File Type: fsm Modell2.fsm (26.0 KB, 422 views)
  #4  
Old 02-26-2016
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hi Johanna,

Connect control points(home locations) to the dispatcher with the 'A' key.A blue line will appear when the connection is made correctly.

If you want to send it to a home location then in the on Resource available trigger you need to change the home location default centerobject(current,1) to inobject(current,1) because the AGV is connected to dispatcher through ‘A’ connection and the condition to send the AGV to home is

content(gettasksequence(resource))==0 by default

If the AGV does not have any tasksequence in the tasksequence queue then the AGV goes back to the home location.You need to change the code in the option travel to home location a bit to run the model.Here is the modified one.
Code:
  treenode dest = inobject(current, 1);
  int condition = content(gettasksequencequeue(resource))==0;
  if (condition) {
  // this prevents stack overflow (I only want to travel there if I'm not there yet)
  if (fabs(time() - getlabelnum(current,"f_travelhome_time")) > 0.01) {
                addlabel(current,"f_travelhome_time");
                setlabelnum(current,"f_travelhome_time",time());
  treenode ts = createemptytasksequence(resource, 0,0);
  inserttask(ts, TASKTYPE_TRAVEL, dest, NULL, 0, 1);
  // and for good measure to absolutely make sure it doesn't get into stack overflow
  // I do a delay of 0. Where otherwise stack overflow would occur, here the model
  // will simply not progress.
  inserttask(ts, TASKTYPE_DELAY, NULL, NULL, 0, STATE_IDLE);
  dispatchtasksequence(ts);
  return1;
         }
  }

Last edited by sagar bolisetti; 02-26-2016 at 11:46 AM.
The Following User Says Thank You to sagar bolisetti For This Useful Post:
Johanna Klietz (02-26-2016)

Tags
agv, homelocation, taskexecuter


Thread Thread Starter Forum Replies Last Post
Set up end speed for travel Yiheng Feng Q&A 2 05-27-2013 09:36 AM
difference between offset travel and travel? zhang xin Q&A 2 08-20-2012 07:11 AM
the way of travel to the rack Nicky Yen Q&A 4 04-16-2012 04:12 AM
Problems with using "Travel to Homelocation" Sebastian Hemmann Q&A 2 12-09-2010 05:57 AM
Offset Travel AlanZhang Q&A 16 04-18-2008 10:25 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.