Jump to content

jzhou

Members
  • Posts

    530
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by jzhou

  1. You can not directly move a entity currently still ON the Path to a node...
  2. It is a feature of Enterprise or Professional version, called Table State
  3. a! You may refer to Simbits ‘serverusingtasksequcencewithdatatables_sequencedenpendentSetups
  4. can you show me the table, how the workers shift/workschedulues look like? you can fill in some dummy time....if confidential.. would like to figure out a solutions based on your data sample...
  5. you can create many customised workschedule and assign to each worker ,like below screenshots,
  6. finally I can use the addIn, it's kool stuff.thanks Glen.
  7. If you only assign the four entities ,it's easy. you can use a statevariable as a counter and use Decide to check the 1st one, the 2nd one, etc..
  8. please don't use many object to represent female or male. just use one Entity class. you can define a statevariable called gendertype to the Entity Class. then either assign it to 0(male), or 1(female). in the source ,just create the Entity ,and assign ModelEntity.gendertype with random distribution such as Uniform(0,1)..or any empirical distribution you like. If statement : if ModelEntity.gendertype=0 , then Do something.. For the symbol. you can just use the symbol index as ModelEntity.gendertype, and make sure the index 0 is a female symbol and 1 is a male symbol..
  9. Editing Vehicle behavior can be complex. I subclass it and do some modification , as attached. However, this example must be refined ... Model1.spfx
  10. Hi, You can even use process logic in Evaluating Seize Request AddOn on server. and set Token.ReturnValue=FALSE if the incoming ModelEntity does not fit your criteria..
  11. Please kindly post your model here so that we can try to debug for you...
  12. Dear Flora, I build a sample model to interrupt a task and afterwards resume that task with the remaining processing time pls kindly find the attched model. thanks! I am not quite understanding your approach, however the error you mentioned is the token is not targeting at Worker, thus the error... InterruptingTaskExample_byJeff2.spfx
  13. cannot download ,download a few times , files got corrrupted. do we have more fast download link?thanks a lot!
  14. good job! Running in 10.173,there is a runtime warning of status label ...
  15. you can write a sorting algorithms with process steps. I attached one example (built in sprint 10.171) I wrote two weeks ago. It use simple Insert Sorting algorithms, the purpose is : a timer trigger the sorting process and sort the vectors in assending way. then excecute according to the sequence...I only write one cycle, you should resetting some values in the algorithm to make it work ... This is Before Sorting: 26,25,16 ,18,22 This is After Sorting :16,18,22,25,26 This is the main sorting process Resetting values in algorithms(not in attached model). Hope it helps. You can wrting whatever sorting algorithms you want, like shell algorithms, bubble algorithms, cocktail algorithms, name a few...which can be reusable in your future projects. BTW: if you wrote this algorithms in C#, it takes 26 lines, we use 18 steps...can be less.. or just as David suggests, you can write a customised sorting STEP using simio C# API , it makes model look neat... -------------------------------------------------------------------------------------------------------------- static void InsertSort(int[] dataArray) { for (int i = 1; i < dataArray.Length; i++)//外层循环用来确定待比较的数值 { int iValue = dataArray; //保存索引1的位置,不然会被覆盖 bool isRightInsert = false; for (int j = i - 1; j >= 0; j--)//内循环确定最终的位置 { if (dataArray[j] > iValue) { dataArray[j + 1] = dataArray[j]; } else { dataArray[j + 1] = iValue;//如果0索引位置比1索引位置小,就不用移动, isRightInsert = true; break; } } //标签在循环后面,先循环确定n-1个数的顺序,最后与dataArray[0]进行判断0索引位置是否已经前移,是的话iValue为最小元素被插入到0号索引位置 if (isRightInsert == false) { dataArray[0] = iValue; } } } Model-sorting.spfx
  16. feel wonderful helping others and feel greatly honored for such an recognition!Thank you!Simio team!
  17. i posted a example model for your reference http://www.simio.com/forums/viewtopic.php?f=6&t=2866
  18. MultiFailureServer.spfx [/img] in response to the above thread: http://www.simio.com/forums/viewtopic.php?f=1&p=9187#p9187
  19. What kind of demo you want, hospital related??
×
×
  • Create New...