12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import models/SimpleClassDiagrams as SCD
- include "primitives.alh"
- SCD CausalBlockDiagrams_Runtime{
- Class Float {
- $
- if (bool_not(is_physical_float(self))):
- return "Float has no float value"!
- else:
- return "OK"!
- $
- }
- Class Block{}
- Class ConstantBlock{
- value : Float {
- target_lower_multiplicity = 1
- target_upper_multiplicity = 1
- }
- }
- Class AdditionBlock{}
- Class NegatorBlock{}
- Class MultiplyBlock{}
- Class InverseBlock{}
- Class DelayBlock{
- memory : Float {
- target_lower_multiplicity = 1
- target_upper_multiplicity = 1
- }
- }
- Class Schedule {
- block : Block {
- target_lower_multiplicity = 0
- target_upper_multiplicity = 1
- }
- next : Schedule {
- target_lower_multiplicity = 1
- target_upper_multiplicity = 1
- }
- lower_multiplicity = 1
- }
- Association Link(Block, Block){
- signal : Float {
- target_lower_multiplicity = 0
- target_upper_multiplicity = 1
- }
- }
- Association InitialCondition(Block, DelayBlock){
- source_lower_multiplicity = 0
- source_upper_multiplicity = 1
- }
- Inheritance (ConstantBlock, Block){}
- Inheritance (AdditionBlock, Block){}
- Inheritance (NegatorBlock, Block){}
- Inheritance (MultiplyBlock, Block){}
- Inheritance (InverseBlock, Block){}
- Inheritance (DelayBlock, Block){}
- }
- export CausalBlockDiagrams_Runtime to models/CausalBlockDiagrams_Runtime
|