I would like to assign a value to an attribute (id) of an Entity that is on an EntityContainer. When I try to assign a numeric value to the Entity in the following way: this.obj.id==2, an error occurs that the attribute cannot be assigned to the entity. It looks like I can only assign something to the EntityContainer. Is it also possible to assign something to the Entity itself (on the EntityContainer)?
Thanks in advance.
Kind regards,
Jan-Hein van de Vliert
Harry
Continuing on the theme of EntityContainers, how do you update an EntityContainer's user defined attribute when loading loading the container with an Entity?
Use Case
The entities being carried have an integer attribute, Type, which can the values of 1, 2, 3 or 4. As each Entity is added from a different queue, I want the EntityContainer entity attribute, MinOfType to be the minimum of the EntityContainer's MinOfType value and the Entity that is being added Type value.
On loading the first entity, the MinOfType = Entity_1.Type.
On loading the second entity, the MinOfType is the minimum of EntityContainer.MinOfType and Entity_2.Type.
etc. Eventually the EntityContainer will have exactly eight entities being carried.
The EntityContainer_n.MinOfType attribute is used for branching later on the material flow, and as to set priorities in various queues.
Thanks in advance.
RiF
Harry
Is there a way to do this programmatically? The number of entities within a container can vary but I want same value applied to the same attribute on all entities within the container. Doing this without having to unpack and repack them all?
Basically I'm simulating blood samples (entity) that are now on a plate (container) for analysis. During processing each sample will receive some additives that are added to all samples on a plate (using attributes to assign these values).
Regards
Paul