Browse Source

First preparations for FDEP/PDEP transformation

Former-commit-id: a6126268de
tempestpy_adaptions
mdeutschen 8 years ago
committed by Sebastian Junges
parent
commit
a4b542ce0c
  1. 20
      src/transformations/dft/DftToGspnTransformator.cpp
  2. 5
      src/transformations/dft/DftToGspnTransformator.h

20
src/transformations/dft/DftToGspnTransformator.cpp

@ -73,7 +73,8 @@ namespace storm {
drawCONSTS(dftElement);
break;
case storm::storage::DFTElementType::PDEP:
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "The transformation of a PDEP is not yet implemented.");
drawPDEP(std::static_pointer_cast<storm::storage::DFTDependency<ValueType> const>(dftElement));
//STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "The transformation of a PDEP is not yet implemented.");
break;
default:
STORM_LOG_ASSERT(false, "DFT type unknown.");
@ -261,6 +262,18 @@ namespace storm {
// TODO: Not tested because there is no corresponding DFT element yet.
}
template <typename ValueType>
void DftToGspnTransformator<ValueType>::drawPDEP(std::shared_ptr<storm::storage::DFTDependency<ValueType> const>(dftDependency)) {
// TODO
// TODO
// TODO
std::cout << "Name: " << dftDependency->name() <<
". NameTrigger: " << dftDependency->nameTrigger() <<
". NameDependent: " << dftDependency->nameDependent() <<
". Probability: " << dftDependency->probability() << std::endl;
}
template <typename ValueType>
void DftToGspnTransformator<ValueType>::drawGSPNConnections() {
// Check for every element, if they have parents (all will have at least 1, except the top event).
@ -402,7 +415,12 @@ namespace storm {
break;
}
case storm::storage::DFTElementType::PDEP:
{
// TODO
// TODO
// TODO
break;
}
default:
{
STORM_LOG_ASSERT(false, "DFT type unknown.");

5
src/transformations/dft/DftToGspnTransformator.h

@ -134,6 +134,11 @@ namespace storm {
*/
void drawCONSTS(std::shared_ptr<storm::storage::DFTElement<ValueType> const> dftConstS);
/*
* Draw a Petri net PDEP (FDEP is included with a firerate of 1).
*/
void drawPDEP(std::shared_ptr<storm::storage::DFTDependency<ValueType> const>(dftDependency));
/*
* Calculate the binomial coefficient:
* n! / ( (n - k)! * k!)

Loading…
Cancel
Save