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 7d420dc7 authored by Harald Martini's avatar Harald Martini
Browse files

ignore CompletedBusCycle section when FULL_SIMULATIONS is set

parent c82cbf59
No related branches found
No related tags found
No related merge requests found
......@@ -233,7 +233,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
{
try {
return action();
} catch (VectoException e) {
} catch (Exception e) {
LogManager.GetLogger(typeof(VectoRun).FullName).Info(e);
return null;
}
......
......@@ -209,12 +209,14 @@ public class PrimaryBusSimulation
public void CompletedBusCycleSection(string vifFile, string completed, double start,
double? distance = null)
{
Kernel.Rebind<IDeclarationCycleFactory>().To<TestDeclarationCycleFactoryStartPoint>().InSingletonScope();
var cycleFactory = Kernel.Get<IDeclarationCycleFactory>() as TestDeclarationCycleFactoryStartPoint;
#if FULL_SIMULATIONS
Assert.Ignore();
#endif
var cycleFactory = StartPointCycleFactory();
var missionFilter = TestMissionFilter();
missionFilter?.SetMissions((MissionType.Interurban, LoadingType.ReferenceLoad));
cycleFactory!.SetStartPoint(MissionType.Interurban, start.SI<Meter>(), true, distance?.SI<Meter>());
cycleFactory?.SetStartPoint(MissionType.Interurban, start.SI<Meter>(), true, distance?.SI<Meter>());
var completedJob = GenerateJsonJobCompletedBus(Path.Combine(BASE_DIR_VIF, vifFile),
Path.Combine(BASE_DIR_COMPLETED, completed));
......@@ -470,6 +472,10 @@ public class PrimaryBusSimulation
}
public void RunSimulationPrimary(string jobFile, int runIdx, out string vifFile, params Action<VectoRunData>[] runDataModifier)
{
#if FULL_SIMULATIONS
runIdx = -1;
#endif
var filePath = Path.Combine(BASE_DIR, jobFile);
var dataProvider = _xmlReader.CreateDeclaration(filePath);
var fileWriter = new FileOutputWriter(filePath);
......@@ -630,7 +636,7 @@ public class PrimaryBusSimulation
{
#if FULL_SIMULATIONS
Assert.Ignore();
Assert.Ignore($"");
#endif
var missionFilter = TestMissionFilter();
......
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