Skip to content

Commit

Permalink
Fix error in CnossosVar
Browse files Browse the repository at this point in the history
  • Loading branch information
pierromond committed Nov 4, 2024
1 parent 329c689 commit 356dfb0
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ public static double evaluate(RoadVehicleCnossosvarParameters parameters) throws
double RoadLvl; // Lw/m (1 veh/h)

// Noise level
// Noise level
RoadLvl = getNoiseLvl(getCoeff("ap", freqParam, veh_type, coeffVer), getCoeff("bp", freqParam, veh_type, coeffVer), speed, 70.);
RoadLvl = getNoiseLvl(getCoeff("ar", freqParam, veh_type, coeffVer), getCoeff("br", freqParam, veh_type, coeffVer), speed, 70.);

// Correction by temperature p. 36
switch (veh_type) {
case "1":
RoadLvl = RoadLvl + 0.08 * (20 - Temperature); // K = 0.08 p. 36
break;
case "2":
RoadLvl = RoadLvl + 0.04 * (20 - Temperature); // K = 0.04 p. 36
break;
case "3":
RoadLvl = RoadLvl + 0.04 * (20 - Temperature); // K = 0.04 p. 36
break;
Expand All @@ -70,8 +71,8 @@ public static double evaluate(RoadVehicleCnossosvarParameters parameters) throws


// Rolling noise acceleration correction
double coefficientJunctionDistance = Math.max(1 - Math.abs(Junc_dist) / 100, 0);
RoadLvl = RoadLvl + getCr(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance;
// double coefficientJunctionDistance = Math.max(1 - Math.abs(Junc_dist) / 100, 0);
//RoadLvl = RoadLvl + getCr(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance;


//Studied tyres
Expand Down Expand Up @@ -101,9 +102,9 @@ public static double evaluate(RoadVehicleCnossosvarParameters parameters) throws
double aMax;
switch (acc_type) {
case 1:
if (veh_type.equals("1") || veh_type.equals("2") || veh_type.equals("3")) {
MotorLvl = MotorLvl + getCp(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance;
}
//if (veh_type.equals("1") || veh_type.equals("2") || veh_type.equals("3")) {
// MotorLvl = MotorLvl + getCp(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance;
//}
break;
case 2:
switch (veh_type) {
Expand Down

0 comments on commit 356dfb0

Please sign in to comment.