CIDMParameterSet Class Reference

A class representing a set of IDM parameters that can be saved to file. More...

#include <IDMParameterSet.h>

Collaboration diagram for CIDMParameterSet:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CIDMParameterSet ()
 CIDMParameterSet (WORD id)
virtual ~CIDMParameterSet ()
 CIDMParameterSet (const CIDMParameterSet &ParamSet)
void Serialize (CArchive &ar)
CIDMParameterSetoperator= (const CIDMParameterSet &param)
IDM Generate ()
CParameterget_T ()
CParameterget_A ()
CParameterget_B ()
CParameterget_S0 ()
CParameterget_S1 ()
CParameterget_V0 ()
CParameterget_Delta ()
CParameterget_Polite ()
CParameterget_Bias ()
CParameterget_DeltaAth ()
int getVehicleTypeID () const
void set_T (CParameter *param)
void set_A (CParameter *param)
void set_B (CParameter *param)
void set_S0 (CParameter *param)
void set_S1 (CParameter *param)
void set_V0 (CParameter *param)
void set_Delta (CParameter *param)
void set_Polite (CParameter *param)
void set_Bias (CParameter *param)
void set_DeltaAth (CParameter *param)
void setVehicleTypeID (int id)

Private Member Functions

void setAll (const CIDMParameterSet &ParamSet)
void buildParamSet ()

Private Attributes

int m_VehicleTypeID
CParameter m_T
CParameter m_A
CParameter m_B
CParameter m_S0
CParameter m_S1
CParameter m_V0
CParameter m_Delta
CParameter m_Polite
CParameter m_Bias
CParameter m_DeltaAth


Detailed Description

A class representing a set of IDM parameters that can be saved to file.

Definition at line 19 of file IDMParameterSet.h.


Constructor & Destructor Documentation

CIDMParameterSet::CIDMParameterSet (  ) 

Definition at line 19 of file IDMParameterSet.cpp.

00020 {
00021         buildParamSet();
00022 }

CIDMParameterSet::CIDMParameterSet ( WORD  id  ) 

Definition at line 24 of file IDMParameterSet.cpp.

References buildParamSet(), and m_VehicleTypeID.

00025 {
00026         m_VehicleTypeID = id;
00027         buildParamSet();
00028 }

Here is the call graph for this function:

CIDMParameterSet::~CIDMParameterSet (  )  [virtual]

Definition at line 30 of file IDMParameterSet.cpp.

00031 {
00032 
00033 }

CIDMParameterSet::CIDMParameterSet ( const CIDMParameterSet ParamSet  ) 

Definition at line 35 of file IDMParameterSet.cpp.

References setAll().

00036 {
00037         setAll(ParamSet);
00038 }

Here is the call graph for this function:


Member Function Documentation

void CIDMParameterSet::Serialize ( CArchive &  ar  ) 

Definition at line 58 of file IDMParameterSet.cpp.

References m_A, m_B, m_Bias, m_Delta, m_DeltaAth, m_Polite, m_S0, m_S1, m_T, m_V0, m_VehicleTypeID, and CParameter::Serialize().

Referenced by CEvolveTrafficDoc::Serialize().

00059 {               
00060         m_T                     .Serialize(ar);
00061         m_A                     .Serialize(ar);
00062         m_B                     .Serialize(ar);
00063         m_S0            .Serialize(ar);
00064         m_S1            .Serialize(ar);
00065         m_V0            .Serialize(ar);
00066         m_Delta         .Serialize(ar);
00067         m_Polite        .Serialize(ar);
00068         m_Bias          .Serialize(ar);
00069         m_DeltaAth      .Serialize(ar);
00070 
00071         if (ar.IsStoring())
00072                 ar << m_VehicleTypeID;
00073         else
00074                 ar >> m_VehicleTypeID;
00075 }

Here is the call graph for this function:

CIDMParameterSet & CIDMParameterSet::operator= ( const CIDMParameterSet param  ) 

Definition at line 114 of file IDMParameterSet.cpp.

References setAll().

00115 {
00116         setAll(ParamSet);
00117         return *this;
00118 }

Here is the call graph for this function:

IDM CIDMParameterSet::Generate (  ) 

Definition at line 232 of file IDMParameterSet.cpp.

References m_A, m_B, m_Bias, m_Delta, m_DeltaAth, m_Polite, m_S0, m_S1, m_T, m_V0, IDM::set_A(), IDM::set_B(), IDM::set_Bias(), IDM::set_Delta(), IDM::set_DeltaAth(), IDM::set_Polite(), IDM::set_S0(), IDM::set_S1(), IDM::set_T(), and IDM::set_V0().

