Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9f606009 authored by Harald Martini's avatar Harald Martini
Browse files

multiply soc range with 100 (its in percent),

divide delta soc by 100
parent 7011e014
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ namespace TUGraz.VectoCore.Models.Declaration
public double LookupEquivalenceFactor(MissionType mission, VehicleClass hdvClass, LoadingType loading,
double socRange)
{
var a = _socRanges.MinBy((i => Math.Abs(socRange - i))); //closest
var a = _socRanges.MinBy((i => Math.Abs(socRange * 100 - i))); //closest
if (socRange <= _socRanges.Min() || socRange >= _socRanges.Max()) {
return _initEquivalenceFactors[a].LookupEquivalenceFactor(mission, hdvClass, loading);
......
......@@ -62,7 +62,7 @@ namespace TUGraz.VectoCore.Models.Declaration.IterativeRunStrategies
f_equiv_1 = _results[iteration].f_equiv;
d_soc_1 = _results[iteration].d_soc;
f_equiv_2 = f_equiv_1 - (d_soc_1 / k);
f_equiv_2 = f_equiv_1 - (d_soc_1/100 / k);
runData.HybridStrategyParameters.EquivalenceFactor = f_equiv_2;
runData.HybridStrategyParameters.EquivalenceFactorCharge = f_equiv_2 * factorCharge;
......@@ -70,8 +70,8 @@ namespace TUGraz.VectoCore.Models.Declaration.IterativeRunStrategies
break;
case 1:
d_soc_1 = _results[0].d_soc;
d_soc_2 = _results[1].d_soc;
d_soc_1 = _results[0].d_soc / 100;
d_soc_2 = _results[1].d_soc / 100;
f_equiv_1 = _results[0].f_equiv;
f_equiv_2 = _results[1].f_equiv;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment