Week 4
25/02/2022
Today is the end of the fourth week. Following the plan for this week, we have the final interface of the train traction system implemented.
In this view, we can construct a timetable for a chosen route. Select an unlimited number of vehicles on a selected path and drive out of the station in sequence at specified intervals. The trajectory of the vehicles will be depicted in the form of animations, thus achieving a realistic simulation.
As shown in the below screenshot, the simple timetable can consist of different vehicle models and the time interval between each train. The route characteristic will be presented and the running diagram of this series of vehicles will be plotted as an animation.
The problem we encountered when designing this view is that unexpected behaviours of variables can be observed (e.g., calculations with arrays of different lengths which would not happen in the case of a single simulation) since consecutive simulations is required for this functionality. These unusual behaviours cause the running diagrams of later vehicles to not be plotted. To find the reason of unshown plots, we used the “step” debugging technique and found those unexpected behaviours of variables. To avoid these unwanted behaviours, we either add some default instructions or clear certain variables between simulations (“clear all” is not applicable in our scenario as discussed in the Week 1 Blog).
With all of the functionalities of the train traction system developpped, it is time for us to reflect our work in the past four weeks and prepare for the bench inspection next week.
评论
发表评论