experiments in model and firm py
This commit is contained in:
@@ -74,7 +74,7 @@ class ControllerDB:
|
||||
# insert exp
|
||||
df_xv = pd.read_csv("xv.csv", index_col=None)
|
||||
# read the OA table
|
||||
df_oa = pd.read_fwf("oa.csv", index_col=None)
|
||||
df_oa = pd.read_csv("oa.csv", index_col=None)
|
||||
for idx_scenario, row in df_oa.iterrows():
|
||||
dct_exp_para = {}
|
||||
for idx_col, para_level in enumerate(row):
|
||||
@@ -91,7 +91,11 @@ class ControllerDB:
|
||||
f"init_removal {idx_init_removal}!")
|
||||
|
||||
def add_experiment_1(self, idx_scenario, idx_init_removal,
|
||||
dct_lst_init_remove_firm_prod, g_bom, n_max_trial):
|
||||
dct_lst_init_remove_firm_prod, g_bom,
|
||||
n_max_trial, crit_supplier, firm_pref_request,
|
||||
firm_pref_accept, netw_pref_cust_n,
|
||||
netw_pref_cust_size, cap_limit, diff_new_conn,
|
||||
diff_remove,):
|
||||
e = Experiment(
|
||||
idx_scenario=idx_scenario,
|
||||
idx_init_removal=idx_init_removal,
|
||||
@@ -99,7 +103,16 @@ class ControllerDB:
|
||||
n_iter=int(self.dct_parameter['n_iter']),
|
||||
dct_lst_init_remove_firm_prod=dct_lst_init_remove_firm_prod,
|
||||
g_bom=g_bom,
|
||||
n_max_trial=n_max_trial)
|
||||
n_max_trial=n_max_trial,
|
||||
crit_supplier=crit_supplier,
|
||||
firm_pref_request=firm_pref_request,
|
||||
firm_pref_accept=firm_pref_accept,
|
||||
netw_pref_cust_n=netw_pref_cust_n,
|
||||
netw_pref_cust_size=netw_pref_cust_size,
|
||||
cap_limit=cap_limit,
|
||||
diff_new_conn=diff_new_conn,
|
||||
diff_remove=diff_remove,
|
||||
)
|
||||
db_session.add(e)
|
||||
db_session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user