jfulton Posted September 12, 2019 Share Posted September 12, 2019 Just curious if there's an easier way to go about doing this... Long story short if I am representing multiple physical positions within capacity of a server and I create my own Gantt outside Simio, it's important for me to know WHICH resource (in this case which one of the servers) is utilized by each entity. I was trying to utilize Entity.Location.Parent.Server.Processing.Contents.IndexOfItem( Entity ) and assigning it to a state on the entity and then ultimately writing to an output table. However, this doesn't seem to be working accurately. It may be a timing issue on when this step is called, but is there a default function I'm just not aware of that could be of assistance? Link to comment Share on other sites More sharing options...
asneath Posted October 17, 2019 Share Posted October 17, 2019 Hello, in general it sounds like your approach is good. You could use either an Object Reference State Variable or String State Variable (called something like 'WhichServer'), defined on ModelEntity, depending on the expression you use to make the assignment. For instance, with an Object Reference State Variable you could use 'ModelEntity.Location.Parent.Server'. With a String State Variable you would use 'ModelEntity.Location.Parent.Server.Name'. In terms of timing, you could make the assignment really anytime the ModelEntity is in the Server. You might use the Servers' On Entering State Assignments for example. Then somewhere downstream, perhaps the Entered Add-On Process at a Sink, you could use Add Row and Assign steps to populate the Output Table. Again, just be mindful to make the column types (Object Reference State Variable or String State Variable) match up with the assignments you are making. For instance you might have a String State Variable column named 'Entity' and, in the Add-On Process at the Sink, you assign 'OutputTable1.Entity' the New Value of 'ModelEntity.Name'. Then you could have an Object Reference State Variable column named 'Server' and in the same process assign 'OutputTable1.Server' the New Value 'ModelEntity.WhichServer' (since it is also an Object Reference State Variable). The result will be a list of each ModelEntity (Name) and the Server that processed it. Hope this helps! Adam Link to comment Share on other sites More sharing options...
Recommended Posts