This commit is contained in:
HaoYizhi 2023-06-11 22:42:04 +08:00
parent c367252da2
commit ad8771c459
9 changed files with 86 additions and 35 deletions

2
.vscode/launch.json vendored
View File

@ -12,7 +12,7 @@
"console": "integratedTerminal",
"justMyCode": true,
"args": [
"--exp", "without_exp",
"--exp", "with_exp",
"--reset_db", "True",
"--job", "24"
]

View File

@ -10,6 +10,7 @@ iiabmdb.with_exp_result
where s_id = '54170';
SELECT * FROM iiabmdb.with_exp_sample where id='54170';
SELECT * FROM iiabmdb.with_exp_experiment where id='1084';
SELECT max(id) FROM iiabmdb.with_exp_sample;
select * from

View File

@ -1,3 +1,5 @@
select count(*) from iiabmdb.without_exp_sample;
select distinct s_id from iiabmdb.without_exp_result where ts > 0;
select s_id, max(ts) as max_ts from iiabmdb.without_exp_result where ts > 0 group by s_id order by max_ts;
select e_id, count(id) as count, max(max_ts) as max_max_ts from iiabmdb.without_exp_sample as a
@ -13,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
group by e_id) as b
on a.id = b.e_id
where count >= 9
order by count desc;
where count >= 12
order by count desc;

View File

@ -1 +1 @@
db_name_prefix: without_exp
db_name_prefix: test

View File

@ -74,7 +74,7 @@ class ControllerDB:
result['dct_lst_init_remove_firm_prod'] = \
result['dct_lst_init_remove_firm_prod'].apply(
lambda x: pickle.loads(x))
list_dct = result.loc[result['count'] >= 9,
list_dct = result.loc[result['count'] >= 12,
'dct_lst_init_remove_firm_prod'].to_list()
# list_dct = [{'140': ['1.4.5.1']}]
# list_dct = [{'133': ['1.4.4.1']}]
@ -98,9 +98,9 @@ class ControllerDB:
g_product_js = json.dumps(nx.adjacency_data(g_bom))
# insert exp
df_xv = pd.read_csv("xv_without_exp.csv", index_col=None)
df_xv = pd.read_csv("xv_with_exp.csv", index_col=None)
# read the OA table
df_oa = pd.read_csv("oa_without_exp.csv", index_col=None)
df_oa = pd.read_csv("oa_with_exp.csv", index_col=None)
df_oa = df_oa.iloc[:, 0:df_xv.shape[1]]
for idx_scenario, row in df_oa.iterrows():
dct_exp_para = {}

39
oa_L36.txt Normal file
View File

@ -0,0 +1,39 @@
X X X X X X X X X X X X X X X X X X X X X X X
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
-------------------------------------------------------------------
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3
1 1 1 1 1 2 2 2 2 2 2 1 1 1 1 2 2 2 2 3 3 3 3
1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 1 1 1 1
1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 1 1 1 1 2 2 2 2
1 1 2 2 2 1 1 1 2 2 2 1 1 2 3 1 2 3 3 1 2 2 3
1 1 2 2 2 1 1 1 2 2 2 2 2 3 1 2 3 1 1 2 3 3 1
1 1 2 2 2 1 1 1 2 2 2 3 3 1 2 3 1 2 2 3 1 1 2
1 2 1 2 2 1 2 2 1 1 2 1 1 3 2 1 3 2 3 2 1 3 2
1 2 1 2 2 1 2 2 1 1 2 2 2 1 3 2 1 3 1 3 2 1 3
1 2 1 2 2 1 2 2 1 1 2 3 3 2 1 3 2 1 2 1 3 2 1
1 2 2 1 2 2 1 2 1 2 1 1 2 3 1 3 2 1 3 3 2 1 2
1 2 2 1 2 2 1 2 1 2 1 2 3 1 2 1 3 2 1 1 3 2 3
1 2 2 1 2 2 1 2 1 2 1 3 1 2 3 2 1 3 2 2 1 3 1
1 2 2 2 1 2 2 1 2 1 1 1 2 3 2 1 1 3 2 3 3 2 1
1 2 2 2 1 2 2 1 2 1 1 2 3 1 3 2 2 1 3 1 1 3 2
1 2 2 2 1 2 2 1 2 1 1 3 1 2 1 3 3 2 1 2 2 1 3
2 1 2 2 1 1 2 2 1 2 1 1 2 1 3 3 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