Referenced by Road::setIDMDriverModel().

00233 {
00234         IDM tempIDM;
00235         
00236         tempIDM.set_T           (m_T            .Generate() );
00237         tempIDM.set_A           (m_A            .Generate() );
00238         tempIDM.set_B           (m_B            .Generate() );
00239         tempIDM.set_S0          (m_S0           .Generate() );
00240         tempIDM.set_S1          (m_S1           .Generate() );
00241         tempIDM.set_V0          (m_V0           .Generate() );
00242         tempIDM.set_Delta       (m_Delta        .Generate() );
00243         tempIDM.set_Polite      (m_Polite       .Generate() );
00244         tempIDM.set_Bias        (m_Bias         .Generate() );
00245         tempIDM.set_DeltaAth(m_DeltaAth .Generate() );
00246 
00247         return tempIDM;
00248 }

Here is the call graph for this function:

CParameter * CIDMParameterSet::get_T (  ) 

Definition at line 125 of file IDMParameterSet.cpp.

References m_T.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00126 {
00127         return &m_T;
00128 }

CParameter * CIDMParameterSet::get_A (  ) 

Definition at line 135 of file IDMParameterSet.cpp.

References m_A.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00136 {
00137         return &m_A;
00138 }

CParameter * CIDMParameterSet::get_B (  ) 

Definition at line 145 of file IDMParameterSet.cpp.

References m_B.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00146 {
00147         return &m_B;
00148 }

CParameter * CIDMParameterSet::get_S0 (  ) 

Definition at line 155 of file IDMParameterSet.cpp.

References m_S0.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00156 {
00157         return &m_S0;
00158 }

CParameter * CIDMParameterSet::get_S1 (  ) 

Definition at line 165 of file IDMParameterSet.cpp.

References m_S1.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00166 {
00167         return &m_S1;
00168 }

CParameter * CIDMParameterSet::get_V0 (  ) 

Definition at line 175 of file IDMParameterSet.cpp.

References m_V0.

Referenced by SpeedLimit::addVehicle(), and CTrafficConfigDlg::MapRowToParameter().

00176 {
00177         return &m_V0;
00178 }

CParameter * CIDMParameterSet::get_Delta (  ) 

Definition at line 185 of file IDMParameterSet.cpp.

References m_Delta.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00186 {
00187         return &m_Delta;
00188 }

CParameter * CIDMParameterSet::get_Polite (  ) 

Definition at line 195 of file IDMParameterSet.cpp.

References m_Polite.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00196 {
00197         return &m_Polite;
00198 }

CParameter * CIDMParameterSet::get_Bias (  ) 

Definition at line 205 of file IDMParameterSet.cpp.

References m_Bias.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00206 {
00207         return &m_Bias;
00208 }

CParameter * CIDMParameterSet::get_DeltaAth (  ) 

Definition at line 215 of file IDMParameterSet.cpp.

References m_DeltaAth.

Referenced by CTrafficConfigDlg::MapRowToParameter().

00216 {
00217         return &m_DeltaAth;
00218 }

int CIDMParameterSet::getVehicleTypeID (  )  const

Definition at line 225 of file IDMParameterSet.cpp.

References m_VehicleTypeID.

Referenced by setAll().

00226 {
00227         return m_VehicleTypeID;
00228 }

void CIDMParameterSet::set_T ( CParameter param  ) 

Definition at line 120 of file IDMParameterSet.cpp.

References m_T.

00121 {
00122         m_T = *param;
00123 }

void CIDMParameterSet::set_A ( CParameter param  ) 

Definition at line 130 of file IDMParameterSet.cpp.

References m_A.

00131 {
00132         m_A = *param;
00133 }

void CIDMParameterSet::set_B ( CParameter param  ) 

Definition at line 140 of file IDMParameterSet.cpp.

References m_B.

00141 {
00142         m_B = *param;
00143 }

void CIDMParameterSet::set_S0 ( CParameter param  ) 

Definition at line 150 of file IDMParameterSet.cpp.

References m_S0.

00151 {
00152         m_S0 = *param;
00153 }

void CIDMParameterSet::set_S1 ( CParameter param  ) 

Definition at line 160 of file IDMParameterSet.cpp.

References m_S1.

00161 {
00162         m_S1 = *param;
00163 }

void CIDMParameterSet::set_V0 ( CParameter param  ) 

Definition at line 170 of file IDMParameterSet.cpp.

References m_V0.

00171 {
00172         m_V0 = *param;
00173 }

void CIDMParameterSet::set_Delta ( CParameter param  ) 

Definition at line 180 of file IDMParameterSet.cpp.

References m_Delta.

