Pseudo Code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pseudo Code

NetLogo-Users mailing list
Hello All
 

 I need help to convert this pseudo code to Netlogo Code, I have worked for a couple of days but its not working, can any please help?
 

 

 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
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Code

NetLogo-Users mailing list
On 7/10/2017 6:47 PM, [hidden email] [netlogo-users] wrote:
> I have worked for a couple of days but its not working, can any please help?

Work through Wurzer's tutorials:
https://www.youtube.com/playlist?list=PLjgV-BPJumxvDukI78A5nC-3U2TdsQOrT

hth,
Alan Isaac

Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Code

NetLogo-Users mailing list
Thank you

 I did that before but it did not help
 

 Thanks again :) Alan