simulator
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@ spec:
|
|||||||
prod:
|
prod:
|
||||||
Raw_Agriculture_Plot: 1
|
Raw_Agriculture_Plot: 1
|
||||||
- name: Fruit
|
- name: Fruit
|
||||||
amount: 100
|
amount: 20
|
||||||
prod:
|
prod:
|
||||||
Raw_Agriculture_Plot: 1
|
Raw_Agriculture_Plot: 1
|
||||||
# - name: Wood
|
# - name: Wood
|
||||||
@@ -20,10 +20,10 @@ spec:
|
|||||||
# Wood: 1
|
# Wood: 1
|
||||||
|
|
||||||
- name: Food
|
- name: Food
|
||||||
amount: 50
|
amount: 500
|
||||||
prod:
|
prod:
|
||||||
# Fuel: 1
|
# Fuel: 1
|
||||||
# Fruit: 1
|
Fruit: 1
|
||||||
Grain: 2
|
Grain: 2
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,8 +127,9 @@ class Price_Believe_Distribiute_Agent(Base_Distribution_Agent):
|
|||||||
If positive will add lr to believe
|
If positive will add lr to believe
|
||||||
If negative will sub lr to believe
|
If negative will sub lr to believe
|
||||||
"""
|
"""
|
||||||
|
clipMod=max(-self.lr_at_sales,min(modifier,self.lr_at_sales))
|
||||||
self.price_believe[cx_id]+=(modifier/self.lr_at_sales)*self.lr
|
#clip mod so that price believe more smooth
|
||||||
|
self.price_believe[cx_id]+=(clipMod/self.lr_at_sales)*self.lr
|
||||||
|
|
||||||
self.price_believe[cx_id] = round(self.price_believe[cx_id], 2)
|
self.price_believe[cx_id] = round(self.price_believe[cx_id], 2)
|
||||||
if self.price_believe[cx_id] < 1:
|
if self.price_believe[cx_id] < 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user