Code_TYMPAN
4.2.0
Industrial site acoustic simulation
|
#include <TYRoute.h>
Classes | |
class | TrafficHalfer |
This helper class halves and restore the traffic flow of the road. More... | |
Public Types | |
enum | TrafficRegimes { Day, Evening, Night, NB_TRAFFIC_REGIMES } |
enum | RoadType { Motorway, Intercity } |
enum | RoadFunction { LongDistance, Regional } |
Public Types inherited from TYAcousticLine | |
enum | TypeDistribution { TY_PUISSANCE_CALCULEE, TY_PUISSANCE_IMPOSEE } |
Public Member Functions | |
TYRoute () | |
TYRoute (const TYRoute &other) | |
virtual | ~TYRoute () |
TYRoute & | operator= (const TYRoute &other) |
Operateur =. More... | |
bool | operator== (const TYRoute &other) const |
Operateur ==. More... | |
bool | operator!= (const TYRoute &other) const |
Operateur !=. More... | |
virtual bool | deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false) |
virtual std::string | toString () const |
virtual DOM_Element | toXML (DOM_Element &domElement) |
virtual int | fromXML (DOM_Element domElement) |
double | getVitMoy () const |
void | setVitMoy (double vit) |
const TYTrafic & | getTraficJour () const |
TYTrafic & | getTraficJour () |
const TYTrafic & | getTraficNuit () const |
TYTrafic & | getTraficNuit () |
bool | setFromAADT (double aadt_hgv, double aadt_lv, RoadType road_type, RoadFunction road_function, QString *out_msg=NULL) |
Apply Note77 from Setra to estimate trafic from AADT and road kind. More... | |
TYSpectre | computeSpectre (enum TrafficRegimes regime) |
virtual bool | updateAcoustic (const bool &force=false) |
virtual bool | updateAltitudes (const TYAltimetrie &alti, LPTYRouteGeoNode pGeoNode, OMatrix globalMatrix) |
Required the road to update its altitude after altimetry changed. More... | |
const RoadTrafficComponent & | getNMPB08RoadTrafficComponent (enum TrafficRegimes regime, enum TYTrafic::VehicleTypes vehic_type) const |
const RoadTraffic & | getNMBP08RoadTraffic (enum TrafficRegimes regime) |
RoadSurfaceType | surfaceType () const |
Getter for the road surface type. More... | |
double | surfaceAge () const |
Getter for the surface age. More... | |
double | ramp () const |
Getter for the ramp in percent ( > 0 if rise, < 0 if down) More... | |
void | setSurfaceType (RoadSurfaceType type) |
Setter for the road surface type. More... | |
void | setSurfaceAge (double age) |
Setter for the surface age. More... | |
void | setRamp (double ramp) |
Setter for the ramp in percent ( > 0 if rise, < 0 if down) More... | |
void | setRoadTrafficComponent (enum TrafficRegimes regime, enum TYTrafic::VehicleTypes vehic_type, double flow, double speed, RoadFlowType type=FlowType_CONST) |
Set the traffic parameter for a given regime and type of vehicles. More... | |
Public Member Functions inherited from TYAcousticLine | |
TYAcousticLine () | |
TYAcousticLine (const TYAcousticLine &other) | |
virtual | ~TYAcousticLine () |
TYAcousticLine & | operator= (const TYAcousticLine &other) |
Operateur =. More... | |
bool | operator== (const TYAcousticLine &other) const |
Operateur ==. More... | |
bool | operator!= (const TYAcousticLine &other) const |
Operateur !=. More... | |
double | getLargeur () const |
void | setLargeur (double larg) |
LPTYSourceLineic | getSrcLineic () |
const LPTYSourceLineic | getSrcLineic () const |
void | setSrcLineic (const LPTYSourceLineic pSrcLin) |
TYTabPoint & | getTabPoint () |
const TYTabPoint & | getTabPoint () const |
void | setTabPoint (const TYTabPoint &tab) |
virtual void | remAllSrcs () |
virtual void | computeSpectre () |
virtual TYTabSourcePonctuelleGeoNode | getSrcs () const |
virtual bool | setSrcsLw () |
virtual void | setRegime (TYSpectre &Spectre, int regime=-1, bool recursif=false) |
virtual int | addRegime (TYRegime regime) |
virtual bool | remRegime (int regime) |
TYRegime & | getRegimeNb (const int &nb) |
const TYRegime & | getRegimeNb (const int &nb) const |
size_t | getNbRegimes () const |
int | getCurRegime () const |
virtual void | setCurRegime (int regimeNumber) |
virtual TYRegime | buildRegime () |
virtual void | loadRegime (int regimeNb=-1) |
virtual void | updateCurrentRegime () |
QString | getRegimeName () |
void | setRegimeName (const QString &name) |
bool | getIsRayonnant () |
const bool | getIsRayonnant () const |
int | getTypeDistribution () const |
void | setTypeDistribution (int typeDistri) |
void | setIsRayonnant (const bool &rayonnant) |
bool | getUseAtt () |
const bool | getUseAtt () const |
void | setUseAtt (const bool &useAtt) |
LPTYAttenuateur | getAtt () |
const LPTYAttenuateur | getAtt () const |
void | setAtt (LPTYAttenuateur pAtt) |
TYSpectre * | getSpectre (int regime=-1) const |
bool | getIsRegimeChangeAble () |
virtual LPTYSpectre | getRealPowerSpectrum () |
void | exportCSV (std::ofstream &ofs) |
Export au format csv sur un flux transmis. More... | |
Public Member Functions inherited from TYSource | |
TYSource () | |
TYSource (const TYSource &other) | |
virtual | ~TYSource () |
TYSource & | operator= (const TYSource &other) |
Operateur =. More... | |
bool | operator== (const TYSource &other) const |
Operateur ==. More... | |
bool | operator!= (const TYSource &other) const |
Operateur !=. More... | |
virtual TYSpectre * | getCurrentSpectre () const |
virtual void | setSpectre (LPTYSpectre pSpectre) |
Public Member Functions inherited from TYElement | |
void * | getAllUses () |
void | setAllUses (void *allUses) |
void | cleanAllUses () |
TYElement () | |
TYElement (TYElement *pParent, bool PutInInstanceList=true) | |
TYElement (const TYElement &other, bool PutInInstanceList=true) | |
virtual | ~TYElement () |
void | setID (TYUUID id) |
void | setID (const QString &str_id) |
const TYUUID & | getID () const |
QString | getStringID () const |
bool | hasNullID () const |
void | regenerateID () |
void | setName (QString name) |
void | setName (std::string name) |
virtual QString | getName () const |
void | setParent (TYElement *pParent) |
TYElement * | getParent () const |
virtual void | setIsAcousticModified (bool isModified) |
bool | getIsAcousticModified () |
virtual void | setIsGeometryModified (bool isModified) |
bool | getIsGeometryModified () |
TYElement & | operator= (const TYElement &other) |
bool | operator== (const TYElement &other) const |
bool | operator!= (const TYElement &other) const |
bool | callFromXMLIfEqual (DOM_Element &domElement, int *pRetVal=NULL) |
std::string | getMetierName () |
virtual void | updateCurrentCalcul (TYListID &listID, bool recursif=true) |
virtual void | getChilds (LPTYElementArray &childs, bool recursif=true) |
virtual void | setInCurrentCalcul (bool state, bool recurschild=true, bool recursparent=true) |
virtual bool | isInCurrentCalcul () |
void | addCopy () |
Increment le compteur de nombre de copies. More... | |
void | setCopyCount (const unsigned int copyCount) |
Modifie la vaeur du compteur. More... | |
Public Member Functions inherited from IRefCount | |
IRefCount () | |
virtual | ~IRefCount () |
virtual int | incRef () |
virtual int | decRef () |
int | getRefCount () const |
Public Member Functions inherited from OPrototype | |
virtual | ~OPrototype () |
virtual OPrototype * | clone () const =0 |
virtual const char * | getClassName () const |
bool | isA (const char *className) const |
Public Member Functions inherited from TYColorInterface | |
virtual void | updateColor () |
TYColorInterface () | |
TYColorInterface (const TYColorInterface &other) | |
virtual | ~TYColorInterface () |
TYColorInterface & | operator= (const TYColorInterface &other) |
bool | operator== (const TYColorInterface &other) const |
bool | operator!= (const TYColorInterface &other) const |
void | deepCopy (const TYColorInterface *pOther, bool copyId=true, bool pUseCopyTag=false) |
DOM_Element | toXML (DOM_Element &domElement) |
int | fromXML (DOM_Element domElement) |
virtual void | setColor (const OColor &color) |
OColor | getColor () const |
Static Public Member Functions | |
static bool | note77_check_validity (double aadt_hgv, double aadt_lv, RoadType road_type, RoadFunction road_function, QString *out_msg=NULL) |
Check the validity domain of AADT for Note 77. More... | |
Static Public Member Functions inherited from TYElement | |
static LPTYElementArray | findTypeCollectionAndCallFromXML (DOM_Element parentElem, const char *type) |
static void | setLogInstances (bool log) |
static bool | getLogInstances () |
static TYElement * | getInstance (TYUUID uuid) |
static void | purgeInstances () |
static bool | testId (const TYUUID &id, const TYElement *pElem) |
static TYUUID | newID () |
static TYUUID | fromString (QString id) |
static QString | toString (TYUUID &uuid) |
static uint64 | getConstructorCount () |
static uint64 | getDestructorCount () |
static uint64 | getIdGenerationCount () |
static bool | getIsSavedOk () |
static void | setIsSavedOk (const bool &toSave) |
static void | setRegenerateID (const bool &bRegenerate) |
static bool | getRegenerateID () |
Static Public Member Functions inherited from OPrototype | |
static OPrototype * | findAndClone (const char *className) |
static int | findPrototype (const char *className) |
static OPrototype * | safeDownCast (OPrototype *pObject) |
static void | add_factory (const char *, IOProtoFactory::ptr_type factory) |
Public Attributes | |
bool | computed_declivity |
If true, the mean declivity of the read is computed from the altimetry. More... | |
Static Public Attributes | |
static const double | undefined_declivity = std::numeric_limits<double>::quiet_NaN() |
Protected Member Functions | |
RoadTrafficComponent & | accessRoadTrafficComponent (enum TrafficRegimes regime, enum TYTrafic::VehicleTypes vehic_type) |
double | calculPenteMoyenne () |
Calcul de la pente moyenne de la route. More... | |
void | updateComputedDeclivity () |
update the mean declivity from the current source distribution. More... | |
virtual void | distriSrcs (const TYAltimetrie &alti, LPTYRouteGeoNode pGeoNode, OMatrix globalMatrix) |
double | getOffSet () |
void | setOffSet (const double &offSet) |
Protected Member Functions inherited from OPrototype | |
OPrototype () | |
Static Protected Member Functions | |
static bool | is_valid_declivity (double decli) |
Check that the declivity is valid, i.e. is not undefined_declivity . More... | |
Protected Attributes | |
RoadTraffic | road_traffic |
TYTrafic | traffic_regimes [NB_TRAFFIC_REGIMES] |
double | _offSet |
Protected Attributes inherited from TYAcousticLine | |
int | _curRegime |
Regime de fonctionnement courant. More... | |
bool | _isRayonnant |
Mise en fonctionnement. More... | |
bool | _useAtt |
Utilisation d'un attenuateur. More... | |
LPTYAttenuateur | _pAtt |
Attenuateur associe a l'element;. More... | |
int | _typeDistribution |
Indique le type de distribution a utiliser. pour l'etat courant. More... | |
bool | _regimeChangeAble |
Indique si on peut ajouter un regime a un element (cas des routes) More... | |
int | _nextRegime |
Numero d'ordre du regime suivant. More... | |
double | _largeur |
Largeur. More... | |
LPTYSourceLineic | _pSrcLineic |
Source Lineique. More... | |
TYTabPoint | _tabPoint |
Tableau des points. More... | |
TYTabRegimes | _tabRegimes |
Tableau des regimes. More... | |
Protected Attributes inherited from TYSource | |
LPTYSpectre | _pSpectre |
Protected Attributes inherited from TYElement | |
QString | _name |
Nom courant de l'element. More... | |
TYElement * | _pParent |
Reference sur l'element parent. More... | |
bool | _bPutInInstanceList |
unsigned int | _copyCount |
bool | _inCurrentCalcul |
Indique si cet element est actif dans le Calcul courant. More... | |
bool | _isAcousticModified |
Indicateur de modification acoustique. More... | |
bool | _isGeometryModified |
Indicateur de modification de la geometrie. More... | |
LPTYElementGraphic | _pGraphicObject |
L'object graphique metier associe a cet element. More... | |
void * | _allUses |
Multi purpose void pointer (use for compatibility actually) More... | |
Protected Attributes inherited from IRefCount | |
int | m_refCount |
The reference counter. More... | |
Protected Attributes inherited from TYColorInterface | |
OColor | _color |
Private Types | |
typedef double | note77_tables[2][2][3] |
Private Member Functions | |
FRIEND_TEST (TestRoads, xml_roundtrip) | |
virtual void | distriSrcs () |
void | setRoadTrafficArrayForRegime (enum TrafficRegimes regime) |
internally set the RoadTraffic's array of RoadTrafficComponents according to the given regime. More... | |
Static Private Attributes | |
static const note77_tables | note77_lower_bounds |
static const note77_tables | note77_upper_bounds |
static const note77_tables | note77_hourly_HGV_coeff |
static const note77_tables | note77_hourly_LV_coeff |
enum TYRoute::RoadType |
TYRoute::TYRoute | ( | ) |
TYRoute::TYRoute | ( | const TYRoute & | other | ) |
Copy constructor
Definition at line 99 of file TYRoute.cpp.
|
virtual |
Destructor
Definition at line 104 of file TYRoute.cpp.
|
protected |
|
protected |
Calcul de la pente moyenne de la route.
undefined_declivity
if it could not not be computed Definition at line 314 of file TYRoute.cpp.
TYSpectre TYRoute::computeSpectre | ( | enum TrafficRegimes | regime | ) |
Compute road spectrum from its traffic
Definition at line 280 of file TYRoute.cpp.
|
virtual |
Effectue une copie en allouant de la memoire (deep copy) et non pas en copiant seulement les pointeurs (shallow copy). Cette methode s'utilise comme l'operateur egal. L'ID peut ne pas etre copie, le parent n'est jamais copie.
pOther | L'element a copier. |
copyId | Copie l'identifiant unique ou pas. |
true
si la copie est possible; false
sinon. Reimplemented from TYAcousticLine.
Definition at line 146 of file TYRoute.cpp.
|
inlineprivatevirtual |
Creation des sources de la source lineique
Reimplemented from TYAcousticLine.
Definition at line 238 of file TYRoute.h.
|
protectedvirtual |
Sources distribution 'globalMatrix' is the matrix allowing to move 'pGeoNode' to a global frame. If 'pGeoNode' is in the root site node, it is equal to the identity matrix.
Definition at line 450 of file TYRoute.cpp.
|
private |
|
virtual |
Extrait les informations a partir du noeud DOM passe afin de recuperer les parametres de la classe.
domElement | Le noeud DOM a partir duquel les parametres doivent etre recuperes. |
Reimplemented from TYAcousticLine.
Definition at line 188 of file TYRoute.cpp.
const RoadTraffic & TYRoute::getNMBP08RoadTraffic | ( | enum TrafficRegimes | regime | ) |
const RoadTrafficComponent & TYRoute::getNMPB08RoadTrafficComponent | ( | enum TrafficRegimes | regime, |
enum TYTrafic::VehicleTypes | vehic_type | ||
) | const |
|
inline |
|
inline |
|
inline |
|
staticprotected |
Check that the declivity is valid, i.e. is not undefined_declivity
.
Definition at line 36 of file TYRoute.cpp.
|
static |
Check the validity domain of AADT for Note 77.
Definition at line 594 of file TYRoute.cpp.
bool TYRoute::operator!= | ( | const TYRoute & | other | ) | const |
bool TYRoute::operator== | ( | const TYRoute & | other | ) | const |
Operateur ==.
Definition at line 124 of file TYRoute.cpp.
|
inline |
bool TYRoute::setFromAADT | ( | double | aadt_hgv, |
double | aadt_lv, | ||
TYRoute::RoadType | road_type, | ||
TYRoute::RoadFunction | road_function, | ||
QString * | out_msg = NULL |
||
) |
Apply Note77 from Setra to estimate trafic from AADT and road kind.
Annual Average Daily Traffic for both HGV and LV can be used to estimate traffic as long as the kind of the road is identified. This approach is described in Setra Note 77 (french) or appendix C from the guide Road Noise Prediction
.
This method implements this approach and sets the road traffic if successful. If the argument in the scope of application of the Note77 the method succeed and update the traffic. Otherwise it fails and does not modifyt the road.
aadt_hgv | AADT for the HGV |
aadt_lv | AADT for the LV |
road_type | The type (motor way or intercity) |
road_function | The function of the road (long distance or regional) |
out_msg | A pointer a QString which will be cleared and filled with diagnostic information if the validity check fails. |
Definition at line 639 of file TYRoute.cpp.
|
inlineprotected |
void TYRoute::setRamp | ( | double | ramp | ) |
Setter for the ramp in percent ( > 0 if rise, < 0 if down)
Definition at line 709 of file TYRoute.cpp.
|
private |
internally set the RoadTraffic's array of RoadTrafficComponents according to the given regime.
Definition at line 490 of file TYRoute.cpp.
void TYRoute::setRoadTrafficComponent | ( | enum TrafficRegimes | regime, |
enum TYTrafic::VehicleTypes | vehic_type, | ||
double | flow, | ||
double | speed, | ||
RoadFlowType | type = FlowType_CONST |
||
) |
Set the traffic parameter for a given regime and type of vehicles.
regime | regime to set the traffic for : Day, Evening or Night to be set |
vehic_type | type to set the traffic for : light vehicles (LV) or heavy good vehicles (HGV) to be set |
flow | the vehicle flow in vehicle per hour |
speed | the mean speed of the vehicles in km per hour |
type | the type of flow as specified by the NMPB08 library (default to constant speed) |
Definition at line 714 of file TYRoute.cpp.
void TYRoute::setSurfaceAge | ( | double | age | ) |
Setter for the surface age.
Definition at line 704 of file TYRoute.cpp.
void TYRoute::setSurfaceType | ( | RoadSurfaceType | type | ) |
Setter for the road surface type.
Definition at line 699 of file TYRoute.cpp.
|
inline |
|
inline |
|
inline |
|
virtual |
Retourne une chaine de caractere donnant des informations sur cet objet (utile pour le debugage).
Reimplemented from TYAcousticLine.
Definition at line 163 of file TYRoute.cpp.
|
virtual |
Construit une arborescence DOM a partir du noeud passe afin de sauvegarder les parametres au format XML.
domElement | Le noeud DOM parent a partir duquel l'arborescence doit etre creee. |
Reimplemented from TYAcousticLine.
Definition at line 168 of file TYRoute.cpp.
|
virtual |
Update acoustic characteristics of the road
Reimplemented from TYAcousticLine.
Definition at line 383 of file TYRoute.cpp.
|
virtual |
Required the road to update its altitude after altimetry changed.
alti | the altimetry the altitude must be updated from |
pGeoNode | the GeoNode associated with this Road |
globalMatrix | is the matrix allowing to move 'pGeoNode' to a global frame. If 'pGeoNode' is in the root site node, it is equal to the identity matrix. |
Definition at line 407 of file TYRoute.cpp.
|
protected |
update the mean declivity from the current source distribution.
NB Do ensure that distriSrcs(const TYAltimetrie&)
has been called since last geometry or altimetry changes.
In case the computed declivity is not valid, report an error and let it unchanged
Definition at line 496 of file TYRoute.cpp.
|
protected |
bool TYRoute::computed_declivity |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
protected |
|
static |