18 #include <unordered_map>
39 typedef std::unordered_multimap<adore::env::traffic::Participant::TTrackingID,std::pair<adore::env::BorderBased::BorderID,adore::env::BorderBased::BorderPositioning<4>>>
TParticipantToBorder;
40 typedef std::unordered_multimap<adore::env::traffic::Participant::TTrackingID,adore::env::traffic::Participant>
TTrackingIDToParticipant;
148 double X[4];
double Y[4];
156 double xmin,xmax,ymin,ymax;
162 a = participant.length_*0.5;
163 b = -participant.length_*0.5;
164 w2 = participant.width_*0.5;
165 Xref = participant.center_(0);
166 Yref = participant.center_(1);
167 X[0] = Xref+ca*b -sa*(-w2);
168 Y[0] = Yref+sa*b +ca*(-w2);
169 X[1] = Xref+ca*a -sa*(-w2);
170 Y[1] = Yref+sa*a +ca*(-w2);
171 X[2] = Xref+ca*a -sa*(+w2);
172 Y[2] = Yref+sa*a +ca*(+w2);
173 X[3] = Xref+ca*b -sa*(+w2);
174 Y[3] = Yref+sa*b +ca*(+w2);
184 bit.
first!=bit.second;
187 auto border = bit.first->second;
191 if(boost::geometry::intersects(border->getBoostBox(
left),pbox))
196 borderToParticipant_.insert(std::make_pair(border->m_id,std::make_pair(positioning,participant.trackingID_)));
197 participantToBorder_.insert(std::make_pair(participant.trackingID_,std::make_pair(border->m_id,positioning)));
abstract factory for adore::env communication
Definition: afactory.h:41
virtual TParticipantSetReader * getTrafficParticipantSetReader()=0
Definition: lanematchingstrategy.h:350
bool anyInside()
Definition: lanematchingstrategy.h:367
efficiently store borders in boost R-tree
Definition: borderset.h:99
itRegion2Border getBordersInRegion(double x0, double x1, double y0, double y1)
get all borders in this within region
Definition: borderset.h:370
Border * getLeftNeighbor(Border *b)
Get left neighbor of a border.
Definition: borderset.h:1252
static adore::env::AFactory * get()
Definition: afactory.h:236
Definition: trafficmap.h:36
std::unordered_multimap< adore::env::BorderBased::BorderID, std::pair< adore::env::BorderBased::BorderPositioning< 4 >, adore::env::traffic::Participant::TTrackingID >, adore::env::BorderBased::BorderIDHasher > TBorderToParticipant
Definition: trafficmap.h:38
TParticipantSet participantSet_
Definition: trafficmap.h:45
adore::env::AFactory::TParticipantSetReader * tpsetReader_
Definition: trafficmap.h:47
adore::env::BorderBased::BorderSet * getBorderSet()
Get the border set.
Definition: trafficmap.h:63
void update()
Update the TrafficMap.
Definition: trafficmap.h:126
TParticipantToBorder participantToBorder_
Definition: trafficmap.h:43
adore::env::BorderBased::BorderSet * borderSet_
Definition: trafficmap.h:46
TTrackingIDToParticipant trackingIDToParticipant_
Definition: trafficmap.h:44
const TBorderToParticipant & getBorderToParticipant() const
Get the border to participant map.
Definition: trafficmap.h:72
TParticipantSet & getTrafficParticipantSet()
Get the set of traffic participants.
Definition: trafficmap.h:54
TrafficMap(adore::env::BorderBased::BorderSet *borderSet)
Construct a new TrafficMap object.
Definition: trafficmap.h:99
std::unordered_multimap< adore::env::traffic::Participant::TTrackingID, adore::env::traffic::Participant > TTrackingIDToParticipant
Definition: trafficmap.h:40
const TParticipantToBorder & getParticipantToBorder() const
Get the participant to border map.
Definition: trafficmap.h:81
void matchBorders()
Match traffic to borders.
Definition: trafficmap.h:146
TrafficMap(adore::env::BorderBased::BorderSet *borderSet, adore::env::AFactory *factory)
Construct a new TrafficMap object.
Definition: trafficmap.h:110
const TTrackingIDToParticipant & getTrackingIDToParticipant() const
Get the tracking id to participant map.
Definition: trafficmap.h:90
TBorderToParticipant borderToParticipant_
Definition: trafficmap.h:42
std::unordered_multimap< adore::env::traffic::Participant::TTrackingID, std::pair< adore::env::BorderBased::BorderID, adore::env::BorderBased::BorderPositioning< 4 > > > TParticipantToBorder
Definition: trafficmap.h:39
Definition: com_patterns.h:68
virtual void getData(T &value)=0
virtual bool hasUpdate() const =0
std::vector< Participant > TParticipantSet
Definition: participant.h:164
@ left
Definition: indicator_hint.h:35
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
T min(T a, T b, T c, T d)
Definition: adoremath.h:663
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
Definition: areaofeffectconverter.h:20
a functor, which hashes a BorderID object -> std::unordered_set<BorderID,BorderIDHasher> amap(0);
Definition: borderid.h:176
boost::geometry::model::box< Coordinate::boost_point > boost_box
bounding box
Definition: border.h:66
boost::geometry::model::point< double, 3, boost::geometry::cs::cartesian > boost_point
Definition: coordinate.h:36
T1 first
Definition: borderset.h:47
int TTrackingID
Definition: participant.h:32