Browse Source

Merge branch 'master' into prism-pomdp

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
52db0c1107
  1. 0
      resources/cmake/find_modules/FindGUROBI.cmake
  2. 4
      src/storm-gspn/storage/gspn/GspnBuilder.cpp
  3. 4
      src/storm-gspn/storage/gspn/GspnBuilder.h
  4. 2
      src/storm-gspn/storage/gspn/Place.cpp
  5. 2
      src/storm-gspn/storage/gspn/Place.h
  6. 5
      src/storm/models/sparse/StandardRewardModel.cpp
  7. 9
      src/storm/models/sparse/StandardRewardModel.h
  8. 2
      src/storm/storage/dd/cudd/InternalCuddBdd.cpp

0
resources/cmake/find_modules/FindGurobi.cmake → resources/cmake/find_modules/FindGUROBI.cmake

4
src/storm-gspn/storage/gspn/GspnBuilder.cpp

@ -13,7 +13,7 @@ namespace storm {
gspnName = name;
}
uint_fast64_t GspnBuilder::addPlace(boost::optional<uint64_t> capacity, uint_fast64_t const& initialTokens, std::string const& name) {
uint_fast64_t GspnBuilder::addPlace(boost::optional<uint64_t> const& capacity, uint_fast64_t const& initialTokens, std::string const& name) {
auto newId = places.size();
auto place = storm::gspn::Place(newId);
place.setCapacity(capacity);
@ -70,7 +70,7 @@ namespace storm {
return addTimedTransition(priority, rate, 1, name);
}
uint_fast64_t GspnBuilder::addTimedTransition(uint_fast64_t const &priority, double const &rate, boost::optional<uint64_t> numServers, std::string const& name) {
uint_fast64_t GspnBuilder::addTimedTransition(uint_fast64_t const &priority, double const &rate, boost::optional<uint64_t> const& numServers, std::string const& name) {
auto trans = storm::gspn::TimedTransition<double>();
auto newId = GSPN::timedTransitionIdToTransitionId(timedTransitions.size());
trans.setName(name);

4
src/storm-gspn/storage/gspn/GspnBuilder.h

@ -25,7 +25,7 @@ namespace storm {
* A capacity of -1 indicates an unbounded place.
* @param initialTokens The number of inital tokens in the place.
*/
uint_fast64_t addPlace(boost::optional<uint64_t> capacity = 1, uint_fast64_t const& initialTokens = 0, std::string const& name = "");
uint_fast64_t addPlace(boost::optional<uint64_t> const& capacity = 1, uint_fast64_t const& initialTokens = 0, std::string const& name = "");
void setPlaceLayoutInfo(uint64_t placeId, LayoutInfo const& layoutInfo);
@ -51,7 +51,7 @@ namespace storm {
* @param rate The rate for the transition.
* @param numServers The number of servers this transition has (in case of K-Server semantics) or boost::none (in case of Infinite-Server-Semantics).
*/
uint_fast64_t addTimedTransition(uint_fast64_t const &priority, RateType const& rate, boost::optional<uint64_t> numServers, std::string const& name = "");
uint_fast64_t addTimedTransition(uint_fast64_t const &priority, RateType const& rate, boost::optional<uint64_t> const& numServers, std::string const& name = "");
void setTransitionLayoutInfo(uint64_t transitionId, LayoutInfo const& layoutInfo);

2
src/storm-gspn/storage/gspn/Place.cpp

@ -29,7 +29,7 @@ namespace storm {
return this->numberOfInitialTokens;
}
void Place::setCapacity(boost::optional<uint64_t> cap) {
void Place::setCapacity(boost::optional<uint64_t> const& cap) {
this->capacity = cap;
}

2
src/storm-gspn/storage/gspn/Place.h

@ -56,7 +56,7 @@ namespace storm {
* @param capacity The capacity of this place. A non-negative number represents the capacity.
* boost::none indicates that the flag is not set.
*/
void setCapacity(boost::optional<uint64_t> capacity);
void setCapacity(boost::optional<uint64_t> const& capacity);
/*!
* Returns the capacity of tokens of this place.

5
src/storm/models/sparse/StandardRewardModel.cpp

@ -349,11 +349,6 @@ namespace storm {
return result;
}
template<typename ValueType>
void StandardRewardModel<ValueType>::setStateActionRewardValue(uint_fast64_t row, ValueType const& value) {
this->optionalStateActionRewardVector.get()[row] = value;
}
template<typename ValueType>
template<typename MatrixValueType>
void StandardRewardModel<ValueType>::clearRewardAtState(uint_fast64_t state, storm::storage::SparseMatrix<MatrixValueType> const& transitions) {

9
src/storm/models/sparse/StandardRewardModel.h

@ -287,15 +287,6 @@ namespace storm {
template<typename MatrixValueType>
storm::storage::BitVector getChoicesWithFilter(storm::storage::SparseMatrix<MatrixValueType> const& transitionMatrix, std::function<bool(ValueType const&)> const& filter) const;
/*!
* Sets the given value in the state-action reward vector at the given row. This assumes that the reward
* model has state-action rewards.
*
* @param row The row at which to set the given value.
* @param value The value to set.
*/
void setStateActionRewardValue(uint_fast64_t row, ValueType const& value);
/*!
* Retrieves whether the reward model is empty, i.e. contains no state-, state-action- or transition-based
* rewards.

2
src/storm/storage/dd/cudd/InternalCuddBdd.cpp

@ -196,7 +196,7 @@ namespace storm {
// Open the file, dump the DD and close it again.
std::vector<cudd::BDD> cuddBddVector = { this->getCuddBdd() };
FILE* filePointer = fopen(filename.c_str() , "w");
FILE* filePointer = fopen(filename.c_str() , "a+");
if (showVariablesIfPossible) {
ddManager->getCuddManager().DumpDot(cuddBddVector, ddVariableNames.data(), &ddNames[0], filePointer);
} else {

Loading…
Cancel
Save