]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - 3d_ontologies/plant3d.graph
git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@7151 ac1ea38d...
[simantics/3d.git] / 3d_ontologies / plant3d.graph
diff --git a/3d_ontologies/plant3d.graph b/3d_ontologies/plant3d.graph
new file mode 100644 (file)
index 0000000..d280a2e
--- /dev/null
@@ -0,0 +1,507 @@
+HasNext\r
+HasPrevious\r
+%import "layer0.graph"\r
+%import "animation.graph"\r
+%import "g3d.graph"\r
+%define symmetric()\r
+    $subject\r
+        $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+    $subject\r
+        $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+    PartOf Plant3DOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+    PartOf Plant3DOntology\r
+%deflib Library Plant3DOntology\r
+Plant3DOntology @ "Plant3D Ontology" : Ontology\r
+    PartOf TypeSystemProject\r
+    HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+    HasVersion "1.0" : Version\r
+    HasResourceClass "fi.vtt.simantics.processeditor.stubs.Plant3DResource" : String\r
+    HasStubsPackage "fi.vtt.simantics.processeditor.stubs" : String\r
+\r
+Plant3DNamespace : Namespace\r
+    PartOf TypeSystemNamespaces\r
+    HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+    HasNamespaceRoot Plant3DOntology\r
+    \r
+# Project\r
+Plant3DProjectType @ "Plant3DProjectType" <T ProjectType\r
+Plant3DProject @ "Plant3DProject" : Plant3DProjectType <T Project\r
+    PartOf ProjectTypes\r
+\r
+\r
+#****************************************************************************\r
+#\r
+#  PBS structure and components\r
+#\r
+#****************************************************************************\r
+\r
+P3DNode @ "P3DNode" <T G3DNode\r
+    HasDescription "Base node for all 3D plant objects. Used as an identifier." : String\r
+PBSNode <T Entity\r
+    HasDescription "Plant Breakdown Structure super type" : String\r
+    HasDescription "Example: Site > Plant > Area > Unit" : String\r
+    [HasParentStructure card "0..1"]\r
+    [HasChildStructure card "0..*"]\r
+HasChildStructure <R IsRelatedTo\r
+    InverseOf HasParentStructure\r
+    HasDomain [PBSNode]\r
+    HasRange [PBSNode]\r
+Plant <T P3DNode <T PBSNode\r
+    HasDescription "Root node of the scene-graph" : String\r
+    HasDescription "Contains Equipment and Pipe Runs (Scene-graph)" : String\r
+    HasDescription "Scene-graph structure IS NOT Plant Breakdown Structure (PBS)" : String\r
+HasGraphics <R IsWeaklyRelatedTo\r
+    HasDescription "link to geometric representation of component or equipment" : String\r
+    HasRange [G3DModel]\r
+LibraryComponent <T P3DNode <T PBSNode\r
+    HasDescription "Base type for librarised components and equipment" : String\r
+    [HasGraphics card "0..1"]\r
+Equipment <T LibraryComponent\r
+    [HasNozzle card "0..1"]\r
+    [HasNozzleDefinition card "0..*"]\r
+    [HasNozzleRestriction card "0..1"]\r
+# TODO : PipeRun should link to Spec and use its information\r
+PipeRun <T P3DNode\r
+    HasDescription "Non visible node" : String\r
+    HasDescription "Contains all pipeline components that contain same specification (size, ..)" : String\r
+    [HasPipeDiameter card "1"]\r
+    [HasTurnRadius card "1"]\r
+    [HasControlPoints card "0..*"]\r
+Nozzle <T LibraryComponent\r
+    [HasPipeDiameter card "1"]\r
+    [HasLength card "1"]\r
+    [HasControlPoint card "0..1"]  #0..1 prevents automatic instantion of control point\r
+PipelineComponent <T LibraryComponent\r
+    [HasPipeDiameter card "1"]\r
+    [HasControlPoint card "0..1"]\r
+SingleConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to only one component" : String\r
+DualConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to two components" : String\r
+MultiConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to more than two components" : String\r
+InlineComponent <T PipelineComponent\r
+    HasDescription "Component that connects to two or more components, and maintains direction of (main) " : String\r
+    HasDescription "pipe run. Centerline of main pipeline may have offset: with offset there is two control " : String\r
+    HasDescription "points for main pipeline, and without offset, there is only one control point for main " : String\r
+    HasDescription "pipeline. The component may also join two pipe runs together: then there is always one " : String\r
+    HasDescription "control point for one pipe run." : String\r
+    [HasLength card "1"]\r
+EndComponent <T PipelineComponent\r
+    HasDescription "Component that ends the pipe run" : String\r
+    HasDescription "Component may contain other control points" : String\r
+TurnComponent <T PipelineComponent\r
+    HasDescription "Component that changes direction of the pipeline" : String\r
+    HasDescription "Component that connects to two or more components, and specifies connectivity of main " : String\r
+    HasDescription "pipe run. Is base type for elbows, pipe bends, etc., but also for components that won't " : String\r
+    HasDescription "maintain main pipeline direction (inline component). CHECK!!!" : String\r
+    [HasTurnAngle card "1"]\r
+FixedLengthInlineComponent <T InlineComponent\r
+    HasDescription "Inline component that has fixed length" : String\r
+    [HasRotationAngle card "1"]\r
+VariableLengthInlineComponent <T InlineComponent\r
+    HasDescription "Inline component whose length can be changed" : String\r
+FixedAngleTurnComponent <T TurnComponent\r
+    HasDescription "Turn Component that has specific turning angle that cannot be changed" : String\r
+    [HasRotationAngle card "1"]\r
+VariableAngleTurnComponent <T TurnComponent\r
+    HasDescription "Turn Component whose turning angle can be modified" : String\r
+    HasDescription "Contains always one control point (there are no contradictory cases / how to calculate?)" : String\r
+    [HasTurnRadius card "1"]\r
+SizeChangeComponent <T FixedLengthInlineComponent\r
+    HasDescription "Component that changes pipe run along main pipeline. (Spec change)" : String\r
+OffsetComponent <T FixedLengthInlineComponent\r
+    HasDescription "Component that offsets the center of piperun." : String  \r
+CodedComponent <T PipelineComponent\r
+    HasDescription "Currently used with non-customizable / hard-coded components" : String\r
+NonVisibleComponent <T PipelineComponent\r
+    HasDescription "(Pseudo) Component that cannot bee seen." : String\r
+\r
+#****************************************************************************\r
+#\r
+#  Pipe Control Points\r
+#\r
+#****************************************************************************\r
+\r
+# control point base type\r
+PipeControlPoint <T Entity\r
+    HasDescription "Base type" : String\r
+    [HasLocalPosition card "1"]\r
+    [HasWorldPosition card "1"]\r
+    [HasLocalOrientation card "1"]\r
+    [HasWorldOrientation card "1"]\r
+    [HasNext card "0..1"]\r
+    [HasPrevious card "0..1"]\r
+    [HasNext card "0..1"]\r
+    [HasSubPoint card "0..*"]\r
+    [SubPointOf card "0..1"]\r
+    [HasPipeDiameter card "1"]\r
+    [ControlPointOf card "0..1"]\r
+    [ControlPointOfPipeRun card "0..1"]\r
+\r
+# divide to path leg ends and inline\r
+PathLegEndControlPoint <T PipeControlPoint\r
+    HasDescription "A control point that ends path leg." : String\r
+InlineControlPoint <T PipeControlPoint\r
+    [HasLength card "1"]\r
+\r
+# turns\r
+TurnControlPoint <T PathLegEndControlPoint\r
+    [HasTurnAngle card "1"]\r
+    [HasLength card "1"]                               # TODO : should this be length or something else?\r
+   \r
+FixedAngleTurnControlPoint <T TurnControlPoint         #is this unnecessary ( Fixed angle could be created with EndComponent + Directed as a subpoint)?   \r
+    HasDescription "While variable angle turn control point is positioned by path legs, user is responsible for rotating fixed angle turn components." : String\r
+    [HasRotationAngle card "1"]\r
+    [IsReversed card "1"]\r
+VariableAngleTurnControlPoint <T TurnControlPoint\r
+    [HasTurnRadius card "1"]\r
+    [HasTurnAxis card "1"]                             # this was for update purposes\r
+# inline\r
+VariableLengthControlPoint <T InlineControlPoint\r
+FixedLengthControlPoint <T InlineControlPoint\r
+   [HasRotationAngle card "1"]\r
+\r
+RunEndControlPoint <T PathLegEndControlPoint\r
+    HasDescription "Control Point that ends a PipeRun." : String\r
+    HasDescription "Only Next or Previous ControlPoint must be set, and other must be end" : String\r
+\r
+# directed and undirected\r
+\r
+DirectedControlPoint <T RunEndControlPoint\r
+    [HasLocalOrientation card "1"]\r
+    [HasWorldOrientation card "1"]\r
+#    [HasDirection card "1"]\r
+UndirectedControlPoint <T RunEndControlPoint\r
+\r
+EndComponentControlPoint <T UndirectedControlPoint\r
+    [HasRotationAngle card "1"]\r
+    \r
+# for N-Port components (N > 3), defines position and direction of control point relative to main control point \r
+NPortControlPoint <T DirectedControlPoint\r
+#    [HasRelativePosition card "1"]\r
+#    [HasRelativeDirection card "1"] \r
+\r
+# Size change & Offset\r
+# TODO: could we allow variable length components that offset piperun ? (currently only component that is variable length is straight pipe, so for now: no) \r
+# note: SizeChange actually ends a piperun, but allows path leg to continue\r
+DualInlineControlPoint <T FixedLengthControlPoint\r
+    HasDescription "FixedLengthInlineControlPoint that has subcontrolpoint in the same PipeRun/Pathleg." : String\r
+    HasDescription "The previous controlpoint is connected (next) to this point and the next point is connected (previous) to subpoint, while this point and the subpoint are connected both the previous and the next point." : String\r
+SizeChangeControlPoint <T DualInlineControlPoint\r
+    HasDescription "Changes PipeRun within the path leg." : String\r
+    HasDescription "This CP belongs to the PipeRun that is the previous side and subpoint belongs to the PipeRun that is on the next side." : String \r
+OffsettingPoint <T DualInlineControlPoint\r
+    [HasOffset card "1"]\r
+    HasDescription "Offsets the center of the pipe." : String                 \r
+DualSubControlPoint <T FixedLengthControlPoint\r
+    HasDescription "DualInlineControlPoint's subpoint." : String\r
+\r
+# nozzle must have its own control point so that we know to link pipe diameters of the nozzle and the piperun\r
+NozzleControlPoint <T DirectedControlPoint\r
+\r
+# TODO : is it necessary to model inline control point that has no length?\r
+BranchEndControlPoint <T UndirectedControlPoint\r
+BranchControlPoint <T FixedLengthControlPoint\r
+\r
+# TODO : we also need a way to specify if control point can be moved from its current place or not (this may be dynamic)\r
+      \r
+\r
+# relation and property definitions\r
+\r
+HasControlPoint <R IsRelatedTo\r
+    InverseOf ControlPointOf\r
+    HasDomain [(PipelineComponent or Nozzle)]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Relation between PipelineComponent and ControlPoint" : String\r
+HasControlPoints <R IsRelatedTo\r
+    InverseOf ControlPointOfPipeRun\r
+    HasDomain [PipeRun]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Relation between PipeRun and ControlPoint" : String\r
+    HasDescription "This is needed because a PipeLineComponent may contain multiple ControlPoints that belong to different PipeRuns." : String\r
+HasNext <R IsWeaklyRelatedTo\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Next point in the piperun" : String\r
+HasPrevious <R IsWeaklyRelatedTo\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Previous point in the piperun" : String\r
+HasSubPoint @ "Has SubPoint" <R IsRelatedTo\r
+    InverseOf SubPointOf\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Subcontrolpoint's position is defined by its parent control point. Local Position of subpoint is its position relative to its parent point similar to child/parent relationship in scene-graph." : String \r
+\r
+HasPipeDiameter <R HasNonTransformation\r
+    HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+    HasRange [Double]\r
+HasTurnAngle <R HasNonTransformation\r
+    HasRange [Double]\r
+HasRotationAngle <R HasTransformation\r
+    HasRange [Double]\r
+HasOffset <R HasProperty\r
+    HasRange [Double]\r
+#HasRelativePosition <R HasProperty\r
+#    HasRange [Position]\r
+#HasRelativeDirection <R HasProperty\r
+#    HasRange [Tuple3]\r
+#HasDirection <R HasProperty\r
+#    HasRange [Tuple3]  \r
+HasTurnRadius <R HasNonTransformation\r
+    HasRange [Double]   \r
+IsReversed <R HasProperty\r
+    HasRange [Boolean]\r
+HasTurnAxis <R HasTransformation\r
+    HasRange [Tuple3]\r
+    \r
+HasNozzleDefinition <R HasProperty\r
+    HasDomain [Equipment]\r
+    HasRange [Nozzle]\r
+    HasDescription "This relation is used to connect nozzles to equipment in the template. For instantiated equipment nozzles must be connected with HasNozzle relation." : String  \r
+HasNozzle <R HasChild\r
+    InverseOf NozzleOf\r
+    HasDomain [Equipment]\r
+    HasRange [Nozzle]\r
+    HasDescription "Used to connect nozzles to equipment." : String\r
+HasNozzleRestriction <R HasMultiplicity\r
+    HasDescription "Used in template equipment to restrict amount of nozzles." : String\r
+    HasDescription "If template has as many nozzleDefinitions that maximum count in this restriction, user cannot add new nozzles to the equipment instance." : String\r
+\r
+\r
+\r
+#****************************************************************************\r
+#\r
+#  Predefined equipment and components\r
+#\r
+#****************************************************************************    \r
+    \r
+    \r
+Reducer <T CodedComponent <T SizeChangeComponent <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ConcentricReducer <T Reducer\r
+#ConcentricReducerImpl : ConcentricReducer\r
+ConcentricReducer <T Reducer : Reducer\r
+  PartOf Plant3DOntology\r
+  HasRotationAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : SizeChangeControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasSubPoint\r
+        _ : DualSubControlPoint\r
+          HasWorldPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasWorldOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+          HasLocalPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasLocalOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double \r
+#EccentricReducer <T Reducer <T OffsetComponent\r
+#EccentricReducerImpl : EccentricReducer\r
+EccentricReducer <T Reducer <T OffsetComponent : Reducer : OffsetComponent\r
+  PartOf Plant3DOntology\r
+  HasRotationAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : SizeChangeControlPoint : OffsettingPoint\r
+      HasOffset "1.0" : Double #TODO : define an equation that can calculate the offset form pipediameters. This requires relative  \r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasSubPoint\r
+        _ : DualSubControlPoint\r
+          HasWorldPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasWorldOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+          HasLocalPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasLocalOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+#Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#ElbowImpl : Elbow\r
+Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent : CodedComponent : VariableAngleTurnComponent : DualConnectedComponent\r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double\r
+  HasTurnRadius "0.0" : Double\r
+  HasTurnAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : VariableAngleTurnControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double    \r
+#Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent\r
+#StraightImpl : Straight\r
+Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent : CodedComponent : DualConnectedComponent : VariableLengthInlineComponent\r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double\r
+  HasControlPoint \r
+    _ : VariableLengthControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double \r
+          \r
+BranchSplitComponent <T FixedLengthInlineComponent <T NonVisibleComponent : FixedLengthInlineComponent : NonVisibleComponent          \r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double          \r
+  HasControlPoint\r
+    _ : BranchControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+          \r
+#Tee <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+#BendPipe <T PipeComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#Cap <T EndComponent\r
+#BlindFlange <T EndComponent\r
+#TwoWayBallValve <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ThreeWayTTypeBallValve <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+#    HasName "Three Way T Type Ball Valve" : String\r
+#ThreeWayYType120DegreeBallValve <T EndComponent <T MultiConnectedComponent\r
+#    HasName "Three Way Y Type 120 Degree Ball Valve" : String\r
+Vessel <T Equipment\r
+VerticalVessel <T Vessel\r
+    [HasHeight card "1"]\r
+HorizontalVessel <T Vessel\r
+    [HasLength card "1"]\r
+\r
+HasHeight <R HasNonTransformation\r
+    HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+    HasRange [Double]\r
+\r
+#****************************************************************************\r
+#\r
+#  Specs \r
+#\r
+#****************************************************************************\r
+\r