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

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

@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.

Yuito.Y avatar image Yuito.Y commented ·

Hi, Felix

Thank you for your answer.
We were able to solve the problem by the method you gave us.

However, this solution did not work for the other side of the same trigger, moving to x,y,z.
Please let me know how to solve this one.

Best regards.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Yuito.Y commented ·
You will just have to make sure to choose coordinates along the center of the ASRS track. Or you use similar code to above to project the coordinates to the ASRS' local coordinates system, set the y-coordinate to lie in the center and project the new vector back to the model coordinates.
0 Likes 0 ·