question

Shinya O avatar image
0 Likes"
Shinya O asked Felix Möhlmann edited

Delete and Copy Group Members does not copy Travel offset option

Hi,

In Model Parameter Table, Delete and Copy Group Members does not copy Travel offset option. For example, a TaskExecuter is connected to AGV network and Travel offset option is "Do not travel offests for load/unload tasks". If you add this TaskExecuter to the group and increase the number in the model parameter table, the copys will become "Use navigator for offset travel".

Thanks in advance.

FlexSim 24.1.0
agvmodel ptarameter table
· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
@Shinya O, have you tried to customize a template object to insert objects for your group?
0 Likes 0 ·

1 Answer

Jeanette F avatar image
0 Likes"
Jeanette F answered Felix Möhlmann edited

Hello @Shinya O,

This has been submitted to the development team


· 4
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

If you're happy to edit the OnSet code of the parameter then you can find the line that recreates object connections and set the property afterwards:

applicationcommand("recreateObjectConnections", newObj, firstObj);  //existing line
newObj.setProperty("OffsetTravel",1);   //additional line.
0 Likes 0 ·
Shinya O avatar image Shinya O Jason Lightfoot ♦♦ commented ·

Thank you, Jeanette and Jason.

0 Likes 0 ·
Kai D avatar image Kai D Jason Lightfoot ♦♦ commented ·

Hello,

I have a similar but different question. Is it also possible to copy Triggers from one object to another with the "Delete and Copy Group Members" instruction? I didn't really find a way when trying the .setProperty function.
I have an AGV with two very specific Triggers and want to duplicate it up to 30 times without having to always copy and paste the triggers. Is there a way to accomplish this?

Thanks in advance.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kai D commented ·

'Generic' labels that can apply to any task executer should copy over. So I assume we are talking about triggers unique to AGVs, like "On AGV Finish Travel"? Those are not copied because the TE only becomes an AGV after being connected to the network. You can insert the following code at the same place mentioned in Jason's answers (after the applicationcommand), to copy over the triggers entered into the array.

// Copy AGV triggers
Array triggerNames = ["OnAGVFinishTravel"];
for(int t = 1; t <= triggerNames.length; t++)
{
                      
    // Create trigger node on new object
    treenode eventNode = function_s(newObj, "assertEventWithCode", triggerNames[t]);
    string propName = "Triggers." + triggerNames[t];
    function_s(newObj, "applyProperties", propName);
    // Find node on original object and copy value (code)
    treenode baseTrigger = AGV(firstObj).as(treenode).subnodes[eventNode.name];
    eventNode.value = baseTrigger.value;
}
1 Like 1 ·