Luisa opdracht
No preview image
Model was written in NetLogo 6.1.1
•
Viewed 43 times
•
Downloaded 9 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ ] patches-own [ faculteit ; sociale-omgeving ;; hoeveel interactie tussen studenten en hoeveel leuke evenementen technisch-niveau ;; hoog niveau qua technische/ beta-gehalte prestige ;; in hoeverre wordt de opleiding gezien als prestige sociale-omgeving-basis ;; hoeveel interactie tussen studenten en hoeveel leuke evenementen er in eerste instantie is technisch-niveau-basis ;; hoog niveau qua technische/ beta-gehalte er in eerste instantie is prestige-basis ;; in hoeverre wordt de opleiding gezien als prestige er in eerste instantie is ] turtles-own [ Ssociale-omgeving ;; hoe sociaal is de student Ttechnisch-niveau ;; hoe sterk is de student in beta vakken Pprestige ;; hoeveel geeft de student om prestige studiejaren ;; hoeveel jaar is de student al bezig met zijn studie typeturtle ;; is hij rationeel, feestbeest, ambitieus of een snob ] to setup clear-all ask patches [ set pcolor white set sociale-omgeving -10 set technisch-niveau -10 set prestige -10 ] ask patches with [ pxcor >= -21 and pxcor < -10 ] [ set faculteit "A" set pcolor 14 ; set plabel "A" set plabel-color 16 set sociale-omgeving 8 set technisch-niveau 2 set prestige 3 set sociale-omgeving-basis 8 set technisch-niveau-basis 2 set prestige-basis 3 ] ask patches with [ pxcor > -10 and pxcor < 0 ] [ set faculteit "B" set pcolor 34 ; set plabel "B" set plabel-color 36 set sociale-omgeving 2 set technisch-niveau 8 set prestige 3 set sociale-omgeving-basis 2 set technisch-niveau-basis 8 set prestige-basis 3 ] ask patches with [ pxcor > 0 and pxcor < 10 ] [ set faculteit "C" set pcolor 44 ; set plabel "C" set plabel-color 46 set sociale-omgeving 3 set technisch-niveau 8 set prestige 8 set sociale-omgeving-basis 3 set technisch-niveau-basis 8 set prestige-basis 8 ] ask patches with [ pxcor > 10 and pxcor < 21 ] [ set faculteit "D" set pcolor 84 ; set plabel "D" set plabel-color 86 set sociale-omgeving 6 set technisch-niveau 5 set prestige 9 set sociale-omgeving-basis 6 set technisch-niveau-basis 5 set prestige-basis 9 ] reset-ticks set-default-shape turtles "person" end to go create-turtles 3 [ nieuw ] ask turtles [ ifelse studiejaren < 3 [ set studiejaren studiejaren + 1 ] [ die ] ] ; ask patches with [pcolor != white] [ faculteitsstrategie ] strategiewissel tick end to strategiewissel foreach [ "A" "B" "C" "D" ] [faculteitcode -> let faculteitpatches patches with [faculteit = faculteitcode ] let getal random 15 ask faculteitpatches [ faculteitsstrategie getal ] ] ; foreach (range 1 (length region-boundaries + 1)) [ region-number -> ; let region-patches patches with [ region = region-number ] ; create-turtles 300 [ ; move-to one-of region-patches ; set color pcolor + 3 ; ] ; ] end to nieuw set studiejaren 0 set color black ; set shape "person" set size 1 ; move-within-patch studieprofiel studiekeuze print (list "student" Ssociale-omgeving Ttechnisch-niveau Pprestige [faculteit] of patch-here ) print (list "A" [sociale-omgeving] of patch -15 0 [technisch-niveau] of patch -15 0 [prestige] of patch -15 0 ) print (list "B" [sociale-omgeving] of patch -5 0 [technisch-niveau] of patch -5 0 [prestige] of patch -5 0 ) print (list "C" [sociale-omgeving] of patch 5 0 [technisch-niveau] of patch 5 0 [prestige] of patch 5 0 ) print (list "D" [sociale-omgeving] of patch 15 0 [technisch-niveau] of patch 15 0 [prestige] of patch 15 0 ) print (list "D2" [sociale-omgeving] of patch 16 0 [technisch-niveau] of patch 16 0 [prestige] of patch 16 0 ) ; move-within-patch end to move-within-patch set heading 0 ; dan kijken de studenten naar het noorden forward 0.333 * (random 100 - 50) / 50 ; blijkt dat "forward 1", 1 step maakt met de grootte van het speelveld is, dus 1/3 is lxb patch en dan right 90 ; student kijkt nu naar het oosten forward 0.333 * (random 100 - 50) / 50 end to studieprofiel set Ssociale-omgeving random 11 set Ttechnisch-niveau random 11 set Pprestige random 11 end to studiekeuze if Keuze-strategie = "Mix" [ let keuze random 4 if keuze = 0 [ rationeel ] if keuze = 1 [ feestbeest ] if keuze = 2 [ ambitieus ] if keuze = 3 [ snobs ] ] if Keuze-strategie = "Allemaal-rationeel" [ rationeel ] if Keuze-strategie = "Allemaal-feestbeesten" [ feestbeest ] if Keuze-strategie = "Allemaal-ambitieus" [ ambitieus ] if Keuze-strategie = "Allemaal-snobs" [ snobs ] end to rationeel let dummysoc Ssociale-omgeving let dummytec Ttechnisch-niveau let dummypres Pprestige move-to min-one-of patches [ abs ( dummysoc - sociale-omgeving ) + abs ( dummytec - technisch-niveau) + abs (dummypres - prestige)] set typeturtle "rationeel" set color green end to feestbeest move-to max-one-of patches [ sociale-omgeving ] set typeturtle "feestbeest" set color red end to ambitieus move-to max-one-of patches [ technisch-niveau ] set typeturtle "ambitieus" set color blue end to snobs move-to max-one-of patches [ prestige ] set typeturtle "snobs" set color yellow end to faculteitsstrategie [strategie] let naam "" if strategie = 0 [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau technisch-niveau-basis set prestige prestige-basis set naam "honest" ] if strategie = 1 ;; S−: [ set sociale-omgeving max ( list ( sociale-omgeving-basis - 1 ) 0 ) set technisch-niveau technisch-niveau-basis set prestige prestige-basis set naam "S-" ] if strategie = 2 ;; S+: [ set sociale-omgeving min ( list ( sociale-omgeving-basis + 1 ) 10 ) set technisch-niveau technisch-niveau-basis set prestige prestige-basis set naam "S+" ] if strategie = 3 ;; T-: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau max ( list ( technisch-niveau-basis - 1 ) 0 ) set prestige prestige-basis set naam "T-" ] if strategie = 4 ;; T+: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau min ( list ( technisch-niveau-basis + 1 ) 10 ) set prestige prestige-basis set naam "T+" ] if strategie = 5 ;; P-: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau technisch-niveau-basis set prestige max ( list ( prestige-basis - 1 ) 0 ) set naam "P-"] if strategie = 6 ;; P+: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau technisch-niveau-basis set prestige min ( list ( prestige-basis + 1 ) 10 ) set naam "P+"] if strategie = 7 ;; max-S: [ set sociale-omgeving 10 set technisch-niveau technisch-niveau-basis set prestige prestige-basis set naam "Max-S" ] if strategie = 8 ;; max-T: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau 10 set prestige prestige-basis set naam "Max-T" ] if strategie = 8 ;; max-P: [ set sociale-omgeving sociale-omgeving-basis set technisch-niveau technisch-niveau-basis set prestige 10 set naam "Max-P" ] if strategie = 9 ;; strat-S−: [ set sociale-omgeving max ( list ( sociale-omgeving - 1 ) 0 ) set technisch-niveau technisch-niveau set prestige prestige set naam "Strat-S-" ] if strategie = 10 ;; strat-S+: [ set sociale-omgeving min ( list ( sociale-omgeving + 1 ) 10 ) set technisch-niveau technisch-niveau set prestige prestige set naam "Strat-S+" ] if strategie = 11 ;; strat-T-: [ set sociale-omgeving sociale-omgeving set technisch-niveau max ( list ( technisch-niveau - 1 ) 0 ) set prestige prestige set naam "Strat-T-" ] if strategie = 12 ;; strat-T+: [ set sociale-omgeving sociale-omgeving set technisch-niveau min ( list ( technisch-niveau + 1 ) 10 ) set prestige prestige set naam "Strat-T+" ] if strategie = 13 ;; strat-P-: [ set sociale-omgeving sociale-omgeving set technisch-niveau technisch-niveau set prestige max ( list ( prestige - 1 ) 0 ) set naam "Strat-P-" ] if strategie = 14 ;; strat-P+: [ set sociale-omgeving sociale-omgeving set technisch-niveau technisch-niveau set prestige min ( list ( prestige + 1 ) 10 ) set naam "Strat-P+" ] ; print ( list plabel naam strategie sociale-omgeving sociale-omgeving-basis ) end ;to move ; turtle procedure (uit Many Regions model, licht herschreven ; Turtles will move differently in different models, but ; the general pattern shown here should be applied for all ; movements of turtles that need to stay in a specific region. ; First, save the region that the turtle is currently in: ;; let current-region region ; Then, after saving the region, we can move the turtle: ;; right random 30 ;; left random 30 ;; forward 0.25 ; Finally, after moving, make sure the turtle ; stays in the region it was in before: ;; keep-in-region current-region ;end ;to keep-in-region [ which-region ] ; turtle procedure ; This is the procedure that make sure that turtles don't leave the region they're ; supposed to be in. It is your responsibility to call this whenever a turtle moves. ; if region != which-region [ ; Get our region boundaries from the global region list: ; let region-min-pxcor first item (which-region - 1) region-boundaries ; let region-max-pxcor last item (which-region - 1) region-boundaries ; The total width is (min - max) + 1 because `pxcor`s are in the middle of patches: ; let region-width (region-max-pxcor - region-min-pxcor) + 1 ; ifelse xcor < region-min-pxcor [ ; if we crossed to the left, ; set xcor xcor + region-width ; jump to the right boundary ; ] [ ; if xcor > region-max-pxcor [ ; if we crossed to the right, ; set xcor xcor - region-width ; jump to the left boundary ; ] ; ] ; ] ;end ;to setup-turtles ; This procedure simply creates turtles in the different regions. ; The `foreach` pattern shown can be used whenever you ; need to do something for each different region. ; foreach (range 1 (length region-boundaries + 1)) [ region-number -> ; let region-patches patches with [ region = region-number ] ; create-turtles 300 [ ; move-to one-of region-patches ; set color pcolor + 3 ; ] ; ] ;end
There is only one version of this model, created about 4 years ago by Nicolas Ximenez.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.