NMPB08 Shared Libraries
Classes | Public Member Functions
RailwaySourceModel Class Reference

the railway source model links traffic data to the sound power radiated from equivalent sources More...

#include <RailwayEmission.h>

List of all members.

Classes

class  InvalidHeight
 exception thrown when an invalid source is detected and OPTION_MODIFY_HEIGHTS is not set More...
struct  SourceDistribution
 distribution of sound power over different source heights

Public Member Functions

 RailwaySourceModel (void)
 constructor
virtual ~RailwaySourceModel (void)
 destructor
bool CreateTraffic (double hours)
 initialise the traffic record
bool ClearTraffic (void)
 clears the traffic flow
bool SetRailCorrection (NMPB_RailCorrectionType corr)
 set the rail correction
NMPB_RailCorrectionType GetRailCorrection (void)
 get the rail correction
bool AddTraffic (const char *name, double nb, double speed)
 add trains or units to the traffic flow
bool SetEmissionAngles (double sin_h, double sin_v)
 defines the angles of emission for the calculation of apparent sound power
RailwayEmission const * GetEmission (ScreenBodyInteraction *screenBodyInteraction)
 calculates and returns the corresponding emission model in terms of equivalent source positions and (apparent) sound power
RailwayTraffic const * GetTraffic (void)
 return the current traffic data associated with the model
unsigned int SetOptions (unsigned int option, bool on_off)
 enables or disables selected options
unsigned int GetOptions (unsigned int option)
 return the currently selected options

Detailed Description

the railway source model links traffic data to the sound power radiated from equivalent sources

Definition at line 22 of file RailwayEmission.h.


Constructor & Destructor Documentation

RailwaySourceModel::RailwaySourceModel ( void  ) [inline]

constructor

Definition at line 29 of file RailwayEmission.h.

virtual RailwaySourceModel::~RailwaySourceModel ( void  ) [inline, virtual]

destructor

Definition at line 41 of file RailwayEmission.h.


Member Function Documentation

bool RailwaySourceModel::AddTraffic ( const char *  name,
double  nb,
double  speed 
)

add trains or units to the traffic flow

  • name identification of the train or unit as specified in the database
  • nb number of movements over the observation period
  • speed speed of the trains in km/h

Definition at line 123 of file RailwayEmission.cpp.

bool RailwaySourceModel::ClearTraffic ( void  ) [inline]

clears the traffic flow

Definition at line 62 of file RailwayEmission.h.

bool RailwaySourceModel::CreateTraffic ( double  hours) [inline]

initialise the traffic record

  • hours duration of the period of obervation in hours

Definition at line 52 of file RailwayEmission.h.

RailwayEmission const * RailwaySourceModel::GetEmission ( ScreenBodyInteraction screenBodyInteraction)

calculates and returns the corresponding emission model in terms of equivalent source positions and (apparent) sound power

Returns:
pointer to the emission model, null pointer in case of error
Note:
in case the traffic refers trains and units with sources defined at heights other than those of the emission model, an error willbe detected and the function will return a NULL pointer. This behaviour can be avoided by setting the OPTION_MODIFY_HEIGHTS option.

Definition at line 148 of file RailwayEmission.cpp.

unsigned int RailwaySourceModel::GetOptions ( unsigned int  option) [inline]

return the currently selected options

Parameters:
optionoptions to be reported
Returns:
the selected set of options

Definition at line 168 of file RailwayEmission.h.

NMPB_RailCorrectionType RailwaySourceModel::GetRailCorrection ( void  ) [inline]

get the rail correction

Definition at line 81 of file RailwayEmission.h.

RailwayTraffic const* RailwaySourceModel::GetTraffic ( void  ) [inline]

return the current traffic data associated with the model

Returns:
pointer to the traffic data, null pointer in case of error

Definition at line 138 of file RailwayEmission.h.

bool RailwaySourceModel::SetEmissionAngles ( double  sin_h,
double  sin_v 
) [inline]

defines the angles of emission for the calculation of apparent sound power

  • sin_h sinus of the horizontal angle, 0 = plane perpendicular to the track
  • sin_v sinus of the vertical angle, 0 = horizontal plane

Definition at line 104 of file RailwayEmission.h.

unsigned int RailwaySourceModel::SetOptions ( unsigned int  option,
bool  on_off 
) [inline]

enables or disables selected options

Parameters:
optionoptions to be set or cleared
on_offif true, options will be set, otherwise options will be cleared
Returns:
the modified set of options

Definition at line 152 of file RailwayEmission.h.

bool RailwaySourceModel::SetRailCorrection ( NMPB_RailCorrectionType  corr) [inline]

set the rail correction

Definition at line 72 of file RailwayEmission.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines