Browse Source

operators to remove bounds / optimality types from a formula

tempestpy_adaptions
Sebastian Junges 6 years ago
parent
commit
07588df137
  1. 12
      src/storm/logic/OperatorFormula.cpp
  2. 9
      src/storm/logic/OperatorFormula.h

12
src/storm/logic/OperatorFormula.cpp

@ -61,6 +61,10 @@ namespace storm {
operatorInformation.bound = newBound;
}
void OperatorFormula::removeBound() {
operatorInformation.bound = boost::none;
}
bool OperatorFormula::hasOptimalityType() const {
return static_cast<bool>(operatorInformation.optimalityType);
}
@ -69,6 +73,14 @@ namespace storm {
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;
}

9
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 <typename ValueType>
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;

Loading…
Cancel
Save