1#ifndef STORM_MODELS_ABSTRACTMODEL_H_
2#define STORM_MODELS_ABSTRACTMODEL_H_
11class ModelBase :
public std::enable_shared_from_this<ModelBase> {
35 template<
typename ModelType>
36 std::shared_ptr<ModelType>
as() {
37 return std::dynamic_pointer_cast<ModelType>(this->shared_from_this());
46 template<
typename ModelType>
47 std::shared_ptr<ModelType const>
as()
const {
48 return std::dynamic_pointer_cast<ModelType const>(this->shared_from_this());
ModelBase(ModelType const &modelType)
Constructs a model of the given type.
virtual bool isExact() const
Checks whether the model is exact.
virtual bool isSymbolicModel() const
Checks whether the model is a symbolic model.
virtual std::string const & getUniqueRewardModelName() const =0
bool isNondeterministicModel() const
Returns true if the model is a nondeterministic model.
virtual bool hasUniqueRewardModel() const =0
virtual uint_fast64_t getNumberOfStates() const =0
Returns the number of states of the model.
bool isDiscreteTimeModel() const
Returns true if the model is a descrete-time model.
virtual uint_fast64_t getNumberOfChoices() const =0
Returns the number of choices ine the model.
virtual void reduceToStateBasedRewards()=0
Converts the transition rewards of all reward models to state-based rewards.
virtual bool hasParameters() const
Checks whether the model has parameters.
virtual ModelType getType() const
Return the actual type of the model.
virtual bool isSparseModel() const
Checks whether the model is a sparse model.
virtual void printModelInformationToStream(std::ostream &out) const =0
Prints information about the model to the specified stream.
std::shared_ptr< ModelType > as()
Casts the model into the model type given by the template parameter.
virtual bool hasRewardModel(std::string const &rewardModelName) const =0
Retrieves whether the model has a reward model with the given name.
std::shared_ptr< ModelType const > as() const
Casts the model into the model type given by the template parameter.
bool isOfType(storm::models::ModelType const &modelType) const
Checks whether the model is of the given type.
virtual bool isPartiallyObservable() const
virtual uint_fast64_t getNumberOfTransitions() const =0
Returns the number of (non-zero) transitions of the model.
virtual bool supportsParameters() const
Checks whether the model supports parameters.