Eclipse SUMO - Simulation of Urban MObility
V5/cs/Start.cs
Go to the documentation of this file.
1 #define FLEET
2 using System;
3 using System.IO;
4 using System.Collections.Generic;
5 using System.Globalization;
6 using System.Linq;
7 using System.Text;
8 using System.Threading.Tasks;
9 using System.Reflection;
10 
11 namespace PHEMlightdll
12 {
13  public class Start
14  {
15  private List<string> _DataPath;
16  private CEPHandler DataInput;
17  public Helpers Helper = new Helpers();
18 
19  //******************* Parameters of Array or Single calculation *******************
20  //********************************* INPUT ******************************************
21  //*** DATATYP | UNIT | VARIBLE | Description ***
22  //List<string> | [-] | DataFiles (VEH, FC, EMI)| Name of file (e.g. "PC_D_EU4" path neede if not in "Default Vehicles") or aggregated name (PC, HDV, BUS, TW) by FleetMix calculation
23  //List<double> / double | [s] | Time | Time signal
24  //List<double> / double | [m/s] | Velocity | Velocity signal
25  //double | [m/s^2]| acc | Acceleration (ONLY NEDDED BY SINGLE CALCULATION)
26  //List<double> / double | [%] | Gradient | Gradient of the route
27  //out List<VehicleResult> | [-] | VehicleResultsOrg | Returned result list
28  //bool | [-] | fleetMix = false | Optional parameter if fleetMix should be calculate
29  //string | [-] | CommentPref = "c" | Optional parameter for comment prefix
30 
31  //********************************* OUPUT: VehicleResultsOrg **********************
32  //*** DATATYP | UNIT | VARIBLE | Description ***
33  //string | [-] | vehicle | Name of the vehicle
34  //string | [-] | cycle | Name of the cycle
35  //double | [s] | time | Time
36  //double | [m/s] | speed | Velocity
37  //double | [kW] | power | Calculated power at the engine (ICE for conventional and HEV vehicles, electric engine for BEVs) including engine inertia and auxiliaries; not limited for engine fullload and braking limitations
38  //double | [kW] | P_pos | Positive engine power limited with engine rated power
39  //double | [-] | pNormRated | Engine power normalised with rated engine power and limited with the power range (fullload and drag) as specified in the characteristic curve for fuel consumption
40  //double | [-] | pNormDrive | Engine power normalised with "P_drive" and limited with the power range (fullload and drag) as specified in the characteristic curve for emissions
41  //double | [m/s^2]| acc | Caclulated/given acceleration
42  //Dictionary<string, double>| [*] | Emissiondata | Calculated emissions for all components which are defined in the emission curves. Unit dependent of emission component
43 
44 
45  #region calculate
46  //Calculate data from array
47  public bool CALC_Array(List<string> DataFiles,
48  List<double> Time,
49  List<double> Velocity,
50  List<double> Gradient,
51  out List<VehicleResult> VehicleResultsOrg,
52  bool fleetMix = false,
53  Correction DataCor = null,
54  string CommentPref = "c")
55  {
56  //Declaration
57  int i;
58  double acc;
59  List<VehicleResult> _VehicleResult = new List<VehicleResult>();
60 
61  //Initialisation
62  Helper.ErrMsg = null;
63 
64  //Borrow
65  Helper.CommentPrefix = CommentPref;
66  _DataPath = new List<string>();
67  //Set path by normal calculation (on given) and set path by fleetmix (on Default Vehicles) calculation
68  for (i = 0; i < DataFiles.Count; i++)
69  {
70  if ((DataFiles[i].LastIndexOf(@"\")) >= 0)
71  {
72  _DataPath.Add(DataFiles[i]);
73  }
74  else
75  {
76  //_DataPath.Add(Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(@"\")) + @"\Default Vehicles\" + Helper.PHEMDataV);
77  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
78  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
79  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
80  i += 1;
81  }
82  }
83 
84  //Read the vehicle and emission data
85  #if FLEET
86  if (fleetMix)
87  {
88  //Set the vehicle class
89  Helper.gClass = _DataPath[0];
90 
91  //Generate the class
92  DataInput = new CEPHandler();
93 
94  //Read the FleetShares
95  if (!DataInput.ReadFleetShares(DataFiles[1], Helper))
96  {
97  VehicleResultsOrg = null;
98  return false;
99  }
100  //Read the vehicle and emission data
101  if (!DataInput.GetFleetCEP(_DataPath, DataFiles[0], Helper, DataCor))
102  {
103  VehicleResultsOrg = null;
104  return false;
105  }
106  }
107  else
108  #endif
109  {
110  //Get vehicle string
111  if (!Helper.setclass(DataFiles[0]))
112  {
113  VehicleResultsOrg = null;
114  return false;
115  }
116 
117  //Generate the class
118  DataInput = new CEPHandler();
119 
120  //Read the vehicle and emission data
121  if (!DataInput.GetCEP(_DataPath, Helper, DataCor))
122  {
123  VehicleResultsOrg = null;
124  return false;
125  }
126  }
127 
128  //Calculate emissions per second
129  for (i = 1; i <= Time.Count - 1; i++)
130  {
131  //Calculate the acceleration
132  acc = (Velocity[i] - Velocity[i - 1]) / (Time[i] - Time[i - 1]);
133 
134  //Calculate and save the data in the List
135  _VehicleResult.Add(PHEMLight.CreateVehicleStateData(Helper,
137  Time[i - 1],
138  Velocity[i - 1],
139  acc,
140  Gradient[i - 1]));
141  if (Helper.ErrMsg != null)
142  {
143  VehicleResultsOrg = null;
144  return false;
145  }
146  }
147  VehicleResultsOrg = _VehicleResult;
148  return true;
149  }
150 
151  //Calculate single data
152  public bool CALC_Single(List<string> DataFiles,
153  double Time,
154  double Velocity,
155  double acc,
156  double Gradient,
157  out List<VehicleResult> VehicleResultsOrg,
158  bool fleetMix = false,
159  Correction DataCor = null,
160  string CommentPref = "c")
161  {
162  //Declaration
163  List<VehicleResult> _VehicleResult = new List<VehicleResult>();
164  VehicleResultsOrg = _VehicleResult;
165 
166  //Borrow
167  Helper.CommentPrefix = CommentPref;
168  _DataPath = new List<string>();
169  //Set path by normal calculation (on given) and set path by fleetmix (on Fleetshare file) calculation
170  for (int i = 0; i < DataFiles.Count; i++)
171  {
172  if ((DataFiles[i].LastIndexOf(@"\")) >= 0)
173  {
174  _DataPath.Add(DataFiles[i]);
175  }
176  else
177  {
178  //_DataPath.Add(Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(@"\")) + @"\Default Vehicles\" + Helper.PHEMDataV);
179  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
180  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
181  _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\")));
182  i += 1;
183  }
184  }
185 
186  //Read the vehicle and emission data
187  #if FLEET
188  if (fleetMix)
189  {
190  //Set the vehicle class
191  Helper.gClass = "AggClass_" + DataFiles[0];
192 
193  //Generate the class
194  DataInput = new CEPHandler();
195 
196  //Read the FleetShares
197  if (!DataInput.ReadFleetShares(DataFiles[1], Helper))
198  {
199  VehicleResultsOrg = null;
200  return false;
201  }
202  //Read the vehicle and emission data
203  if (!DataInput.GetFleetCEP(_DataPath, DataFiles[0], Helper, DataCor))
204  {
205  VehicleResultsOrg = null;
206  return false;
207  }
208  }
209  else
210  #endif
211  {
212  //Get vehicle string
213  if (!Helper.setclass(DataFiles[0]))
214  {
215  VehicleResultsOrg = null;
216  return false;
217  }
218 
219  //Generate the class
220  DataInput = new CEPHandler();
221 
222  //Read the vehicle and emission data
223  if (!DataInput.GetCEP(_DataPath, Helper, DataCor))
224  {
225  VehicleResultsOrg = null;
226  return false;
227  }
228  }
229 
230  //Calculate and save the data in the List
231  _VehicleResult.Add(PHEMLight.CreateVehicleStateData(Helper,
233  Time,
234  Velocity,
235  acc,
236  Gradient));
237  VehicleResultsOrg = _VehicleResult;
238  return true;
239  }
240  #endregion
241 
242  #region ExportData
243  private Dictionary<string, cErgEntry> ErgEntries = new Dictionary<string, cErgEntry>();
244  private List<string> ErgEntryList = new List<string>(); //Needed because Dictionary is not sorted
245 
246  //Add to ERG file
247  private void AddToErg(string IDstring, string Head, string Unit)
248  {
249  if (!ErgEntries.ContainsKey(IDstring))
250  {
251  ErgEntries.Add(IDstring, new cErgEntry(Head, Unit));
252  ErgEntryList.Add(IDstring);
253  }
254  }
255 
256  //Create result head
257  private string ErgHead()
258  {
259  //Declaration
260  StringBuilder s = new StringBuilder();
261  string key = null;
262  bool First = true;
263 
264  foreach (string key_loopVariable in ErgEntryList)
265  {
266  key = key_loopVariable;
267  if (!First)
268  s.Append(",");
269  s.Append(ErgEntries[key].Head);
270  First = false;
271  }
272  //Return value
273  return s.ToString();
274  }
275 
276  //Create result units
277  private string ErgUnits()
278  {
279  //Declaration
280  StringBuilder s = new StringBuilder();
281  bool First = true;
282  string key = null;
283 
284  foreach (string key_loopVariable in ErgEntryList)
285  {
286  key = key_loopVariable;
287  if (!First)
288  s.Append(",");
289  s.Append(ErgEntries[key].Unit);
290  First = false;
291  }
292 
293  //Return value
294  return s.ToString();
295  }
296 
297  //Output sequence for the emissions
298  private void OutSeq(VehicleResult _VehicleResult, bool STA = false, bool add = false)
299  {
300  string Unit = "/km";
301  List<string> OutSeqStr = new List<string> { "FC", "FC_EL", "CO2", "NOX", "CO", "HC", "PM", "PN" };
302 
303  if (STA) Unit = "/h";
304 
305  if (!add)
306  {
307  //Clear the result arrays
308  ErgEntries.Clear();
309  ErgEntryList.Clear();
310 
311  AddToErg("FC", "FC", "[g" + Unit + "]");
312  AddToErg("FC_EL", "Engine Power", "[kWh" + Unit + "]");
313  AddToErg("CO2", "CO2", "[g" + Unit + "]");
314  AddToErg("NOX", "NOx", "[g" + Unit + "]");
315  AddToErg("CO", "CO", "[g" + Unit + "]");
316  AddToErg("HC", "HC", "[g" + Unit + "]");
317  AddToErg("PM", "PM", "[g" + Unit + "]");
318  AddToErg("PN", "PN", "[#" + Unit + "]");
319 
320  foreach (string id in _VehicleResult.EmissionData.Emi.Keys)
321  {
322  if (!OutSeqStr.Contains(id)) AddToErg(id.ToUpper(), id, "[g" + Unit + "]");
323  }
324  }
325  else
326  {
327  foreach (string id in _VehicleResult.EmissionData.Emi.Keys)
328  {
329  if (!ErgEntries.ContainsKey(id.ToUpper())) AddToErg(id.ToUpper(), id, "[g" + Unit + "]");
330  }
331  }
332  }
333 
334  //Export the data
335  public bool ExportData(string path, List<VehicleResult> _VehicleResult)
336  {
337  if (path == null || _VehicleResult == null || _VehicleResult.Count == 0) return false;
338 
339  //Write head
340  StringBuilder allLines = new StringBuilder();
341  string lineEnding = "\r\n";
342 
343  //Produce emission output sequence. Only first one needed because should be always the same for a single vehicle
344  OutSeq(_VehicleResult[0], true);
345 
346  //Vehicle type
347  allLines.AppendLine("Vehicletype: ," + _VehicleResult[0].Vehicle);
348 
349  //Header and unit
350  allLines.AppendLine("Time, Speed, Gradient, Accelaration, Engine power raw, P_pos, P_norm_rated, P_norm_drive," + ErgHead());
351  allLines.AppendLine("[s], [m/s], [%], [m/s^2], [kW], [kW], [-], [-]," + ErgUnits());
352 
353  //Write data
354  foreach (VehicleResult Result in _VehicleResult)
355  {
356  allLines.Append(Result.Time.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
357  allLines.Append(Result.Speed.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
358  allLines.Append(Result.Grad.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
359  allLines.Append(Result.Accelaration.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
360  allLines.Append(Result.Power.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
361  allLines.Append(Result.PPos.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
362  allLines.Append(Result.PNormRated.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
363  allLines.Append(Result.PNormDrive.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
364  foreach (string id in ErgEntryList)
365  {
366  if (Result.EmissionData.Emi.ContainsKey(id))
367  allLines.Append(Result.EmissionData.Emi[id].ToString("0.0000", CultureInfo.InvariantCulture) + ",");
368  else
369  allLines.Append("-,");
370  }
371  allLines.Append(lineEnding);
372  }
373 
374  // Write the string to a file.
375  if (path.IndexOf(".", 0) < 0)
376  {
377  path = path + ".sta";
378  }
379  try
380  {
381  StreamWriter file = new StreamWriter(path);
382  file.WriteLine(allLines);
383  file.Close();
384  return true;
385  }
386  catch (Exception ex)
387  {
388  return false;
389  }
390  }
391 
392  //Export summerized data
393  public bool ExportSumData(string path, List<VehicleResult> _VehicleResult)
394  {
395  if (path == null || _VehicleResult == null) return false;
396  StringBuilder allLines = new StringBuilder();
397 
398  if (path.IndexOf(".", 0) < 0)
399  {
400  path = path + ".erg";
401  }
402 
403  //Produce emission output sequence for all calculated vehicles
404  OutSeq(_VehicleResult[0], false);
405  foreach (VehicleResult Result in _VehicleResult)
406  {
407  OutSeq(Result, false, true);
408  }
409 
410  if (!File.Exists(path))
411  {
412  //Write head
413  allLines.AppendLine("PHEMLight Results");
414  allLines.AppendLine("");
415  allLines.AppendLine("Vehicle, Cycle, Time, Speed, Gradient, Accelaration, Engine power raw, P_pos, P_norm_rated, P_norm_drive," + ErgHead());
416  allLines.AppendLine("[-], [-], [s], [km/h], [%], [m/s^2], [kW], [kW], [-], [-]," + ErgUnits());
417  }
418 
419  //Write data
420  foreach (VehicleResult Result in _VehicleResult)
421  {
422  allLines.Append(Result.Vehicle + ",");
423  allLines.Append(Result.Cycle + ",");
424  allLines.Append(Result.Time.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
425  allLines.Append(Result.Speed.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
426  allLines.Append(Result.Grad.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
427  allLines.Append(Result.Accelaration.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
428  allLines.Append(Result.Power.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
429  allLines.Append(Result.PPos.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
430  allLines.Append(Result.PNormRated.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
431  allLines.Append(Result.PNormDrive.ToString("0.0000", CultureInfo.InvariantCulture) + ",");
432  foreach (string id in ErgEntryList)
433  {
434  if (Result.EmissionData.Emi.ContainsKey(id))
435  allLines.Append(Result.EmissionData.Emi[id].ToString("0.0000", CultureInfo.InvariantCulture) + ",");
436  else
437  allLines.Append("-,");
438  }
439  allLines.Append("\r\n");
440  }
441  // Write the string to a file.
442  try
443  {
444  StreamWriter file = new StreamWriter(path, true);
445  file.WriteLine(allLines);
446  file.Close();
447  return true;
448  }
449  catch (Exception ex)
450  {
451  return false;
452  }
453  }
454 
455  public VehicleResult GenerateSumData(List<VehicleResult> _VehicleResult)
456  {
457  //Declaration
458  string vehicle = "";
459  string cycle = "";
460  double sum_time = 0;
461  double sum_speed = 0;
462  double sum_grad = 0;
463  double sum_power = 0;
464  double sum_pPos = 0;
465  double sum_pNormRated = 0;
466  double sum_pNormDrive = 0;
467  double sum_acc = 0;
468  Dictionary<string, double> sum_Emi = new Dictionary<string, double>();
469 
470  if (_VehicleResult == null || _VehicleResult.Count == 0) return new VehicleResult("", "", 0, 0, 0, 0, 0, 0, 0, 0, sum_Emi);
471 
472  //Vehicle and cycle are always the same here
473  vehicle = _VehicleResult[0].Vehicle;
474  cycle = _VehicleResult[0].Cycle;
475 
476  //Write data
477  foreach (VehicleResult Result in _VehicleResult)
478  {
479  sum_speed += Result.Speed * 3.6;
480  sum_power += Result.Power;
481  if (Result.PPos > 0) { sum_pPos += Result.PPos; }
482  sum_grad += Result.Grad;
483  sum_pNormRated += Result.PNormRated;
484  sum_pNormDrive += Result.PNormDrive;
485  sum_acc += Result.Accelaration;
486  foreach(string id in Result.EmissionData.Emi.Keys)
487  {
488  if (sum_Emi.ContainsKey(id))
489  sum_Emi[id] += Result.EmissionData.Emi[id];
490  else
491  sum_Emi.Add(id, Result.EmissionData.Emi[id]);
492  }
493  }
494 
495  //Build average
496  sum_time = _VehicleResult[_VehicleResult.Count - 1].Time - _VehicleResult[0].Time;
497  sum_power /= _VehicleResult.Count;
498  sum_pPos /= _VehicleResult.Count;
499  sum_grad /= _VehicleResult.Count;
500  sum_pNormRated /= _VehicleResult.Count;
501  sum_pNormDrive /= _VehicleResult.Count;
502  sum_acc /= _VehicleResult.Count;
503  if (sum_speed > 0)
504  {
505  foreach (string id in sum_Emi.Keys.ToList())
506  {
507  sum_Emi[id] /= sum_speed;
508  }
509  }
510  else
511  {
512  foreach (string id in sum_Emi.Keys)
513  {
514  sum_Emi[id] = 0;
515  }
516  }
517  sum_speed /= _VehicleResult.Count;
518 
519  return new VehicleResult(vehicle,
520  cycle,
521  sum_time,
522  sum_speed,
523  sum_grad,
524  sum_power,
525  sum_pPos,
526  sum_pNormRated,
527  sum_pNormDrive,
528  sum_acc,
529  sum_Emi);
530  }
531  #endregion
532  }
533 
534  //Calculation
535  class PHEMLight
536  {
537  #region CreateVehicleStateData
539  CEP currCep,
540  double time,
541  double inputSpeed,
542  double inputAcc,
543  double Gradient = 0,
544  Correction DataCor = null)
545  {
546  //Declaration
547  double speed = Math.Max(inputSpeed, 0);
548  double acc;
549  double P_pos;
550 
551  //Speed/Acceleration limitation
552  if (speed == 0)
553  acc = 0;
554  else
555  acc = Math.Min(inputAcc, currCep.GetMaxAccel(speed, Gradient, (Helper.pClass == Constants.strBEV | Helper.uClass == Constants.strHybrid)));
556 
557  //Calculate the power
558  double power = currCep.CalcPower(speed, acc, Gradient, (Helper.pClass == Constants.strBEV | Helper.uClass == Constants.strHybrid));
559  double P_eng = currCep.CalcEngPower(power);
560  double Pwheel = 0;
561  if (Helper.uClass == Constants.strHybrid) Pwheel = currCep.CalcWheelPower(speed, acc, Gradient);
562  //Power limitation
563  if (P_eng >= 0)
564  P_pos = power;
565  else
566  P_pos = 0;
567 
568  //Calculate the result values (BEV)
569  if (Helper.pClass == Constants.strBEV)
570  {
571  return new VehicleResult(Helper.gClass,
572  "",
573  time,
574  speed,
575  Gradient,
576  P_eng,
577  P_pos,
578  P_eng / currCep.RatedPower,
579  P_eng / currCep.DrivingPower,
580  acc,
581  currCep.GetAllEmission(P_eng, speed, Helper));
582  }
583 
584  //Calculate the decel costing
585  double decelCoast = currCep.GetDecelCoast(speed, acc, Gradient);
586 
587  //Calculate the result values (Zero emissions by costing, Idling emissions by v <= 0.5m / s²)
588  if (acc >= decelCoast || speed <= Constants.ZERO_SPEED_ACCURACY)
589  {
590  if (Helper.uClass == Constants.strHybrid)
591  return new VehicleResult(Helper.gClass,
592  "",
593  time,
594  speed,
595  Gradient,
596  P_eng,
597  P_pos,
598  P_eng / currCep.RatedPower,
599  P_eng / currCep.DrivingPower,
600  acc,
601  currCep.GetAllEmission(Pwheel, speed, Helper));
602  else
603  return new VehicleResult(Helper.gClass,
604  "",
605  time,
606  speed,
607  Gradient,
608  P_eng,
609  P_pos,
610  P_eng / currCep.RatedPower,
611  P_eng / currCep.DrivingPower,
612  acc,
613  currCep.GetAllEmission(P_eng, speed, Helper));
614  }
615  else
616  {
617  if (Helper.uClass == Constants.strHybrid)
618  return new VehicleResult(Helper.gClass,
619  "",
620  time,
621  speed,
622  Gradient,
623  P_eng,
624  P_pos,
625  P_eng / currCep.RatedPower,
626  P_eng / currCep.DrivingPower,
627  acc,
628  currCep.GetAllEmission(Pwheel, speed, Helper, true));
629  else
630  return new VehicleResult(Helper.gClass,
631  "",
632  time,
633  speed,
634  Gradient,
635  P_eng,
636  P_pos,
637  P_eng / currCep.RatedPower,
638  P_eng / currCep.DrivingPower,
639  acc,
640  currCep.GetAllEmission(P_eng, speed, Helper, true));
641  }
642  }
643  #endregion
644  }
645 }
bool ReadFleetShares(string DataPath, Helpers Helper)
Dictionary< string, CEP > CEPS
bool GetFleetCEP(string DataPath, string AggClass, Helpers Helper)
bool GetCEP(const std::vector< std::string > &DataPath, Helpers *Helper)
Dictionary< string, double > GetAllEmission(double power, double speed, Helpers VehicleClass, bool SetZero=false)
Definition: V5/cs/CEP.cs:354
double GetMaxAccel(double speed, double gradient)
Definition: cpp/CEP.cpp:420
double CalcWheelPower(double speed, double acc, double gradient)
Definition: V5/cs/CEP.cs:325
double CalcEngPower(double power)
Definition: cpp/CEP.cpp:219
double CalcPower(double speed, double acc, double gradient)
Definition: cpp/CEP.cpp:200
double GetDecelCoast(double speed, double acc, double gradient)
Definition: cpp/CEP.cpp:326
static const std::string strBEV
Definition: cpp/Constants.h:63
static const double ZERO_SPEED_ACCURACY
Definition: cpp/Constants.h:39
static const std::string strHybrid
Definition: cpp/Constants.h:62
Dictionary< string, double > Emi
bool setclass(const std::string &VEH)
static VehicleResult CreateVehicleStateData(Helpers Helper, CEP currCep, double time, double inputSpeed, double inputAcc, double Gradient=0)
static VehicleResult CreateVehicleStateData(Helpers Helper, CEP currCep, double time, double inputSpeed, double inputAcc, double Gradient=0, Correction DataCor=null)
Definition: V5/cs/Start.cs:538
bool CALC_Single(List< string > DataFiles, double Time, double Velocity, double acc, double Gradient, out List< VehicleResult > VehicleResultsOrg, bool fleetMix=false, Correction DataCor=null, string CommentPref="c")
Definition: V5/cs/Start.cs:152
Dictionary< string, cErgEntry > ErgEntries
Definition: V5/cs/Start.cs:243
List< string > ErgEntryList
Definition: V5/cs/Start.cs:244
void OutSeq(VehicleResult _VehicleResult, bool STA=false, bool add=false)
Definition: V5/cs/Start.cs:298
CEPHandler DataInput
List< string > _DataPath
bool CALC_Array(List< string > DataFiles, List< double > Time, List< double > Velocity, List< double > Gradient, out List< VehicleResult > VehicleResultsOrg, bool fleetMix=false, Correction DataCor=null, string CommentPref="c")
Definition: V5/cs/Start.cs:47
void AddToErg(string IDstring, string Head, string Unit)
Definition: V5/cs/Start.cs:247
VehicleResult GenerateSumData(List< VehicleResult > _VehicleResult)
Definition: V5/cs/Start.cs:455
bool ExportSumData(string path, List< VehicleResult > _VehicleResult)
Definition: V5/cs/Start.cs:393
bool ExportData(string path, List< VehicleResult > _VehicleResult)
Definition: V5/cs/Start.cs:335
C++ TraCI client API implementation.
Definition: Vehicle.h:34