In my simulation, I calculated the travel time and CO2 emission.I calculated CO2 emission using the following functions:
double TraCICommandInterface::Vehicle::getCO2(std::string vehicle,
std::string lane, std::string edge) {
return traci->genericGetDouble(CMD_GET_VEHICLE_VARIABLE, vehicle, VAR_CO2EMISSION,
RESPONSE_GET_VEHICLE_VARIABLE);}
As soon as I got acquainted with scalar and vector file, I noticed that travel time and CO2 emission were stored in .sca file. The travel time is exactly what I was calculating, but the CO2 emiision parameter is different, and that is a huge difference.
i am using omnetpp-5.0, sumo-0.25.0 and veins-veins-4.4. Can anyone help me?
CO2 emissions are calculated by both SUMO and the Veins 4.4 simulation modules (the SUMO models are read via TraCI commands, the others are logged to .sca files). Both are using different models (see the respective source code). Depending on what you are simulating and what you are checking for, either model might be more appropriate.