Obtain Processor and Operator Status

Obtain Processor and Operator Status

jpanY7K8B
Explorer Explorer
134 Views
5 Replies
Message 1 of 6

Obtain Processor and Operator Status

jpanY7K8B
Explorer
Explorer

I am using Process flow a lot for most of the simulation projects. But I am always struggle to get a resource's status summary. I created this simple model with both Processor and Operator resources in process flow linked to 3D object. But I could not get correct status summary. I appreciate if you can please share some solutions. 

 

jpanY7K8B_0-1760055675683.png

 

0 Likes
Accepted solutions (1)
135 Views
5 Replies
Replies (5)
Message 2 of 6

moehlmann_fe
Enthusiast
Enthusiast

When you release a resource the label it was assigned to is removed from the token. You need to reset the state before you release it or copy the label to still have a reference to the object afterwards.

0 Likes
Message 3 of 6

jpanY7K8B
Explorer
Explorer

@moehlmann_fe, Can you please help share an example? I am still confused. Thank you

0 Likes
Message 4 of 6

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

When the token acquires a resource, a reference to the resource object is stored in the label you specify in the "Acquire" activity. You use these labels to set the objects' state. Now, as I said, releasing the resource removes the label from the token, so you can no longer use them to refer to the objects. Because the "Set State" option uses the deprecated "setstate()" command instead of the newer syntax ("object.setState()") this does not prompt an error message, so you might not realize that something went wrong.

moehlmann_fe_0-1760185033408.png   

moehlmann_fe_1-1760185044474.png

  

0 Likes
Message 5 of 6

jpanY7K8B
Explorer
Explorer

It is working, thank you. @moehlmann_fe If I may extend my question, how can I apply a Time Table to the resource? let's that both Processor and Operation work 9-5 M-F.

0 Likes
Message 6 of 6

moehlmann_fe
Enthusiast
Enthusiast

This would be easiest when all objects are represented by task executers. Why? Because then you can forego acquiring them as a resource and simply use a Create TS activity that waits until the created task sequence was started. Task executers stopped by a time table won't start new task sequences, so the tokens are effectively stopped as well.

Note: When a very large number of pending task sequences accumulates the simulation becomes quite slow. In that case do keep the Process Flow resources. The objects will get acquired while off schedule but the task sequence will still not start. If you do this, remove the dispatchers and create/dispatch the task sequence directly to the acquired object.

0 Likes