Browse Source

fixed a lot of unused variable warnings

Former-commit-id: 806f74b30d
tempestpy_adaptions
sjunges 11 years ago
parent
commit
0eb13c6415
  1. 2
      src/adapters/SymbolicModelAdapter.h
  2. 8
      src/counterexamples/MILPMinimalLabelSetGenerator.h
  3. 2
      src/models/MarkovAutomaton.h
  4. 2
      src/solver/GlpkLpSolver.cpp
  5. 1
      src/solver/GmmxxLinearEquationSolver.cpp
  6. 1
      src/solver/GmmxxNondeterministicLinearEquationSolver.cpp
  7. 1
      src/solver/NativeLinearEquationSolver.cpp
  8. 1
      src/solver/NativeNondeterministicLinearEquationSolver.cpp
  9. 2
      src/storage/BitVector.cpp
  10. 1
      src/storage/SparseMatrix.cpp
  11. 1
      src/utility/vector.h

2
src/adapters/SymbolicModelAdapter.h

@ -157,7 +157,6 @@ private:
for (uint_fast64_t j = 0; j < module.getNumberOfBooleanVariables(); ++j) {
storm::ir::BooleanVariable const& booleanVariable = module.getBooleanVariable(j);
bool initialValue = booleanVariable.getInitialValue()->getValueAsBool(nullptr);
*initialStates *= *cuddUtility->getConstantEncoding(1, variableToRowDecisionDiagramVariableMap[booleanVariable.getName()]);
}
for (uint_fast64_t j = 0; j < module.getNumberOfIntegerVariables(); ++j) {
@ -187,7 +186,6 @@ private:
}
bool changed;
int iter = 0;
do {
changed = false;
*newReachableStates = *reachableStates * *systemAdd01;

8
src/counterexamples/MILPMinimalLabelSetGenerator.h

@ -169,7 +169,6 @@ namespace storm {
* @return A mapping from labels to variable indices.
*/
static std::pair<std::unordered_map<uint_fast64_t, uint_fast64_t>, uint_fast64_t> createLabelVariables(storm::solver::LpSolver& solver, boost::container::flat_set<uint_fast64_t> const& relevantLabels) {
int error = 0;
std::stringstream variableNameBuffer;
std::unordered_map<uint_fast64_t, uint_fast64_t> resultingMap;
for (auto const& label : relevantLabels) {
@ -190,7 +189,6 @@ namespace storm {
* @return A mapping from states to a list of choice variable indices.
*/
static std::pair<std::unordered_map<uint_fast64_t, std::list<uint_fast64_t>>, uint_fast64_t> createSchedulerVariables(storm::solver::LpSolver& solver, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation) {
int error = 0;
std::stringstream variableNameBuffer;
uint_fast64_t numberOfVariablesCreated = 0;
std::unordered_map<uint_fast64_t, std::list<uint_fast64_t>> resultingMap;
@ -219,7 +217,6 @@ namespace storm {
* @return A mapping from initial states to choice variable indices.
*/
static std::pair<std::unordered_map<uint_fast64_t, uint_fast64_t>, uint_fast64_t> createInitialChoiceVariables(storm::solver::LpSolver& solver, storm::models::Mdp<T> const& labeledMdp, StateInformation const& stateInformation) {
int error = 0;
std::stringstream variableNameBuffer;
uint_fast64_t numberOfVariablesCreated = 0;
std::unordered_map<uint_fast64_t, uint_fast64_t> resultingMap;
@ -245,7 +242,6 @@ namespace storm {
* @return A mapping from states to the index of the corresponding probability variables.
*/
static std::pair<std::unordered_map<uint_fast64_t, uint_fast64_t>, uint_fast64_t> createProbabilityVariables(storm::solver::LpSolver& solver, StateInformation const& stateInformation) {
int error = 0;
std::stringstream variableNameBuffer;
uint_fast64_t numberOfVariablesCreated = 0;
std::unordered_map<uint_fast64_t, uint_fast64_t> resultingMap;
@ -269,7 +265,6 @@ namespace storm {
* @return The index of the variable for the probability of the virtual initial state.
*/
static std::pair<uint_fast64_t, uint_fast64_t> createVirtualInitialStateVariable(storm::solver::LpSolver& solver, bool maximizeProbability = false) {
int error = 0;
std::stringstream variableNameBuffer;
variableNameBuffer << "pinit";
@ -285,7 +280,6 @@ namespace storm {
* @return A mapping from problematic states to the index of the corresponding variables.
*/
static std::pair<std::unordered_map<uint_fast64_t, uint_fast64_t>, uint_fast64_t> createProblematicStateVariables(storm::solver::LpSolver& solver, storm::models::Mdp<T> const& labeledMdp, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation) {
int error = 0;
std::stringstream variableNameBuffer;
uint_fast64_t numberOfVariablesCreated = 0;
std::unordered_map<uint_fast64_t, uint_fast64_t> resultingMap;
@ -329,7 +323,6 @@ namespace storm {
* @return A mapping from problematic choices to the index of the corresponding variables.
*/
static std::pair<std::unordered_map<std::pair<uint_fast64_t, uint_fast64_t>, uint_fast64_t, PairHash>, uint_fast64_t> createProblematicChoiceVariables(storm::solver::LpSolver& solver, storm::models::Mdp<T> const& labeledMdp, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation) {
int error = 0;
std::stringstream variableNameBuffer;
uint_fast64_t numberOfVariablesCreated = 0;
std::unordered_map<std::pair<uint_fast64_t, uint_fast64_t>, uint_fast64_t, PairHash> resultingMap;
@ -539,7 +532,6 @@ namespace storm {
*/
static uint_fast64_t assertReachabilityProbabilities(storm::solver::LpSolver& solver, storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& psiStates, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation, VariableInformation const& variableInformation) {
uint_fast64_t numberOfConstraintsCreated = 0;
int error = 0;
for (auto state : stateInformation.relevantStates) {
std::vector<double> coefficients;
std::vector<uint_fast64_t> variables;

2
src/models/MarkovAutomaton.h

@ -123,7 +123,7 @@ namespace storm {
}
// Then compute how many rows the new matrix is going to have.
uint_fast64_t newNumberOfRows = this->getNumberOfChoices() - numberOfHybridStates;
//uint_fast64_t newNumberOfRows = this->getNumberOfChoices() - numberOfHybridStates;
// Create the matrix for the new transition relation and the corresponding nondeterministic choice vector.
storm::storage::SparseMatrixBuilder<T> newTransitionMatrixBuilder(0, 0, 0, true, this->getNumberOfStates() + 1);

2
src/solver/GlpkLpSolver.cpp

@ -110,8 +110,6 @@ namespace storm {
glp_set_row_name(this->lp, nextConstraintIndex, name.c_str());
// Determine the type of the constraint and add it properly.
bool isUpperBound = boundType == LESS || boundType == LESS_EQUAL;
bool isStrict = boundType == LESS || boundType == GREATER;
switch (boundType) {
case LESS:
glp_set_row_bnds(this->lp, nextConstraintIndex, GLP_UP, 0, rightHandSideValue - storm::settings::Settings::getInstance()->getOptionByLongName("precision").getArgument(0).getValueAsDouble());

1
src/solver/GmmxxLinearEquationSolver.cpp

@ -152,7 +152,6 @@ namespace storm {
// Set up some temporary variables so that we can just swap pointers instead of copying the result after
// each iteration.
std::vector<ValueType>* swap = nullptr;
std::vector<ValueType>* currentX = &x;
bool multiplyResultProvided = true;

1
src/solver/GmmxxNondeterministicLinearEquationSolver.cpp

@ -59,7 +59,6 @@ namespace storm {
newX = new std::vector<ValueType>(x.size());
xMemoryProvided = false;
}
std::vector<ValueType>* swap = nullptr;
uint_fast64_t iterations = 0;
bool converged = false;

1
src/solver/NativeLinearEquationSolver.cpp

@ -106,7 +106,6 @@ namespace storm {
void NativeLinearEquationSolver<ValueType>::performMatrixVectorMultiplication(storm::storage::SparseMatrix<ValueType> const& A, std::vector<ValueType>& x, std::vector<ValueType>* b, uint_fast64_t n, std::vector<ValueType>* multiplyResult) const {
// Set up some temporary variables so that we can just swap pointers instead of copying the result after
// each iteration.
std::vector<ValueType>* swap = nullptr;
std::vector<ValueType>* currentX = &x;
bool multiplyResultProvided = true;

1
src/solver/NativeNondeterministicLinearEquationSolver.cpp

@ -54,7 +54,6 @@ namespace storm {
newX = new std::vector<ValueType>(x.size());
xMemoryProvided = false;
}
std::vector<ValueType>* swap = nullptr;
uint_fast64_t iterations = 0;
bool converged = false;

2
src/storage/BitVector.cpp

@ -200,7 +200,6 @@ namespace storm {
}
BitVector& BitVector::operator&=(BitVector const& other) {
uint_fast64_t minSize = std::min(other.bucketVector.size(), bucketVector.size());
std::vector<uint64_t>::iterator it = bucketVector.begin();
for (std::vector<uint64_t>::const_iterator otherIt = other.bucketVector.begin(); it != bucketVector.end() && otherIt != other.bucketVector.end(); ++it, ++otherIt) {
@ -224,7 +223,6 @@ namespace storm {
}
BitVector& BitVector::operator|=(BitVector const& other) {
uint_fast64_t minSize = std::min(other.bucketVector.size(), bucketVector.size());
std::vector<uint64_t>::iterator it = bucketVector.begin();
for (std::vector<uint64_t>::const_iterator otherIt = other.bucketVector.begin(); it != bucketVector.end() && otherIt != other.bucketVector.end(); ++it, ++otherIt) {

1
src/storage/SparseMatrix.cpp

@ -743,7 +743,6 @@ namespace storm {
const_iterator it = this->begin();
const_iterator ite;
typename std::vector<uint_fast64_t>::const_iterator rowIterator = rowIndications.begin();
typename std::vector<uint_fast64_t>::const_iterator rowIteratorEnd = rowIndications.end();
typename std::vector<T>::iterator resultIterator = result.begin();
typename std::vector<T>::iterator resultIteratorEnd = result.end();

1
src/utility/vector.h

@ -94,7 +94,6 @@ namespace storm {
*/
template<class T>
void selectVectorValues(std::vector<T>& vector, std::vector<uint_fast64_t> const& rowGroupToRowIndexMapping, std::vector<uint_fast64_t> const& rowGrouping, std::vector<T> const& values) {
uint_fast64_t oldPosition = 0;
for (uint_fast64_t i = 0; i < vector.size(); ++i) {
vector[i] = values[rowGrouping[i] + rowGroupToRowIndexMapping[i]];
}

Loading…
Cancel
Save