reorder exp table + diff_new_conn
This commit is contained in:
parent
48077189f0
commit
daab7af6ee
Binary file not shown.
Binary file not shown.
9
firm.py
9
firm.py
|
@ -198,14 +198,7 @@ class FirmAgent(ap.Agent):
|
|||
self.accept_request(select_customer, product)
|
||||
|
||||
def accept_request(self, down_firm, product):
|
||||
lst_firm_size = [
|
||||
firm.revenue_log for firm in self.model.a_lst_total_firms
|
||||
if product in firm.a_lst_product
|
||||
and product not in firm.a_lst_product_removed
|
||||
]
|
||||
prod_accept = self.revenue_log / sum(lst_firm_size)
|
||||
# damp prod
|
||||
prod_accept = prod_accept ** self.flt_diff_new_conn
|
||||
prod_accept = self.flt_diff_new_conn
|
||||
if self.model.nprandom.choice([True, False],
|
||||
p=[prod_accept, 1 - prod_accept]):
|
||||
self.firm_network.graph.add_edges_from([
|
||||
|
|
12
orm.py
12
orm.py
|
@ -55,20 +55,20 @@ class Experiment(Base):
|
|||
g_bom = Column(Text(4294000000), nullable=False)
|
||||
|
||||
n_max_trial = Column(Integer, nullable=False)
|
||||
crit_supplier = Column(DECIMAL(8, 4), nullable=False)
|
||||
firm_req_prf_size = Column(DECIMAL(8, 4), nullable=False)
|
||||
firm_req_prf_conn = Column(Boolean, nullable=False)
|
||||
cap_limit_prob_type = Column(String(16), nullable=False)
|
||||
cap_limit_level = Column(DECIMAL(8, 4), nullable=False)
|
||||
firm_acc_prf_size = Column(DECIMAL(8, 4), nullable=False)
|
||||
firm_acc_prf_conn = Column(Boolean, nullable=False)
|
||||
diff_new_conn = Column(DECIMAL(8, 4), nullable=False)
|
||||
crit_supplier = Column(DECIMAL(8, 4), nullable=False)
|
||||
diff_remove = Column(DECIMAL(8, 4), nullable=False)
|
||||
proactive_ratio = Column(DECIMAL(8, 4), nullable=False)
|
||||
netw_sply_prf_n = Column(Integer, nullable=False)
|
||||
netw_sply_prf_size = Column(Boolean, nullable=False)
|
||||
netw_cust_prf_n = Column(Integer, nullable=False)
|
||||
netw_cust_prf_size = Column(Boolean, nullable=False)
|
||||
cap_limit_prob_type = Column(String(16), nullable=False)
|
||||
cap_limit_level = Column(DECIMAL(8, 4), nullable=False)
|
||||
diff_new_conn = Column(DECIMAL(8, 4), nullable=False)
|
||||
diff_remove = Column(DECIMAL(8, 4), nullable=False)
|
||||
proactive_ratio = Column(DECIMAL(8, 4), nullable=False)
|
||||
|
||||
sample = relationship(
|
||||
'Sample', back_populates='experiment', lazy='dynamic')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
n_max_trial,crit_supplier,firm_req_prf_size,firm_req_prf_conn,firm_acc_prf_size,firm_acc_prf_conn,netw_sply_prf_n,netw_sply_prf_size,netw_cust_prf_n,netw_cust_prf_size,cap_limit_prob_type,cap_limit_level,diff_new_conn,diff_remove,proactive_ratio
|
||||
15,2,2,TRUE,2,TRUE,3,TRUE,3,TRUE,uniform,5,0.5,0.5,0.4
|
||||
10,1,1,FALSE,1,FALSE,2,FALSE,2,FALSE,normal,10,1,1,0.6
|
||||
5,0.5,0.5,,0.5,,1,,1,,,15,2,2,0.8
|
||||
n_max_trial,firm_req_prf_size,firm_req_prf_conn,cap_limit_prob_type,cap_limit_level,firm_acc_prf_size,firm_acc_prf_conn,diff_new_conn,crit_supplier,diff_remove,proactive_ratio,netw_sply_prf_n,netw_sply_prf_size,netw_cust_prf_n,netw_cust_prf_size
|
||||
15,2,TRUE,uniform,5,2,TRUE,0.3,2,0.5,0.4,3,TRUE,3,TRUE
|
||||
10,1,FALSE,normal,10,1,FALSE,0.5,1,1,0.6,2,FALSE,2,FALSE
|
||||
5,0.5,,,15,0.5,,0.7,0.5,2,0.8,1,,1,
|
||||
|
|
|
|
@ -1,2 +1,20 @@
|
|||
n_max_trial,crit_supplier,firm_req_prf_size,firm_req_prf_conn,firm_acc_prf_size,firm_acc_prf_conn,netw_sply_prf_n,netw_sply_prf_size,netw_cust_prf_n,netw_cust_prf_size,cap_limit_prob_type,cap_limit_level,diff_new_conn,diff_remove,proactive_ratio
|
||||
10,1,1,TRUE,1,TRUE,2,TRUE,2,TRUE,uniform,10,1,1,0.9
|
||||
n_max_trial,firm_req_prf_size,firm_req_prf_conn,cap_limit_prob_type,cap_limit_level,firm_acc_prf_size,firm_acc_prf_conn,diff_new_conn,crit_supplier,diff_remove,proactive_ratio,netw_sply_prf_n,netw_sply_prf_size,netw_cust_prf_n,netw_cust_prf_size
|
||||
10,1,TRUE,uniform,10,1,TRUE,0.7,1,1,0.9,2,TRUE,2,TRUE
|
||||
,,,,,,,,,,,,,,
|
||||
,,,,,,,,,,,,,,
|
||||
,,,,,,,,,,,,,,
|
||||
n_max_trial,,,,,,,,,,,,,,
|
||||
firm_req_prf_size,,,,,,,,,,,,,,
|
||||
firm_req_prf_conn,,,,,,,,,,,,,,
|
||||
cap_limit_prob_type,,,,,,,,,,,,,,
|
||||
cap_limit_level,,,,,,,,,,,,,,
|
||||
firm_acc_prf_size,,,,,,,,,,,,,,
|
||||
firm_acc_prf_conn,,,,,,,,,,,,,,
|
||||
diff_new_conn,,,,,,,,,,,,,,
|
||||
crit_supplier,,,,,,,,,,,,,,
|
||||
diff_remove,,,,,,,,,,,,,,
|
||||
proactive_ratio,,,,,,,,,,,,,,
|
||||
netw_sply_prf_n,,,,,,,,,,,,,,
|
||||
netw_sply_prf_size,,,,,,,,,,,,,,
|
||||
netw_cust_prf_n,,,,,,,,,,,,,,
|
||||
netw_cust_prf_size,,,,,,,,,,,,,,
|
||||
|
|
|
Loading…
Reference in New Issue