Tang3828 Posted July 30, 2023 Share Posted July 30, 2023 Hi I've got a model where the situation is like this: 1. 3 Worker: W1 W2 W3 2. 3 Server: S1 S2 S3 On Monday (work schedule), W1 will work in S1 in the morning and work in S2 in the afternoon. W2 will work on S2 in the morning and S1 in the afternoon. But on Tuesday, W1 will work in S2 in the morning and S3 in the afternoon. W2 will work in S3 in the morning and S2 in the afternoon. The server properties in the secondary resource are "select from the node list." But since the node list for S1 and S2 contain both W1 and W2, and they both have the same hour of working (4+4), when the S1 server seized the resource on Tuesday morning, instead of W1, W2 got allocated instead( W2 should be in S3). I have tried: 1. Using server selection goal to " smallest distance," but it didn't work since the worker will keep swapping the room every day 2. Giving each worker a new initial value and setting the selection goal to "smallest value," but they still have the issue. 3. Try setting idle action for the worker to stay at the node, but sometimes the worker will go to the wrong destination from the first entity, hence no one working in the other room. (2 worker stay together) Is there any method to realize this idea? Thanks in advance Link to comment Share on other sites More sharing options...
dsturrock Posted August 9, 2023 Share Posted August 9, 2023 Perhaps its a little late, but attached is a possible solution to your problem. This started out pretty simple. The problem was how to specify which server is serviced by which resource. One way to do that is a table. But since its changing over time I chose to use a time-indexed table, that is a table that knows about time and returns different data at different times. In this case, each row corresponds to 12 hours and each column specifies the resource needed by the respective server. As they say, "the devil is in the detail" and in this case the "devil" is that the specified resource may change between seize and release (e.g., seize at 11:59, release at 12:05). Simio doesn't like that and all the easy options re-evaluate the resource expression on release and so may try to release the wrong resource. One option would have been to create a custom server, but that seems to be overkill. Here is a somewhat simpler approach: 1) Add an entity state named MyResource and assign it at the last possible moment before use. This value will be used only for release. The assigned value is drawn from the table using an expression like Table1.S1Resource.TimeIndexedValue.Object. Note that the .timeindexedvalue indicates to get the value associated with the current time. And the .object at the end is used to tell Simio to return that value as an object not a number. 2) Use Secondary Resources - Other Resource Seizes to seize the name specified in the table using the same expression above Table1.S1Resource.TimeIndexedValue.Object. 3) Use Secondary Resources - Other Resource Releases to release the resource saved in MyResource. TimeBasedWorkerSelection.spfx Link to comment Share on other sites More sharing options...
Recommended Posts