breed [consumers] breed [duopolists duopolist] duopolists-own [earns] globals [duopolist1 duopolist2 nearest price1 price1-best price2 price2-best price-of-nearest] to setup ca set-default-shape consumers "person" set-default-shape duopolists "truck" create-consumers number-of-consumers [set color white ; a trigger allowing all consumers showing a label for prices taken: if the price taken not discounted, the label stays empty, ... ; ... but if there is some discount in accordance to following price policy rules, the label is filled with the discounted price; ... ; ... this trigger permits us to divide consumers, for the purposes of programming technique, between those taking discounts ... ; ... and those paying full prices set label "" setxy random-xcor random-ycor] ; the following little ploy allows the model working with sense even in case the price policies are "best for customers so far served ... ; ... by competitor" or "best for faithfuls" for both duopolists (see ahead); otherwise, there would be no modifications ... ; ... in those cases, as the starting livery of all consumers would be neither turquoise nor orange, but only white: it's like ... ; ... there would be a little group of consumers that, at the beginning of simulation, already showed their tendency ... ; ... to one duopolist rather than to the other ask n-of (number-of-consumers / 10) consumers [set color orange] ask n-of (number-of-consumers / 10) consumers with [color != orange] [set color turquoise] create-duopolists 2 [set earns 0 set color orange set label-color white setxy random-xcor random-ycor ; the consumers are specified through all the who-numbers from 0 to "number-of-consumers" - 1; ... ; ... the first duopolist, taking now turquoise color, is specified through the who-number equal to the "number of consumers" ... ; ... planned by the observer; finally, the other duopolist is specified through the who-number of the former, increased by one set duopolist1 number-of-consumers set duopolist2 (number-of-consumers + 1) ask duopolist duopolist1 [set color turquoise]] ; both prices can initially be at randomized levels, 1 to 20 inclusive: maybe they are on the same level, or not; ... ; ... or, instead, they can be set at certain levels planned by the observer by switching in the interface ifelse randomize-initial-prices? [set price1 (1 + random 20) set price2 (1 + random 20)] [set price1 initial-price1 set price2 initial-price2] end to go label-duopolists-with-prices send-consumers-to-take-right-price calculate-earns behave-like-a-consumer behave-like-a-duopolist move-prices tick update-plots end to label-duopolists-with-prices ; for both duopolists, the price labelling begins here, so the labels are updated after each time unit ask duopolist duopolist1 [set label price1] ask duopolist duopolist2 [set label price2] end to send-consumers-to-take-right-price ; the consumers lying at a smaller distance to a duopolist than to the other take the price policy (and the color, ... ; ... via the "take-price-policy" procedures) of the former; ... ; ... notice that the color changing happens only after the price policy taking: otherwise, there may be some deviation ... ; ... from the right process: a consumer obtains a discount if he already wears a certain livery color , and then, ... ; ... if that color is not the same of that of the discounter, he takes the latter's color ask consumers with [distance duopolist duopolist1 < distance duopolist duopolist2][take-price-policy1] ask consumers with [distance duopolist duopolist1 > distance duopolist duopolist2][take-price-policy2] ; if the distance of a consumer to a duopolist is the same than to the other, then ... ; ...the consumer takes (or maintains) a price policy and a livery color based on the following rules; ... ; notice that, if some consumer changes his livery color to "pink - 1", he remains, for a tick, "hesitant", ... ; ... i.e. he doesn't take any price policy ask consumers with [(distance duopolist duopolist1 = distance duopolist duopolist2) and (color = turquoise or color = turquoise - 0.5 or color = turquoise - 1 or color = turquoise - 1.5)] [ifelse random 100 < 35 [set color pink - 1 calculate-earns] [ifelse (random 100 >= 35 and random 100 < 50) [take-price-policy2] [take-price-policy1]]] ask consumers with [(distance duopolist duopolist1 = distance duopolist duopolist2) and (color = orange or color = orange - 0.5 or color = orange - 1 or color = orange - 1.5)] [ifelse random 100 < 35 [set color pink - 1 calculate-earns] [ifelse (random 100 >= 35 and random 100 < 50) [take-price-policy1] [take-price-policy2]]] ask consumers with [(distance duopolist duopolist1 = distance duopolist duopolist2) and color = white] [ifelse random 100 < 25 [take-price-policy1] [ifelse (random 100 >= 25 and random 100 < 50) [take-price-policy2] [set color pink - 1 calculate-earns]]] ask consumers with [(distance duopolist duopolist1 = distance duopolist duopolist2) and color = pink - 1] [ifelse random 100 < 25 [take-price-policy1] [ifelse (random 100 >= 25 and random 100 < 50) [take-price-policy2] [calculate-earns]]] end ; here are now the settings made through selection of a price policy: ... ; ... - if the best price is allowed for any set of fresh-captured customers, they pay a price surely cheaper than the full ones ... ; ... (with the exception of the case that the cut made is equal to zero, so that the price allowed equals the minimum ... ; ... of the full ones), and then take the color of their serving duopolist ...; ; ... - if the best price is allowed only for customers keeping the same supplier for three times (as happens ... ; ... when "better for faithfuls" is selected), the effects are the same as described above; but note, in that case, ... ; ... how the progress of customers' "confirmation of faithfulness" is shown: it is represented by color changings - the turquoise ... ; ... and orange colors darken at each time unit in which the consumers keep supplied by the same duopolist -, we're about changings ... ; ... that are permitted only once in a time unit by means of "calculate-earns" procedure - quite a true ... ; ... "goto"-flavoured procedure!..); ... ; ... note, also: in case of price discrimination, the price labelled on a consumer is not the same labelled ... ; ... on his furnisher - the duopolists always show their full prices; the consumers show, if at all, the discounted ones; ... ; ... and pay attention, finally, to the fact that the price policy "best for customers so far not served by anyone" obviously ... ; ... takes sense only if the switch "only-if-near?" is on: otherwise, there would never be consumers not served by a duopolist! to take-price-policy1 if price1-policy = "no discrimination" [set color turquoise calculate-earns] if (price1-policy = "best for all new customers" and (color != turquoise or color != turquoise - 0.5 or color != turquoise - 1 or color != turquoise - 1.5) and random 100 < max-willingness-to-discount1) [set price1-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist1) 2) set label price1-best set label-color yellow - 1 set color turquoise calculate-earns] if (price1-policy = "best for customers so far not served by anyone" and (color = pink - 1 or color = white) and random 100 < max-willingness-to-discount1) [set price1-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist1) 2) set label price1-best set label-color yellow - 1 set color turquoise calculate-earns] if (price1-policy = "best for customers so far served by competitor" and random 100 < max-willingness-to-discount1) [ask consumers with [color = orange or color = orange - 0.5 or color = orange - 1 or color = orange - 1.5] [set price1-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist1) 2) set label price1-best set label-color yellow - 1 set color turquoise calculate-earns]] if price1-policy = "best for faithfuls" and random 100 < max-willingness-to-discount1 [ask consumers with [color = turquoise][set color turquoise - 0.5 calculate-earns] ask consumers with [color = turquoise - 0.5][set color turquoise - 1 calculate-earns] ask consumers with [color = turquoise - 1][set color turquoise - 1.5 calculate-earns] ask consumers with [color = turquoise - 1.5] [set price1-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist1) 2) set label price1-best set label-color yellow - 1 calculate-earns]] end to take-price-policy2 if price2-policy = "no discrimination" [set color orange calculate-earns] if (price2-policy = "best for all new customers" and (color != orange or color != orange - 0.5 or color != orange - 1 or color != orange - 1.5) and random 100 < max-willingness-to-discount2) [set price2-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist2) 2) set label price2-best set label-color magenta - 1 set color orange calculate-earns] if (price2-policy = "best for customers so far not served by anyone" and (color = pink - 1 or color = white) and random 100 < max-willingness-to-discount2) [set price2-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist2) 2) set label price2-best set label-color magenta - 1 set color orange calculate-earns] if (price2-policy = "best for customers so far served by competitor" and random 100 < max-willingness-to-discount2) [ask consumers with [color = turquoise or color = turquoise - 0.5 or color = turquoise - 1 or color = turquoise - 1.5] [set price2-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist2) 2) set label price2-best set label-color magenta - 1 set color orange calculate-earns]] if price2-policy = "best for faithfuls" and random 100 < max-willingness-to-discount2 [ask consumers with [color = orange][set color orange - 0.5 calculate-earns] ask consumers with [color = orange - 0.5][set color orange - 1 calculate-earns] ask consumers with [color = orange - 1][set color orange - 1.5 calculate-earns] ask consumers with [color = orange - 1.5] [set price2-best max (list 0 precision (min (list price1 price2) - price-cut-made-by-duopolist2) 2) set label price2-best set label-color magenta - 1 calculate-earns]] end to calculate-earns ; if a consumer is distant to a duopolist less than to the other, then the former and his price become the "nearest" ones; ... ; ... moreover, if the switch "only-if-near?" is on, and, at the same time, the distance of the closer duopolist ... ; ... is smaller than the limit distance planned by the observer, then the earns gained by that duopolist ... ; ... increase by a quantity equal to his price; but if the aforesaid switch is, instead, off, ... ; ... the earns increase occurs anyhow, with no consideration at all of distance data ask consumers with [label = ""][if (distance duopolist duopolist1 != distance duopolist duopolist2) [ifelse (distance duopolist duopolist1 < distance duopolist duopolist2) [set nearest duopolist1 set price-of-nearest price1] [set nearest duopolist2 set price-of-nearest price2]] ifelse only-if-near? [if (distance duopolist nearest < lim-distance) [ask duopolist nearest [set earns earns + price-of-nearest]]] [ask duopolist nearest [set earns earns + price-of-nearest]]] ask consumers with [label = price1-best][if (distance duopolist duopolist1 != distance duopolist duopolist2) [ifelse (distance duopolist duopolist1 < distance duopolist duopolist2) [set nearest duopolist1 set price-of-nearest price1-best] [set nearest duopolist2 set price-of-nearest price2]] ifelse only-if-near? [if (distance duopolist nearest < lim-distance) [ask duopolist nearest [set earns earns + price-of-nearest]]] [ask duopolist nearest [set earns earns + price-of-nearest]]] ask consumers with [label = price2-best][if (distance duopolist duopolist1 != distance duopolist duopolist2) [ifelse (distance duopolist duopolist1 < distance duopolist duopolist2) [set nearest duopolist1 set price-of-nearest price1] [set nearest duopolist2 set price-of-nearest price2-best]] ifelse only-if-near? [if (distance duopolist nearest < lim-distance) [ask duopolist nearest [set earns earns + price-of-nearest]]] [ask duopolist nearest [set earns earns + price-of-nearest]]] ; the consumers whose distance to the nearest duopolist is greater than the limit distance planned by the observer... ; ...take the color "pink - 1" if only-if-near? [ask consumers with [distance duopolist nearest > lim-distance] [set label "" set color pink - 1]] end to behave-like-a-consumer if behaviour-of-consumers = "wander" [ask consumers [do-random-walk]] ; if the behavioural criterion is set on "go to nearest", the consumers always move towards the closest duopolist if behaviour-of-consumers = "go to nearest" [ask consumers [if (distance duopolist duopolist1 != distance duopolist duopolist2) [ifelse (distance duopolist duopolist1 < distance duopolist duopolist2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] ; if the behavioural criterion is set on "go always to cheapest", the consumers always move towards the low-pricing duopolist if (behaviour-of-consumers = "go always to cheapest" and price1-policy = "no discrimination" and price2-policy = "no discrimination" and price1 != price2) [ifelse (price1 < price2) [ask consumers [set heading towards duopolist duopolist1 fd 1]] [ask consumers [set heading towards duopolist duopolist2 fd 1]]] if (behaviour-of-consumers = "go always to cheapest" and price1-policy != "no discrimination" and price2-policy != "no discrimination") [ask consumers with [label = price1-best] [if price1-best != price2-best [ifelse (price1-best < price2-best) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]] ask consumers with [label = price2-best] [if price1-best != price2-best [ifelse (price2-best < price1-best) [set heading towards duopolist duopolist2 fd 1] [set heading towards duopolist duopolist1 fd 1]]] ask consumers with [label = ""] [if (price1 != price2) [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] if (behaviour-of-consumers = "go always to cheapest" and price1-policy = "no discrimination" and price2-policy != "no discrimination") [ask consumers with [label = price2-best] [set heading towards duopolist duopolist2 fd 1] ask consumers with [label = ""] [if price1 != price2 [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] if (behaviour-of-consumers = "go always to cheapest" and price1-policy != "no discrimination" and price2-policy = "no discrimination") [ask consumers with [label = price1-best] [set heading towards duopolist duopolist1 fd 1] ask consumers with [label = ""] [if price1 != price2 [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] ; if the behavioural criterion is set on "go to cheapest only if well-known", the consumers wilfully move towards ... ; ... the low-pricing duopolist, but only with a probability equal to the knowledge rate planned by the observer, divided by a hundred ... ; ... (e.g. if the knowledge rate is planned to be 100%, that is equivalent to a probability of 100/100 = 1 - the certainty -; ... ; ... if the same rate is, on the other hand, planned to be 0%, that is equivalent to a probability of 0 - the impossibility! - ... ; ... that the consumer intentionally move towards the cheapest duopolist... ; ... But he can still move towards the cheapest one without intention, of course!) if (behaviour-of-consumers = "go to cheapest if well-known" and price1-policy = "no discrimination" and price2-policy = "no discrimination") [ifelse (random 100 <= knowledge-rate) [ifelse price1 != price2 [ifelse (price1 < price2) [ask consumers [set heading towards duopolist duopolist1 fd 1]] [ask consumers [set heading towards duopolist duopolist2 fd 1]]] [ask consumers [set heading towards one-of duopolists fd 1]]] [ask consumers [set heading towards one-of duopolists fd 1]]] if (behaviour-of-consumers = "go to cheapest if well-known" and price1-policy != "no discrimination" and price2-policy != "no discrimination") [ifelse (random 100 <= knowledge-rate) [ask consumers with [label = price1-best] [if price1-best != price2-best [ifelse (price1-best < price2-best) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]] ask consumers with [label = price2-best] [if price1-best != price2-best [ifelse (price2-best < price1-best) [set heading towards duopolist duopolist2 fd 1] [set heading towards duopolist duopolist1 fd 1]]] ask consumers with [label = ""] [if price1 != price2 [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] [ask consumers [set heading towards one-of duopolists fd 1]]] if (behaviour-of-consumers = "go to cheapest if well-known" and price1-policy = "no discrimination" and price2-policy != "no discrimination") [ifelse (random 100 <= knowledge-rate) [ask consumers with [label = price2-best] [set heading towards duopolist duopolist2 fd 1] ask consumers with [label = ""] [if price1 != price2 [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] [ask consumers [set heading towards one-of duopolists fd 1]]] if (behaviour-of-consumers = "go to cheapest if well-known" and price1-policy != "no discrimination" and price2-policy = "no discrimination") [ifelse (random 100 <= knowledge-rate) [ask consumers with [label = price1-best] [set heading towards duopolist duopolist1 fd 1] ask consumers with [label = ""] [if price1 != price2 [ifelse (price1 < price2) [set heading towards duopolist duopolist1 fd 1] [set heading towards duopolist duopolist2 fd 1]]]] [ask consumers [set heading towards one-of duopolists fd 1]]] end to behave-like-a-duopolist ; if the behavioural criterion is set on "stay at centre", both duopolists stay at one step away from the true centre ... ; ... of the world (0,0), so that it is always possible for the consumers to compare their distance from the duopolists and, ... ; ... consequently, to decide by which of them being provided if behaviour-of-duopolist1 = "stay at centre" [ask duopolist duopolist1 [home rt random 45 lt random 45 fd 1]] if behaviour-of-duopolist2 = "stay at centre" [ask duopolist duopolist2 [home rt random 45 lt random 45 fd 1]] ; if the behavioural criterion is set on "go far from competitor", the duopolist with the lesser income flees from the competitor ... ; ... if the latter is too close to him if (behaviour-of-duopolist1 = "go far from competitor" and ([earns] of duopolist duopolist1 < [earns] of duopolist duopolist2)) [ask duopolist duopolist1 [if (distance duopolist duopolist2 <= 5) [bk (1 + random 15)]]] if (behaviour-of-duopolist2 = "go far from competitor" and ([earns] of duopolist duopolist2 < [earns] of duopolist duopolist1)) [ask duopolist duopolist2 [if (distance duopolist duopolist1 <= 5) [bk (1 + random 15)]]] ; if the behavioural criterion is set on "go randomly", the duopolist gaining the lesser income starts moving randomly in the world ... ; ... to meet new selling opportunities if (behaviour-of-duopolist1 = "go randomly" and ([earns] of duopolist duopolist1 < [earns] of duopolist duopolist2)) [ask duopolist duopolist1 [do-random-walk]] if (behaviour-of-duopolist2 = "go randomly" and ([earns] of duopolist duopolist2 < [earns] of duopolist duopolist1)) [ask duopolist duopolist2 [do-random-walk]] ; if the behavioural criterion is set on "go towards competitor", the duopolist gaining the lesser income starts moving ... ; ...towards his competitor if (behaviour-of-duopolist1 = "go towards competitor" and ([earns] of duopolist duopolist1 < [earns] of duopolist duopolist2)) [ask duopolist duopolist1 [set heading towards duopolist duopolist2 fd 1]] if (behaviour-of-duopolist2 = "go towards competitor" and ([earns] of duopolist duopolist2 < [earns] of duopolist duopolist1)) [ask duopolist duopolist2 [set heading towards duopolist duopolist1 fd 1]] ; if the behavioural criterion is set on "go towards consumers", each duopolist starts moving towards the consumers actually lying ... ; ... at a smaller distance to him than to the competitor; that is intended to show a situation in which a duopolist ... ; ... tries to tighten his client to his neighbour against competitor's expansion aims if behaviour-of-duopolist1 = "go towards consumers" [ask duopolist duopolist1 [set heading towards max-one-of patches [count consumers with [distance myself < distance duopolist duopolist2]] fd 1]] if behaviour-of-duopolist2 = "go towards consumers" [ask duopolist duopolist2 [set heading towards max-one-of patches [count consumers with [distance myself < distance duopolist duopolist1]] fd 1]] end to do-random-walk rt random-float 360 forward 1 end to move-prices ; if the price trend for the turquoise duopolist is set: ... ; ... - on "fluctuation", the pricing fluctuates in a little range, with sinusoidal corrections; ... ; ... - on "growth", the pricing increases with a sinusoidal trend; ... ; ... - on "fall", the pricing decreases with a sinusoidal trend, until it sinks under 1, where it begins fluctuating randomly ... ; ... from 1 to 5 inclusive if price1-trend = "fluctuation" [ifelse price1 >= 1 [set price1 precision (price1 + sin (random (pi / 2)) - sin (random (pi / 2))) 2] [set price1 price1 + 1]] if price1-trend = "growth" [ifelse price1 >= 1 [set price1 precision (price1 + sin (random (pi / 2))) 2] [set price1 price1 + 1]] if price1-trend = "fall" [ifelse price1 >= 1 [set price1 precision (price1 - sin (random (pi / 2))) 2] [set price1 price1 + 1 + random 5]] ; if the price trend for the orange duopolist is set: ... ; ... - on "fluctuation", the pricing fluctuates in a little range, with cosinusoidal corrections; ... ; ... - on "growth", the pricing increases with a "parasigmoidal" trend; ... ; ... - on "fall", the pricing decreases with a cosinusoidal trend, until it sinks under 1, where it begins fluctuating randomly ... ; ... from 1 to 5 inclusive if price2-trend = "fluctuation" [ifelse price2 >= 1 [set price2 precision (price2 + cos (random (pi / 2)) - cos (random (pi / 2))) 2] [set price2 price2 + 1]] if price2-trend = "growth" [ifelse price2 >= 1 [set price2 precision (price2 + 2 / (1 + e) ^ (ticks / price2)) 2] [set price2 price2 + 1]] if price2-trend = "fall" [ifelse price2 >= 1 [set price2 precision (price2 - cos (random (pi / 2))) 2] [set price2 price2 + 1 + random 5]] end to update-plots set-current-plot "earns" set-current-plot-pen "duopolist 1" plot [earns] of duopolist duopolist1 set-current-plot-pen "duopolist 2" plot [earns] of duopolist duopolist2 set-current-plot "consumers provided" set-current-plot-pen "by duopolist 1" plot count consumers with [color = turquoise or color = turquoise - 0.5 or color = turquoise - 1 or color = turquoise - 1.5] set-current-plot-pen "by duopolist 2" plot count consumers with [color = orange or color = orange - 0.5 or color = orange - 1 or color = orange - 1.5] set-current-plot-pen "by no one" plot count consumers with [color = pink - 1] set-current-plot "distance traveled" ifelse only-if-near? [set-current-plot-pen "max" plot max [distance duopolist nearest] of consumers with [distance duopolist nearest < lim-distance] set-current-plot-pen "mean" plot mean [distance duopolist nearest] of consumers with [distance duopolist nearest < lim-distance] set-current-plot-pen "min" plot min [distance duopolist nearest] of consumers with [distance duopolist nearest < lim-distance]] [set-current-plot-pen "max" plot max [distance duopolist nearest] of consumers set-current-plot-pen "mean" plot mean [distance duopolist nearest] of consumers set-current-plot-pen "min" plot min [distance duopolist nearest] of consumers] end @#$#@#$#@ GRAPHICS-WINDOW 475 10 1059 615 20 20 14.0 1 10 1 1 1 0 0 0 1 -20 20 -20 20 0 0 1 ticks CHOOSER 244 122 471 167 behaviour-of-consumers behaviour-of-consumers "stay" "wander" "go to nearest" "go always to cheapest" "go to cheapest if well-known" 3 CHOOSER 4 243 238 288 behaviour-of-duopolist1 behaviour-of-duopolist1 "stay anywhere" "stay at centre" "go far from competitor" "go randomly" "go towards competitor" "go towards consumers" 2 SLIDER 6 86 241 119 number-of-consumers number-of-consumers 50 1000 300 1 1 individuals HORIZONTAL SWITCH 286 10 412 43 only-if-near? only-if-near? 0 1 -1000 SLIDER 6 122 241 155 lim-distance lim-distance 0 29 20 1 1 NIL HORIZONTAL SLIDER 244 86 471 119 knowledge-rate knowledge-rate 0 100 50 1 1 % HORIZONTAL CHOOSER 4 328 237 373 price1-trend price1-trend "freeze" "fluctuation" "growth" "fall" 3 CHOOSER 240 328 471 373 price2-trend price2-trend "freeze" "fluctuation" "growth" "fall" 3 TEXTBOX 210 64 360 82 CONSUMERS 11 0.0 1 TEXTBOX 208 187 358 205 DUOPOLISTS 11 0.0 1 PLOT 241 544 472 787 earns NIL NIL 0.0 10.0 0.0 10.0 true true PENS "duopolist 1" 1.0 0 -14835848 true "duopolist 2" 1.0 0 -955883 true PLOT 3 498 237 787 distance traveled NIL NIL 0.0 10.0 0.0 10.0 true true PENS "max" 1.0 0 -6675684 true "mean" 1.0 0 -4079321 true "min" 1.0 0 -15040220 true BUTTON 76 10 139 43 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 142 10 217 43 go once go NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 220 10 283 43 NIL go T 1 T OBSERVER NIL NIL NIL NIL MONITOR 798 616 1060 661 consumers provided by duopolist 1 count consumers with [color = turquoise or color = turquoise - 0.5 or color = turquoise - 1 or color = turquoise - 1.5] 17 1 11 MONITOR 798 679 1061 724 consumers provided by duopolist 2 count consumers with [color = orange or color = orange - 0.5 or color = orange - 1 or color = orange - 1.5] 17 1 11 MONITOR 798 741 1062 786 consumers not provided by the duopolists count consumers with [color = pink - 1] 17 1 11 MONITOR 241 498 347 543 earns of duopolist 1 precision ([earns] of duopolist duopolist1) 2 17 1 11 MONITOR 366 497 472 542 earns of duopolist 2 precision ([earns] of duopolist duopolist2) 2 17 1 11 CHOOSER 241 243 472 288 behaviour-of-duopolist2 behaviour-of-duopolist2 "stay anywhere" "stay at centre" "go far from competitor" "go randomly" "go towards competitor" "go towards consumers" 2 CHOOSER 3 377 237 422 price1-policy price1-policy "no discrimination" "best for all new customers" "best for customers so far not served by anyone" "best for customers so far served by competitor" "best for faithfuls" 0 CHOOSER 240 377 471 422 price2-policy price2-policy "no discrimination" "best for all new customers" "best for customers so far not served by anyone" "best for customers so far served by competitor" "best for faithfuls" 0 SLIDER 3 462 237 495 price-cut-made-by-duopolist1 price-cut-made-by-duopolist1 0.00 10.00 0.1 0.05 1 $ HORIZONTAL SLIDER 240 462 471 495 price-cut-made-by-duopolist2 price-cut-made-by-duopolist2 0.00 10.00 0.35 0.05 1 $ HORIZONTAL SWITCH 137 207 370 240 randomize-initial-prices? randomize-initial-prices? 1 1 -1000 SLIDER 4 291 237 324 initial-price1 initial-price1 50 1000 50 10 1 $ HORIZONTAL SLIDER 241 291 472 324 initial-price2 initial-price2 50 1000 60 10 1 $ HORIZONTAL SLIDER 3 426 237 459 max-willingness-to-discount1 max-willingness-to-discount1 0 100 20 1 1 % HORIZONTAL SLIDER 240 426 471 459 max-willingness-to-discount2 max-willingness-to-discount2 0 100 28 1 1 % HORIZONTAL PLOT 476 616 796 786 consumers provided NIL NIL 0.0 10.0 0.0 10.0 true true PENS "by duopolist 1" 1.0 0 -14835848 true "by duopolist 2" 1.0 0 -955883 true "by no one" 1.0 0 -4757638 true @#$#@#$#@ WHAT IS IT? ----------- This model represents an extension of the Hotelling spatial competition model by considering two dimensions. HOW IT WORKS ------------ A certain number of consumers feel like buying a product that is sold by two firms (duopolist1 and duopolist2). If the switch "only-if-near?" is set off, at each time unit, all consumers buy the product from the "nearest" duopolist, without abandoning its original place: only the progress of time units allows the consumers to move or stay according to the rules established by the observer by selection of a behaviour criterion; but if the switch is set on, the consumers are allowed to take the product from the nearest duopolist only if he is at a distance lesser than the limit distance selected by the observer, so that, at certain times, maybe some consumers are not able to take no product at all (they take the color "pink - 1"). Both duopolists may stay or move around the world to attract new consumers, following some behaviour criteria arranged for them. The most interesting rules are: a) those by which a duopolist reacts to the competitor's situation, that is, he reacts to the better price or the shorter distance boasted by the competitor by moving in the world in order to contrast his antagonist in the same market or escape from his neighbourhood in search of a less "difficult" market, and b) those by which the consumers address themselves towards the duopolist showing the cheapest price or the less distance to them: it deals with situations capable to uncork persevering, very hard price- or position war between suppliers. HOW TO USE IT ------------- "Setup" creates a certain number of consumers randomly spread around the world and two firms: duopolist1 (turquoise) and duopolist2 (orange). "Go" makes duopolists move or stay in the world accordingly to the criteria set by the observer, with the goal to gain new consumers or defend his market share. The same for the consumers, that, according to the behavioural criteria dedicated to them, may stay in the world, or wander around it, or reach the nearest duopolist, or the cheapest one (with a rate of knowledge representing, in percentage terms, the probability to really reach the cheapest duopolist). "Go once" makes the same of "go" in a single time unit. By the slider "number-of-consumers" one can select how many people will act in the world demanding the good furnished by the duopolists. The sliders "initial-price1" and "initial-price2" makes possible to set different initial price levels for the duopolists; alternatively, one can let the program establish randomly the initial price levels, by setting on the switch "randomize-initial-prices". The sliders "price-cut-made-by-duopolist1" and "price-cut-made-by-duopolist2" allow to diversify the discount policies followed by the duopolist; in particular, if one or both sliders are set on zero, the corrisponding price policy doesn't trend to practice discounted prices, but to practice only the best price between the market ones. Acting on the slider "knowledge rate" it is possible to select the probability for a consumer desiring to be supplied from the cheapest duopolist to have success in being satisfied. Finally, the slider "lim-distance" makes one be able to set the distance under which the consumers can searching for the duopolist that is, to his respect, "nearest" than the other. THINGS TO NOTICE ---------------- When the "Setup" buttton is pushed, the consumers are put randomly on the world, and are not provided by any duopolist; but after clicking of "Go", they begin to compare their distance from the nearest duopolist, and the prices fixed by the competitors. If their area is not the best - and the chooser "behaviour-of-consumers" is not set on "stay" - the consumers begin to move out till they will find out a new "best" area. The flow of simulations is affected primarily by the initial distribution of consumers in the world and by the initial price levels: in fact, the behaviour of duopolist depends mostly by earns gained in each time unit and by possible price difference, the latter orienting the preferences conferred by consumers to each competitor. After that, it will be the price-policies, the behavioural criteria of consumers and duopolist, and the price trends that determine what kind of results will be obtained during the simulations. THINGS TO TRY ------------- It could be very interesting to test various combinations of sets for switches and choosers; particularly, if the former ones were set on their extreme levels (e.g. for the max-willingness-to-discount, try setting on levels 0% and 100%: it could be highlighted the effects of agents' interactions in case of absolute unwillingness by one or both duopolists to practice any discount and, on the contrary, in case of perpetual and complete willingnes to practice discounts). EXTENDING THE MODEL ------------------- To make the model more complete, one might introduce some balance constrain for the consumers, differentiate them with respect to tastes, or, finally, differentiate the products furnished by the duopolists. One could, also, try to remove the absumption that the consumers always buy from the nearest duopolist, while the price is able, eventually, only to address them along a path that makes them approaching to the cheapest duopolist. CREDITS AND REFERENCES ---------------------- For a friendly introduction to the classical Hotelling model, it may be useful to look at Roberta Capello - Economia regionale (63 - 68) - Il Mulino, Bologna, 2004 (in italian language). @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 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 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 person 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 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 sheep false 0 Rectangle -7500403 true true 151 225 180 285 Rectangle -7500403 true true 47 225 75 285 Rectangle -7500403 true true 15 75 210 225 Circle -7500403 true true 135 75 150 Circle -16777216 true false 165 76 116 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 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.1 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 1.0 0.0 0.0 1 1.0 0.0 0.2 0 1.0 0.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@