question

jacopo-r avatar image
0 Likes"
jacopo-r asked Jordan Johnson commented

Instance of AGV connecting to wrong control point when creating

Hi,

In my model (see attached Instances_ControlPoint.fsm), I have an AGV connected to a control point with Traveler AGV connection. I have noticed that when I create an instance of this object, the new instance will have a TravelerAGV connection with the first control point I have ever created in the model. In this case, you can see that I have three control points in order of creation (CP1, CP2, CP3), and if I connect the template AGV (TaskExecuter1) to the CP2 and create a new instance with the "plus" button, then the AGV instance will be connected to CP1, which is the first one ever created.

I played around with this a bit and the only thing I figured out is that all instances (even of different objects) will be connected to the first control point ever created.

In case the control point I want the objects connect to, is not the first one ever created, is there a way or some settings to set in order to have all instances connected to the same control point as the template is? What I am aiming for is to have all AGVs connected to the same CP, therefore they will be one of top of each other. Afterwards I will place them wherever I need.

Thanks

FlexSim 22.2.2
templateinstancesagv instances
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 Jordan Johnson commented

I can't say whether this is intentional or an oversight.

@Jordan Johnson Is this something that might get adjusted/fixed in the future?

For now you can run the code below to switch the resetCP of all instance objects to that of the template (adjust the first line to point to the template if you use this in other models)

Object template = Model.find("TaskExecuter1");
Object templateResetPoint = AGV(template).resetCP;

treenode instances = template.find(">templateinstances");
for(int i = 1; i <= instances.subnodes.length; i++)
{
    Object instance = ownerobject(instances.subnodes[i].value);
    AGV(instance).resetCP = templateResetPoint;
}
· 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.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
This is a good question. I'll add it to the dev list so we can review this behavior.
0 Likes 0 ·