Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 93ae31ba authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

hybrid strategy: calculation of gearshift penalty - if score is negative,...

hybrid strategy: calculation of gearshift penalty - if score is negative, multiply with penalty (instead of dividing) to get a worse rating
parent a6500966
No related branches found
No related tags found
No related merge requests found
......@@ -44,9 +44,16 @@ namespace TUGraz.VectoCommon.Models {
public IResponse Response { get; set; }
public double Score =>
(FuelCosts + EquivalenceFactor * (BatCosts + ICEStartPenalty1) * SoCPenalty + ICEStartPenalty2 +
RampUpPenalty) / GearshiftPenalty;
public double Score
{
get
{
var cost = (FuelCosts + EquivalenceFactor * (BatCosts + ICEStartPenalty1) * SoCPenalty + ICEStartPenalty2 +
RampUpPenalty);
var gearshift = cost.IsSmaller(0) ? GearshiftPenalty : 1 / GearshiftPenalty;
return cost * gearshift;
}
}
public double FuelCosts { get; set; }
......
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