Extract MDP model to PRISM #50
-
Hello, I have an MDP model using Alergia. I would like to export this to PRISM for the use of model checking, does anyone know how I would go about this as there is nothing in the documentation? Many thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You should be able to use |
Beta Was this translation helpful? Give feedback.
-
Hi, mdp_2_prism_format method in https://github.com/DES-Lab/AALpy/blob/master/aalpy/utils/ModelChecking.py Hints: Make sure that learned modes is input complete, MDPs class have a function for that. from aalpy.utils import generate_random_mdp, mdp_2_prism_format
random_mdp = generate_random_mdp(10, 3, 3)
if not random_mdp.is_input_complete():
random_mdp.make_input_complete(missing_transition_go_to='sink_state')
mdp_2_prism_format(random_mdp, 'random_mdp', 'save_file.prism')
|
Beta Was this translation helpful? Give feedback.
You should be able to use
mdp_2_prism_format(mdp: Mdp, name: str, output_path=None)
fromaalpy.utils
to export, or you could usemodel_check_properties(model: Mdp, properties: str)
directly.