|
|
@ -4,6 +4,8 @@ import util.script as script |
|
|
|
import util.queries as queries |
|
|
|
import dimod |
|
|
|
|
|
|
|
from tqdm import tqdm |
|
|
|
|
|
|
|
def main(): |
|
|
|
wmis_siman_results_alpha_num_of_assignments() |
|
|
|
#wmis_siman_results() |
|
|
@ -30,9 +32,9 @@ def wmis_siman_results_alpha_num_of_assignments(): |
|
|
|
idb = script.connect_to_instance_pool() |
|
|
|
|
|
|
|
q = queries.WMIS_result_scope_query_raw(idb) |
|
|
|
q.query("c42_v[5-42]_1", "wmis_siman_results") |
|
|
|
q.query("c42_v[5-84]_1", "wmis_siman_results") |
|
|
|
|
|
|
|
insert_row = ("INSERT INTO c42_v5to42_1_wmis_results " |
|
|
|
insert_row = ("INSERT INTO c42_v5to84_1_wmis_results " |
|
|
|
"(result_id, " |
|
|
|
" number_of_clauses, " |
|
|
|
" number_of_variables, " |
|
|
@ -42,7 +44,7 @@ def wmis_siman_results_alpha_num_of_assignments(): |
|
|
|
" energy) " |
|
|
|
"VALUES (%s, %s, %s, %s, %s, %s, %s) ") |
|
|
|
|
|
|
|
for result in q: |
|
|
|
for result in tqdm(q): |
|
|
|
sample_set = queries.read_raw_wmis_sample_set(result["data"]) |
|
|
|
|
|
|
|
data = script.analyze_wmis_sample(sample_set.first) |
|
|
@ -57,8 +59,6 @@ def wmis_siman_results_alpha_num_of_assignments(): |
|
|
|
int(data["num_occurrences"]), |
|
|
|
int(data["energy"]))) |
|
|
|
|
|
|
|
print(data) |
|
|
|
|
|
|
|
edb.commit() |
|
|
|
edb_cursor.close() |
|
|
|
edb.close() |
|
|
|