Pseudo Code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pseudo Code

NetLogo-Users mailing list
Dear All
 

 I need help on converting this pseduo code to netlogo code
 

 

 Create 53 employees (50 specialists, 2 managers, and 1 director)
 Ask each employee {
 Set the 30-tuple, with each dimension takes a value of -1, 0, or 1 with equal probabilities
 Set learning rate p1 = the learning rate treatment of the current simulation session
 If I am a manager
 [Set learning rate = 1.25 × p1]
 If I am a director
 [Set learning rate = 1.5 × p1]
 If the current workplace rigidity treatment = “rigidity”
 [form a tie with a randomly chosen superior]
 Else
 [form a tie with another randomly chosen employee]
 }
 Create the ITSS
 Ask the ITSS {
 Set the 30-tuple, with each dimension takes a value of 0
 Set the flexibility p2 = the ITSS flexibility treatment of the current simulation session
 }
 Create the work requirements
 Ask the work requirements {
 Set the 30-tuple, with each dimension takes a value of -1, 0, or 1 with equal probabilities
 }
 Run one tick of the model clock {
 Ask the ITSS [adapts to the majority practices of employees]
 Ask each employee [learn from the ITSS and learn from each other (the order of these two actions is randomly
 determined)]
 }
 Repeat the “Run one tick of the model clock” procedure 12 times
 Set assimilation of the ITSS = average (the proportion of identical values between the 30-tuples of the ITSS and the
 employees)
 Set IT-based work performance = average (the proportion of identical values between the 30-tuples of the work
 requirements and the employees)
 

 Thank you
 

 

 Albert