| 
					
					
						
							
						
					
					
				 | 
				@ -570,15 +570,12 @@ namespace storm { | 
			
		
		
	
		
			
				 | 
				 | 
				                double T = boundsPair.second; | 
				 | 
				 | 
				                double T = boundsPair.second; | 
			
		
		
	
		
			
				 | 
				 | 
				                ValueType kappa = storm::utility::one<ValueType>() / 10; // would be better as option-parameter
 | 
				 | 
				 | 
				                ValueType kappa = storm::utility::one<ValueType>() / 10; // would be better as option-parameter
 | 
			
		
		
	
		
			
				 | 
				 | 
				                ValueType epsilon = storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision(); | 
				 | 
				 | 
				                ValueType epsilon = storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision(); | 
			
		
		
	
		
			
				 | 
				 | 
				                ValueType lambda = exitRateVector[0]; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                for (ValueType act: exitRateVector) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                ValueType lambda = exitRate[0]; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                for (ValueType act: exitRate) { | 
			
		
		
	
		
			
				 | 
				 | 
				                    lambda = std::max(act, lambda); | 
				 | 
				 | 
				                    lambda = std::max(act, lambda); | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				                uint64_t N; | 
				 | 
				 | 
				                uint64_t N; | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                //calculate relative ReachabilityVectors
 | 
				 | 
				 | 
				                //calculate relative ReachabilityVectors
 | 
			
		
		
	
		
			
				 | 
				 | 
				                std::vector<ValueType> in{}; | 
				 | 
				 | 
				                std::vector<ValueType> in{}; | 
			
		
		
	
		
			
				 | 
				 | 
				                std::vector<std::vector<ValueType>> relReachability(transitionMatrix.getRowCount(), in); | 
				 | 
				 | 
				                std::vector<std::vector<ValueType>> relReachability(transitionMatrix.getRowCount(), in); | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -621,10 +618,11 @@ namespace storm { | 
			
		
		
	
		
			
				 | 
				 | 
				                    //logfile << "starting iteration\n";
 | 
				 | 
				 | 
				                    //logfile << "starting iteration\n";
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    maxNorm = storm::utility::zero<ValueType>(); | 
				 | 
				 | 
				                    maxNorm = storm::utility::zero<ValueType>(); | 
			
		
		
	
		
			
				 | 
				 | 
				                    // (2) update parameter
 | 
				 | 
				 | 
				                    // (2) update parameter
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    N = ceil(lambda * T * exp(2) - log(kappa * epsilon)); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    // (3) uniform  - just applied to markovian states
 | 
				 | 
				 | 
				                    // (3) uniform  - just applied to markovian states
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    for (uint_fast64_t i = 0; i < fullTransitionMatrix.getRowGroupCount(); i++) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                        if (!markovianStates[i]) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    for (uint64_t i = 0; i < fullTransitionMatrix.getRowGroupCount(); i++) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                        if (!markovianStates[i] || psiStates[i]) { | 
			
		
		
	
		
			
				 | 
				 | 
				                            continue; | 
				 | 
				 | 
				                            continue; | 
			
		
		
	
		
			
				 | 
				 | 
				                        } | 
				 | 
				 | 
				                        } | 
			
		
		
	
		
			
				 | 
				 | 
				                        uint64_t from = rowGroupIndices[i]; //markovian state -> no Nondeterminism -> only one row
 | 
				 | 
				 | 
				                        uint64_t from = rowGroupIndices[i]; //markovian state -> no Nondeterminism -> only one row
 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -638,7 +636,7 @@ namespace storm { | 
			
		
		
	
		
			
				 | 
				 | 
				                        ValueType exitNew = lambda; | 
				 | 
				 | 
				                        ValueType exitNew = lambda; | 
			
		
		
	
		
			
				 | 
				 | 
				                        for (auto &v : line) { | 
				 | 
				 | 
				                        for (auto &v : line) { | 
			
		
		
	
		
			
				 | 
				 | 
				                            if (v.getColumn() == i) { //diagonal element
 | 
				 | 
				 | 
				                            if (v.getColumn() == i) { //diagonal element
 | 
			
		
		
	
		
			
				 | 
				 | 
				                                ValueType newSelfLoop = exitNew - exitOld + v.getValue(); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                                ValueType newSelfLoop = exitNew - exitOld + v.getValue()*exitOld; | 
			
		
		
	
		
			
				 | 
				 | 
				                                ValueType newRate = newSelfLoop / exitNew; | 
				 | 
				 | 
				                                ValueType newRate = newSelfLoop / exitNew; | 
			
		
		
	
		
			
				 | 
				 | 
				                                v.setValue(newRate); | 
				 | 
				 | 
				                                v.setValue(newRate); | 
			
		
		
	
		
			
				 | 
				 | 
				                            } else { //modify probability
 | 
				 | 
				 | 
				                            } else { //modify probability
 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -654,8 +652,6 @@ namespace storm { | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    storm::utility::numerical::FoxGlynnResult<ValueType> foxGlynnResult = storm::utility::numerical::foxGlynn(lambda*T, epsilon*kappa); | 
				 | 
				 | 
				                    storm::utility::numerical::FoxGlynnResult<ValueType> foxGlynnResult = storm::utility::numerical::foxGlynn(lambda*T, epsilon*kappa); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    N = std::max(ceil(lambda * T * exp(2) - log(kappa * epsilon)), ceil(foxGlynnResult.right - foxGlynnResult.left +1 )); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                    // Scale the weights so they add up to one.
 | 
				 | 
				 | 
				                    // Scale the weights so they add up to one.
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    for (auto& element : foxGlynnResult.weights) { | 
				 | 
				 | 
				                    for (auto& element : foxGlynnResult.weights) { | 
			
		
		
	
		
			
				 | 
				 | 
				                        element /= foxGlynnResult.totalWeight; | 
				 | 
				 | 
				                        element /= foxGlynnResult.totalWeight; | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -695,8 +691,8 @@ namespace storm { | 
			
		
		
	
		
			
				 | 
				 | 
				                            maxNorm = std::max(maxNorm, diff); | 
				 | 
				 | 
				                            maxNorm = std::max(maxNorm, diff); | 
			
		
		
	
		
			
				 | 
				 | 
				                        } | 
				 | 
				 | 
				                        } | 
			
		
		
	
		
			
				 | 
				 | 
				                    } | 
				 | 
				 | 
				                    } | 
			
		
		
	
		
			
				 | 
				 | 
				                    printTransitions(N, maxNorm, fullTransitionMatrix, exitRate, markovianStates, psiStates, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                                    relReachability, psiStates, psiStates, unifVectors, logfile); //TODO remove
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    //printTransitions(N, maxNorm, fullTransitionMatrix, exitRate, markovianStates, psiStates,
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    //                relReachability, psiStates, psiStates, unifVectors, logfile); //TODO remove
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                    // (6) double lambda
 | 
				 | 
				 | 
				                    // (6) double lambda
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |