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

Skip to content
Snippets Groups Projects
Commit 92c3cc0b authored by Michael KRISPER's avatar Michael KRISPER
Browse files

Merge branch 'feature/VECTO-126-moddata-and-sumdata-correctness' into...

Merge branch 'feature/VECTO-126-moddata-and-sumdata-correctness' into feature/VECTO-134-add-start-button-for-v3-into-gui
parents 7dd31146 6da567a5
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,11 @@ namespace TUGraz.VectoCore.FileIO.Reader.DataObjectAdaper
internal DriverData CreateDriverData(VectoJobFileV2Engineering job)
{
var data = job.Body;
AccelerationCurveData accelerationData = null;
if (!string.IsNullOrWhiteSpace(data.AccelerationCurve) && data.AccelerationCurve != "<NOFILE>") {
accelerationData = AccelerationCurveData.ReadFromFile(Path.Combine(job.BasePath, data.AccelerationCurve));
}
var accelerationData = AccelerationCurveData.ReadFromFile(Path.Combine(job.BasePath, data.AccelerationCurve));
var lookAheadData = new DriverData.LACData {
Enabled = data.LookAheadCoasting.Enabled,
Deceleration = data.LookAheadCoasting.Dec.SI<MeterPerSquareSecond>(),
......@@ -169,12 +172,14 @@ namespace TUGraz.VectoCore.FileIO.Reader.DataObjectAdaper
var lossMapPath = Path.Combine(gearbox.BasePath, gearSettings.LossMap);
var lossMap = TransmissionLossMap.ReadFromFile(lossMapPath, gearSettings.Ratio);
var shiftPolygon = string.IsNullOrEmpty(gearSettings.ShiftPolygon)
? null
: ShiftPolygon.ReadFromFile(Path.Combine(gearbox.BasePath, gearSettings.ShiftPolygon));
var fullLoad = string.IsNullOrEmpty(gearSettings.FullLoadCurve) || gearSettings.FullLoadCurve.Equals("<NOFILE>")
? null
: FullLoadCurve.ReadFromFile(Path.Combine(gearbox.BasePath, gearSettings.FullLoadCurve));
var shiftPolygon = !string.IsNullOrEmpty(gearSettings.ShiftPolygon) && gearSettings.ShiftPolygon != "-" &&
gearSettings.ShiftPolygon != "<NOFILE>"
? ShiftPolygon.ReadFromFile(Path.Combine(gearbox.BasePath, gearSettings.ShiftPolygon))
: null;
var fullLoad = !string.IsNullOrEmpty(gearSettings.FullLoadCurve) && gearSettings.FullLoadCurve != "<NOFILE>" &&
gearSettings.FullLoadCurve != "-"
? FullLoadCurve.ReadFromFile(Path.Combine(gearbox.BasePath, gearSettings.FullLoadCurve))
: null;
var gear = new GearData {
LossMap = lossMap,
......
......@@ -62,7 +62,10 @@ namespace TUGraz.VectoCore.FileIO.Reader.Impl
Technology = a.Technology,
TechList = a.TechList.DefaultIfNull(Enumerable.Empty<string>()).ToArray(),
DemandType = AuxiliaryDemandType.Mapping,
Data = AuxiliaryData.ReadFromFile(Path.Combine(basePath, a.Path))
Data =
(!string.IsNullOrWhiteSpace(a.Path) && a.Path != "<NOFILE>")
? AuxiliaryData.ReadFromFile(Path.Combine(basePath, a.Path))
: null
}).Concat(new VectoRunData.AuxData { ID = "", DemandType = AuxiliaryDemandType.Direct }.ToEnumerable()).ToList();
}
......
......@@ -129,6 +129,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public AMTShiftStrategy(GearboxData data, IDataBus dataBus) : base(data, dataBus)
{
PreviousGear = 1;
// todo: move to settings
Data.EarlyShiftUp = true;
Data.SkipGears = true;
}
......@@ -318,31 +322,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public uint NextGear { get; set; }
}
//TODO Implement MTShiftStrategy
public class MTShiftStrategy : ShiftStrategy
public class MTShiftStrategy : AMTShiftStrategy
{
public MTShiftStrategy(GearboxData data, IDataBus bus) : base(data, bus) {}
public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outEngineSpeed)
public MTShiftStrategy(GearboxData data, IDataBus bus) : base(data, bus)
{
throw new NotImplementedException();
}
public override void Disengage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outEngineSpeed)
{
throw new NotImplementedException();
}
public override bool ShiftRequired(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
NewtonMeter inTorque,
PerSecond inAngularSpeed, uint gear, Second lastShiftTime)
{
throw new NotImplementedException();
}
public override uint InitGear(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outEngineSpeed)
{
throw new NotImplementedException();
// todo: move to settings
Data.EarlyShiftUp = false;
Data.SkipGears = true;
}
}
......
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