#pragma once #include #include "storm/modelchecker/multiobjective/Objective.h" #include "storm/modelchecker/multiobjective/deterministicScheds/DeterministicSchedsObjectiveHelper.h" #include "storm/storage/geometry/Polytope.h" #include "storm/storage/geometry/PolytopeTree.h" #include "storm/solver/LpSolver.h" #include "storm/solver/GurobiLpSolver.h" #include "storm/utility/Stopwatch.h" namespace storm { class Environment; namespace modelchecker { namespace multiobjective { template class DeterministicSchedsLpChecker { public: typedef typename ModelType::ValueType ValueType; typedef typename std::shared_ptr> Polytope; typedef typename std::vector Point; DeterministicSchedsLpChecker(Environment const& env, ModelType const& model, std::vector> const& objectiveHelper); ~DeterministicSchedsLpChecker(); /*! * Specifies the current direction. */ void setCurrentWeightVector(std::vector const& weightVector); /*! * Optimizes in the currently given direction * @return some optimal point found in that direction. */ boost::optional check(storm::Environment const& env, Polytope area); /*! * Optimizes in the currently given direction, recursively checks for points in the given area. * @return all pareto optimal points in the area given by polytopeTree as well as a set of area in which no solution lies (the points might be achievable via some point outside of this area, though) */ std::pair, std::vector> check(storm::Environment const& env, storm::storage::geometry::PolytopeTree& polytopeTree, GeometryValueType const& eps); private: void initializeLpModel(Environment const& env); void checkRecursive(storm::storage::geometry::PolytopeTree& polytopeTree, GeometryValueType const& eps, std::vector& foundPoints, std::vector& infeasableAreas); ModelType const& model; std::vector> const& objectiveHelper; std::unique_ptr> lpModel; storm::solver::GurobiLpSolver* gurobiLpModel; std::vector initialStateResults; std::vector currentObjectiveVariables; std::vector currentWeightVector; storm::utility::Stopwatch swInit; storm::utility::Stopwatch swCheck; storm::utility::Stopwatch swCheckVertices; storm::utility::Stopwatch swLpSolve; storm::utility::Stopwatch swLpBuild; storm::utility::Stopwatch swAux; }; } } }