Csantucci, on 28 April 2022 - 09:02 AM, said:
In addition to that, a new file format is needed to define the containers that are present at game start in the various container stations. I'd prefer to keep it in "MSTS" format, because that would be coherent with the other files, but I see that for new file formats the .json format is mandatory...
This new file could then be recalled from .act files, and also from timetable files, provided someone would implement this second link.
cjakeman, on 28 April 2022 - 11:51 AM, said:
Yes, it is indeed mandatory.
What is the current OR policy for implementation of JSON format files? When will all old formats be converted over?
How will legacy files be handled, will OR always have to handle both file formats? Will there be some sort of incentive provided to encourage users to transition to JSON files?
My personal preference would be to see this new file as a "MSTS" format, as most users already are familiar with the layout, style and text format. It could then be converted over when all the other "MSTS" files are converted to JSON.
Whilst I agree that it maybe reasonable to be working towards a JSON format, I think that we need to consider all the implications of a JSON conversion, and develop an appropriate transition plan, rather the encouraging an ad-hoc mixture of MSTS Legacy files and JSON.
Csantucci, on 28 April 2022 - 09:02 AM, said:
Replying to Peter after some days of coding and testing: I'm open to discussion about file formats and so on, but I think that the best place is here, for two reasons: first, we are speaking about files that will be managed by content creators and by players, so here there is a wider audience. Second, I prefer not to duplicate the discussion.
Ok, thanks for that.
To provide a base for the attaching of physics to this new loading/unloading concept lets think in terms of the following two physics scenarios (this is not
all the physics that need to be considered, but acts as an example).
i) The first obvious one is the wagon weight (mass) that will need to vary as loads or added or subtracted. Naturally this will impact the tonnage capacity.
ii) Train Resistance - All Davis values will be impacted as the weight changes. In particular the Davis C value will be the most challenging (due to the change in air resistance), as it will vary from an empty wagon, to one or two containers single stacked, and containers double stacked. So how could we differentiate if the same container is added as a single stack or double stack?
So, I assume that you have already thought about the handling of wagons in MSTSWagon.cs and to ensure that we are on the same page, I believe we have two scenarios as follows:
i)
In Game Addition / Subtraction of Load - Containers (or other loads) are loaded at a terminal and the physics is added or subtracted from the base wagon in MSTSWagon.cs as appropriate. One aspect that will need to be considered is how is the load linked to an articulated wagon consist, eg 5 pack container cars? Hence the need to consider a "bigger" picture view of loading and articulated wagons.
ii)
Game Initialisation - Train consist is built, and loads are added to MSTSWagon.cs
Are these the options that you have considered?
Hence, on the above basis I agree with your concept of creating a
LOA file for every discrete load. Some thought will need to be given to the parameters defined in this file, so that only the required parameters are required.
I also think that using a
ACT file or Timetable file as a means for providing a pool of containers (or loads) at a site seems a reasonable approach. For the ACT file I would suggest that they should either be able to be included directly into the ACT file, or alternatively via an INC file (my preferred solution). When the activity initially starts how will it physically locate the containers at the loading site. Will the user need to put in a location reference point similar to the loose consist concept?
Csantucci, on 28 April 2022 - 09:02 AM, said:
At the moment for the containers I am using an intermediate solution: container data are stored in .inc files (one for every container type) within a directory, with a mnemonic name indicating the dimensions of the container and the brand. This way it is not needed to write specific code, and the data are centralized, easily accessible and don't require duplication. As this is a solution that didn't require writing code, another solution, if better, wouldn't mean that I have wasted time.
As a prove of concept this seems a reasonable approach, but I would suggest that a "permanent" solution needs to be developed before final deployment, as we don't want to create a legacy situation that needs to be maintained into the future.
Csantucci, on 28 April 2022 - 09:02 AM, said:
I am thinking at two ways to link container data to wagon data: the first way is - let's say so - an embedded way, where the .wag file contains the data of the containers carried by referencing the above .inc files. I think that wagon+container developers would like to have also this possibility. The second way is to insert the link in the .con file.
I am thinking at the following one:
...
Wagon (
WagonData ( DTTX_62142_3D ATW.DTTX_62142 )
UiD ( 6 )
ContainerData (
Container (
Include ( "..//..//common.containerdata//20hamburgsud.inc")
Alignment (CenterRear)
)
Container (
Include ( "..//..//common.containerdata//20cmacgm.inc")
Alignment (CenterFront)
)
...
)
...
For a start I would prefer to see Container renamed to Load, as this will allow future extension of this work beyond containers without needing to change input file formats.
Again I think that it should be possible to either add the statements directly to the CON file, or as a preferred solution via an INC file.
Is it possible to use a more abbreviated coding input? Perhaps something like the following:
LoadData ( UiD Load File Load Directory Load Alignment )
Which using your example might look something like this:
LoadData ( 6 20cmacgm common.containerdata CenterFront )
Thus reducing a number of lines into one line, and also allowing it to be placed anywhere in the file or in an INC file. It also maintains a similar format to WagonData, etc.
Csantucci, on 28 April 2022 - 09:02 AM, said:
Allowed alignments are Rear, CenterRear, CenterFront, Front, Center and Above. I believe I can manage all significant container layouts this way.
Center alignment is default.
Can you describe each of these positions, for example my main question is what is the difference between Rear and CentreRear, etc?