C2C_online_shopping
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 [ temp-c-price temp-c-seller-rating temp-c-shipping total-sellers count-A count-B count-C count-D count-E count-F count-G count-H count-I count-J ] breed [sellers seller] breed [buyers buyer] sellers-own [ inventory cost ; product cost profit-rate ; profit rate of the product price ; price of the product sales-volume ; cout of sold products revenue ; revenue age ; how many days the seller has been active in the market profit ; profit rating ; feedback ratings from buyers, +1 = positive, -1 = negative, 0 = neutral utility star-level ; proportional to the feedback rating alive? ] buyers-own [ rating ; feedback rating from sellers, +1 = positive, -1 = negative, 0 = neutral c-price ; price coefficient in utility function c-seller-rating ; seller-rating coefficient utility function c-shipping ; shipping coefficient utility function ] ;********************INITIALIZE******************** to setup clear-all ;; create existing sellers set-default-shape sellers "computer server" create-sellers existing-sellers [ setxy random-xcor random-ycor set color blue set age random 10000 set rating random 10000 ;set size 1 + rating * 0.01 ;; initialize set sales-volume 0 set revenue 0 set profit 0 set inventory random 1000 set cost 20 set profit-rate random 20 set alive? true ] ;; create existing buyers set-default-shape buyers "computer workstation" create-buyers number-of-buyers [ setxy random-xcor random-ycor set c-price random 100 / (100 * 20) set c-seller-rating random 100 / (100 * 1000) set c-shipping random 100 / (100 * 25) ] ; update-variables ;do-plots end ;;********************RUN******************** to go ;; sellers not doing well leave the market ;; new sellers enter the market create-sellers new-sellers [ set size 1 setxy random-xcor random-ycor set color red set age 0 set rating 0 set sales-volume 0 set revenue 0 set profit 0 set inventory random 1000 set cost 20 set profit-rate random 20 set alive? true ] ;; sellers adjust their price ask sellers [ adjust-price ] ask n-of demand buyers [ ask sellers [ set utility -10000 ] surf-online make-a-choice ; give-feedback ] update-variables ;do-plots end to adjust-price set price cost * (profit-rate / 100 + 1) end ;; buyers surf online and randomly pick 4 sellers to surf-online set temp-c-price c-price set temp-c-seller-rating c-seller-rating set temp-c-shipping c-shipping ; show count sellers ask n-of choice-set-size sellers with [alive?] [ set utility ( temp-c-price * price + temp-c-seller-rating * rating + temp-c-shipping * (distance myself) + (random 100 / 100)) ] end to make-a-choice ask one-of sellers with-max [utility] [ set sales-volume (sales-volume + 1) set revenue (revenue + price) set profit (profit + cost * profit-rate) ;show sales-volume set inventory (inventory - 1) set size size + 0.01 ;show inventory ;; give seller feedback rating ifelse random 100 < 98 [ set rating (rating + 1) ; buyer satisfied with seller ] [ if random 50 < 100 [ set rating (rating - 1) ; buyer not stisfied with seller ] ] ] end to update-variables ask sellers [ ifelse rating <= 250 [ set star-level "A" ] [ ifelse rating <= 500 [ set star-level "B" ] [ ifelse rating <= 1000 [ set star-level "C" ] [ ifelse rating <= 2000 [ set star-level "D" ] [ ifelse rating <= 5000 [ set star-level "E" ] [ ifelse rating <= 5000 [ set star-level "F" ] [ ifelse rating <= 5000 [ set star-level "G" ] [ ifelse rating < 10000 [ set star-level "H" ] [ ifelse rating < 20000 [ set star-level "I" ] [ set star-level "J" ] ] ] ] ] ] ] ] ] ] ask sellers with [age > 100] [ if revenue < 100 [ set alive? false set color yellow ] ] set total-sellers count sellers with [alive?] ;show total-sellers set count-A count sellers with [star-level = "A" and alive?] set count-B count sellers with [star-level = "B" and alive?] set count-C count sellers with [star-level = "C" and alive?] set count-D count sellers with [star-level = "D" and alive?] set count-E count sellers with [star-level = "E" and alive?] set count-F count sellers with [star-level = "F" and alive?] set count-G count sellers with [star-level = "G" and alive?] set count-H count sellers with [star-level = "H" and alive?] set count-I count sellers with [star-level = "I" and alive?] set count-J count sellers with [star-level = "J" and alive?] end ;to do-plots ; set-current-plot "sellers rating" ; set-current-plot-pen "1" ; plot count-A ; ;show A-sales-volume ; set-current-plot-pen "2" ; plot count-B ; ;show B-sales-volume ; set-current-plot-pen "3" ; plot count-C ; set-current-plot-pen "4" ; plot count-D ; set-current-plot-pen "5" ; plot count-E ; set-current-plot-pen "6" ; plot count-F ; set-current-plot-pen "7" ; plot count-G ; set-current-plot-pen "8" ; plot count-H ; set-current-plot-pen "9" ; plot count-I ; set-current-plot-pen "10" ; plot count-J ;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.