diff --git a/src/storm/logic/OperatorFormula.cpp b/src/storm/logic/OperatorFormula.cpp index a86e5a47a..890d5476c 100644 --- a/src/storm/logic/OperatorFormula.cpp +++ b/src/storm/logic/OperatorFormula.cpp @@ -60,6 +60,10 @@ namespace storm { void OperatorFormula::setBound(Bound const& newBound) { operatorInformation.bound = newBound; } + + void OperatorFormula::removeBound() { + operatorInformation.bound = boost::none; + } bool OperatorFormula::hasOptimalityType() const { return static_cast(operatorInformation.optimalityType); @@ -68,6 +72,14 @@ namespace storm { OptimizationDirection const& OperatorFormula::getOptimalityType() const { return operatorInformation.optimalityType.get(); } + + void OperatorFormula::setOptimalityType(storm::solver::OptimizationDirection newOptimalityType) { + operatorInformation.optimalityType = newOptimalityType; + } + + void OperatorFormula::removeOptimalityType() { + operatorInformation.optimalityType = boost::none; + } bool OperatorFormula::isOperatorFormula() const { return true; diff --git a/src/storm/logic/OperatorFormula.h b/src/storm/logic/OperatorFormula.h index a396f21ac..c4d3067fb 100644 --- a/src/storm/logic/OperatorFormula.h +++ b/src/storm/logic/OperatorFormula.h @@ -30,18 +30,23 @@ namespace storm { // Bound-related accessors. bool hasBound() const; + Bound const& getBound() const; + void setBound(Bound const& newBound); + void removeBound(); + ComparisonType getComparisonType() const; void setComparisonType(ComparisonType newComparisonType); storm::expressions::Expression const& getThreshold() const; template ValueType getThresholdAs() const; void setThreshold(storm::expressions::Expression const& newThreshold); - Bound const& getBound() const; - void setBound(Bound const& newBound); + // Optimality-type-related accessors. bool hasOptimalityType() const; storm::solver::OptimizationDirection const& getOptimalityType() const; + void setOptimalityType(storm::solver::OptimizationDirection newOptimalityType); + void removeOptimalityType(); virtual bool isOperatorFormula() const override; OperatorInformation const& getOperatorInformation() const;