FOUADELALBI Posted April 11, 2016 Share Posted April 11, 2016 Hello, I am just trying to improve my model. The worker is performing task on server 2 and can transport parts from server 1. Now, I want the worker to transport different parts based on their weight, so the travel time will be different. Example, when it is part A, so the travel time will be 5s or 10s for part B. Thanks for your help. Model12.spfx Link to comment Share on other sites More sharing options...
dsturrock Posted April 13, 2016 Share Posted April 13, 2016 The problem is easy without the worker - simply add a column to your table called MoveTime and reference Table1.MoveTime in the TimePath. When you have a worker that makes it a bit harder because you can directly use that time, instead you must let the worker specify the time. I would probably subclass the worker and make my own worker with a custom state called MoveTime, but for ease of explaining, lets just use worker priority (an existing state of type real) to hold the desired move time. On the Loaded process of the worker you need to assign the movement time to the worker: Worker1[1].Priority = Table1.MoveTime On the UnLoaded process of the worker you need to assign the movement time of the worker back to whatever his empty move time should be. Then on the TimePath, specify the time as Worker1[1].Priority Link to comment Share on other sites More sharing options...
FOUADELALBI Posted April 14, 2016 Author Share Posted April 14, 2016 Hi Dave, I tried to modify my model based on your suggestions but still have problems. The worker still does not take my Table1.MoveTime in consideration (worker should transport parts based on part type/travel time). I set the pathTime after the server based on Table1.MoveTime just to understand the logic and it works. Thanks for your help. Model121.spfx Link to comment Share on other sites More sharing options...
dsturrock Posted April 14, 2016 Share Posted April 14, 2016 You created a state on the model, which is of no use to you. Then you assigned to it the result of a logical expression (==), which would evaluate to either true or false, then you used that value as a time. Instead, either create a custom state on the WORKER (for clarity) or just use the existing priority state on the WORKER as I recommended (for expediency). Then assign that new state (or Worker1[1].Priority) to Table1.MoveTime. Link to comment Share on other sites More sharing options...
FOUADELALBI Posted April 15, 2016 Author Share Posted April 15, 2016 I tried to fix my model uppon yours suggestions but really can't. Could you make it a little easy please. Thank you. Link to comment Share on other sites More sharing options...
dsturrock Posted June 9, 2016 Share Posted June 9, 2016 Since you are a student, I am trying to guide you in the right direction to help you learn, rather than just giving you a model with the solution. I believe I have given you plenty of tips to help you solve this problem. I think you should consider carefully the advice I have provided, review appropriate help topics if necessary, and if you still don't understand something, ask specific questions. Link to comment Share on other sites More sharing options...
Recommended Posts