Skip to content

Commit

Permalink
Rounding sampled date to avoid float drift with the GUI, not optimal …
Browse files Browse the repository at this point in the history
…but works
  • Loading branch information
tand00 committed Sep 6, 2024
1 parent b831985 commit c3720c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions include/Core/TAPN/StochasticStructure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ namespace VerifyTAPN::SMC {
date = std::geometric_distribution(parameters.geometric.p)(engine);
break;
}
date = round(date * 100000) / 100000;
return std::max(date, 0.0);
}

Expand Down
10 changes: 0 additions & 10 deletions src/DiscreteVerification/VerificationTypes/SMCVerification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,6 @@ SMCVerification::createTokenNode(rapidxml::xml_document<> &doc, const TAPN::Time
xml_attribute<> *ageAttribute = doc.allocate_attribute("age", doc.allocate_string(
str.c_str()));
tokenNode->append_attribute(ageAttribute);
if (place.getMaxConstant() < token.getAge()) {
xml_attribute<> *gtAttribute = doc.allocate_attribute("greaterThanOrEqual",
doc.allocate_string("true"));
tokenNode->append_attribute(gtAttribute);
} else {
xml_attribute<> *gtAttribute = doc.allocate_attribute("greaterThanOrEqual",
doc.allocate_string("false"));
tokenNode->append_attribute(gtAttribute);
}

return tokenNode;
}

Expand Down

0 comments on commit c3720c5

Please sign in to comment.