FlexSim Community Forum

FlexSim Community Forum (https://archive.flexsim.com/index.php)
-   Flexsim Student Forum (https://archive.flexsim.com/forumdisplay.php?f=135)
-   -   Distance and set a condition (https://archive.flexsim.com/showthread.php?t=3349)

SayedMohammad Ayati 05-13-2016 07:09 AM

Distance and set a condition
 
Hi,
My problem is how to set a condition on AGV that when it passed a certain distance then travel to object.
Indeed, there are codes which say how to have distance, but it is not working in Trigger in UnLoad as taskexecuter to set this condition,.
My problem is : if (distance>100) then Travel to object... "100 meter"
So thanks

SayedMohammad Ayati 05-13-2016 10:00 AM

1 Attachment(s)
according to may last post, I have attached this,
indeed I have considered a threshold=50 but AGV pass this amount however it is traveling to the object.
what should I do?
also I am looking for a method to make two different label, once showes the total travel and second reset when travel from object to resource.
Can you please help me.

mark.gormley 05-16-2016 01:51 AM

Hi,


I have a few pointers for you:

  • You will want to set a reset position on the TaskExecutor5 so that he always begins from the same position. This will ensure the model behaves the same way each time you run. Right click on it to do this.
  • When you create a task sequence it needs to be dispatched, your code is missing the dispatch step.
  • You may want to make the new task sequence a higher priority than the one from the source so that TaskExecutor5 does the new task before any other tasks

SayedMohammad Ayati 05-16-2016 03:32 AM

as you see in coding, it can understand that I am beginner, could you please clarify more about the dispatching and so on

mark.gormley 05-17-2016 01:58 AM

Have a look at an example task sequence, you can find one by selecting "Task Sequence Example 1" from any objects use transport trigger pick list then exploring the code.

The last section of the task sequence dispatches it:
dispatchtasksequence(ts);


All times are GMT -6. The time now is 08:37 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.