00181 {
00182         m_Delta = *param;
00183 }

void CIDMParameterSet::set_Polite ( CParameter param  ) 

Definition at line 190 of file IDMParameterSet.cpp.

References m_Polite.

00191 {
00192         m_Polite = *param;
00193 }

void CIDMParameterSet::set_Bias ( CParameter param  ) 

Definition at line 200 of file IDMParameterSet.cpp.

References m_Bias.

00201 {
00202         m_Bias = *param;
00203 }

void CIDMParameterSet::set_DeltaAth ( CParameter param  ) 

Definition at line 210 of file IDMParameterSet.cpp.

References m_DeltaAth.

00211 {
00212         m_DeltaAth = *param;
00213 }

void CIDMParameterSet::setVehicleTypeID ( int  id  ) 

Definition at line 220 of file IDMParameterSet.cpp.

References m_VehicleTypeID.

00221 {
00222         m_VehicleTypeID = id;
00223 }

void CIDMParameterSet::setAll ( const CIDMParameterSet ParamSet  )  [private]

Definition at line 81 of file IDMParameterSet.cpp.

References getVehicleTypeID(), m_A, m_B, m_Bias, m_Delta, m_DeltaAth, m_Polite, m_S0, m_S1, m_T, m_V0, and m_VehicleTypeID.

Referenced by CIDMParameterSet(), and operator=().

00082 {
00083         this->m_T               = ParamSet.m_T;
00084         this->m_A               = ParamSet.m_A;
00085         this->m_B               = ParamSet.m_B;
00086         this->m_S0              = ParamSet.m_S0;
00087         this->m_S1              = ParamSet.m_S1;
00088         this->m_V0              = ParamSet.m_V0;
00089         this->m_Delta   = ParamSet.m_Delta;
00090         this->m_Polite  = ParamSet.m_Polite;
00091         this->m_Bias    = ParamSet.m_Bias;
00092         this->m_DeltaAth= ParamSet.m_DeltaAth;
00093         
00094         this->m_VehicleTypeID = ParamSet.getVehicleTypeID();
00095 }

Here is the call graph for this function:

void CIDMParameterSet::buildParamSet (  )  [private]

Definition at line 97 of file IDMParameterSet.cpp.

References IDM_PARAM_A, IDM_PARAM_B, IDM_PARAM_BIAS, IDM_PARAM_DELTA, IDM_PARAM_DELTAATH, IDM_PARAM_POLITE, IDM_PARAM_S0, IDM_PARAM_S1, IDM_PARAM_T, IDM_PARAM_V0, m_A, m_B, m_Bias, m_Delta, m_DeltaAth, m_Polite, m_S0, m_S1, m_T, m_V0, and CParameter::setID().

Referenced by CIDMParameterSet().

00098 {
00099         // Set each of the parameters of the IDM model
00100         // Note appropriate default values are specified in the 
00101         // CDistribution(WORD id) constructor
00102         m_T                     .setID(IDM_PARAM_T);
00103         m_A                     .setID(IDM_PARAM_A);
00104         m_B                     .setID(IDM_PARAM_B);
00105         m_S0            .setID(IDM_PARAM_S0);
00106         m_S1            .setID(IDM_PARAM_S1);
00107         m_V0            .setID(IDM_PARAM_V0);
00108         m_Delta         .setID(IDM_PARAM_DELTA);
00109         m_Polite        .setID(IDM_PARAM_POLITE);
00110         m_Bias          .setID(IDM_PARAM_BIAS);
00111         m_DeltaAth      .setID(IDM_PARAM_DELTAATH);
00112 }

Here is the call graph for this function:


Member Data Documentation

Definition at line 77 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_T(), Serialize(), set_T(), and setAll().

Definition at line 78 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_A(), Serialize(), set_A(), and setAll().

Definition at line 79 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_B(), Serialize(), set_B(), and setAll().

Definition at line 80 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_S0(), Serialize(), set_S0(), and setAll().

Definition at line 81 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_S1(), Serialize(), set_S1(), and setAll().

Definition at line 82 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_V0(), Serialize(), set_V0(), and setAll().

Definition at line 83 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_Delta(), Serialize(), set_Delta(), and setAll().

Definition at line 84 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_Polite(), Serialize(), set_Polite(), and setAll().

Definition at line 85 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_Bias(), Serialize(), set_Bias(), and setAll().

Definition at line 86 of file IDMParameterSet.h.

Referenced by buildParamSet(), Generate(), get_DeltaAth(), Serialize(), set_DeltaAth(), and setAll().


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

Generated on Wed Aug 20 00:48:45 2008 for EvolveTraffic by  doxygen 1.5.6