|
@@ -1,26 +1,17 @@
|
|
|
import models/SimpleClassDiagrams as SCD
|
|
|
include "primitives.alh"
|
|
|
|
|
|
-SCD CausalBlockDiagrams{
|
|
|
+SCD CausalBlockDiagrams_Runtime{
|
|
|
Class Float {
|
|
|
$
|
|
|
if (bool_not(is_physical_float(self))):
|
|
|
return "Float has no float value"!
|
|
|
else:
|
|
|
return "OK"!
|
|
|
- $
|
|
|
+ $
|
|
|
}
|
|
|
|
|
|
- Class Block{
|
|
|
- output : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- signal : Float {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- }
|
|
|
+ Class Block{}
|
|
|
|
|
|
Class ConstantBlock{
|
|
|
value : Float {
|
|
@@ -29,59 +20,39 @@ SCD CausalBlockDiagrams{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Class AdditionBlock{
|
|
|
- input1 : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- input2 : Block {
|
|
|
+ Class AdditionBlock{}
|
|
|
+ Class NegatorBlock{}
|
|
|
+ Class MultiplyBlock{}
|
|
|
+ Class InverseBlock{}
|
|
|
+ Class DelayBlock{
|
|
|
+ memory : Float {
|
|
|
target_lower_multiplicity = 1
|
|
|
target_upper_multiplicity = 1
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Class NegatorBlock{
|
|
|
- input1 : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
+ Class Schedule {
|
|
|
+ block : Block {
|
|
|
+ target_lower_multiplicity = 0
|
|
|
target_upper_multiplicity = 1
|
|
|
}
|
|
|
- input2 : Block {
|
|
|
+ next : Schedule {
|
|
|
target_lower_multiplicity = 1
|
|
|
target_upper_multiplicity = 1
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- Class MultiplyBlock{
|
|
|
- input1 : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- input2 : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
+ lower_multiplicity = 1
|
|
|
}
|
|
|
|
|
|
- Class InverseBlock{
|
|
|
- input1 : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
+ Association Link(Block, Block){
|
|
|
+ signal : Float {
|
|
|
+ target_lower_multiplicity = 0
|
|
|
target_upper_multiplicity = 1
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- Class DelayBlock{
|
|
|
- input : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- initial : Block {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
- memory : Float {
|
|
|
- target_lower_multiplicity = 1
|
|
|
- target_upper_multiplicity = 1
|
|
|
- }
|
|
|
+ Association InitialCondition(Block, DelayBlock){
|
|
|
+ source_lower_multiplicity = 0
|
|
|
+ source_upper_multiplicity = 1
|
|
|
}
|
|
|
|
|
|
Inheritance (ConstantBlock, Block){}
|
|
@@ -92,4 +63,4 @@ SCD CausalBlockDiagrams{
|
|
|
Inheritance (DelayBlock, Block){}
|
|
|
}
|
|
|
|
|
|
-export CausalBlockDiagrams to models/CausalBlockDiagrams
|
|
|
+export CausalBlockDiagrams_Runtime to models/CausalBlockDiagrams_Runtime
|