Nadine Posted October 13, 2013 Share Posted October 13, 2013 Hello, could you please explain the difference between entity, model entity and the defaultEntity and give me examples where I have to use which reference in an expression? Thanks a lot! Regards Nadine Link to comment Share on other sites More sharing options...
jzhou Posted October 14, 2013 Share Posted October 14, 2013 Entity includes Vehicle Object class, ModelEntity does not.... DefaultEntity is a default ModelEntity instance... Please correct me if not right... Link to comment Share on other sites More sharing options...
dsturrock Posted October 14, 2013 Share Posted October 14, 2013 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. You might search Help on Hierarchy for additional information. Link to comment Share on other sites More sharing options...
dsturrock Posted October 14, 2013 Share Posted October 14, 2013 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 More sharing options...
Nadine Posted October 18, 2013 Author Share Posted October 18, 2013 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 More sharing options...
Recommended Posts