我想通過formBuyerAggressiveness到一個bidTargetPrice過程。它給出了「預期的記者」錯誤消息。這是我迄今爲止的代碼。我想通過一個過程變量作爲輸入到另一個過程netlogo
to bidTargetPrice [tradeID]
let buyerAggressiveness [formBuyerAggresiveness] of tradeID
; if (buyerAggresiveness <= 1) [
ifelse (- 1 < buyerAggresiveness) and (buyerAggresiveness <= 0)
[report equilibriumPrice * (1 - (((e^(- buyerAggresiveness * theta)) - 1)/(e^theta - 1)))
]
[report equilibriumPrice + ((value - equilibriumPrice) * (((e^(buyerAggresiveness * theta)) - 1)/((e^theta) - 1)))
]
; ]
以下是我在上述過程中調用的過程。我打算把買方的侵略性參數轉化爲幫助形成價格的代理人。
to formBuyerAggresiveness
;define some local parameters
ifelse (transactionPrice > 0.0)
[ ifelse (bidTargetPrice >= transactionPrice)
[ let desiredAggressiveness (((1 - C2) * rshout) - C1) ;rshout is the degree of aggressiveness that would form a price equal to the last bid
report buyerAggressiveness (degreeOfAggressiveness + B1 * (desiredAggressiveness - degreeOfAggressiveness)) ;degreeOfAggressiveness is a random of individual trader aggressiveness from -1 to 1 range. *defined during init user/buyer
]
[ let desiredAggressiveness (((1 + C2) * rshout) + C1) ;buyer must be more aggresive
report degreeOfAggressiveness + B1 * (desiredAggressiveness - degreeOfAggressiveness)
]
]
[ if (bid?) and (bidTargetPrice <= bestBid)
[let desiredAggressiveness (((1 + C2) * rshout) + C1)
report degreeOfAggressiveness + B1 * (desiredAggressiveness - degreeOfAggressiveness)
]
]
end
你爲什麼使用報表formBuyerAggresiveness?對我來說,這不是一個記者的背景,你可以使用set。但我不知道你在哪裏打電話'formBuyerAggresiveness' – delaye 2015-03-31 07:49:14