all_base = '& G F base1 & G F base2 G F base3'
order1 = 'G i supply X U ! supply base'
order2 = 'G i base X U ! base supply'
order = '& %s %s' %(order1, order2)
task1 = '& %s & G ! obstacle %s' %(all_base, order2)
task2 = '& %s G F supply' %all_base
task3 = '& %s %s' %(all_base, order2)
dra = Dra(task1)
t3 = time.time()
print '------------------------------'
print 'DRA done, time: %s' %str(t3-t2)

#----
prod_dra = Product_Dra(motion_mdp, dra)
#prod_dra.dotify()
t41 = time.time()
print '------------------------------'
print 'Product DRA done, time: %s' %str(t41-t3)
#----
prod_dra.compute_S_f()
t42 = time.time()
print '------------------------------'
print 'Compute MEC done, time: %s' %str(t42-t41)

#------
gamma = 0.0 # 0.3
best_all_plan = syn_full_plan(prod_dra, gamma)
t5 = time.time()
print '------------------------------'
print 'Plan synthesis done, time: %s' %str(t5-t42)
Example #2
0
#----
# task_formula = "& G F & r1 g1 & G F & r2 g2 G F & r4 g3"
task_formula = "& G F & r1 g1 & G F & r2 g2 & G F & r3 F & r4 g3 G F & r2 g1"
dra = Dra(task_formula)

print 'dra done by time %s' % str(time.time() - start)

#----
prod_dra = Product_Dra(motion_mdp, dra)
prod_dra.compute_S_f()
#prod_dra.dotify()

print 'prod_dra done by time %s' % str(time.time() - start)

allowed_risk = 0.0
best_all_plan = syn_full_plan(prod_dra, allowed_risk)

# #----------------------------------------
# print "----------------------------------------"
# print "||||||||Simulation start||||||||||||||||"
# print "----------------------------------------"
# total_T = 20
# state_seq = [initial_node,]
# label_seq = [initial_label,]
# N = 5
# n = 0
# print "Try %s simulations of length %s" %(str(N), str(total_T))

# XX = []
# LL = []
# UU = []
Example #3
0
#----
seq_formula1 = "& F a & F b F c"
seq_formula2 = "F & a F & b F c"
sur_formula1 = "& G F a & G F b G F c"
sur_formula2 = "& G F a G F b"
seq_sur_formula1 = "G F i a F i b F c"
seq_sur_formula2 = "G F & a F & b F c"
dra = Dra(sur_formula1)

#----
prod_dra = Product_Dra(motion_mdp, dra)
prod_dra.compute_S_f()
#prod_dra.dotify()

allowed_risk = 0.0
best_all_plan = syn_full_plan(prod_dra, allowed_risk)

#----------------------------------------
print "----------------------------------------"
print "||||||||Simulation start||||||||||||||||"
print "----------------------------------------"
total_T = 20
state_seq = [initial_node,]
label_seq = [initial_label,]
N = 5
n = 0
print "Try %s simulations of length %s" %(str(N), str(total_T))

XX = []
LL = []
UU = []
Example #4
0
t3 = time.time()
print 'DRA done, time: %s' % str(t3 - t2)

#----
prod_dra = Product_Dra(motion_mdp, dra)
#prod_dra.dotify()
t41 = time.time()
print 'Product DRA done, time: %s' % str(t41 - t3)
#----
prod_dra.compute_S_f()
t42 = time.time()
print 'Compute accepting MEC done, time: %s' % str(t42 - t41)

#------
gamma = 0.3
best_all_plan = syn_full_plan(prod_dra, gamma)
t5 = time.time()
print 'Plan synthesis done, time: %s' % str(t5 - t42)

#----------------------------------------
print "----------------------------------------"
print "||||||||Simulation start||||||||||||||||"
print "----------------------------------------"
total_T = 300
state_seq = [
    initial_node,
]
label_seq = [
    initial_label,
]
N = 10
Example #5
0
t3 = time.time()
print 'DRA done, time: %s' %str(t3-t2)

#----
prod_dra = Product_Dra(motion_mdp, dra)
#prod_dra.dotify()
t41 = time.time()
print 'Product DRA done, time: %s' %str(t41-t3)
#----
prod_dra.compute_S_f()
t42 = time.time()
print 'Compute accepting MEC done, time: %s' %str(t42-t41)

#------
gamma = 0.0
best_all_plan = syn_full_plan(prod_dra, gamma,alpha=0.0)
t5 = time.time()
print 'Plan synthesis done, time: %s' %str(t5-t42)

# #----------------------------------------
# print "----------------------------------------"
# print "||||||||Simulation start||||||||||||||||"
# print "----------------------------------------"
# total_T = 300
# state_seq = [initial_node,]
# label_seq = [initial_label,]
# N = 10
# n = 0
# print "Try %s simulations of length %s" %(str(N), str(total_T))

# XX = []