Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a83727d2 authored by Nazim@misirlou's avatar Nazim@misirlou
Browse files

nzm

parent 5067bd03
No related branches found
No related tags found
No related merge requests found
......@@ -4,15 +4,10 @@ RADIUS=1
CONTROLSHIFT=1 # shift for reading the initial and final configurations
NTRANS=8
# GLOABAL VARS
# GLOBAL VARS
T=0 # number of time steps
TABTRANS="" # transition table
#sx="*1111101*" # initial configuration
#sy="*0111001*" # final configuration
############### gen cond ##################
......@@ -24,8 +19,7 @@ def setConfigCondition(cond, time):
if cond[i]=='*': # hack to make the variable appear
print( naming.signedName('0', time, i) + " " + naming.signedName('1', time, i))
if cond[i] == '0' or cond[i] == '1':
biti=cond[i]
print ( naming.signedName(biti, time, i) )
print ( naming.signedName(cond[i], time, i) )
......
import os, sys
import subprocess
import re
ECA=110
TSTEPS=70
......@@ -21,8 +23,22 @@ def run():
ncells=len(x)+2
cmd4="python3 w-prnCNFsolution.py %d Zsol-%s.cnf"%(ncells, basename)
cmdseq=[cmd1,cmd2,cmd3,cmd4]
for cmd in cmdseq:
#print(cmd)
runcmd(cmd)
subprocess.run(cmd1.split())
subprocess.run(cmd2.split())
#------------------------------
result = subprocess.getoutput(cmd3)
#------------------------------
subprocess.run(cmd4.split())
itimeCPU=result.index("CPU time")
part= result[itimeCPU+20:itimeCPU+35].strip()
#print("part:[%s]"%part)
tim=re.search("\d[.]?\d+", part)
if tim:
print("satsolver CPU time:%s"%tim.group(0))
else:
print("time could not be extracted")
run()
run()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment