diff --git a/__pycache__/firm.cpython-38.pyc b/__pycache__/firm.cpython-38.pyc index 9e75445..e66c462 100644 Binary files a/__pycache__/firm.cpython-38.pyc and b/__pycache__/firm.cpython-38.pyc differ diff --git a/__pycache__/model.cpython-38.pyc b/__pycache__/model.cpython-38.pyc index b7f758a..95e447c 100644 Binary files a/__pycache__/model.cpython-38.pyc and b/__pycache__/model.cpython-38.pyc differ diff --git a/firm.py b/firm.py index e865c72..5a30250 100644 --- a/firm.py +++ b/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([ diff --git a/orm.py b/orm.py index b446097..b09be55 100644 --- a/orm.py +++ b/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') diff --git a/xv_with_exp.csv b/xv_with_exp.csv index 9b87f46..179456b 100644 --- a/xv_with_exp.csv +++ b/xv_with_exp.csv @@ -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, diff --git a/xv_without_exp.csv b/xv_without_exp.csv index a2d55d0..d3b73b5 100644 --- a/xv_without_exp.csv +++ b/xv_without_exp.csv @@ -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,,,,,,,,,,,,,,