7 changed files with 153 additions and 1 deletions
			
			
		- 
					1benchmark_dft.py
 - 
					5examples/dft/fdep3.dft
 - 
					54src/models/sparse/MarkovAutomaton.cpp
 - 
					45src/solver/stateelimination/MAEliminator.cpp
 - 
					32src/solver/stateelimination/MAEliminator.h
 - 
					9src/storage/FlexibleSparseMatrix.cpp
 - 
					8src/storage/FlexibleSparseMatrix.h
 
@ -0,0 +1,5 @@ | 
				
			|||
toplevel "A"; | 
				
			|||
"A" and "B" "C" "F"; | 
				
			|||
"F" fdep "B" "C"; | 
				
			|||
"B" lambda=0.4 dorm=0; | 
				
			|||
"C" lambda=0.8 dorm=0; | 
				
			|||
@ -0,0 +1,45 @@ | 
				
			|||
#include "src/solver/stateelimination/MAEliminator.h"
 | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
    namespace solver { | 
				
			|||
        namespace stateelimination { | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            MAEliminator<SparseModelType>::MAEliminator(storm::storage::FlexibleSparseMatrix<ValueType>& transitionMatrix, storm::storage::FlexibleSparseMatrix<ValueType>& backwardTransitions) : StateEliminator<SparseModelType>(transitionMatrix, backwardTransitions){ | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            void MAEliminator<SparseModelType>::updateValue(storm::storage::sparse::state_type const& state, ValueType const& loopProbability) { | 
				
			|||
                // Do nothing
 | 
				
			|||
            } | 
				
			|||
        | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            void MAEliminator<SparseModelType>::updatePredecessor(storm::storage::sparse::state_type const& predecessor, ValueType const& probability, storm::storage::sparse::state_type const& state) { | 
				
			|||
                // Do nothing
 | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            void MAEliminator<SparseModelType>::updatePriority(storm::storage::sparse::state_type const& state) { | 
				
			|||
                // Do nothing
 | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            bool MAEliminator<SparseModelType>::filterPredecessor(storm::storage::sparse::state_type const& state) { | 
				
			|||
                assert(false); | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            bool MAEliminator<SparseModelType>::isFilterPredecessor() const { | 
				
			|||
                return false; | 
				
			|||
            } | 
				
			|||
             | 
				
			|||
             | 
				
			|||
            template class MAEliminator<storm::models::sparse::Dtmc<double>>; | 
				
			|||
             | 
				
			|||
#ifdef STORM_HAVE_CARL
 | 
				
			|||
            template class MAEliminator<storm::models::sparse::Dtmc<storm::RationalFunction>>; | 
				
			|||
#endif
 | 
				
			|||
             | 
				
			|||
        } // namespace stateelimination
 | 
				
			|||
    } // namespace storage
 | 
				
			|||
} // namespace storm
 | 
				
			|||
@ -0,0 +1,32 @@ | 
				
			|||
#ifndef STORM_SOLVER_STATEELIMINATION_MAELIMINATOR_H_ | 
				
			|||
#define STORM_SOLVER_STATEELIMINATION_MAELIMINATOR_H_ | 
				
			|||
 | 
				
			|||
#include "src/solver/stateelimination/StateEliminator.h" | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
    namespace solver { | 
				
			|||
        namespace stateelimination { | 
				
			|||
             | 
				
			|||
            template<typename SparseModelType> | 
				
			|||
            class MAEliminator : public StateEliminator<SparseModelType> { | 
				
			|||
 | 
				
			|||
                typedef typename SparseModelType::ValueType ValueType; | 
				
			|||
 | 
				
			|||
            public: | 
				
			|||
                MAEliminator(storm::storage::FlexibleSparseMatrix<ValueType>& transitionMatrix, storm::storage::FlexibleSparseMatrix<ValueType>& backwardTransitions); | 
				
			|||
                 | 
				
			|||
                // Instantiaton of Virtual methods | 
				
			|||
                void updateValue(storm::storage::sparse::state_type const& state, ValueType const& loopProbability) override; | 
				
			|||
                void updatePredecessor(storm::storage::sparse::state_type const& predecessor, ValueType const& probability, storm::storage::sparse::state_type const& state) override; | 
				
			|||
                void updatePriority(storm::storage::sparse::state_type const& state) override; | 
				
			|||
                bool filterPredecessor(storm::storage::sparse::state_type const& state) override; | 
				
			|||
                bool isFilterPredecessor() const override; | 
				
			|||
                 | 
				
			|||
            private: | 
				
			|||
            }; | 
				
			|||
             | 
				
			|||
        } // namespace stateelimination | 
				
			|||
    } // namespace storage | 
				
			|||
} // namespace storm | 
				
			|||
 | 
				
			|||
#endif // STORM_SOLVER_STATEELIMINATION_MAELIMINATOR_H_ | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue