jaylee0300 Posted October 4, 2018 Share Posted October 4, 2018 (edited) Hello! Is there any possible way to change the order of queue depend on the datetime state variable? I have datetime state variable; jut simply set 2018-10-07 0:00:00 There are two entities called partA and partB and they are created following arrival table which has release column. So,partA and partB go to inputbuffer of a server, but partA just wait in the inputbuffer, not goes into the server until 2018-10-07. after the specific time, all of the partA move to the front of the inputbuffer and enter the server. I'm trying to do that using new station where partA is transfered from the inputbuffer to until 2018-10-07. Does anyone have an idea? or can anyone model this situation? Thank you. Jay. Edited October 4, 2018 by jaylee0300 1 Link to comment Share on other sites More sharing options...
jaylee0300 Posted October 5, 2018 Author Share Posted October 5, 2018 Change the question , capacity of a resource is zero until 2018-10-07. Until resource is available, partA is waiting in inputbuffer of server and partB is being processed. I don't know how to process the server , not waiting for secondary resource.. where I'm in stock is. .workstation is only waiting for a secondary resource because the associaed entity is in front of the queue. Does anyone know how to change the order of the entity in this situation? Link to comment Share on other sites More sharing options...
gocken Posted October 5, 2018 Share Posted October 5, 2018 Store only partA at a storage queue until 2018-10-07. Just at 2018-10-07 trigger a process (via a timer element) in which you should search "Storage Queue" for Part A. Transfer found entities into the inputbuffer of your server. Note that you can rank all the parts according to any criteria you defined (FIFO, SPT, modelentity.timecreated etc). Link to comment Share on other sites More sharing options...
jaylee0300 Posted October 6, 2018 Author Share Posted October 6, 2018 I thought station is better than storage. So, I use station and timer element, but It doesn't work. I attached brief model below.. Thank you. Resource.spfx Link to comment Share on other sites More sharing options...
gocken Posted October 7, 2018 Share Posted October 7, 2018 (edited) I have taken a glance at your model. At first look your timer element needs to be revised and you should not change the capacity a resource via a user-defined state variable. Use resource.currentcapacity state variable. I have revised your model and it looks like working. Due to having no more time I could not deeply analysed. see attached file. Resource.spfx Edited October 7, 2018 by gocken 1 Link to comment Share on other sites More sharing options...
jaylee0300 Posted October 8, 2018 Author Share Posted October 8, 2018 13 hours ago, gocken said: I have taken a glance at your model. At first look your timer element needs to be revised and you should not change the capacity a resource via a user-defined state variable. Use resource.currentcapacity state variable. I have revised your model and it looks like working. Due to having no more time I could not deeply analysed. see attached file. Resource.spfx Thank you:) I didn't know Resource.currencapcity state variable exists. Actually one of the problems in my model was PartA seize the workstation even though PartA is transferred to _StationForA. I Though It could be fine workstation is released before PartA is transferred, but the error message below apeared.. Link to comment Share on other sites More sharing options...
gocken Posted October 8, 2018 Share Posted October 8, 2018 Jay, I have attached the revised model. If you examine the model I have followed somewhat different way to achieve your goals. Resource (1).spfx 1 Link to comment Share on other sites More sharing options...
jaylee0300 Posted October 9, 2018 Author Share Posted October 9, 2018 The Workstation release problem is solved Thank you so much. By the way, is it impossible to change Time Offset in timer element during model running? I' ve just tried to dynamically change the state variable, SchduledDateTime during run-time, but the changed value is not considered .. I mean, I made a button which fire a event to change the value of ScheduledDateTime to later time. During running the simulation, I clicked the button and check the value to change using Status label. The problem is .. the value was changed in the status label, but the timer event cannot fire at the changed time. So.. I thought time Offset cannot be changed during model running.. Am I Right..? or Are there any ideas to solve it? Link to comment Share on other sites More sharing options...
gocken Posted October 9, 2018 Share Posted October 9, 2018 First define a state type property within your model. Then set its value as the state variable (which you are using for changing the value of time offset). Then, set timer offset property of timer element as a referenced property (choose state type property as the referenced property). Then when you click the button during the run (change the value of the state variable) the timer offset value should change. If this does not work do not hesitate for asking more. Note: be sure that you are using the right units of time offset propery (hours, minutes, seconds etc). Link to comment Share on other sites More sharing options...
jaylee0300 Posted October 10, 2018 Author Share Posted October 10, 2018 I've followed your suggestion, but still cannot change the timer offset .. I attached model below.. Thank you. Resource (1).spfx Link to comment Share on other sites More sharing options...
gocken Posted October 20, 2018 Share Posted October 20, 2018 If our approach has failed then lets try another approach. If the timer element's task is to invoke process 1 we could achieve this by another approach. See attached file. Do not forget to set delay time property of delay step. The model includes the logic roughly. You have to improve and complete the logic according to your goals. Resource (1) (1).spfx Link to comment Share on other sites More sharing options...
Recommended Posts