|
|
@ -21,6 +21,15 @@ namespace storm { |
|
|
|
generator = storm::utility::RandomProbabilityGenerator<double>(seed); |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType, typename RewardModelType> |
|
|
|
bool DiscreteTimeSparseModelSimulator<ValueType,RewardModelType>::randomStep() { |
|
|
|
// TODO random_uint is slow
|
|
|
|
if (model.getTransitionMatrix().getRowGroupSize(currentState) == 0) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return step(generator.random_uint(0, model.getTransitionMatrix().getRowGroupSize(currentState) - 1)); |
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType, typename RewardModelType> |
|
|
|
bool DiscreteTimeSparseModelSimulator<ValueType,RewardModelType>::step(uint64_t action) { |
|
|
|
// TODO lots of optimization potential.
|
|
|
|