Jump to content

ResultLand

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by ResultLand

  1. Hi,

    I have a PersonEntity and I would like have different behaviour to it depending on whether it's a woman or a man (and obviously the symbols have to be correct).

    That's why I figured that 2 object instances would be a good approach, 1 male and 1 female. But now I wonder what my approach should be in the rest of the modelling.

    For example if I want to randomly spawn females and males from a source, how do I express this in the entity type, as I have to choose there between male and female already.

    How do I refer in expressions to the object instance? f.e. IF(male); do command

     

    So I have 3 questions:

    1) is my strategy good?

    2) how do I dynamically change the entity type in sources?

    3) how do I use object instances (or object types) in expressions like if-statements?

     

    Thank you so much in advance,

     

    Jarek

    Result

  2. 15 hours ago, alexdmolnar said:

    @ResultLand I understand. 

    I am not sure about the level of success you will have with these suggestions, but they may be worth a try. Nevertheless, in the time that you vet these processes, it may be just as easy to re-create your entity in the new model. 

    (1) You could try deleting the new model ModelEntity from the Navigation pane, then rename your entity of interest to ModelEntity.

    (2) From your old model, save a version which just contains the entity of interest (delete all other objects in the Navigation pane), then load the file as a library in the new model after deleting the default ModelEntity from the new model. Finally, use the subclass feature to subclass your entity of interest and use newly created entity (from the subclass feature of your entity of interest) in the model. Subclassing the entity will allow you to manipulate the entity object definition, as you would expect. 

    I hope this information helps. Thanks for using the forum.

    Regards,

    Alex

    Hi Alex,

     

    Option 1 doesn't work. Because the reference won't be correct.

    Option 2 might do something, but at this point it is easier to recreate the Entity i suppose.

     

    Thanks,

     

    Jarek

  3. 13 hours ago, alexdmolnar said:

    @ResultLand Care to share your model?

    Hi Alex,

    Thank you for replying. I unfortunately cannot share the model or a dummy model because of the confidentiality policy.

    I eventually got to the problem, I copy pasted an entity from class ModelEntity from an old model into another new model. The name ModelEntity exists in my new model. The internal reference to the ModelEntity class however, is still pointing to the old reference, so not to the ModelEntity of the new model. So the copy pasted entity listens to all inherited functions and methods of the Entity class, but any custom statevariables etc. won't be recognised. 

    So my question now is: How can I make the copy pasted entity point towards the correct ModelEntity Class Reference? 

    Note: If you try to "Convert to type" your entity will lose all symbols and so on, so that's not an option because that is the reason why I want to copy paste it. Also, the object reference list is empty fyi.

    Note 2: I'm new to Simio so I don't know if my reasoning is wrong, if so, please correct me.

  4. I have the same issue. I want to insert a State assignment on the output of a separator. I see my state variable appearing in the list, so when I pick ModelEntity.variablename I immediately receive 2 errors: the name was not found and the repeating data has errors, this does not happen with a standard state variable like f.e. ModelEntity.Picture. Version is 10.174.16986

     

    Thanks,

     

    Jarek

     

    image.png

×
×
  • Create New...