Map model tests to FMU Tests
If (model.prestate.blocked = false and model.postState.blocked = true) then only verify that FMU blocks Reason is that the FMU moves data all the way through if possible. Model does otherwise. Witness:
{
"preState": {
"H": 1,
"incomingUnprocessed": {
"0": {
"values": [
[
2,
2
]
],
"visiblen": 0
},
"1": {
"values": [
[
2,
2
]
],
"visiblen": 1
}
},
"incomingLookahead": {
"0": [
[
1,
1
]
],
"1": [
[
1,
1
]
]
},
"currentData": {
"0": [
1,
1
],
"1": [
1,
1
]
},
"startOffsetTime": 1,
"maxAge": 0,
"initialized": true,
"lookahead": 2,
"id": "",
"cstime": 0,
"blocked": false
},
"postState": {
"H": 1,
"incomingUnprocessed": {
"0": {
"values": [
[
2,
2
]
],
"visiblen": 1
},
"1": {
"values": [],
"visiblen": 0
}
},
"incomingLookahead": {
"0": [
[
1,
1
]
],
"1": [
[
1,
1
],
[
2,
2
]
]
},
"currentData": {
"0": [
1,
1
],
"1": [
1,
1
]
},
"startOffsetTime": 1,
"maxAge": 0,
"initialized": true,
"lookahead": 2,
"id": "",
"cstime": 0,
"blocked": true
},
"action": "dostep",
"meta": "670--<Action line 363, col 9 to line 379, col 34 of module RabbitMQFMUSignals>"
}
If (model.prestate.blocked = true) then skip test test Post state is always the same - limited by model. Witness:
"preStateNode": {
"raw": "/\\ initialized = TRUE\n/\\ fmu_state = [blocked |-> TRUE, outputs |-> <<0, 1>>, offset |-> 1, cstime |-> 0, lookahead_signals |-> <<<<>>, <<1>>>>]\n/\\ env_state = [ signals |->\n << [signal |-> <<1, 2>>, visiblen |-> 2],\n [signal |-> <<2>>, visiblen |-> 0] >>,\n maxAge |-> 0,\n H |-> 1 ]\n",
"env_state_signals": {
"0": {
"values": [
1,
2
],
"nvisible": 2
},
"1": {
"values": [
2
],
"nvisible": 0
}
},
"env_state_H": 1,
"env_state_maxDelay": 0,
"initialized": true,
"fmu_state_incoming_lookahead_signals": {
"0": [],
"1": [
1
]
},
"fmu_state_blocked": true,
"fmu_state_cstime": 0,
"fmu_state_outputs": [
0,
1
],
"fmu_state_offset": 1,
"has_fmu_state": false,
"meta_id": "",
"lookahead": 0
},
"preState": {
"H": 1,
"incomingUnprocessed": {
"0": {
"values": [
[
1,
1
],
[
2,
2
]
],
"visiblen": 2
},
"1": {
"values": [
[
2,
2
]
],
"visiblen": 0
}
},
"incomingLookahead": {
"0": [],
"1": [
[
1,
1
]
]
},
"currentData": {
"0": [
0,
0
],
"1": [
1,
1
]
},
"startOffsetTime": 1,
"maxAge": 0,
"initialized": true,
"lookahead": 2,
"id": "",
"cstime": 0,
"blocked": true
},
"postStateNode": {
"raw": "/\\ initialized = TRUE\n/\\ fmu_state = [blocked |-> TRUE, outputs |-> <<0, 1>>, offset |-> 1, cstime |-> 0, lookahead_signals |-> <<<<>>, <<1>>>>]\n/\\ env_state = [ signals |->\n << [signal |-> <<1, 2>>, visiblen |-> 2],\n [signal |-> <<2>>, visiblen |-> 0] >>,\n maxAge |-> 0,\n H |-> 1 ]\n",
"env_state_signals": {
"0": {
"values": [
1,
2
],
"nvisible": 2
},
"1": {
"values": [
2
],
"nvisible": 0
}
},
"env_state_H": 1,
"env_state_maxDelay": 0,
"initialized": true,
"fmu_state_incoming_lookahead_signals": {
"0": [],
"1": [
1
]
},
"fmu_state_blocked": true,
"fmu_state_cstime": 0,
"fmu_state_outputs": [
0,
1
],
"fmu_state_offset": 1,
"has_fmu_state": false,
"meta_id": "",
"lookahead": 0
},
"postState": {
"H": 1,
"incomingUnprocessed": {
"0": {
"values": [
[
1,
1
],
[
2,
2
]
],
"visiblen": 2
},
"1": {
"values": [
[
2,
2
]
],
"visiblen": 0
}
},
"incomingLookahead": {
"0": [],
"1": [
[
1,
1
]
]
},
"currentData": {
"0": [
0,
0
],
"1": [
1,
1
]
},
"startOffsetTime": 1,
"maxAge": 0,
"initialized": true,
"lookahead": 2,
"id": "",
"cstime": 0,
"blocked": true
},
"action": "dostep",
"meta": "585--<Action line 363, col 9 to line 379, col 34 of module RabbitMQFMUSignals>"
}
FMU always ignores incomingUnprocessed as model adds events all the sudden
FMU only takes what we can be seen. Ignores the rest.
Edited by Casper Thule Hansen