question

Yuito.Y avatar image
0 Likes"
Yuito.Y asked Felix Möhlmann commented

Behavior of asrs vehicles

asrs_OnResourceAvailable_model_20241028.fsm
画面録画 2024-10-28 182006.mp4
If I return to the home location when a task is available in the object's trigger, ASRS would move all the time.
Is this movement intended? I want it to stay there, unmoving.
Please let me know if you have a solution.

FlexSim 24.0.4
asrsasrs vehicle behaviour
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

I assume it's not intended, but that's how the code works for task executers without navigator. If the last time the code was called was longer than 0.01 model time units ago (which makes an implicit assumption that seconds are used) a task to move to the target location is dispatched. Because the ASRS will first retract the slide before extending it again to reach the target location, the movement takes longer than this time and is repeat again indefinitely.

To fix this, either use coordinates that lie along the centerline of the ASRS' track as the home location or adjust the code to automatically only travel along the track and don't extend the slide.

capture1.png

  1. ...
  2. else { // task executers without navigators (like the crane)
  3.         // this prevents stack overflow (I only want to travel there if I'm not there yet)
  4.         if (fabs(Model.time - current.labels.assert("f_travelhome_time", 0).value) > seconds(0.01)) {
  5.             current.f_travelhome_time = Model.time;    
  6.             TaskSequence ts = TaskSequence.create(resource);
  7.              // use offset travel instead of regular travel tasks
  8.             Vec3 destLoc = dest.getLocation(0, 0, 0).project(dest.up, current);
  9.             destLoc.y = -current.size.y/2;
  10.             destLoc = destLoc.project(current, current.up);
  11.             ts.addTask(TASKTYPE_TRAVELTOLOC, NULL, NULL, destLoc.x, destLoc.y, destLoc.z);
  12.             ts.dispatch();
  13.             return 1;
  14.         }
  15.     }

@Jeanette F Could you please pass this along to the team, so this might get improved in one of the next versions?


capture1.png (24.6 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.