You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
502 B

  1. from . import storage
  2. from .storage import *
  3. from . import state,action
  4. class ModelInstantiator:
  5. def __init__(self, model):
  6. if model.model_type == ModelType.MDP:
  7. self._instantiator = PmdpInstantiator(model)
  8. elif model.model_type == ModelType.DTMC:
  9. self._instantiator = PdtmcInstantiator(model)
  10. else:
  11. raise ValueError("Only DTMCs and MDPs supported")
  12. def instantiate(self, point):
  13. return self._instantiator.instantiate(point)