Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Video 092 and Video 093 (Go to Video Tutorials)

...

Assign Maya Attribute by Agent Type

We can use Miarmy > Knowledge Perception > Maya Attribute > Attribute Manager… and select the Agent Group node you want to operate, and then add or edit the maya attribute for this type of agent.

...


After assigning, at the beginning of simulation, based on the example above, all the agents which type is "loco" will contain 2 maya attribute, the names are "aaa" and "bbb" and the value of "aaa" is a random number between 0 and 10 and the value of "bbb" is random number between -5 and 5.


Assign Maya Attribute by

...

Attribute Host Managers

We can add some attributes onto the Attribute Host. And then, with that host node:

  • We can assign the maya attribute to a lot of different type of agents altogether
  • Also we can assign the maya attribute by place node (no matter what type of them)

 

Agent

...

Attribute Host Manager

For creating an Attribute Host, we just need use Miarmy > Knowledge Perception > Maya Attribute > Create Attribute Host, and then we still need to use Attribute Manager to add/edit the variable attribute on the host node.


Create host node and add 2 attributes onto it


For assigning the attribute to the agent, we need link it to agent group node or place node. We need to the Attribute Connection Editor which at Miarmy > Knowledge Perception > Maya Attribute > Attribute Host Linker.

As the below image shown, the left if the attribute host we need select and then edit this link in the Attribute Host Linker. The right-hand side window is the Connection Editor. There are 2 tables, the right one contains the all the agent types and the place nodes inside your open scene, we can select some of them and click the "<<< Add Link(s)" to the left side. The left side shows the place node or agent type node which already connected to the Host node.

...


After setting up, based on the above example, when simulation begin the agent type "snake" and also all the agents from "McdPlace1Shape" will contain the variables attributes "ccc" and "ddd" and the values are "ccc" between 0 and 10, and "ddd" between -12 and 12.

...