기타활동/기타

NetLogo 를 통한 소비자 연구 분석 참조 코드

늘근이 2016. 1. 31. 12:55

대학교때 신제품의 경제학이라는 이름을 가지고 어떻게 소비자에게 제품이 전파되고 다시 실구매까지 이어지는데에 대한 연구(?)를 진행한 적이 있다.

 

그때 NetLogo (https://ccl.northwestern.edu/netlogo/)를 가지고 이것저것 프로그래밍을 해서 실제로 그래프도 만들어보고 값도 입력해보았으나, 그럴듯한 실데이터가 없어서 검증또한 어렵고 맞는 방향인지 확인하기가 좀 어려웠던 적이 있다.

 

실제로 신제품의 경제학이란, 얼리 어답터가 먼저 제품을 수용해서 '입소문'이 퍼진 후 실제로 실구매로 이어지게끔 하는 현상을 그당시에는 지칭했는데, 어디서 엉뚱깽뚱하게 떨어진 소리는 아니고, Bass라는 아저씨의 모델을 충실히 따랐던것이 기억난다. 

 

 

https://drive.google.com/file/d/0By5Dq7U-73WccUFNTEdzSU1jNUE/view

 

자세한 내용은 위에 있고, 결국 도출한 식은 다음과 같다.

 

 

 

아 뭔가 지금봐도 모르겠지만, 어쨌든 얼리어답터성격의 사람들의 수요를 따라해서 구매하게 된다는 모델.. 사실 이걸 하면서도 이렇게 되리라는 보장은 없다. 비관적이다.

 

 실제로 구현한 모습은 다음과 같다. 어느정도의 구매가 이어지는데에 대한 코딩이다.

 

실제로 이를 시뮬레이션 한 코드는 다음과 같다.

 

 

;;All copyrights reserved. SFERS economics 2 team 2013'
;;KohRakYun BaikYeonJoo Parkhyejin KimMinBum
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;variable setting;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
turtles-own[
innovator?
activated?
buy?
fresh_buyer?
ki
u1
u0 ]
patches-own[
patch_info?
time ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
to Setup
clear-all
set-default-shape turtles "person"
crt PeopleIntheMarket [
setxy random-xcor random-ycor
set activated? false
set buy? false
set fresh_buyer? false
ifelse who <= InnovatorPortion * PeopleIntheMarket [set innovator? true
set color yellow]
[set innovator? false
set color white]
] ;; random placed turtles with person shape // setting innovators and imitators
settinginitialvariablestoeachturtles
ask patches [ifelse random 10000 <= Initial_Information [set pcolor green
set patch_info? true
set time 0]
[set patch_info? false]]
;; set patches by slider control
reset-ticks
end
to settinginitialvariablestoeachturtles
ask turtles [set i 0 ;;setting initial information that each turtles has 0
set u1 random-normal Utility_Yes 10
set u0 random-normal Utility_No 5] ;;setting each turtles U0 = slider u0 with std5 / u1 = slider with std10
;;this part, especially std, can be changed.
ask turtles [if innovator? = true [set k K-p]]
ask turtles [if innovator? = false [set k K-q]]
end
to Go
reset_freshbuyer
move
eat
activation ;; level '1'
buy ;; level '2'
reproduce ;; feedback
information_disappear ;; infromation disappears when switch is on, meaning that time adequacy is also important to make potential customers purchase
ask patches [if patch_info? = true [set time time + 1]] ;;to make information disappear
tick
end
to reset_freshbuyer
ask turtles [set fresh_buyer? false] ;; after buying new products, if turtles don't leave feedback right away, then there are no possibilities to leave information afterward.
end
to move
ask turtles [
fd 1
rt random 360
] ;; to move turtles randomly
end
to eat
ask turtles [if patch_info? = true [set i i + 1]]
end ;;patch eating process
to activation
ask turtles [if i > 0 [ifelse ((k / i) < (u1 - u0)) [set activated? true
set size 2]
[if random-float 1 >= (1 - ((Tau - (u0 - u1)) / (Tau + (k / i)))) [set activated? true
set size 2]]
]]
end
to buy
ask turtles [if buy? = false and activated? = true [if random-float 1 < (1 - (Threshold / (Delta * i))) [set buy? true
set color red
set fresh_buyer? true]]]
end
to reproduce
ask turtles [ifelse produce_info_forever = false [if fresh_buyer? = true [if random-float 1 <= info_reproduce_ratio [set pcolor blue
set patch_info? true
set time 0]]]
[if random-float 1 <= info_reproduce_ratio [set pcolor blue
set patch_info? true
set time 0]]] ;;complicated.. no time to explain.. ask me later
end
to information_disappear
ask patches [if info_disappear = true [if random-normal info_disappear_time info_disappear_std <= time [set pcolor black
set patch_info? false
set time 0]]]
end
to-report %buy
ifelse any? turtles
[ report (count turtles with [buy?] / count turtles) * 100 ]
[ report 0 ]
end

 

어쨌든 말하고자 했던 부분은, 위의 모델의 정합성이 아니다.

 

만약 실데이터에 접근해서 연구를 있다면 이런 모델들을 세워주는 플랫폼을 통해

 

- 최적의 소비자권장가를 제안하거나

- 어느 시점에 마케팅을 해야하는지,

- 언제 포기해야하는지

 

를 구현할수 있을것 같다. 

 

 

대략적으로 떠오로는 생각은 위와같은

1) NetLogo를 이용한 시뮬레이션 프로그램이 오픈소스이며,

2) 모델을 세우는데 있어 직접 세우지 않고 머신러닝 시스템을 이용해 도출을 해야하며,

3) 이는 파이썬이나 자바(스칼라)기반으로 GPU 의 힘을 빌려

4) 인메모리 스파크와 같은 오픈소스 분산처리를 구현하고

 

아주빠른속도로 시뮬레이션을 하는 솔루션을 개발해 낼수 있다는 것이다.

 

 

 

'기타활동 > 기타' 카테고리의 다른 글

깨달음 (2016 12 27, 화)  (0) 2016.12.27
Mac 용 유틸리티 참조  (3) 2016.12.26
Docker 간단 설치  (0) 2016.01.23
[참고] 코드  (0) 2016.01.03
언어를 배울때의 빠르게 배우는점.  (0) 2015.12.28