no need for resetting random generator with seed
This commit is contained in:
parent
36abde1022
commit
09ea2e9527
|
@ -15,5 +15,5 @@ inner join (select s_id, max(ts) as max_ts from iiabmdb.without_exp_result where
|
||||||
on a.id = b.s_id
|
on a.id = b.s_id
|
||||||
group by e_id) as b
|
group by e_id) as b
|
||||||
on a.id = b.e_id
|
on a.id = b.e_id
|
||||||
where count >= 12
|
where count > 10
|
||||||
order by count desc;
|
order by count desc;
|
||||||
|
|
|
@ -2,6 +2,7 @@ select id, e_id, idx_sample, seed, ts_done from iiabmdb.without_exp_sample where
|
||||||
select count(id) from iiabmdb.without_exp_sample where is_done_flag != -1;
|
select count(id) from iiabmdb.without_exp_sample where is_done_flag != -1;
|
||||||
select count(id) from iiabmdb.without_exp_sample‘;
|
select count(id) from iiabmdb.without_exp_sample‘;
|
||||||
select count(id) from iiabmdb.with_exp_sample where is_done_flag != -1;
|
select count(id) from iiabmdb.with_exp_sample where is_done_flag != -1;
|
||||||
|
select * from iiabmdb.with_exp_sample where is_done_flag != 1;
|
||||||
|
|
||||||
select * from
|
select * from
|
||||||
(select distinct idx_scenario, n_max_trial, crit_supplier, firm_pref_request,
|
(select distinct idx_scenario, n_max_trial, crit_supplier, firm_pref_request,
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -70,7 +70,7 @@ class ControllerDB:
|
||||||
result['dct_lst_init_remove_firm_prod'] = \
|
result['dct_lst_init_remove_firm_prod'] = \
|
||||||
result['dct_lst_init_remove_firm_prod'].apply(
|
result['dct_lst_init_remove_firm_prod'].apply(
|
||||||
lambda x: pickle.loads(x))
|
lambda x: pickle.loads(x))
|
||||||
list_dct = result.loc[result['count'] >= 12,
|
list_dct = result.loc[result['count'] > 10,
|
||||||
'dct_lst_init_remove_firm_prod'].to_list()
|
'dct_lst_init_remove_firm_prod'].to_list()
|
||||||
else:
|
else:
|
||||||
for _, row in Firm.iterrows():
|
for _, row in Firm.iterrows():
|
||||||
|
|
2
model.py
2
model.py
|
@ -1,6 +1,5 @@
|
||||||
import agentpy as ap
|
import agentpy as ap
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import numpy as np
|
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
from firm import FirmAgent
|
from firm import FirmAgent
|
||||||
from product import ProductAgent
|
from product import ProductAgent
|
||||||
|
@ -13,7 +12,6 @@ class Model(ap.Model):
|
||||||
def setup(self):
|
def setup(self):
|
||||||
self.sample = self.p.sample
|
self.sample = self.p.sample
|
||||||
self.int_stop_times, self.int_stop_t = 0, None
|
self.int_stop_times, self.int_stop_t = 0, None
|
||||||
self.nprandom = np.random.default_rng(self.p.seed)
|
|
||||||
self.int_n_iter = int(self.p.n_iter)
|
self.int_n_iter = int(self.p.n_iter)
|
||||||
|
|
||||||
self.dct_lst_remove_firm_prod = self.p.dct_lst_init_remove_firm_prod
|
self.dct_lst_remove_firm_prod = self.p.dct_lst_init_remove_firm_prod
|
||||||
|
|
|
@ -1,37 +1,37 @@
|
||||||
X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16,X17,X18,X19,X20,X21,X22,X23
|
X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16,X17,X18,X19,X20,X21,X22,X23
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
1,0,0,0,1,0,0,1,1,1,1,1,0,1,0,0,0,0,0,1,1,1,1
|
1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1
|
||||||
2,0,0,0,2,0,0,2,2,2,2,2,0,2,0,0,0,0,0,2,2,2,2
|
2,0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,2,2,2,2,2
|
||||||
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2
|
0,0,0,0,0,0,0,1,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