PortML.Documents
1.1.26
See the version list below for details.
dotnet add package PortML.Documents --version 1.1.26
NuGet\Install-Package PortML.Documents -Version 1.1.26
<PackageReference Include="PortML.Documents" Version="1.1.26" />
paket add PortML.Documents --version 1.1.26
#r "nuget: PortML.Documents, 1.1.26"
// Install PortML.Documents as a Cake Addin #addin nuget:?package=PortML.Documents&version=1.1.26 // Install PortML.Documents as a Cake Tool #tool nuget:?package=PortML.Documents&version=1.1.26
About
PortML stands for Port Markup Language. It is a descriptive language or document which describes container port assets, such as yard sets, quay cranes, wharves, and AGVs, as a markup code for modelling and simulation. In the future, besides the assets, it will include events as part of the document as well.
PortML Spec
PortML document follows the PortML specification which is defined in the schema file PortML.xsd. The schema defines all of the datatypes and base infrastructure types.
The PortML is described using the following format.
<PortML xmlns="http://o2des.com/portml-namespace" (attrA="value")>
<nameA><nameA>
<nameB[x]></nameB>
<nameC>
<nameD></nameD>
</nameC>
<name>
Using this format:
- To build a valid XML instance of a resource, simply replace the contents of the elements and attributes with valid content as described by the cardinality, type rules and content description found in the comment in each element;
- Elements are always in the namespace http://o2des.com/portml-namespace. This is usually specified as the default namespace on the root element;
- Element name is case-sensitive (though duplicates that differ only in case are never defined);
- Elements must always appear in the order documented;
- Elements which are not documented in this PortML Spec should not be included in the PortML document;
- Any of the XML elements may have an id attribute to serve as the target of an internal reference;
- Attributes can never be empty. Either they are absent, or they are present with at least one character of non-whitespace content;
- Implementers should trim leading and trailing whitespace before writing and SHOULD trim leading and trailing whitespace when reading attribute values;
- XML comments, processing instructions and formatting are not part of the contents of a resource;
- XML resources MUST be exchanged using UTF-8 encoding. Specifying the character encoding using a <?xml encoding="UTF-8" ?> processing instruction is not needed;
- The MIME-type for this format is application/xml.
How to Use
using (StreamReader file = new StreamReader("<path to PortML document>"))
{
try
{
string portMLDocument = file.ReadToEnd();
var parser = new PortML.Documents.PortMLParser();
var portML = parser.Parse(portMLDocument);
...
}
catch (Exception ex)
{
Assert.Fail(ex.Message);
}
}
Wharf
Wharf is the side of the port terminal where vessels will be parked at.
Quay cranes will be located at the land side of the wharf while vessels will be parked at the sea side. As shown in the following diagram, the direction of the wharf, defined by StartingAt and EndingAt, is important. The wharf direction will decide which side of it is land side and which side of it is sea side.
To retrieve the wharf information from the PortML
object, use the following code.
var wharfs = portML.GetAllWharfs();
The code above will return a list of WharfInfo object which contains the following information.
Property | Data Type | Description |
---|---|---|
ReferenceId | string | Reference ID of the wharf. |
StartingAt | Vector2 | The coordinate of the starting point of the wharf. |
EndingAt | Vector2 | The coordinate of the ending point of the wharf. |
Length | double | Wharf length in meter. |
Yard Sets
YardSet module is corresponding to the container yard in the sea port terminal.
The starting point and facing direction of a yardset is defined in the way shown in the following diagram.
The Facing
property defines the direction of the yardset in radian rotating around the StartingAt
point.
To retrieve the wharf information from the PortML
object, use the following code.
var yardSets = portML.GetAllYardSets();
The code above will return a list of YardSetInfo object which contains the following information.
Property | Data Type | Description |
---|---|---|
ReferenceId | string | Reference ID of the yardset. |
StartingAt | Vector2 | The coordinate of the starting point of the yardset. |
Facing | double | The direction of the yardset in radian. |
NumberOfRows | int | Number of rows of the yardset. |
NumberOfBays | int | Number of bays of the yardset. |
NumberOfTiers | int | Number of tiers of the yardset. |
BayTypes | BayType[] | Type (either exchange or transhipment) of each bay. |
SlotWidth | double | Average width of each slot in the yardset. The total width of the yardset is thus SlotWidth * NumberOfRows. |
SlotLength | double | Average length of each slot in the yardset. The total width of the yardset is thus SlotLength * NumberOfBays. |
Release Notes
Version 1.1.26
Released on 31st December 2021
Changes:
- Added test project.
Version 1.0.4
Released on 29th December 2021
Changes:
- Added WharfInfo and YardSetInfo.
Feedback
Bug reports and contributions are welcome at PortML Contact Us Page.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Numerics.Vectors (>= 4.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.82 | 196 | 4/17/2024 |
1.1.81 | 144 | 3/22/2024 |
1.1.80 | 123 | 3/19/2024 |
1.1.79 | 120 | 2/28/2024 |
1.1.78 | 127 | 2/21/2024 |
1.1.77 | 145 | 2/14/2024 |
1.1.76 | 179 | 8/22/2023 |
1.1.75 | 142 | 8/22/2023 |
1.1.71 | 412 | 11/8/2022 |
1.1.70 | 400 | 10/19/2022 |
1.1.69 | 435 | 10/18/2022 |
1.1.68 | 429 | 10/13/2022 |
1.1.67 | 445 | 7/25/2022 |
1.1.66 | 441 | 7/4/2022 |
1.1.65 | 429 | 6/15/2022 |
1.1.64 | 429 | 6/14/2022 |
1.1.63 | 481 | 6/8/2022 |
1.1.61 | 441 | 6/3/2022 |
1.1.60 | 458 | 5/8/2022 |
1.1.59 | 452 | 4/30/2022 |
1.1.58 | 441 | 4/29/2022 |
1.1.57 | 470 | 4/28/2022 |
1.1.56 | 446 | 4/28/2022 |
1.1.55 | 487 | 4/23/2022 |
1.1.53 | 450 | 3/15/2022 |
1.1.52 | 460 | 2/24/2022 |
1.1.51 | 459 | 2/22/2022 |
1.1.50 | 458 | 2/11/2022 |
1.1.49 | 467 | 2/10/2022 |
1.1.48 | 466 | 1/27/2022 |
1.1.47 | 487 | 1/27/2022 |
1.1.46 | 484 | 1/27/2022 |
1.1.45 | 504 | 1/19/2022 |
1.1.44 | 479 | 1/15/2022 |
1.1.42 | 470 | 1/15/2022 |
1.1.41 | 467 | 1/11/2022 |
1.1.40 | 298 | 1/11/2022 |
1.1.39 | 472 | 1/11/2022 |
1.1.38 | 315 | 1/5/2022 |
1.1.37 | 313 | 1/5/2022 |
1.1.36 | 314 | 1/3/2022 |
1.1.35 | 295 | 1/3/2022 |
1.1.34 | 331 | 1/2/2022 |
1.1.33 | 325 | 1/2/2022 |
1.1.32 | 314 | 1/2/2022 |
1.1.31 | 322 | 1/2/2022 |
1.1.30 | 310 | 1/2/2022 |
1.1.29 | 297 | 1/2/2022 |
1.1.28 | 300 | 12/31/2021 |
1.1.27 | 301 | 12/31/2021 |
1.1.26 | 297 | 12/30/2021 |
1.1.25 | 306 | 12/30/2021 |
1.1.24 | 294 | 12/30/2021 |
1.1.22 | 298 | 12/30/2021 |
1.0.4 | 309 | 12/29/2021 |
1.0.3 | 311 | 12/29/2021 |
Please refer to README.