Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

bugfix looking up torque for a certain electric power and angular speed

in case the forward interpolation gives a different result, a search is started. but the search always returned torque for 0 power
parent 7a6d1b09
Branches
Tags
No related merge requests found
...@@ -80,9 +80,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data ...@@ -80,9 +80,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
var searchResult = SearchAlgorithm.Search(retVal, electricPower - elPwr.ElectricalPower, var searchResult = SearchAlgorithm.Search(retVal, electricPower - elPwr.ElectricalPower,
interval: 10.SI<NewtonMeter>(), interval: 10.SI<NewtonMeter>(),
getYValue: x => (Watt)x, getYValue: x => (Watt)x - electricPower,
evaluateFunction: x => LookupElectricPower(voltage, avgSpeed, x, true).ElectricalPower, evaluateFunction: x => LookupElectricPower(voltage, avgSpeed, x, true).ElectricalPower,
criterion: x => ((Watt)x).Value() criterion: x => ((Watt)x - electricPower).Value()
); );
return searchResult; return searchResult;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment