GHao Posted January 21 Share Posted January 21 Hello, I need check state variable of object/models in a list. Is there any method to use like a "for loop" Thank you! Link to comment Share on other sites More sharing options...
jzhou Posted January 21 Share Posted January 21 (edited) You are not able to use an index to return an item in a List. I would suggest using a Table instead of a List Edited January 21 by jzhou 1 Link to comment Share on other sites More sharing options...
ttarkan Posted September 8 Share Posted September 8 You can create a new object reference state variable in vector format then assign object reference to the any row of this array using assign step. When choose your vector type variable Simio will let you enter the row number as well in the assign step as seen in figure below. When you want to refer to second row of a vector type state variable use the following syntax: ObjectReferenceState1[2] When you want to refer to second row and third coloumn of a matrix based variable use the following syntax: ObjectReferenceState1[2,3] That is inside the squared brackets, first value indicates row and second value indicates coloumn index of the variable. Then you can use loop to increment a token based variable and decide step to search a vector type variable. But I suggest creating a table for these objects and using search step as well. Link to comment Share on other sites More sharing options...
Recommended Posts