Browse Source

Add draft of plant for power window

Yentl Van Tendeloo 8 years ago
parent
commit
79d2a10d94
1 changed files with 38 additions and 0 deletions
  1. 38 0
      models/plant_PW.mvc

+ 38 - 0
models/plant_PW.mvc

@@ -0,0 +1,38 @@
+SimpleClassDiagrams Plant_PW{
+    SimpleAttribute String {
+        constraint = $
+            String function constraint(model : Element, name : String):
+                if (is_physical_string(model["model"][name])):
+                    return "OK"!
+                else:
+                    return "String has non-string value"!
+            $
+    }
+    Class Rocker : Movement {}
+    Class PushPull : Movement {}
+    Class Movement : Switch {}
+    Class Switch : Named {}
+    Class LockOut : Switch {}
+    Class Port {}
+    Class Boundary : Named {}
+    Class PowerWindow : Named{}
+    Class Side : PowerWindow{}
+    Class Roof : PowerWindow{}
+    Class Named {
+        name : String
+    }
+    Class Sensor : Named {}
+    Class Infrared : Sensor {}
+    Class ForceDetecting : Sensor {}
+
+    Association ConnectSwitch (Port, Switch) {}
+    Association has1 (Boundary, Switch) {}
+    Association Controls (Movement, PowerWindow) {}
+    Association HasSwitch (PowerWindow, Switch) {}
+    Association Locks (LockOut, PowerWindow) {}
+    Association HasSensor (PowerWindow, Sensor) {}
+    Association Around (Boundary, PowerWindow) {}
+    Association Interface (Boundary, Port) {}
+    Association ConnectSensor (Port, Sensor) {}
+    Association has2 (Boundary, Sensor) {}
+}