Commit 18f66cdf authored by Thom Badings's avatar Thom Badings
Browse files

Synch for coin benchmark

parent e0d4b26f
......@@ -100,8 +100,13 @@ def run_sample(numiter,numsample,thres,direction,parameters,model,properties,mod
# for each sample
for i in range(int(numsample)):
# if i % int(numsample/10) == 0:
# print('Run for sample',i)
if numsample >= 10000:
div = 100
else:
div = 10
if i % int(numsample/div) == 0:
print('Run for sample',i)
#sample parameters according to the region defined by
# "Parameter synthesis for Markov models: Faster than ever" paper
......@@ -110,7 +115,7 @@ def run_sample(numiter,numsample,thres,direction,parameters,model,properties,mod
for x in parameters:
if "coin" in model_file:
s = np.random.uniform(0.15, 0.85)
s = np.random.uniform(0.1, 0.9)
#s= np.random.uniform(1e-5,1-1e-5)
else:
......@@ -130,8 +135,8 @@ def run_sample(numiter,numsample,thres,direction,parameters,model,properties,mod
instantiated_model = instantiator.instantiate(rational_parameter_assignments)
result = stormpy.model_checking(instantiated_model, properties[0]).at(instantiated_model.initial_states[0])
# if verbose and i % int(numsample/10) == 0:
# print(' -- Solution value:',float(result))
if verbose and i % int(numsample/div) == 0:
print(' -- Solution value:',float(result))
#print(result)
#append the counter according to the spec
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment