yes, that is indeed interesting.
First, I assume you are working with our latest version of Enterprise Dynamics ED 10. If not please let me know as the attached demo model won't work for you.
The HumanResource (HR) atom is by default intended to either use the "walk" option, then the HR moves along a path network (or offroad) or the HR does not actually walk but then you can attach it to a product and see him move along that product.
So, what you want here is a mix of both.
Therefore, you need to switch that "walk" option (attribute "UseTravel") off when the HR arrives at the first Server (task start) and switch it on when it leaves the second Server (task end).
The easy part is switching it on at the end of the task. Here you can use the trigger "When freed" (see Gui of HR). Just switch the attribute value by using the piece of code "HumanResource_SetUseTravel(c, true)" that activates the travel on the network again and you have to reset some connections of the HR that it starts with the correct first node of the network "Connect(2, c, 0, out(1, c)), Connect(3, c, 0, out(1, c))". The starting node is the node that you select when pressing the button "Link to Network". In the code I set output channels 2 and 3 to my starting node that will be the first node again for the HR after a task has been finished (at Server 2).
For the arrival of the HR at the task start location (Server 1), unfortunately, we do not have any trigger. Therefore, I have to go into the code of the HR itself. If you have access to the "Atom Editor" (Display > Atom Editor) you can see the changes here.
The changes have been made within the HR model atom called "HumanResource7". Within the Atom Editor go to Events sheet and there to OnEvent eventhandler. At event "HumanResource_EVENTCODE_ARRIVEATTASKLOCATION" at line 39 I added the only piece of code necessary "HumanResource_SetUseTravel(c, false)" to switch the "walk" option off.
So, that should be it I guess. Please, give it a try and let me know. Success.
- (69.34 KiB) Downloaded 3 times