)) sys.transitions.add_adj(transmat2, ['s0','s1','s2','s3'], env_actions='none') print(sys) sys_vars = {} sys_init = {} sys_safe = {} sys_prog = {} env_vars = {} env_init = {} env_safe = {} env_prog = {} specs = spec.GRSpec(env_vars, sys_vars, env_init, sys_init, env_safe, sys_safe, env_prog, sys_prog) ctrl = synth.synthesize('gr1c',specs,sys=sys) print(ctrl.inputs) if not ctrl.save('counter_graph_2.png'): print(ctrl) write_matlab_case("taxi_planning_counter_3.m", ctrl, classname="taxi_planning_counter_3")
sys_safe |= {'(pick && loc_1 && req_1) -> X(wait_1)'} sys_safe |= {'des -> X(!wait_1)'} sys_safe |= {'(wait_1 && !des) -> X(wait_1)'} sys_safe |= {'(pick && loc_2 && req_2) -> X(wait_2)'} sys_safe |= {'des -> X(!wait_2)'} sys_safe |= {'(wait_2 && !des) -> X(wait_2)'} sys_safe |= {'(pick && loc_3 && req_3) -> X(wait_3)'} sys_safe |= {'des -> X(!wait_3)'} sys_safe |= {'(wait_3 && !des) -> X(wait_3)'} sys_prog = {'temp_0_1'} sys_prog |= {'temp_1_1'} sys_prog |= {'temp_2_1'} sys_prog |= {'temp_3_1'} sys_prog |= {'temp_0_2'} # @sys_specs_section_end@ # Initialize GRspec specs = spec.GRSpec(env_vars, sys_vars, env_init, sys_init, env_safe, sys_safe, env_prog, sys_prog) ctrl = synth.synthesize('gr1c', specs, sys=sys) write_matlab_case("taxi_planning_discreet.m", ctrl, classname="taxi_planning_discreet") #if not ctrl.save('taxi_planning_3person.png'): # print(ctrl)
#sys_safe |= {'des -> X(!wait_3)'} #sys_safe |= {'(wait_3 && !des) -> X(wait_3)'} #sys_safe |= {'(pick && loc_4 && req_4) -> X(wait_4)'} #sys_safe |= {'des -> X(!wait_4)'} #sys_safe |= {'(wait_4 && !des) -> X(wait_4)'} sys_prog = {'temp_0_1'} sys_prog |= {'temp_0_2'} sys_prog |= {'temp_1_1'} #sys_prog |= {'temp_1_2'} sys_prog |= {'temp_2_1'} #sys_prog |= {'temp_2_2'} #sys_prog |= {'temp_3_1'} #sys_prog |= {'temp_3_2'} #sys_prog |= {'temp_4_1'} #sys_prog |= {'temp_4_2'} # @sys_specs_section_end@ # Initialize GRspec specs = spec.GRSpec(env_vars, sys_vars, env_init, sys_init, env_safe, sys_safe, env_prog, sys_prog) ctrl = synth.synthesize('gr1c', specs, sys=sys) write_matlab_case("taxi_planning_discreet.m", ctrl, classname="taxi_planning_discreet") #if not ctrl.save('taxi_planning_3person.png'): # print(ctrl)