From 2275a83466b62e033242d708bc4f6049dcec200d Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Mon, 15 Mar 2021 23:47:36 +0100 Subject: [PATCH] init ChoiceFilter as shielding util --- src/storm/shields/AbstractShield.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/storm/shields/AbstractShield.h b/src/storm/shields/AbstractShield.h index a9191f213..805c66e78 100644 --- a/src/storm/shields/AbstractShield.h +++ b/src/storm/shields/AbstractShield.h @@ -10,11 +10,24 @@ #include "storm/storage/BitVector.h" #include "storm/storage/Distribution.h" +#include "storm/utility/constants.h" + #include "storm/solver/OptimizationDirection.h" + #include "storm/logic/ShieldExpression.h" namespace tempest { namespace shields { + namespace utility { + template + struct ChoiceFilter { + bool operator()(ValueType max, ValueType v, double shieldValue) { + Compare compare; + if(relative) return compare(v, max * shieldValue); + else return compare(v, max); + } + }; + } template class AbstractShield { @@ -51,7 +64,6 @@ namespace tempest { storm::OptimizationDirection optimizationDirection; storm::storage::BitVector relevantStates; - boost::optional coalitionStates; }; }