holgerbrandl / kalasim

Discrete Event Simulator
https://www.kalasim.org/
MIT License
69 stars 10 forks source link

Component creation order is wrong in clerk queue example #2

Closed holgerbrandl closed 3 years ago

holgerbrandl commented 3 years ago

The correct event order when running Bank_1_clerk.kt should be

   30       0.000 main                 current                              
   32                                  customergenerator.0 create           
   32                                  customergenerator.0 activate         scheduled for      0.000 @    6  process=process
   33                                  clerk.0 create                       
   33                                  clerk.0 activate                     scheduled for      0.000 @   21  process=process
   34                                  waitingline create                   
   36                                  main run +50.000    

but instead, we obtain

.00                            main                     DATA        create
.00   main
.00                            CustomerGenerator.1      DATA        create
.00                            CustomerGenerator.1      DATA        activate
.00                            main                     CURRENT     run +50.0
.00   CustomerGenerator.1
.00                                                                 create ComponentQueue.1
.00                            Clerk.1                  DATA        create
.00                            Clerk.1                  DATA        activate

The component queue and the clerk should be created before main is rescheduled.

This problem is caused by https://github.com/InsertKoinIO/koin/issues/801

holgerbrandl commented 3 years ago

fixed by updating to koin v2.2.0