12template<
typename ValueType>
17template<
typename ValueType>
26template<
typename ValueType>
31template<
typename ValueType>
36template<
typename ValueType>
38 STORM_LOG_THROW(
hasSchedulers(), storm::exceptions::IllegalFunctionCallException,
"Cannot retrieve player 1 scheduler, because none was generated.");
40 uint_fast64_t state = 0;
48template<
typename ValueType>
50 STORM_LOG_THROW(
hasSchedulers(), storm::exceptions::IllegalFunctionCallException,
"Cannot retrieve player 2 scheduler, because none was generated.");
52 uint_fast64_t state = 0;
60template<
typename ValueType>
63 "Cannot retrieve player 1 scheduler choices, because they were not generated.");
67template<
typename ValueType>
70 "Cannot retrieve player 2 scheduler choices, because they were not generated.");
74template<
typename ValueType>
80template<
typename ValueType>
85template<
typename ValueType>
87 if (cachingEnabled && !value) {
91 cachingEnabled = value;
94template<
typename ValueType>
96 return cachingEnabled;
99template<
typename ValueType>
104template<
typename ValueType>
106 this->uniqueSolution = value;
109template<
typename ValueType>
111 return this->uniqueSolution;
114template<
typename ValueType>
119template<
typename ValueType>
123 return std::make_unique<StandardGameSolver<ValueType>>(player1Matrix, player2Matrix, std::make_unique<GeneralLinearEquationSolverFactory<ValueType>>());
126template<
typename ValueType>
130 return std::make_unique<StandardGameSolver<ValueType>>(std::move(player1Matrix), std::move(player2Matrix),
131 std::make_unique<GeneralLinearEquationSolverFactory<ValueType>>());
134template<
typename ValueType>
137 return std::make_unique<StandardGameSolver<ValueType>>(player1Grouping, player2Matrix, std::make_unique<GeneralLinearEquationSolverFactory<ValueType>>());
140template<
typename ValueType>
143 return std::make_unique<StandardGameSolver<ValueType>>(std::move(player1Grouping), std::move(player2Matrix),
144 std::make_unique<GeneralLinearEquationSolverFactory<ValueType>>());
virtual std::unique_ptr< GameSolver< ValueType > > create(Environment const &env, storm::storage::SparseMatrix< storm::storage::sparse::state_type > const &player1Matrix, storm::storage::SparseMatrix< ValueType > const &player2Matrix) const
A class representing the interface that all game solvers shall implement.
boost::optional< std::vector< uint_fast64_t > > player1SchedulerChoices
The scheduler choices that induce the optimal values (if they could be successfully generated).
boost::optional< std::vector< uint_fast64_t > > player1ChoicesHint
bool hasUniqueSolution() const
Retrieves whether the solution to the min max equation system is assumed to be unique.
boost::optional< std::vector< uint_fast64_t > > player2SchedulerChoices
storm::storage::Scheduler< ValueType > computePlayer2Scheduler() const
std::vector< uint_fast64_t > const & getPlayer2SchedulerChoices() const
storm::storage::Scheduler< ValueType > computePlayer1Scheduler() const
Retrieves the generated scheduler.
void setCachingEnabled(bool value)
Sets whether some of the generated data during solver calls should be cached.
bool trackSchedulers
Whether we generate schedulers during solving.
std::vector< uint_fast64_t > const & getPlayer1SchedulerChoices() const
Retrieves the generated (deterministic) choices of the optimal scheduler.
void setTrackSchedulers(bool value=true)
Sets whether schedulers are generated when solving equation systems.
bool hasSchedulers() const
Retrieves whether the solver generated a scheduler.
virtual void clearCache() const
bool hasSchedulerHints() const
Returns whether Scheduler hints are available.
bool isTrackSchedulersSet() const
Retrieves whether this solver is set to generate schedulers.
void setSchedulerHints(std::vector< uint_fast64_t > &&player1Choices, std::vector< uint_fast64_t > &&player2Choices)
Sets scheduler hints that might be considered by the solver as an initial guess.
void setHasUniqueSolution(bool value=true)
Sets whether the solution to the min max equation system is known to be unique.
boost::optional< std::vector< uint_fast64_t > > player2ChoicesHint
bool isCachingEnabled() const
Retrieves whether some of the generated data during solver calls should be cached.
This class defines which action is chosen in a particular state of a non-deterministic model.
void setChoice(SchedulerChoice< ValueType > const &choice, uint_fast64_t modelState, uint_fast64_t memoryState=0)
Sets the choice defined by the scheduler for the given state.
A class that holds a possibly non-square matrix in the compressed row storage format.
#define STORM_LOG_THROW(cond, exception, message)