14 changed files with 305 additions and 68 deletions
			
			
		- 
					23src/storm/environment/Environment.cpp
- 
					13src/storm/environment/Environment.h
- 
					12src/storm/environment/SubEnvironment.cpp
- 
					31src/storm/environment/modelchecker/ModelCheckerEnvironment.cpp
- 
					28src/storm/environment/modelchecker/ModelCheckerEnvironment.h
- 
					100src/storm/environment/modelchecker/MultiObjectiveModelCheckerEnvironment.cpp
- 
					48src/storm/environment/modelchecker/MultiObjectiveModelCheckerEnvironment.h
- 
					6src/storm/modelchecker/multiobjective/multiObjectiveModelChecking.cpp
- 
					7src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.cpp
- 
					24src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.cpp
- 
					18src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.cpp
- 
					2src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h
- 
					57src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.cpp
- 
					4src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h
| @ -0,0 +1,31 @@ | |||||
|  | #include "storm/environment/modelchecker/ModelCheckerEnvironment.h"
 | ||||
|  | 
 | ||||
|  | #include "storm/environment/modelchecker/MultiObjectiveModelCheckerEnvironment.h"
 | ||||
|  | 
 | ||||
|  | #include "storm/settings/SettingsManager.h"
 | ||||
|  | #include "storm/utility/macros.h"
 | ||||
|  | 
 | ||||
|  | #include "storm/exceptions/InvalidEnvironmentException.h"
 | ||||
|  | #include "storm/exceptions/UnexpectedException.h"
 | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | namespace storm { | ||||
|  |      | ||||
|  |     ModelCheckerEnvironment::ModelCheckerEnvironment() { | ||||
|  |         // Intentionally left empty
 | ||||
|  |     } | ||||
|  |      | ||||
|  |     ModelCheckerEnvironment::~ModelCheckerEnvironment() { | ||||
|  |         // Intentionally left empty
 | ||||
|  |     } | ||||
|  |      | ||||
|  |     MultiObjectiveModelCheckerEnvironment& ModelCheckerEnvironment::multi() { | ||||
|  |         return multiObjectiveModelCheckerEnvironment.get(); | ||||
|  |     } | ||||
|  |      | ||||
|  |     MultiObjectiveModelCheckerEnvironment const& ModelCheckerEnvironment::multi() const { | ||||
|  |         return multiObjectiveModelCheckerEnvironment.get(); | ||||
|  |     } | ||||
|  | } | ||||
|  |      | ||||
|  | 
 | ||||
| @ -0,0 +1,28 @@ | |||||
|  | #pragma once | ||||
|  | 
 | ||||
|  | #include <memory> | ||||
|  | #include <boost/optional.hpp> | ||||
|  | 
 | ||||
|  | #include "storm/environment/Environment.h" | ||||
|  | #include "storm/environment/SubEnvironment.h" | ||||
|  | 
 | ||||
|  | namespace storm { | ||||
|  |      | ||||
|  |     // Forward declare subenvironments | ||||
|  |     class MultiObjectiveModelCheckerEnvironment; | ||||
|  |      | ||||
|  |     class ModelCheckerEnvironment { | ||||
|  |     public: | ||||
|  |          | ||||
|  |         ModelCheckerEnvironment(); | ||||
|  |         ~ModelCheckerEnvironment(); | ||||
|  |          | ||||
|  |         MultiObjectiveModelCheckerEnvironment& multi(); | ||||
|  |         MultiObjectiveModelCheckerEnvironment const& multi() const; | ||||
|  | 
 | ||||
|  |      | ||||
|  |     private: | ||||
|  |         SubEnvironment<MultiObjectiveModelCheckerEnvironment> multiObjectiveModelCheckerEnvironment; | ||||
|  |     }; | ||||
|  | } | ||||
|  | 
 | ||||
| @ -0,0 +1,100 @@ | |||||
|  | #include "storm/environment/modelchecker/MultiObjectiveModelCheckerEnvironment.h"
 | ||||
