3 %import "layer0.graph"
\r
4 %import "animation.graph"
\r
8 $layer0.InverseOf $subject
\r
9 %define tag($tagname)
\r
12 %deflib Type _ @ "Types" : TypeLibrary
\r
13 PartOf Plant3DOntology
\r
14 %deflib Relation _ @ "Relations" : RelationLibrary
\r
15 PartOf Plant3DOntology
\r
16 %deflib Library Plant3DOntology
\r
17 Plant3DOntology @ "Plant3D Ontology" : Ontology
\r
18 PartOf TypeSystemProject
\r
19 HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI
\r
20 HasVersion "1.0" : Version
\r
21 HasResourceClass "org.simantics.processeditor.stubs.Plant3DResource" : String
\r
22 HasStubsPackage "org.simantics.processeditor.stubs" : String
\r
24 Plant3DNamespace : Namespace
\r
25 PartOf TypeSystemNamespaces
\r
26 HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI
\r
27 HasNamespaceRoot Plant3DOntology
\r
30 Plant3DProjectType @ "Plant3DProjectType" <T ProjectType
\r
31 Plant3DProject @ "Plant3DProject" : Plant3DProjectType <T Project
\r
35 #****************************************************************************
\r
37 # PBS structure and components
\r
39 #****************************************************************************
\r
41 P3DNode @ "P3DNode" <T G3DNode
\r
42 HasDescription "Base node for all 3D plant objects. Used as an identifier." : String
\r
44 HasDescription "Plant Breakdown Structure super type" : String
\r
45 HasDescription "Example: Site > Plant > Area > Unit" : String
\r
46 [HasParentStructure card "0..1"]
\r
47 [HasChildStructure card "0..*"]
\r
48 HasChildStructure <R IsRelatedTo
\r
49 InverseOf HasParentStructure
\r
52 Plant <T P3DNode <T PBSNode
\r
53 HasDescription "Root node of the scene-graph" : String
\r
54 HasDescription "Contains Equipment and Pipe Runs (Scene-graph)" : String
\r
55 HasDescription "Scene-graph structure IS NOT Plant Breakdown Structure (PBS)" : String
\r
56 HasGraphics <R IsWeaklyRelatedTo
\r
57 HasDescription "link to geometric representation of component or equipment" : String
\r
59 LibraryComponent <T P3DNode <T PBSNode
\r
60 HasDescription "Base type for librarised components and equipment" : String
\r
61 [HasGraphics card "0..1"]
\r
62 Equipment <T LibraryComponent
\r
63 [HasNozzle card "0..1"]
\r
64 [HasNozzleDefinition card "0..*"]
\r
65 [HasNozzleRestriction card "0..1"]
\r
66 # TODO : PipeRun should link to Spec and use its information
\r
68 HasDescription "Non visible node" : String
\r
69 HasDescription "Contains all pipeline components that contain same specification (size, ..)" : String
\r
70 [HasPipeDiameter card "1"]
\r
71 [HasTurnRadius card "1"]
\r
72 [HasControlPoints card "0..*"]
\r
73 Nozzle <T LibraryComponent
\r
74 [HasPipeDiameter card "1"]
\r
75 [HasLength card "1"]
\r
76 [HasControlPoint card "0..1"] #0..1 prevents automatic instantion of control point
\r
77 PipelineComponent <T LibraryComponent
\r
78 [HasPipeDiameter card "1"]
\r
79 [HasControlPoint card "0..1"]
\r
80 SingleConnectedComponent <T PipelineComponent
\r
81 HasDescription "A component that is connected to only one component" : String
\r
82 DualConnectedComponent <T PipelineComponent
\r
83 HasDescription "A component that is connected to two components" : String
\r
84 MultiConnectedComponent <T PipelineComponent
\r
85 HasDescription "A component that is connected to more than two components" : String
\r
86 InlineComponent <T PipelineComponent
\r
87 HasDescription "Component that connects to two or more components, and maintains direction of (main) " : String
\r
88 HasDescription "pipe run. Centerline of main pipeline may have offset: with offset there is two control " : String
\r
89 HasDescription "points for main pipeline, and without offset, there is only one control point for main " : String
\r
90 HasDescription "pipeline. The component may also join two pipe runs together: then there is always one " : String
\r
91 HasDescription "control point for one pipe run." : String
\r
92 [HasLength card "1"]
\r
93 EndComponent <T PipelineComponent
\r
94 HasDescription "Component that ends the pipe run" : String
\r
95 HasDescription "Component may contain other control points" : String
\r
96 TurnComponent <T PipelineComponent
\r
97 HasDescription "Component that changes direction of the pipeline" : String
\r
98 HasDescription "Component that connects to two or more components, and specifies connectivity of main " : String
\r
99 HasDescription "pipe run. Is base type for elbows, pipe bends, etc., but also for components that won't " : String
\r
100 HasDescription "maintain main pipeline direction (inline component). CHECK!!!" : String
\r
101 [HasTurnAngle card "1"]
\r
102 FixedLengthInlineComponent <T InlineComponent
\r
103 HasDescription "Inline component that has fixed length" : String
\r
104 [HasRotationAngle card "1"]
\r
105 VariableLengthInlineComponent <T InlineComponent
\r
106 HasDescription "Inline component whose length can be changed" : String
\r
107 FixedAngleTurnComponent <T TurnComponent
\r
108 HasDescription "Turn Component that has specific turning angle that cannot be changed" : String
\r
109 [HasRotationAngle card "1"]
\r
110 VariableAngleTurnComponent <T TurnComponent
\r
111 HasDescription "Turn Component whose turning angle can be modified" : String
\r
112 HasDescription "Contains always one control point (there are no contradictory cases / how to calculate?)" : String
\r
113 [HasTurnRadius card "1"]
\r
114 SizeChangeComponent <T FixedLengthInlineComponent
\r
115 HasDescription "Component that changes pipe run along main pipeline. (Spec change)" : String
\r
116 OffsetComponent <T FixedLengthInlineComponent
\r
117 HasDescription "Component that offsets the center of piperun." : String
\r
118 CodedComponent <T PipelineComponent
\r
119 HasDescription "Currently used with non-customizable / hard-coded components" : String
\r
120 NonVisibleComponent <T PipelineComponent
\r
121 HasDescription "(Pseudo) Component that cannot bee seen." : String
\r
123 #****************************************************************************
\r
125 # Pipe Control Points
\r
127 #****************************************************************************
\r
129 # control point base type
\r
130 PipeControlPoint <T Entity
\r
131 HasDescription "Base type" : String
\r
132 [HasLocalPosition card "1"]
\r
133 [HasWorldPosition card "1"]
\r
134 [HasLocalOrientation card "1"]
\r
135 [HasWorldOrientation card "1"]
\r
136 [HasNext card "0..1"]
\r
137 [HasPrevious card "0..1"]
\r
138 [HasNext card "0..1"]
\r
139 [HasSubPoint card "0..*"]
\r
140 [SubPointOf card "0..1"]
\r
141 [HasPipeDiameter card "1"]
\r
142 [ControlPointOf card "0..1"]
\r
143 [ControlPointOfPipeRun card "0..1"]
\r
145 # divide to path leg ends and inline
\r
146 PathLegEndControlPoint <T PipeControlPoint
\r
147 HasDescription "A control point that ends path leg." : String
\r
148 InlineControlPoint <T PipeControlPoint
\r
149 [HasLength card "1"]
\r
152 TurnControlPoint <T PathLegEndControlPoint
\r
153 [HasTurnAngle card "1"]
\r
154 [HasLength card "1"] # TODO : should this be length or something else?
\r
156 FixedAngleTurnControlPoint <T TurnControlPoint #is this unnecessary ( Fixed angle could be created with EndComponent + Directed as a subpoint)?
\r
157 HasDescription "While variable angle turn control point is positioned by path legs, user is responsible for rotating fixed angle turn components." : String
\r
158 [HasRotationAngle card "1"]
\r
159 [IsReversed card "1"]
\r
160 VariableAngleTurnControlPoint <T TurnControlPoint
\r
161 [HasTurnRadius card "1"]
\r
162 [HasTurnAxis card "1"] # this was for update purposes
\r
164 VariableLengthControlPoint <T InlineControlPoint
\r
165 FixedLengthControlPoint <T InlineControlPoint
\r
166 [HasRotationAngle card "1"]
\r
168 RunEndControlPoint <T PathLegEndControlPoint
\r
169 HasDescription "Control Point that ends a PipeRun." : String
\r
170 HasDescription "Only Next or Previous ControlPoint must be set, and other must be end" : String
\r
172 # directed and undirected
\r
174 DirectedControlPoint <T RunEndControlPoint
\r
175 [HasLocalOrientation card "1"]
\r
176 [HasWorldOrientation card "1"]
\r
177 # [HasDirection card "1"]
\r
178 UndirectedControlPoint <T RunEndControlPoint
\r
180 EndComponentControlPoint <T UndirectedControlPoint
\r
181 [HasRotationAngle card "1"]
\r
183 # for N-Port components (N > 3), defines position and direction of control point relative to main control point
\r
184 NPortControlPoint <T DirectedControlPoint
\r
185 # [HasRelativePosition card "1"]
\r
186 # [HasRelativeDirection card "1"]
\r
188 # Size change & Offset
\r
189 # 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
190 # note: SizeChange actually ends a piperun, but allows path leg to continue
\r
191 DualInlineControlPoint <T FixedLengthControlPoint
\r
192 HasDescription "FixedLengthInlineControlPoint that has subcontrolpoint in the same PipeRun/Pathleg." : String
\r
193 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
194 SizeChangeControlPoint <T DualInlineControlPoint
\r
195 HasDescription "Changes PipeRun within the path leg." : String
\r
196 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
197 OffsettingPoint <T DualInlineControlPoint
\r
198 [HasOffset card "1"]
\r
199 HasDescription "Offsets the center of the pipe." : String
\r
200 DualSubControlPoint <T FixedLengthControlPoint
\r
201 HasDescription "DualInlineControlPoint's subpoint." : String
\r
203 # nozzle must have its own control point so that we know to link pipe diameters of the nozzle and the piperun
\r
204 NozzleControlPoint <T DirectedControlPoint
\r
206 # TODO : is it necessary to model inline control point that has no length?
\r
207 BranchEndControlPoint <T UndirectedControlPoint
\r
208 BranchControlPoint <T FixedLengthControlPoint
\r
210 # 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
213 # relation and property definitions
\r
215 HasControlPoint <R IsRelatedTo
\r
216 InverseOf ControlPointOf
\r
217 HasDomain [(PipelineComponent or Nozzle)]
\r
218 HasRange [PipeControlPoint]
\r
219 HasDescription "Relation between PipelineComponent and ControlPoint" : String
\r
220 HasControlPoints <R IsRelatedTo
\r
221 InverseOf ControlPointOfPipeRun
\r
222 HasDomain [PipeRun]
\r
223 HasRange [PipeControlPoint]
\r
224 HasDescription "Relation between PipeRun and ControlPoint" : String
\r
225 HasDescription "This is needed because a PipeLineComponent may contain multiple ControlPoints that belong to different PipeRuns." : String
\r
226 HasNext <R IsWeaklyRelatedTo
\r
227 HasDomain [PipeControlPoint]
\r
228 HasRange [PipeControlPoint]
\r
229 HasDescription "Next point in the piperun" : String
\r
230 HasPrevious <R IsWeaklyRelatedTo
\r
231 HasDomain [PipeControlPoint]
\r
232 HasRange [PipeControlPoint]
\r
233 HasDescription "Previous point in the piperun" : String
\r
234 HasSubPoint @ "Has SubPoint" <R IsRelatedTo
\r
235 InverseOf SubPointOf
\r
236 HasDomain [PipeControlPoint]
\r
237 HasRange [PipeControlPoint]
\r
238 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
240 HasPipeDiameter <R HasNonTransformation
\r
242 HasLength <R HasNonTransformation
\r
244 HasTurnAngle <R HasNonTransformation
\r
246 HasRotationAngle <R HasTransformation
\r
248 HasOffset <R HasProperty
\r
250 #HasRelativePosition <R HasProperty
\r
251 # HasRange [Position]
\r
252 #HasRelativeDirection <R HasProperty
\r
253 # HasRange [Tuple3]
\r
254 #HasDirection <R HasProperty
\r
255 # HasRange [Tuple3]
\r
256 HasTurnRadius <R HasNonTransformation
\r
258 IsReversed <R HasProperty
\r
260 HasTurnAxis <R HasTransformation
\r
263 HasNozzleDefinition <R HasProperty
\r
264 HasDomain [Equipment]
\r
266 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
267 HasNozzle <R HasChild
\r
269 HasDomain [Equipment]
\r
271 HasDescription "Used to connect nozzles to equipment." : String
\r
272 HasNozzleRestriction <R HasMultiplicity
\r
273 HasDescription "Used in template equipment to restrict amount of nozzles." : String
\r
274 HasDescription "If template has as many nozzleDefinitions that maximum count in this restriction, user cannot add new nozzles to the equipment instance." : String
\r
278 #****************************************************************************
\r
280 # Predefined equipment and components
\r
282 #****************************************************************************
\r
285 Reducer <T CodedComponent <T SizeChangeComponent <T FixedLengthInlineComponent <T DualConnectedComponent
\r
286 #ConcentricReducer <T Reducer
\r
287 #ConcentricReducerImpl : ConcentricReducer
\r
288 ConcentricReducer <T Reducer : Reducer
\r
289 PartOf Plant3DOntology
\r
290 HasRotationAngle "0.0" : Double
\r
292 _ : SizeChangeControlPoint
\r
295 HasX "0.0" : Double
\r
296 HasY "0.0" : Double
\r
297 HasZ "0.0" : Double
\r
298 HasWorldOrientation
\r
300 HasX "0.0" : Double
\r
301 HasY "1.0" : Double
\r
302 HasZ "0.0" : Double
\r
303 HasAngle "0.0" : Double
\r
306 HasX "0.0" : Double
\r
307 HasY "0.0" : Double
\r
308 HasZ "0.0" : Double
\r
309 HasLocalOrientation
\r
311 HasX "0.0" : Double
\r
312 HasY "1.0" : Double
\r
313 HasZ "0.0" : Double
\r
314 HasAngle "0.0" : Double
\r
316 _ : DualSubControlPoint
\r
319 HasX "0.0" : Double
\r
320 HasY "0.0" : Double
\r
321 HasZ "0.0" : Double
\r
322 HasWorldOrientation
\r
324 HasX "0.0" : Double
\r
325 HasY "1.0" : Double
\r
326 HasZ "0.0" : Double
\r
327 HasAngle "0.0" : Double
\r
330 HasX "0.0" : Double
\r
331 HasY "0.0" : Double
\r
332 HasZ "0.0" : Double
\r
333 HasLocalOrientation
\r
335 HasX "0.0" : Double
\r
336 HasY "1.0" : Double
\r
337 HasZ "0.0" : Double
\r
338 HasAngle "0.0" : Double
\r
339 #EccentricReducer <T Reducer <T OffsetComponent
\r
340 #EccentricReducerImpl : EccentricReducer
\r
341 EccentricReducer <T Reducer <T OffsetComponent : Reducer : OffsetComponent
\r
342 PartOf Plant3DOntology
\r
343 HasRotationAngle "0.0" : Double
\r
345 _ : SizeChangeControlPoint : OffsettingPoint
\r
346 HasOffset "1.0" : Double #TODO : define an equation that can calculate the offset form pipediameters. This requires relative
\r
349 HasX "0.0" : Double
\r
350 HasY "0.0" : Double
\r
351 HasZ "0.0" : Double
\r
352 HasWorldOrientation
\r
354 HasX "0.0" : Double
\r
355 HasY "1.0" : Double
\r
356 HasZ "0.0" : Double
\r
357 HasAngle "0.0" : Double
\r
360 HasX "0.0" : Double
\r
361 HasY "0.0" : Double
\r
362 HasZ "0.0" : Double
\r
363 HasLocalOrientation
\r
365 HasX "0.0" : Double
\r
366 HasY "1.0" : Double
\r
367 HasZ "0.0" : Double
\r
368 HasAngle "0.0" : Double
\r
370 _ : DualSubControlPoint
\r
373 HasX "0.0" : Double
\r
374 HasY "0.0" : Double
\r
375 HasZ "0.0" : Double
\r
376 HasWorldOrientation
\r
378 HasX "0.0" : Double
\r
379 HasY "1.0" : Double
\r
380 HasZ "0.0" : Double
\r
381 HasAngle "0.0" : Double
\r
384 HasX "0.0" : Double
\r
385 HasY "0.0" : Double
\r
386 HasZ "0.0" : Double
\r
387 HasLocalOrientation
\r
389 HasX "0.0" : Double
\r
390 HasY "1.0" : Double
\r
391 HasZ "0.0" : Double
\r
392 HasAngle "0.0" : Double
\r
393 #Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent
\r
395 Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent : CodedComponent : VariableAngleTurnComponent : DualConnectedComponent
\r
396 PartOf Plant3DOntology
\r
397 HasLength "0.0" : Double
\r
398 HasTurnRadius "0.0" : Double
\r
399 HasTurnAngle "0.0" : Double
\r
401 _ : VariableAngleTurnControlPoint
\r
404 HasX "0.0" : Double
\r
405 HasY "0.0" : Double
\r
406 HasZ "0.0" : Double
\r
407 HasWorldOrientation
\r
409 HasX "0.0" : Double
\r
410 HasY "1.0" : Double
\r
411 HasZ "0.0" : Double
\r
412 HasAngle "0.0" : Double
\r
415 HasX "0.0" : Double
\r
416 HasY "0.0" : Double
\r
417 HasZ "0.0" : Double
\r
418 HasLocalOrientation
\r
420 HasX "0.0" : Double
\r
421 HasY "1.0" : Double
\r
422 HasZ "0.0" : Double
\r
423 HasAngle "0.0" : Double
\r
424 #Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent
\r
425 #StraightImpl : Straight
\r
426 Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent : CodedComponent : DualConnectedComponent : VariableLengthInlineComponent
\r
427 PartOf Plant3DOntology
\r
428 HasLength "0.0" : Double
\r
430 _ : VariableLengthControlPoint
\r
433 HasX "0.0" : Double
\r
434 HasY "0.0" : Double
\r
435 HasZ "0.0" : Double
\r
436 HasWorldOrientation
\r
438 HasX "0.0" : Double
\r
439 HasY "1.0" : Double
\r
440 HasZ "0.0" : Double
\r
441 HasAngle "0.0" : Double
\r
444 HasX "0.0" : Double
\r
445 HasY "0.0" : Double
\r
446 HasZ "0.0" : Double
\r
447 HasLocalOrientation
\r
449 HasX "0.0" : Double
\r
450 HasY "1.0" : Double
\r
451 HasZ "0.0" : Double
\r
452 HasAngle "0.0" : Double
\r
454 BranchSplitComponent <T FixedLengthInlineComponent <T NonVisibleComponent : FixedLengthInlineComponent : NonVisibleComponent
\r
455 PartOf Plant3DOntology
\r
456 HasLength "0.0" : Double
\r
458 _ : BranchControlPoint
\r
461 HasX "0.0" : Double
\r
462 HasY "0.0" : Double
\r
463 HasZ "0.0" : Double
\r
464 HasWorldOrientation
\r
466 HasX "0.0" : Double
\r
467 HasY "1.0" : Double
\r
468 HasZ "0.0" : Double
\r
469 HasAngle "0.0" : Double
\r
472 HasX "0.0" : Double
\r
473 HasY "0.0" : Double
\r
474 HasZ "0.0" : Double
\r
475 HasLocalOrientation
\r
477 HasX "0.0" : Double
\r
478 HasY "1.0" : Double
\r
479 HasZ "0.0" : Double
\r
480 HasAngle "0.0" : Double
\r
482 #Tee <T FixedLengthInlineComponent <T MultiConnectedComponent
\r
483 #BendPipe <T PipeComponent <T VariableAngleTurnComponent <T DualConnectedComponent
\r
484 #Cap <T EndComponent
\r
485 #BlindFlange <T EndComponent
\r
486 #TwoWayBallValve <T FixedLengthInlineComponent <T DualConnectedComponent
\r
487 #ThreeWayTTypeBallValve <T FixedLengthInlineComponent <T MultiConnectedComponent
\r
488 # HasName "Three Way T Type Ball Valve" : String
\r
489 #ThreeWayYType120DegreeBallValve <T EndComponent <T MultiConnectedComponent
\r
490 # HasName "Three Way Y Type 120 Degree Ball Valve" : String
\r
491 Vessel <T Equipment
\r
492 VerticalVessel <T Vessel
\r
493 [HasHeight card "1"]
\r
494 HorizontalVessel <T Vessel
\r
495 [HasLength card "1"]
\r
497 HasHeight <R HasNonTransformation
\r
499 HasLength <R HasNonTransformation
\r
502 #****************************************************************************
\r
506 #****************************************************************************
\r