@ -30,6 +30,9 @@ TEST(SparseDtmcRegionModelCheckerTest, Brp_Prob) {
auto exBothRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.4<=pL<=0.65,0.75<=pK<=0.95 " ) ;
auto allVioRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.1<=pL<=0.73,0.2<=pK<=0.715 " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_FALSE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allVioRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 0.8369631407 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.8369631407 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getLowerBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.0476784174 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
@ -89,6 +92,9 @@ TEST(SparseDtmcRegionModelCheckerTest, Brp_Rew) {
auto exBothHardRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.5<=pK<=0.75,0.3<=TOMsg<=0.4 " ) ; //this region has a local maximum!
auto allVioRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.1<=pK<=0.3,0.2<=TOMsg<=0.3 " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_FALSE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allVioRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 4.367791292 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 4.367791292 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getLowerBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 3.044795147 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
@ -168,6 +174,7 @@ TEST(SparseDtmcRegionModelCheckerTest, Brp_Rew_Infty) {
//start testing
auto allSatRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_EQ ( storm : : utility : : infinity < double > ( ) , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) ) ;
//test approximative method
@ -206,6 +213,9 @@ TEST(SparseDtmcRegionModelCheckerTest, Brp_Rew_4Par) {
auto exBothRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.1<=pK<=0.7,0.2<=pL<=0.8,0.15<=TOMsg<=0.65,0.3<=TOAck<=0.9 " ) ;
auto allVioRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.1<=pK<=0.4,0.2<=pL<=0.3,0.15<=TOMsg<=0.3,0.1<=TOAck<=0.2 " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_FALSE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allVioRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 4.834779705 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 4.834779705 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getLowerBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 4.674651623 , dtmcModelchecker - > getReachabilityValue ( exBothRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
@ -260,6 +270,9 @@ TEST(SparseDtmcRegionModelCheckerTest, Crowds_Prob) {
auto allVioRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.8<=PF<=0.95,0.2<=badC<=0.2 " ) ;
auto allVioHardRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.8<=PF<=0.95,0.2<=badC<=0.9 " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_FALSE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allVioHardRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 0.1734086422 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.1734086422 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getLowerBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.47178 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
@ -337,6 +350,9 @@ TEST(SparseDtmcRegionModelCheckerTest, Crowds_Prob_1Par) {
auto exBothRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.8<=PF<=0.9 " ) ;
auto allVioRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " 0.01<=PF<=0.8 " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_FALSE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allVioRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 0.8430128158 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.8430128158 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getUpperBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.7731321947 , dtmcModelchecker - > getReachabilityValue ( exBothRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
@ -390,6 +406,8 @@ TEST(SparseDtmcRegionModelCheckerTest, Crowds_Prob_Const) {
//start testing
auto allSatRegion = storm : : modelchecker : : region : : ParameterRegion < storm : : RationalFunction > : : parseRegion ( " " ) ;
EXPECT_TRUE ( dtmcModelchecker - > checkFormulaOnSamplingPoint ( allSatRegion . getSomePoint ( ) ) ) ;
EXPECT_NEAR ( 0.6119660237 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getUpperBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.6119660237 , storm : : utility : : region : : convertNumber < double > ( dtmcModelchecker - > evaluateReachabilityFunction ( allSatRegion . getUpperBoundaries ( ) ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;
EXPECT_NEAR ( 0.6119660237 , dtmcModelchecker - > getReachabilityValue ( allSatRegion . getLowerBoundaries ( ) ) , storm : : settings : : generalSettings ( ) . getPrecision ( ) ) ;