내 netlogo 프로그램에 문제가 있습니다. 코드는 다음과 같습니다.NetLogo 권한이 이상 함
globals[
growth-param
money-size-ratio
]
turtles-own[
location
tsize
bbalance
]
to setup
ca
reset-ticks
ask patches[set pcolor blue]
create-turtles initial-telemarketers [
set size 1
set bbalance 0.0
setxy random-xcor random-ycor
set shape "circle"
]
set growth-param 1000
set money-size-ratio 0.001
end
to go
ask patches[set pcolor blue]
sell
accounting
observer-updates
tick
end
to sell
let territory 10 * sqrt size
let maxcalls 100 * size
ask n-of maxcalls patches in-radius territory[
if pcolor = blue [set pcolor black]
set bbalance bbalance + 2
]
end
to accounting
let cost size * 50
ask turtles[
set bbalance bbalance - cost
ifelse bbalance < 1
[die]
[set size bbalance * growth-param]
]
end
to observer-updates
end
텔레 마케팅 회사가 얼마나 많은 사람이 상호 작용하는지 간단하게 모델링 한 모델입니다. 그것은 Railsback에서입니다 & 그림의 모델링 책.
실행할 때마다 볼 수있는 두 가지 문제점이 있습니다. 프로 시저를 판매 할 때 거북이 전용이므로 관찰자 컨텍스트에서만 새 값으로 설정하고 싶지 않습니다. .
도움 주셔서 감사합니다.
그래, 누구든지 이걸 시도하면 다른 것을 찾을 수 없으니 여기 내 전체 (일하는!) 코드입니다 : – user2221135