Universities Selection Model
Model was written in NetLogo 6.2.2
•
Viewed 169 times
•
Downloaded 11 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
breed [persons person] breed [universities university] persons-own [target familyincome enrolled?] universities-own [highreputation? reputation enrolledstudents] ; reset button to setup clear-all setup-patch setup-university setup-person reset-ticks end ; setup the patch colors to city and urban areas to setup-patch ask patches with [pxcor < -6 AND pycor >= -16] [ set pcolor green ] ask patches with [pxcor >= -6 AND pycor <= 16] [ set pcolor cyan - 1 ] end ; set up the universities based on reputation - it has different colors based on reputation to setup-university create-universities number-of-universities [fd max-pxcor setxy random-xcor random-ycor] ; set the universities shape and default color ask universities [ set shape "house two story" set size 2.6 set color white ; high reputation with white color, moderate reputation with yellow and low reputation with orange ; reputation is based on rank of 30 university - low rank means high reputation and vice versa set reputation random 100 * university-rank / 100 if (reputation >= 0 and reputation < 10 ) [set highreputation? true] ifelse (reputation >= 10 and reputation < 19) [set highreputation? true set color yellow][ ifelse (reputation >= 19) [set highreputation? false set color orange + 1 ][set highreputation? true]] set enrolledstudents 0] end ; setup students color and shape and the target to setup-person create-persons number-of-students [setxy random-xcor random-ycor set shape "person" set size 1 set familyincome one-of (range 500 6000) set color blue - 2 set target 1 set target one-of universities face target ] reset-ticks end ; movement of students between universities to select their target based on distance as well to move-students ask persons [ if distance target = 0 [ set target one-of universities face target ] ifelse distance target < 1 [ move-to target ] [ fd 1 ] ] end ; pick the target university based on family income, rank and distance, the university will be selected. to select-university ifelse (familyincome > income-level and color = white ) [ set target one-of universities with [[familyincome] of myself] with-max [reputation] ] [ ifelse (familyincome < income-level and color = yellow) [ set target min-one-of universities with [[familyincome] of myself - (distance myself) / 100 > 0] with-max [reputation] [distance myself]] [ifelse (familyincome < income-level and color = brown) [set target min-one-of universities with [[familyincome] of myself - (distance myself) / 100 > 0] with-min [reputation] [distance myself]] [set target min-one-of universities with [[familyincome] of myself - (distance myself) / 100 > 0] [distance myself] ] ]] if target != nobody [ move-students] set enrolled? TRUE end ; run the model by calling select university and move students to target to go ask persons [ select-university move-students] ask universities [ calculate-enrolledstudents ] tick if (ticks = 50) [stop] end ; proc to calculate the count of enrolled students to calculate-enrolledstudents if (enrolledstudents < number-of-students) [set enrolledstudents enrolledstudents + 1] end
There is only one version of this model, created over 2 years ago by Razan Nofal.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Universities Selection Model.png | preview | Preview for 'Universities Selection Model' | over 2 years ago, by Razan Nofal | Download |
This model does not have any ancestors.
This model does not have any descendants.