11 #include <boost/unordered_map.hpp>
12 #include <boost/log/trivial.hpp>
13 #include <boost/log/core.hpp>
14 #include <boost/log/expressions.hpp>
16 #include "timed_automaton.hh"
17 #include "renaming_relation.hh"
18 #include "timed_condition_set.hh"
36 void add(
const std::shared_ptr<TAState> &targetState,
const TimedCondition &sourceCondition) {
37 BOOST_LOG_TRIVIAL(trace) <<
"sourceCondition: " << sourceCondition;
39 auto it = sourceMap.find(targetState);
40 if (it == sourceMap.end()) {
56 it->second.push_back(sourceCondition);
64 [[nodiscard]] std::vector<TATransition>
make()
const {
65 std::vector<TATransition> result;
66 result.reserve(sourceMap.size());
68 for (
const auto &[target, sourceConditions]: sourceMap) {
69 for (
const auto &sourceCondition: sourceConditions.getConditions()) {
72 const TATransition::Resets resets{std::make_pair(sourceCondition.size(), 0.0)};
73 result.emplace_back(target.get(), resets, sourceCondition.toGuard());
80 [[nodiscard]]
bool empty()
const {
81 return this->sourceMap.empty();
84 [[nodiscard]] std::size_t size()
const {
85 return this->sourceMap.size();
A class to make a transition from P to P.
Definition: internal_transition_maker.hh:24
void add(const std::shared_ptr< TAState > &targetState, const TimedCondition &sourceCondition)
Add a transition to targetState.
Definition: internal_transition_maker.hh:36
std::vector< TATransition > make() const
Generate transitions.
Definition: internal_transition_maker.hh:64
A set of timed conditions to represent non-convex constraints.
Definition: timed_condition_set.hh:18
A timed condition, a finite conjunction of inequalities of the form , where and .
Definition: timed_condition.hh:19
Definition: experiment_runner.hh:23