|  | 
 | ||||
|  | #include "storm/settings/SettingsManager.h"
 | ||||
|  | #include "storm/settings/modules/MultiObjectiveSettings.h"
 | ||||
|  | #include "storm/utility/constants.h"
 | ||||
|  | #include "storm/utility/macros.h"
 | ||||
|  | 
 | ||||
|  | namespace storm { | ||||
|  |          | ||||
|  |     MultiObjectiveModelCheckerEnvironment::MultiObjectiveModelCheckerEnvironment() { | ||||
|  |         auto const& multiobjectiveSettings = storm::settings::getModule<storm::settings::modules::MultiObjectiveSettings>(); | ||||
|  |         method = multiobjectiveSettings.getMultiObjectiveMethod(); | ||||
|  |         if (multiobjectiveSettings.isExportPlotSet()) { | ||||
|  |             plotPathUnderApprox = multiobjectiveSettings.getExportPlotDirectory() + "underapproximation.csv"; | ||||
|  |             plotPathOverApprox = multiobjectiveSettings.getExportPlotDirectory() + "overapproximation.csv"; | ||||
|  |             plotPathParetoPoints = multiobjectiveSettings.getExportPlotDirectory() + "paretopoints.csv"; | ||||
|  |         } | ||||
|  |          | ||||
|  |         precision = storm::utility::convertNumber<storm::RationalNumber>(multiobjectiveSettings.getPrecision()); | ||||
|  |         if (multiobjectiveSettings.isMaxStepsSet()) { | ||||
|  |             maxSteps = multiobjectiveSettings.getMaxSteps(); | ||||
|  |         } | ||||
|  |     } | ||||
|  |      | ||||
|  |     MultiObjectiveModelCheckerEnvironment::~MultiObjectiveModelCheckerEnvironment() { | ||||
|  |         // Intentionally left empty
 | ||||
|  |     } | ||||
|  |      | ||||
|  |     storm::modelchecker::multiobjective::MultiObjectiveMethod const& MultiObjectiveModelCheckerEnvironment::getMethod() const { | ||||
|  |         return this->method; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setMethod(storm::modelchecker::multiobjective::MultiObjectiveMethod value) { | ||||
|  |         this->method = value; | ||||
|  |     } | ||||
|  |      | ||||
|  |     bool MultiObjectiveModelCheckerEnvironment::isExportPlotSet() const { | ||||
|  |         return this->plotPathUnderApprox.is_initialized() || this->plotPathOverApprox.is_initialized() || this->plotPathParetoPoints.is_initialized(); | ||||
|  |     } | ||||
|  |      | ||||
|  |     boost::optional<std::string> MultiObjectiveModelCheckerEnvironment::getPlotPathUnderApproximation() const { | ||||
|  |         return plotPathUnderApprox; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setPlotPathUnderApproximation(std::string const& path) { | ||||
|  |         plotPathUnderApprox = path; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::unsetPlotPathUnderApproximation() { | ||||
|  |         plotPathUnderApprox = boost::none; | ||||
|  |     } | ||||
|  |      | ||||
|  |     boost::optional<std::string> MultiObjectiveModelCheckerEnvironment::getPlotPathOverApproximation() const { | ||||
|  |         return plotPathOverApprox; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setPlotPathOverApproximation(std::string const& path) { | ||||
|  |         plotPathOverApprox = path; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::unsetPlotPathOverApproximation() { | ||||
|  |         plotPathOverApprox = boost::none; | ||||
|  |     } | ||||
|  |      | ||||
|  |     boost::optional<std::string> MultiObjectiveModelCheckerEnvironment::getPlotPathParetoPoints() const { | ||||
|  |         return plotPathParetoPoints; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setPlotPathParetoPoints(std::string const& path) { | ||||
|  |         plotPathParetoPoints = path; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::unsetPlotPathParetoPoints() { | ||||
|  |         plotPathParetoPoints = boost::none; | ||||
|  |     } | ||||
|  |      | ||||
|  |     storm::RationalNumber const& MultiObjectiveModelCheckerEnvironment::getPrecision() const { | ||||
|  |         return precision; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setPrecision(storm::RationalNumber const& value) { | ||||
|  |         precision = value; | ||||
|  |     } | ||||
|  |      | ||||
|  |     bool MultiObjectiveModelCheckerEnvironment::isMaxStepsSet() const { | ||||
|  |         return maxSteps.is_initialized(); | ||||
|  |     } | ||||
|  |      | ||||
|  |     uint64_t const& MultiObjectiveModelCheckerEnvironment::getMaxSteps() const { | ||||
|  |         return maxSteps.get(); | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::setMaxSteps(uint64_t const& value) { | ||||
|  |         maxSteps = value; | ||||
|  |     } | ||||
|  |      | ||||
|  |     void MultiObjectiveModelCheckerEnvironment::unsetMaxSteps() { | ||||
|  |         maxSteps = boost::none; | ||||
|  |     } | ||||
|  | } | ||||
| @ -0,0 +1,48 @@ | |||||
|  | #pragma once | ||||
|  | 
 | ||||
|  | #include <string> | ||||
|  | 
 | ||||
|  | #include "storm/environment/modelchecker/ModelCheckerEnvironment.h" | ||||
|  | #include "storm/modelchecker/multiobjective/MultiObjectiveModelCheckingMethod.h" | ||||
|  | #include "storm/adapters/RationalNumberAdapter.h" | ||||
|  | 
 | ||||
|  | namespace storm { | ||||
|  |      | ||||
|  |     class MultiObjectiveModelCheckerEnvironment { | ||||
|  |     public: | ||||
|  |          | ||||
|  |         MultiObjectiveModelCheckerEnvironment(); | ||||
|  |         ~MultiObjectiveModelCheckerEnvironment(); | ||||
|  |          | ||||
|  |         storm::modelchecker::multiobjective::MultiObjectiveMethod const& getMethod() const; | ||||
|  |         void setMethod(storm::modelchecker::multiobjective::MultiObjectiveMethod value); | ||||
|  |          | ||||
|  |         bool isExportPlotSet() const; | ||||
|  |         boost::optional<std::string> getPlotPathUnderApproximation() const; | ||||
|  |         void setPlotPathUnderApproximation(std::string const& path); | ||||
|  |         void unsetPlotPathUnderApproximation(); | ||||
|  |         boost::optional<std::string> getPlotPathOverApproximation() const; | ||||
|  |         void setPlotPathOverApproximation(std::string const& path); | ||||
|  |         void unsetPlotPathOverApproximation(); | ||||
|  |         boost::optional<std::string> getPlotPathParetoPoints() const; | ||||
|  |         void setPlotPathParetoPoints(std::string const& path); | ||||
|  |         void unsetPlotPathParetoPoints(); | ||||
|  |          | ||||
|  |         storm::RationalNumber const& getPrecision() const; | ||||
|  |         void setPrecision(storm::RationalNumber const& value); | ||||
|  |          | ||||
|  |         uint64_t const& getMaxSteps() const; | ||||
|  |         bool isMaxStepsSet() const; | ||||
|  |         void setMaxSteps(uint64_t const& value); | ||||
|  |         void unsetMaxSteps(); | ||||
|  |          | ||||
|  |          | ||||
|  |     private: | ||||
|  |         storm::modelchecker::multiobjective::MultiObjectiveMethod method; | ||||
|  |         boost::optional<std::string> plotPathUnderApprox, plotPathOverApprox, plotPathParetoPoints; | ||||
|  |         storm::RationalNumber precision; | ||||
|  |         boost::optional<uint64_t> maxSteps; | ||||
|  |          | ||||
|  |     }; | ||||
|  | } | ||||
|  | 
 | ||||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue