Midsize_Vehicle_Market
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This section could give a general understanding of what the model is trying to show or explain.
HOW IT WORKS
This section could explain what rules the agents use to create the overall behavior of the model.
HOW TO USE IT
This section could explain how to use the model, including a description of each of the items in the interface tab.
THINGS TO NOTICE
This section could give some ideas of things for the user to notice while running the model.
THINGS TO TRY
This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.
EXTENDING THE MODEL
This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.
NETLOGO FEATURES
This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.
RELATED MODELS
This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.
CREDITS AND REFERENCES
This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.
Comments and Questions
globals [ brands A-brand B-brand C-brand D-brand E-brand F-brand G-brand H-brand p1 ; parameter 1 in utility function p2 ; parameter 2 in utility function p3 ; parameter 3 in utility function p4 ; parameter 4 in utility function p5 ; parameter 5 in utility function p6 ; parameter 6 in utility function p7 ; parameter 7 in utility function u_price u_fhr u_MPG u_age u_gender u_income temp-color plot-sales-volume A-sales-volume B-sales-volume C-sales-volume D-sales-volume E-sales-volume F-sales-volume G-sales-volume H-sales-volume total-sales-volume A-market-share B-market-share C-market-share D-market-share E-market-share F-market-share G-market-share H-market-share ] breed [cars car] breed [customers customer] breed [dealers dealer] breed [manufacturers manufacturer] cars-own [ price ; selling price, set by dealer at the beginning of each week front-head-room ; vehicle attributes - front headroom in the utility function MPG ; vehicle attributes - mileage per gallon in the utility function sold? ; status, true = sold, false = for sale brand ; brand, responding to manufacturer ] customers-own [ age ; age, from 20 to 80 gender ; gender, either female (1) or male (0) income ; annual household income, unit: 10k found-dealer? ; indicates wether they found a dealer nearby ] dealers-own [ BSC ; brand specific constants in utility function, reflecting customers' preference in brands ccar-price ; price of conventional car it offers ccar-front-head-room ; front headroom of conventional car it offers ccar-MPG ; MPG of conventional car it offeres inventory ; inventory level, number of cars at the dealers sales-volume ; sales volume this week revenue ; revenue this week utility ; utility value ] manufacturers-own [ sales-volume revenue inventory ] ;********************INITIALIZE******************** to setup clear-all ;; initialize parameters initialize ;; set up brands set brands [red green brown yellow blue pink grey turquoise] ; at most 8 brands in the model ;; initialize manufacturers set-default-shape manufacturers "car" let i 0 repeat number-of-manufacturers [ create-manufacturers 1 ask manufacturer i [ set size 2 setxy min-pxcor + 0.5 min-pycor - i + 8 ; align manufacturers in the lower left corner set color item i brands ] set i (i + 1) ] ;; create dealers set-default-shape dealers "house" ask n-of number-of-dealers patches [ sprout-dealers 1 [ set size 1.8 set color item random number-of-manufacturers brands ; set to different color representing different brands set inventory random max-dealer-inventory ; set initial inventory levels set sales-volume 0 ; starts with zero sales set revenue 0 ;show inventory ; #debug set-up-vehicle-data ; set up vehicle data of each brand ] ] ;; create cars set-default-shape cars "car" ;set-default-shape manufacturers "manufacturer" ; update-variables do-plots end ;********************RUN******************** to go ;; old customers leave the market ask customers [ die ] ;; at the beginning of each sales week ask dealers [ adjust-price ] ;; new customers enter the market initialize-customers ask customers [ ask dealers [ set utility -100000 ] visit-dealers make-a-choice ] update-variables tick do-plots end ;; initialize parameters to initialize set A-brand 0 set B-brand 0.1 set C-brand 0.2 set D-brand 0.3 set E-brand 0.4 set F-brand 0.5 set G-brand 0.6 set H-brand 0.7 set p1 1 set p2 (1 / 20000) set p3 (1 / 40) set p4 (1 / 22.5) set p5 (1 / 50) set p6 (1 / 0.5) set p7 (1 / 10) end ; to set up vehicle attributes of each brand to set-up-vehicle-data ifelse color = red [ set BSC A-brand set ccar-price A-price set ccar-front-head-room A-front-head-room set ccar-MPG A-MPG ] [ ifelse color = green [ set BSC B-brand set ccar-price B-price set ccar-front-head-room B-front-head-room set ccar-MPG B-MPG ] [ ifelse color = brown [ set BSC C-brand set ccar-price C-price set ccar-front-head-room C-front-head-room set ccar-MPG C-MPG ] [ ifelse color = yellow [ set BSC D-brand set ccar-price D-price set ccar-front-head-room D-front-head-room set ccar-MPG D-MPG ] [ ifelse color = blue [ set BSC E-brand set ccar-price E-price set ccar-front-head-room E-front-head-room set ccar-MPG E-MPG ] [ ifelse color = pink [ set BSC F-brand set ccar-price F-price set ccar-front-head-room F-front-head-room set ccar-MPG F-MPG ] [ ifelse color = grey [ set BSC G-brand set ccar-price G-price set ccar-front-head-room G-front-head-room set ccar-MPG G-MPG ] [ set BSC H-brand set ccar-price H-price set ccar-front-head-room H-front-head-room set ccar-MPG H-MPG ] ] ] ] ] ] ] end to adjust-price end to initialize-customers set-default-shape customers "person" create-customers number-of-customers [ setxy random-xcor random-ycor set color white ifelse random 100 < 50 [set gender 1] [set gender 0] set age (20 + random 60) set income (5 + random 10) set found-dealer? false ] end ; customers visit the first 4 dealers they see to visit-dealers ;let i 0 repeat choice-set-size [ while [not found-dealer?] [ wiggle if any? dealers-here [ set found-dealer? true ] ] calculate-utility ;set i (i + 1) set found-dealer? false ] end to wiggle forward random 3 rt (random 180 - 90) end ;; calculate utility for customer i and brand j to calculate-utility set u_age age set u_gender gender set u_income income ask one-of dealers-here [ set utility ( p1 * BSC + p2 * ccar-price + p3 * ccar-front-head-room + p4 * ccar-MPG + p5 * u_age + p6 * u_gender + p7 * u_income + (random 100 / 100) ) ] end ; customers make a choice among 4 cars to make-a-choice ask one-of dealers with-max [utility] [ set sales-volume (sales-volume + 1) set revenue (revenue + ccar-price) ;show sales-volume set inventory (inventory - 1) ;show inventory ] end to update-variables set total-sales-volume sum [sales-volume] of dealers show total-sales-volume ask manufacturer 0 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set A-sales-volume sales-volume set A-market-share (A-sales-volume / total-sales-volume) * 100 ] ask manufacturer 1 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set B-sales-volume sales-volume set B-market-share (B-sales-volume / total-sales-volume) * 100 ] ask manufacturer 2 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set C-sales-volume sales-volume set C-market-share (C-sales-volume / total-sales-volume) * 100 ] ask manufacturer 3 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set D-sales-volume sales-volume set D-market-share (D-sales-volume / total-sales-volume) * 100 ] ask manufacturer 4 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set E-sales-volume sales-volume set E-market-share (E-sales-volume / total-sales-volume) * 100 ] ask manufacturer 5 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set F-sales-volume sales-volume set F-market-share (F-sales-volume / total-sales-volume) * 100 ] ask manufacturer 6 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set G-sales-volume sales-volume set G-market-share (G-sales-volume / total-sales-volume) * 100 ] ask manufacturer 7 [ set temp-color color set sales-volume sum [ sales-volume ] of dealers with [color = temp-color] set inventory sum [ inventory ] of dealers with [color = temp-color] set H-sales-volume sales-volume set H-market-share (H-sales-volume / total-sales-volume) * 100 ] end to do-plots set-current-plot "sales-volume" set-current-plot-pen "1" plot A-sales-volume ;show A-sales-volume set-current-plot-pen "2" plot B-sales-volume ;show B-sales-volume set-current-plot-pen "3" plot C-sales-volume set-current-plot-pen "4" plot D-sales-volume set-current-plot-pen "5" plot E-sales-volume set-current-plot-pen "6" plot F-sales-volume set-current-plot-pen "7" plot G-sales-volume set-current-plot-pen "8" plot H-sales-volume set-current-plot "market-share" set-current-plot-pen "1" plot A-market-share set-current-plot-pen "2" plot B-market-share set-current-plot-pen "3" plot C-market-share set-current-plot-pen "4" plot D-market-share set-current-plot-pen "5" plot E-market-share set-current-plot-pen "6" plot F-market-share set-current-plot-pen "7" plot G-market-share set-current-plot-pen "8" plot H-market-share end
There are 2 versions of this model.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.