Jump to content

Difference between entity, model entity and defaultEntity


Nadine

Recommended Posts

Entity is an object definition and is a base object, i.e. one of the fundamental building blocks that other objects are built with. Its properties and states are defined as part of the Simio engine and are not under user control. Costs and Priority are examples of states that are defined on Entity.


ModelEntity is an object definition derived from Entity. It contains all of the properties, states, and behaviors that an Entity has, plus more. For example a ModelEntity contains Picture and Animation states and the OnEnteredFreeSpace process that are not defined on Entity.


DefaultEntity is not an object definition, but is rather an Instance of the ModelEntity object definition. So it has all the characteristics of a ModelEntity, but each instance can have its own property values.


You can see in this screen shot (from ModelEntity > Definitions > States) that Priority is a state inherited from Entity, but Picture is a state defined on ModelEntity.EntityStates.PNG.21bd649eca8d29349dce58fb269663d9.PNG

You might search Help on Hierarchy for additional information.

Link to comment
Share on other sites

To continue the above post regarding referencing.


Rule 1) States are generally referenced in the form ., for example Entity.Priority.


Rule 2) You can only reference a property or state at the level it was defined, or on an object derived from that. For example Entity.Priority and ModelEntity.Priority are both valid. But Entity.Picture is not valid because the Picture state was defined on ModelEntity and is not defined on Entity.


Rule 3) For the greatest flexibility it is best to use the object definition on which the state was defined. For example you will note that if you use a Ranking Rule of FIFO on a Server (or many other objects) the default expression is Entity.Priority. You could easily change that to ModelEntity.Priority and it would work equally well in most models.

But if your model has another entity definition, say SpecialEntity, that went through that Seize, you would get an error. Why? Because when Simio attempted to evaluate the expression ModelEntity.Priority it would fail because SpecialEntity is not a ModelEntity. But the default expression Entity.Priority will still work because SpecialEntity is derived from Entity and in fact is an Entity.

Link to comment
Share on other sites

Thanks a lot! Now I understand that differences. But it's not yet clear to me when I have to use the instance name (defaultEntity) to refer on any state or property. Could you pls give me an example for this case?


Regards,

Nadine

Link to comment
Share on other sites

×
×
  • Create New...