breed [ adulti adulto] ; defines three kinds of consumers breed [ anziani anziano] breed [ studenti studente] adulti-own [ happiness adulti_price ] ; defines variables that all consumers can use anziani-own [ happiness anziani_price ] studenti-own [ happiness studenti_price ] globals [ cycle_# sold_quantities_cinema1 sold_quantities_cinema2 sold_quantities_cinema3 sold_quantities_cinema4 sold_quantities_cinema5 sold_quantities_cinema6 sold_quantities_cinema7 sold_quantities_cinema8 bought_quantities_adulti bought_quantities_anziani bought_quantities_studenti adulti_yield1 anziani_yield1 studenti_yield1 adulti_yield2 anziani_yield2 studenti_yield2 adulti_yield3 anziani_yield3 studenti_yield3 adulti_yield4 anziani_yield4 studenti_yield4 adulti_yield5 anziani_yield5 studenti_yield5 adulti_yield6 anziani_yield6 studenti_yield6 adulti_yield7 anziani_yield7 studenti_yield7 adulti_yield8 anziani_yield8 studenti_yield8 yield adulti_yield anziani_yield studenti_yield] ;defines the global variables patches-own [c_price1 c_price2 c_price3 c_price4 c_price5 c_price6 c_price7 c_price8 c_price9 c_price10 c_price11 c_price12 c_price13 c_price14 c_price15 c_price16 c_price17 c_price18 c_price19 c_price20 c_price21 c_price22 c_price23 c_price24 ] ;patches' variables to setup ; procedure to set up the world for the simulation ca set cycle_# 0 ; set to 0 the cycles' number setup-adulti setup-anziani setup-studenti set sold_quantities_cinema1 0 ; set to 0 the sold quantity for each cinema set sold_quantities_cinema2 0 set sold_quantities_cinema3 0 set sold_quantities_cinema4 0 set sold_quantities_cinema5 0 set sold_quantities_cinema6 0 set sold_quantities_cinema7 0 set sold_quantities_cinema8 0 set bought_quantities_adulti 0 set bought_quantities_anziani 0 set bought_quantities_studenti 0 set yield 0 ask patches [setup-cinema?] end to setup-adulti ; procedure to create adults set-default-shape adulti "adulti" create-adulti adults_number ; creates a number of adults as described in the slider in the interface ask adulti [ fd 10 setxy random-xcor random-ycor set size 1.5 set color turquoise set adulti_price adults_price ;adults' availability to pay as from the slider in the interface set happiness 10 ;at their birth,consumers all have the same happiness = 10 ] end to setup-anziani ; procedure to create elderlies set-default-shape anziani "anziani" create-anziani elderlies_number ; creates a number of elderlies as from the slider in the interface ask anziani [ fd 10 setxy random-xcor random-ycor set size 1.5 set color white set anziani_price elderlies_price ;elderlies' availability to pay as from the slider in the interface set happiness 10 ;at their birth,consumers all have the same happiness = 10 ] end to setup-studenti set-default-shape studenti "studenti" ; procedure to create students create-studenti students_number ;creates a number of students as from the slider in the interface ask studenti [ fd 10 setxy random-xcor random-ycor set size 1.5 set color magenta set studenti_price students_price ; students' availability to pay as from the slider in the interface set happiness 10 ; at their birth,consumers all have the same happiness = 10 ] end to setup-cinema? ; ; procedure to create the eight cinema from patches if (pycor <= 16) and (pycor > 0) and (pxcor < 0) and( pxcor >= -16) [set pcolor blue set c_price1 8 ; prices fixed praticsed by cinema set c_price2 8 set c_price3 8 ] if (pycor <= 0) and (pycor > -16) and (pxcor < 0) and( pxcor >= -16) [set pcolor pink set c_price4 8 set c_price5 3.5 set c_price6 4.5 ] if (pycor <= 0) and (pycor > -16) and (pxcor >= 0) and( pxcor < 16) [set pcolor red set c_price7 8 set c_price8 4 set c_price9 4 ] if (pycor > 0) and (pycor <= 16) and (pxcor >= 0) and( pxcor < 16) [set pcolor green set c_price10 8 set c_price11 2.5 set c_price12 6 ] if (pycor <= 16) and (pycor > 0) and (pxcor < 0) and( pxcor >= -8) [set pcolor yellow set c_price13 8 set c_price14 2.8 set c_price15 5.5 ] if (pycor > 0) and (pycor <= 16) and (pxcor >= 0) and( pxcor < 8) [set pcolor orange set c_price16 8 set c_price17 4 set c_price18 6 ] if (pycor <= 0) and (pycor > -16) and (pxcor < 0) and( pxcor >= -8) [set pcolor grey set c_price19 8 set c_price20 2 set c_price21 3.50 ] if (pycor <= 0) and (pycor > -16) and (pxcor >= 0) and( pxcor < 8) [set pcolor violet set c_price22 8 set c_price23 3.8 set c_price24 4.80 ] end ; closes procedure "to setup" to go ; procedure to start the simulation if cycle_# mod 10 = 0 [ ask adulti ; command to move adults [fd random 10] ask anziani [fd random 10] ; command to move elderlies ask studenti [fd random 10] ; command to move students ask adulti-on patches with [pcolor = blue ] [without-interruption [ if adulti_price >= c_price1 [set happiness (happiness + 1 ) ] ] ] ;procedure to define adults' happiness ask adulti-on patches with [pcolor = pink ] [without-interruption [ if adulti_price >= c_price4 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = red ] [without-interruption [ if adulti_price >= c_price7 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = green ] [without-interruption [ if adulti_price >= c_price10 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = yellow ] [without-interruption [ if adulti_price >= c_price13 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = orange ] [without-interruption [ if adulti_price >= c_price16 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = grey ] [without-interruption [ if adulti_price >= c_price19 [set happiness (happiness + 1 ) ] ] ] ask adulti-on patches with [pcolor = violet ] [without-interruption [ if adulti_price >= c_price22 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = blue ] [without-interruption [ if anziani_price >= c_price2 [set happiness (happiness + 1 ) ] ] ] ;procedure to define elderlies' happiness ask anziani-on patches with [pcolor = pink ] [without-interruption [ if anziani_price >= c_price5 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = red ] [without-interruption [ if anziani_price >= c_price8 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = green ] [without-interruption [ if anziani_price >= c_price11 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = yellow ] [without-interruption [ if anziani_price >= c_price14 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = orange ] [without-interruption [ if anziani_price >= c_price17 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = grey ] [without-interruption [ if anziani_price >= c_price20 [set happiness (happiness + 1 ) ] ] ] ask anziani-on patches with [pcolor = violet ] [without-interruption [ if anziani_price >= c_price23 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = blue ] [without-interruption [ if studenti_price >= c_price3 [set happiness (happiness + 1 ) ] ] ] ;procedure to define students' happiness ask studenti-on patches with [pcolor = pink ] [without-interruption [ if studenti_price >= c_price6 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = red ] [without-interruption [ if studenti_price >= c_price9 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = green ] [without-interruption [ if studenti_price >= c_price12 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = yellow ] [without-interruption [ if studenti_price >= c_price15 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = orange ] [without-interruption [ if studenti_price >= c_price18 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = grey ] [without-interruption [ if studenti_price >= c_price21 [set happiness (happiness + 1 ) ] ] ] ask studenti-on patches with [pcolor = violet ] [without-interruption [ if studenti_price >= c_price24 [set happiness (happiness + 1 ) ] ] ] ] set cycle_# cycle_# + 1 report-sold_quantities_cinema? ;procedure to count how many tickets have been sold by the different cinemas report-bought_quantities_adulti ;procedure to count how many tickets have been bought by the different consumers report-bought_quantities_anziani report-bought_quantities_studenti report-yield ; procedure to count the unitary consumers' yield report_total_yield ; procedure to count the total consumers' yield ask adulti-on patches with [pcolor != black] [without-interruption [if happiness = 11 [die ]]] ; procedure to let disappear consumers that bought a ticket ask anziani-on patches with [pcolor != black] [without-interruption [if happiness = 11 [die ]]] ask studenti-on patches with [pcolor != black] [without-interruption [if happiness = 11 [die ]]] plot_sold_quantities_cinema? ; plots the eight sold quantities curves into one graph plot_bought_quantities_consumers ; plots the three bought quantities curves into one graph plot_total_yield ; plots the consumers' total yield if not any? turtles [ stop ] ; the simulation stops when all consumers bought a ticket if cycle_# = 1200 [ stop ] ; the simulation stops at 1200 cycles end ; closes procedure "to go" to report-sold_quantities_cinema? ask adulti-on patches with [pcolor = blue] [without-interruption [if adulti_price >= c_price1 [ set sold_quantities_cinema1 sold_quantities_cinema1 + 1 ]]] ; procedure to count how many tickets have been sold by the cinema 1 ask anziani-on patches with [pcolor = blue] [without-interruption [if anziani_price >= c_price2 [ set sold_quantities_cinema1 sold_quantities_cinema1 + 1 ]]] ask studenti-on patches with [pcolor = blue] [without-interruption [if studenti_price >= c_price3 [ set sold_quantities_cinema1 sold_quantities_cinema1 + 1 ]]] ask adulti-on patches with [pcolor = pink] [without-interruption [if adulti_price >= c_price4 [ set sold_quantities_cinema2 sold_quantities_cinema2 + 1 ]]] ; procedure to count how many tickets have been sold by the cinema 2 ask anziani-on patches with [pcolor = pink] [without-interruption [if anziani_price >= c_price5 [ set sold_quantities_cinema2 sold_quantities_cinema2 + 1 ]]] ask studenti-on patches with [pcolor = pink] [without-interruption [if studenti_price >= c_price6 [ set sold_quantities_cinema2 sold_quantities_cinema2 + 1 ]]] ask adulti-on patches with [pcolor = red] [without-interruption [if adulti_price >= c_price7 [ set sold_quantities_cinema3 sold_quantities_cinema3 + 1 ]]] ask anziani-on patches with [pcolor = red] [without-interruption [if anziani_price >= c_price8 [ set sold_quantities_cinema3 sold_quantities_cinema3 + 1 ]]] ask studenti-on patches with [pcolor = red] [without-interruption [if studenti_price >= c_price9 [ set sold_quantities_cinema3 sold_quantities_cinema3 + 1 ]]] ask adulti-on patches with [pcolor = green] [without-interruption [if adulti_price >= c_price10 [ set sold_quantities_cinema4 sold_quantities_cinema4 + 1 ]]] ask anziani-on patches with [pcolor = green] [without-interruption [if anziani_price >= c_price11 [ set sold_quantities_cinema4 sold_quantities_cinema4 + 1 ]]] ask studenti-on patches with [pcolor = green] [without-interruption [if studenti_price >= c_price12 [ set sold_quantities_cinema4 sold_quantities_cinema4 + 1 ]]] ask adulti-on patches with [pcolor = yellow] [without-interruption [if adulti_price >= c_price13 [ set sold_quantities_cinema5 sold_quantities_cinema5 + 1 ]]] ask anziani-on patches with [pcolor = yellow] [without-interruption [if anziani_price >= c_price14 [ set sold_quantities_cinema5 sold_quantities_cinema5 + 1 ]]] ask studenti-on patches with [pcolor = yellow] [without-interruption [if studenti_price >= c_price15 [ set sold_quantities_cinema5 sold_quantities_cinema5 + 1 ]]] ask adulti-on patches with [pcolor = orange] [without-interruption [if adulti_price >= c_price16 [ set sold_quantities_cinema6 sold_quantities_cinema6 + 1 ]]] ask anziani-on patches with [pcolor = orange] [without-interruption [if anziani_price >= c_price17 [ set sold_quantities_cinema6 sold_quantities_cinema6 + 1 ]]] ask studenti-on patches with [pcolor = orange] [without-interruption [if studenti_price >= c_price18 [ set sold_quantities_cinema6 sold_quantities_cinema6 + 1 ]]] ask adulti-on patches with [pcolor = grey] [without-interruption [if adulti_price >= c_price19 [ set sold_quantities_cinema7 sold_quantities_cinema7 + 1 ]]] ask anziani-on patches with [pcolor = grey] [without-interruption [if anziani_price >= c_price20 [ set sold_quantities_cinema7 sold_quantities_cinema7 + 1 ]]] ask studenti-on patches with [pcolor = grey] [without-interruption [if studenti_price >= c_price21 [ set sold_quantities_cinema7 sold_quantities_cinema7 + 1 ]]] ask adulti-on patches with [pcolor = violet] [without-interruption [if adulti_price >= c_price22 [ set sold_quantities_cinema8 sold_quantities_cinema8 + 1 ]]] ask anziani-on patches with [pcolor = violet] [without-interruption [if anziani_price >= c_price23 [ set sold_quantities_cinema8 sold_quantities_cinema8 + 1 ]]] ask studenti-on patches with [pcolor = violet] [without-interruption [if studenti_price >= c_price24 [ set sold_quantities_cinema8 sold_quantities_cinema8 + 1 ]]] end to report-bought_quantities_adulti ; procedure to count how many tickets have been bought by the different consumers ask adulti-on patches with [pcolor != black] [without-interruption [if happiness = 11 [set bought_quantities_adulti bought_quantities_adulti + 1 ]]] end to report-bought_quantities_anziani ask anziani-on patches with [pcolor != black] [without-interruption [if happiness = 11 [set bought_quantities_anziani bought_quantities_anziani + 1 ]]] end to report-bought_quantities_studenti ask studenti-on patches with [pcolor != black] [without-interruption [if happiness = 11 [set bought_quantities_studenti bought_quantities_studenti + 1 ]]] end to report-yield ask adulti-on patches with [pcolor = blue] [without-interruption [if happiness = 11 [ set adulti_yield1 adulti_price - c_price1 ]]] ask anziani-on patches with [pcolor = blue] [without-interruption [if happiness = 11 [ set anziani_yield1 anziani_price - c_price2 ]]] ask studenti-on patches with [pcolor = blue] [without-interruption [if happiness = 11 [ set studenti_yield1 studenti_price - c_price3 ]]] ask adulti-on patches with [pcolor = pink] [without-interruption [if happiness = 11 [ set adulti_yield2 adulti_price - c_price4 ]]] ask anziani-on patches with [pcolor = pink] [without-interruption [if happiness = 11 [ set anziani_yield2 anziani_price - c_price5 ]]] ask studenti-on patches with [pcolor = pink] [without-interruption [if happiness = 11 [ set studenti_yield2 studenti_price - c_price6 ]]] ask adulti-on patches with [pcolor = red] [without-interruption [if happiness = 11 [ set adulti_yield3 adulti_price - c_price7 ]]] ask anziani-on patches with [pcolor = red] [without-interruption [if happiness = 11 [ set anziani_yield3 anziani_price - c_price8 ]]] ask studenti-on patches with [pcolor = red] [without-interruption [if happiness = 11 [ set studenti_yield3 studenti_price - c_price9 ]]] ask adulti-on patches with [pcolor = green] [without-interruption [if happiness = 11 [ set adulti_yield4 adulti_price - c_price10 ]]] ask anziani-on patches with [pcolor = green] [without-interruption [if happiness = 11 [ set anziani_yield4 anziani_price - c_price11 ]]] ask studenti-on patches with [pcolor = green] [without-interruption [if happiness = 11 [ set studenti_yield4 studenti_price - c_price12 ]]] ask adulti-on patches with [pcolor = yellow] [without-interruption [if happiness = 11 [ set adulti_yield5 adulti_price - c_price13]]] ask anziani-on patches with [pcolor = yellow] [without-interruption [if happiness = 11 [ set anziani_yield5 anziani_price - c_price14 ]]] ask studenti-on patches with [pcolor = yellow] [without-interruption [if happiness = 11 [ set studenti_yield5 studenti_price - c_price15 ]]] ask adulti-on patches with [pcolor = orange] [without-interruption [if happiness = 11 [ set adulti_yield6 adulti_price - c_price16 ]]] ask anziani-on patches with [pcolor = orange] [without-interruption [if happiness = 11 [ set anziani_yield6 anziani_price - c_price17 ]]] ask studenti-on patches with [pcolor = orange] [without-interruption [if happiness = 11 [ set studenti_yield6 studenti_price - c_price18 ]]] ask adulti-on patches with [pcolor = grey] [without-interruption [if happiness = 11 [ set adulti_yield7 adulti_price - c_price19 ]]] ask anziani-on patches with [pcolor = grey] [without-interruption [if happiness = 11 [ set anziani_yield7 anziani_price - c_price20 ]]] ask studenti-on patches with [pcolor = grey] [without-interruption [if happiness = 11 [ set studenti_yield7 studenti_price - c_price21 ]]] ask adulti-on patches with [pcolor = violet] [without-interruption [if happiness = 11 [ set adulti_yield8 adulti_price - c_price22 ]]] ask anziani-on patches with [pcolor = violet] [without-interruption [if happiness = 11 [ set anziani_yield8 anziani_price - c_price23 ]]] ask studenti-on patches with [pcolor = violet] [without-interruption [if happiness = 11 [ set studenti_yield8 studenti_price - c_price24 ]]] end to plot_sold_quantities_cinema? set-current-plot "sold_quantities" set-current-plot-pen "q1" plot (sold_quantities_cinema1) set-current-plot "sold_quantities" set-current-plot-pen "q2" plot (sold_quantities_cinema2) set-current-plot "sold_quantities" set-current-plot-pen "q3" plot (sold_quantities_cinema3) set-current-plot "sold_quantities" set-current-plot-pen "q4" plot (sold_quantities_cinema4) set-current-plot "sold_quantities" set-current-plot-pen "q5" plot (sold_quantities_cinema5) set-current-plot "sold_quantities" set-current-plot-pen "q6" plot (sold_quantities_cinema6) set-current-plot "sold_quantities" set-current-plot-pen "q7" plot (sold_quantities_cinema7) set-current-plot "sold_quantities" set-current-plot-pen "q8" plot (sold_quantities_cinema8) end to plot_bought_quantities_consumers set-current-plot "bought_quantities" set-current-plot-pen "q_adults" plot (bought_quantities_adulti) set-current-plot "bought_quantities" set-current-plot-pen "q_elderlies" plot (bought_quantities_anziani) set-current-plot "bought_quantities" set-current-plot-pen "q_students" plot (bought_quantities_studenti) end to report_total_yield ask adulti-on patches with [pcolor != black] [ set adulti_yield (adulti_yield1 + adulti_yield2 + adulti_yield3 + adulti_yield4 + adulti_yield5 + adulti_yield6 + adulti_yield7 + adulti_yield8 ) * adults_number ] ask anziani-on patches with [pcolor != black] [set anziani_yield ( anziani_yield1 + anziani_yield2 + anziani_yield3 + anziani_yield4 + anziani_yield5 + anziani_yield6 + anziani_yield7 + anziani_yield8 ) * elderlies_number] ask studenti-on patches with [pcolor != black] [set studenti_yield ( studenti_yield1 + studenti_yield2 + studenti_yield3 + studenti_yield4 + studenti_yield5 + studenti_yield6 + studenti_yield7 + studenti_yield8 ) * students_number ] end to plot_total_yield ; procedure to plot the consumers' total yield set-current-plot "total_yield" set-current-plot-pen "y_adults" plot (adulti_yield) set-current-plot "total_yield" set-current-plot-pen "y_elderlies" plot (anziani_yield) set-current-plot "total_yield" set-current-plot-pen "y_students" plot (studenti_yield) end @#$#@#$#@ GRAPHICS-WINDOW 254 10 621 379 19 18 9.154 1 10 1 1 1 0 1 1 1 -19 19 -18 18 0 0 1 ticks CC-WINDOW 5 559 1005 654 Command Center 0 BUTTON 19 10 74 43 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 9 107 181 140 adults_price adults_price 1 10 8 1 1 NIL HORIZONTAL SLIDER 7 161 179 194 elderlies_price elderlies_price 1 10 4 1 1 NIL HORIZONTAL SLIDER 4 209 176 242 students_price students_price 2 10 5 1 1 NIL HORIZONTAL SLIDER 627 12 799 45 adults_number adults_number 0 50 37 1 1 NIL HORIZONTAL SLIDER 628 49 800 82 elderlies_number elderlies_number 0 50 44 1 1 NIL HORIZONTAL SLIDER 628 85 800 118 students_number students_number 0 50 48 1 1 NIL HORIZONTAL BUTTON 16 51 79 84 go go T 1 T OBSERVER NIL NIL NIL NIL MONITOR 628 123 776 168 NIL sold_quantities_cinema1 17 1 11 MONITOR 628 176 776 221 NIL sold_quantities_cinema2 17 1 11 MONITOR 628 228 776 273 NIL sold_quantities_cinema3 17 1 11 MONITOR 626 279 774 324 NIL sold_quantities_cinema4 17 1 11 MONITOR 627 328 775 373 NIL sold_quantities_cinema5 17 1 11 MONITOR 629 379 777 424 NIL sold_quantities_cinema6 17 1 11 MONITOR 629 427 777 472 NIL sold_quantities_cinema7 17 1 11 MONITOR 629 478 777 523 NIL sold_quantities_cinema8 17 1 11 PLOT 1 248 237 408 sold_quantities NIL NIL 0.0 40.0 0.0 40.0 true true PENS "q1" 1.0 0 -13345367 true "q2" 1.0 0 -2064490 true "q3" 1.0 0 -1184463 true "q4" 1.0 0 -7500403 true "q5" 1.0 0 -955883 true "q6" 1.0 0 -8630108 true "q7" 1.0 0 -10899396 true "q8" 1.0 0 -2674135 true TEXTBOX 10 418 181 545 PRICE PRATICSED BY CINEMAS\n1)adults: 8,elderlies: 8,students: 8\n2)adults: 8,elderlies: 3.50,students: 4.50\n3)adults: 8,elderlies: 4,students: 4\n4)adults: 8,elderlies: 2.50,students: 6\n5)adults: 8,elderlies: 2.80,students: 5.50\n6)adults: 8,elderlies: 4,students: 6\n7)adults: 8,elderlies: 2,students: 3.50\n8)adults: 8,elderlies: 3.80,students: 4.80 9 102.0 1 MONITOR 142 35 199 80 NIL cycle_# 17 1 11 PLOT 254 390 481 522 bought_quantities NIL NIL 0.0 10.0 0.0 10.0 true true PENS "q_elderlies" 1.0 0 -7500403 true "q_students" 1.0 0 -5825686 true "q_adults" 1.0 0 -14835848 true MONITOR 796 175 875 220 adults_yield adulti_yield 17 1 11 MONITOR 796 225 886 270 elderlies_yield anziani_yield 8 1 11 MONITOR 796 277 890 322 students_yield studenti_yield 3 1 11 PLOT 803 10 996 165 total_yield NIL NIL 0.0 10.0 0.0 10.0 true true PENS "y_adults" 1.0 0 -14835848 true "y_elderlies" 1.0 0 -7500403 true "y_students" 1.0 0 -5825686 true @#$#@#$#@ WHAT IS IT? ----------- The model tries to explain a model of “price discriminination“ with a simple simulation model. The world is divided into eight cinemas and a black area without cinemas; consumers move into the world to buy a ticket. The purpose of this model is to understand that the cinema wich apply the price discriminination sell more tickets. HOW IT WORKS ------------ Consumers move across the world into the eight cinemas according to their happiness. Consumers' happiness is determined according to their possibility to buy a ticket : if a consumer can buy a ticket, she will be happy, if she can not buy anything she will be unhappy. They will move a lot if they are unhappy, and died if they are happy because they buy the ticket and they go into the cinema (the consumers disappear when buy a ticket).If the consumer doesn't try her ticket beacuse her availability to pay is less than the ticket's price, she stay. The model stops when all consumers have bought the ticket or after 1200 cycles (1200 is a number that let consumers try their tickets). HOW TO USE IT ------------- The observer chooses the number of consumers by using the sliders in the interface. In the same way, the observer is asked to set consumers' availability to pay. The observer to set the world of simulation has to click on the button "setup"; the world is genarated, patches take the eight colours of cinemas and the black colour for no-consumption area, finally the consumers stand in random way in the world. The simulation starts when the observer clicks the button "go". On the interface observer can see quantities sold by each cinema, the number of cycles, and the yield of any consumers breed, also in the interface there are three graphs that explain sold quantities by each cinema, the consumers total yield and the bought quantities for breed. THINGS TO NOTICE ---------------- When the level of consumers' availability is maximum we can see that every consumer buys one ticket because consumers' availabiity is higher than every cinemas price. At the opposite, when the level of consumer's availability is low we can see that nobody buys ticket because consumers' availability is lower than every cinemas price. THINGS TO TRY ------------- It could be interesting to try varying the level of the sliders on the interface and notice what happens. EXTENDING THE MODEL ------------------- The model can be extended by introducing one other breed of consumers (for example children), other cinemas that practise the price discrimination, and other variables that can affect consumers behaviours. RELATED MODELS -------------- The simulation has been inspired by the "price discrimination of third degree". CREDITS AND REFERENCES ---------------------- The model has been created after attending the course “Informatica e simulazione per l’economia”, held by Professor Pietro Terna, at the Faculty of Economics, University of Turin. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 adulti false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 anziani false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 studenti false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 4.0.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@