Browse Source

overwrite build model by some method which applies the downcast directly

Former-commit-id: f796834082
tempestpy_adaptions
sjunges 9 years ago
parent
commit
aad97116e0
  1. 19
      stormpy/core/__init__.py

19
stormpy/core/__init__.py

@ -1 +1,20 @@
from stormpy.core._core import * from stormpy.core._core import *
def _build_model(program, formulae):
intermediate = _core.build_model(program, formulae)
if intermediate.parametric:
if intermediate.model_type == ModelType.DTMC:
return intermediate.as_pdtmc()
elif intermediate.model_type == ModelType.MDP:
return intermediate.as_pmdp()
else:
raise RuntimeError("Not supported parametric model constructed")
else:
if intermediate.model_type == ModelType.DTMC:
return intermediate.as_pdtmc()
elif intermediate.model_type == ModelType.MDP:
return intermediate.as_pmdp()
else:
raise RuntimeError("Not supported non-parametric model constructed")
build_model = _build_model
Loading…
Cancel
Save