6#ifndef NeTrainSim_TrainComponent_h
7#define NeTrainSim_TrainComponent_h
11#include "../network/netlink.h"
122 double dieselConversionFactor,
123 double dieselDensity);
137 double bioDieselConversionFactor,
138 double bioDieselDensity);
175 double hydrogenConversionFactor,
176 double hydrogenDensity);
187 virtual double refillBattery(
double timeStep,
double EC_kwh);
246 virtual std::pair<bool,double>
consumeFuel(
double timeStep,
double trainSpeed,
248 double LocomotiveVirtualTractivePower = std::numeric_limits<double>::quiet_NaN(),
249 double dieselConversionFactor = EC::DefaultDieselConversionFactor,
250 double biodieselConversionFactor = EC::DefaultBiodieselConversionFactor,
251 double hydrogenConversionFactor = EC::DefaultHydrogenConversionFactor,
252 double dieselDensity = EC::DefaultDieselDensity,
253 double biodieselDensity = EC::DefaultBioDieselDensity,
254 double hydrogenDensity = EC::DefaultHydrogenDensity);
This file declares the Battery class.
Defines a train component base class.
Definition traincomponent.h:24
virtual std::pair< bool, double > consumeFuelHydrogen(double EC_kwh, double hydrogenConversionFactor, double hydrogenDensity)
consume the locomotive hydrogen fuel.
Definition traincomponent.cpp:108
virtual std::pair< bool, double > consumeFuel(double timeStep, double trainSpeed, double EC_kwh, double LocomotiveVirtualTractivePower=std::numeric_limits< double >::quiet_NaN(), double dieselConversionFactor=EC::DefaultDieselConversionFactor, double biodieselConversionFactor=EC::DefaultBiodieselConversionFactor, double hydrogenConversionFactor=EC::DefaultHydrogenConversionFactor, double dieselDensity=EC::DefaultDieselDensity, double biodieselDensity=EC::DefaultBioDieselDensity, double hydrogenDensity=EC::DefaultHydrogenDensity)
Consume fuel or battery from the vehicle.
Definition traincomponent.cpp:26
virtual std::pair< bool, double > consumeElectricity(double timeStep, double EC_kwh)
consume any source of electricity in the locomotive; either the catenary or the batteries.
Definition traincomponent.cpp:76
double energyConsumed
The amount of energy consumed in kwh.
Definition traincomponent.h:52
double length
Length of the vehicle in meter.
Definition traincomponent.h:33
std::shared_ptr< NetLink > hostLink
Holds the current link this vehicle is on.
Definition traincomponent.h:61
double trackCurvature
The current curvature the vehicle is experiencing.
Definition traincomponent.h:35
virtual std::pair< bool, double > consumeFuelBioDiesel(double EC_kwh, double bioDieselConversionFactor, double bioDieselDensity)
consume the locomotive bio diesel fuel.
Definition traincomponent.cpp:58
double currentWeight
The gross weight of the vehicle when the train is travelling.
Definition traincomponent.h:43
double energyRegenerated
The amount of energy regenerated in kwh.
Definition traincomponent.h:56
virtual double refillBattery(double timeStep, double EC_kwh)
refill the locomtoive battery
Definition traincomponent.cpp:127
virtual double getResistance(double trainSpeed)
Gets the resistance applied on only this vehicle.
Definition traincomponent.cpp:5
friend ostream & operator<<(ostream &ostr, TrainComponent &stud)
Stream insertion operator.
Definition traincomponent.cpp:152
double frontalArea
The total frontal area of the vehicle for the aerodynamics resistance.
Definition traincomponent.h:41
virtual void resetTimeStepConsumptions()
Resets the energy consumptions data for the current time step.
Definition traincomponent.cpp:9
double trackGrade
The current grade the vehicle is experiencing.
Definition traincomponent.h:37
virtual void setCurrentWeight(double newCurrentWeight)
sets the current weight of the vehicle
Definition traincomponent.cpp:17
int noOfAxiles
The number of axiles the car has.
Definition traincomponent.h:47
double dragCoef
The air drag factor for aerodynamics resistance.
Definition traincomponent.h:39
virtual bool rechargeCatenary(double EC_kwh)
Rechage catenary and grid system if they are available.
Definition traincomponent.cpp:138
double cumEnergyRegenerated
The amount of cummulative energy regenerated in kwh.
Definition traincomponent.h:58
std::string name
The name of the vehicle.
Definition traincomponent.h:31
double emptyWeight
The light weight of the vehicle when the train is travelling.
Definition traincomponent.h:45
double auxiliaryPower
Auxiliary power.
Definition traincomponent.h:49
virtual std::pair< bool, double > consumeFuelDiesel(double EC_kwh, double dieselConversionFactor, double dieselDensity)
consume the locomotive diesel fuel.
Definition traincomponent.cpp:40
double cumEnergyConsumed
The amount of cummulative energy consumed in kwh.
Definition traincomponent.h:54
This file declares the Tank class.