@ -95,7 +95,13 @@ namespace storm {
void actionIdentifiersToStream ( std : : ostream & stream , std : : vector < ActionIdentifier > const & actionIdentifiers , ChoiceLabelIdStorage const & labelStorage ) {
void actionIdentifiersToStream ( std : : ostream & stream , std : : vector < ActionIdentifier > const & actionIdentifiers , ChoiceLabelIdStorage const & labelStorage ) {
stream < < " actions: { " ;
stream < < " actions: { " ;
bool first = true ;
for ( auto ai : actionIdentifiers ) {
for ( auto ai : actionIdentifiers ) {
if ( first ) {
first = false ;
} else {
stream < < " " ;
}
stream < < " [ " < < ai . choiceLabelId < < " ( " < < labelStorage . getLabel ( ai . choiceLabelId ) < < " ) " ;
stream < < " [ " < < ai . choiceLabelId < < " ( " < < labelStorage . getLabel ( ai . choiceLabelId ) < < " ) " ;
stream < < " , " < < ai . choiceOriginId < < " ] " ;
stream < < " , " < < ai . choiceOriginId < < " ] " ;
}
}
@ -105,8 +111,14 @@ namespace storm {
template < typename IrrelevantType >
template < typename IrrelevantType >
void actionIdentifiersToStream ( std : : ostream & stream , std : : map < ActionIdentifier , IrrelevantType > const & actionIdentifiers , ChoiceLabelIdStorage const & labelStorage ) {
void actionIdentifiersToStream ( std : : ostream & stream , std : : map < ActionIdentifier , IrrelevantType > const & actionIdentifiers , ChoiceLabelIdStorage const & labelStorage ) {
stream < < " actions: { " ;
stream < < " actions: { " ;
bool first = true ;
for ( auto ai : actionIdentifiers ) {
for ( auto ai : actionIdentifiers ) {
stream < < " [ " < < ai . first . choiceLabelId < < " (' " < < labelStorage . getLabel ( ai . first . choiceLabelId ) < < " ') " ;
if ( first ) {
first = false ;
} else {
stream < < " " ;
}
stream < < " [ " < < ai . first . choiceLabelId < < " ( " < < labelStorage . getLabel ( ai . first . choiceLabelId ) < < " ) " ;
stream < < " , " < < ai . first . choiceOriginId < < " ] " ;
stream < < " , " < < ai . first . choiceOriginId < < " ] " ;
}
}
stream < < " } " ;
stream < < " } " ;
@ -144,7 +156,7 @@ namespace storm {
template < typename ValueType >
template < typename ValueType >
std : : string MakePOMDPCanonic < ValueType > : : getStateInformation ( uint64_t state ) const {
std : : string MakePOMDPCanonic < ValueType > : : getStateInformation ( uint64_t state ) const {
if ( pomdp . hasStateValuations ( ) ) {
if ( pomdp . hasStateValuations ( ) ) {
return std : : to_string ( state ) + " [ " + pomdp . getStateValuations ( ) . getStateInfo ( state ) + " ] " ;
return std : : to_string ( state ) + " " + pomdp . getStateValuations ( ) . getStateInfo ( state ) ;
} else {
} else {
return std : : to_string ( state ) ;
return std : : to_string ( state ) ;
}
}
@ -242,7 +254,7 @@ namespace storm {
detail : : actionIdentifiersToStream ( std : : cout , actionIdentifiers , labelStorage ) ;
detail : : actionIdentifiersToStream ( std : : cout , actionIdentifiers , labelStorage ) ;
std : : cout < < " according to state " < < state < < " . " < < std : : endl ;
std : : cout < < " according to state " < < state < < " . " < < std : : endl ;
STORM_LOG_THROW ( false , storm : : exceptions : : AmbiguousModelException , " Actions identifiers do not align between states ' " < < getStateInformation ( state ) < < " ' and ' " < < getStateInformation ( actionIdentifierDefinition [ observation ] ) < < " ', both having observation " < < observation < < " . See output above for more information. " ) ;
STORM_LOG_THROW ( false , storm : : exceptions : : AmbiguousModelException , " Actions identifiers do not align between states \n \t " < < getStateInformation ( state ) < < " \n and \n \t " < < getStateInformation ( actionIdentifierDefinition [ observation ] ) < < " \n both having observation " < < observation < < " . See output above for more information. " ) ;
}
}
}
}