diff --git a/docs/jupyter_tutorial.html b/docs/jupyter_tutorial.html index 6860f570..8730e323 100644 --- a/docs/jupyter_tutorial.html +++ b/docs/jupyter_tutorial.html @@ -11810,7 +11810,7 @@
class Kid(abce.Agent):
- def init(self, parameters, agent_parameters):
- self.num_kids = parameters['num_kids']
+ def init(self, num_kids):
+ self.num_kids = num_kids
if self.id == 0:
self.create('ball', 1)
@@ -12051,7 +12077,7 @@ Giving a Good
kids = simulation.build_agents(Kid, 'kid', number=num_kids,
- parameters={"num_kids": num_kids})
+ num_kids=num_kids)
@@ -12153,8 +12179,8 @@ Trade¶
class NewKid(abce.Agent):
- def init(self, parameters, agent_parameters):
- self.num_dealers = parameters['num_dealers']
+ def init(self, num_dealers):
+ self.num_dealers = num_dealers
self.create('money', 100) # don't we all wish you'd this function in real live?
def buy_drugs(self):
@@ -12187,7 +12213,7 @@ Trade¶
class DrugDealer(abce.Agent):
- def init(self, parameters, agent_parameters):
+ def init(self):
self.create('drugs', 1)
def sell_to_customers(self):
@@ -12218,7 +12244,7 @@ Trade¶
In [14]:
-simulation_parameters={'num_dealers': 1, 'num_customers': 1, 'rounds': 2}
+num_dealers = 1
@@ -12244,7 +12270,7 @@ Trade¶
In [16]:
-drug_dealers = simulation.build_agents(DrugDealer, 'drug_dealer', number=simulation_parameters['num_dealers'])
+drug_dealers = simulation.build_agents(DrugDealer, 'drug_dealer', number=num_dealers)
@@ -12257,7 +12283,8 @@ Trade¶
In [17]:
-customers = simulation.build_agents(NewKid, 'customer', number=simulation_parameters['num_customers'], parameters=simulation_parameters)
+customers = simulation.build_agents(NewKid, 'customer', number=1,
+ num_dealers=num_dealers)
@@ -12301,7 +12328,7 @@ Trade¶
In [19]:
-for r in range(simulation_parameters['rounds']):
+for r in range(2):
simulation.advance_round(r)
print('Customer offers 10 dollar:')
customers.buy_drugs()
@@ -12328,18 +12355,18 @@ Trade¶
@@ -12474,7 +12501,9 @@ Lets capture data
-Round0
+
+time only simulation 2.27
+Round0
Round1
Round2
Round3
@@ -12491,14 +12520,6 @@ Lets capture dataLets capture dataLets capture data
-/Users/taghawi/Dropbox/workspace/abce_examples/examples/jupyter_tutorial/result/gatherdata_2017-09-05_08-05
+/Users/taghawi/Dropbox/workspace/abce_examples/examples/jupyter_tutorial/result/gatherdata_2018-02-27_04-15
@@ -12671,10 +12698,10 @@ Lets capture data
-['aggregate_datadealer.csv',
+['panel_datadealer.csv',
'aggregated_datadealer.csv',
- 'description.txt',
- 'panel_datadealer.csv']
+ 'aggregate_datadealer.csv',
+ 'description.txt']
@@ -12754,18 +12781,18 @@ Using statistical software
-