RangeValueRule Class Reference

Detailed Description

Describes a numeric range based rule.

Ranges are closed and continuous, defined by a minimum and maximum quantity. When only one extreme is formally defined, the other should take a semantically correct value. For example, if a speed limit only specifies a maximum value, the minimum value is typically zero.

#include <include/maliput/api/rules/range_value_rule.h>

Inheritance diagram for RangeValueRule:


struct  Range
 Defines a range for a RangeValueRule. More...

Public Member Functions

 RangeValueRule (const Rule::Id &id, const Rule::TypeId &type_id, const LaneSRoute &zone, const std::vector< Range > &ranges)
 Constructs a range based Rule. More...
const std::vector< Range > & states () const
- Public Member Functions inherited from Rule
 Rule (const Id &id, const TypeId &type_id, const LaneSRoute &zone)
 Constructs a Rule. More...
virtual ~Rule ()=default
const Idid () const
const TypeIdtype_id () const
const LaneSRoutezone () const

Additional Inherited Members

- Public Types inherited from Rule
using Id = TypeSpecificIdentifier< class Rule >
 Alias for the Rule's unique ID across all Rule types. More...
using TypeId = TypeSpecificIdentifier< class Type >
 Alias for the Rule's type. More...
using RelatedRules = std::map< std::string, std::vector< Id > >
 Alias of a map holding groups of related rules. More...
using RelatedUniqueIds = std::map< std::string, std::vector< UniqueId > >
 Alias of a map holding groups of related unique ids. More...
- Protected Member Functions inherited from Rule
void ValidateRelatedRules (const RelatedRules &related_rules) const
void ValidateRelatedUniqueIds (const RelatedUniqueIds &related_unique_ids) const
void ValidateSeverity (int severity) const

Constructor & Destructor Documentation

◆ RangeValueRule()

RangeValueRule ( const Rule::Id id,
const Rule::TypeId type_id,
const LaneSRoute zone,
const std::vector< Range > &  ranges 

Constructs a range based Rule.

idThe Rule ID.
type_idThe Rule Type ID.
zoneLaneSRoute to which this rule applies.
rangesA vector of possible ranges that this rule could enforce. The actual range that's enforced at any given time is determined by a RangeValueRuleStateProvider. This vector must have at least one Range, and each Range must respect that its min <= max and be unique.
maliput::common::assertion_errorWhen ranges is empty.
maliput::common::assertion_errorWhen any Range within ranges violates min <= max condition.
maliput::common::assertion_errorWhen there are duplicated Range in ranges.

Member Function Documentation



◆ states()

const std::vector<Range>& states ( ) const

The documentation for this class was generated from the following files: