|
| 1 | +Metadata |
| 2 | + name: Q0BOS |
| 3 | + version: "0.1.0" |
| 4 | + author: "AUTHOR_NAME_HERE" |
| 5 | + email: "CONTACT_EMAIL_HERE" |
| 6 | + description: "BRIEF_DESCRIPTION" |
| 7 | +end |
| 8 | + |
| 9 | +Broker<MQTT> LocsysMQTT |
| 10 | + host: 'locsys.issel.ee.auth.gr' |
| 11 | + port: 8883 |
| 12 | + ssl: true |
| 13 | + auth: |
| 14 | + username: '*****' |
| 15 | + password: '*****' |
| 16 | +end |
| 17 | + |
| 18 | +Broker<MQTT> LocalMQTT |
| 19 | + host: 'localhost' |
| 20 | + port: 1883 |
| 21 | + auth: |
| 22 | + username: '' |
| 23 | + password: '' |
| 24 | +end |
| 25 | + |
| 26 | +Broker<Redis> LocalRedis |
| 27 | + host: 'localhost' |
| 28 | + port: 6379 |
| 29 | + auth: |
| 30 | + username: '' |
| 31 | + password: '' |
| 32 | +end |
| 33 | + |
| 34 | +RTMonitor |
| 35 | + broker: LocalRedis |
| 36 | + eventTopic: "goaldsl.{U_ID}.event" |
| 37 | + logsTopic: "goaldsl.{U_ID}.log" |
| 38 | +end |
| 39 | + |
| 40 | +Entity TempSensorDining |
| 41 | + type: sensor |
| 42 | + uri: "streamsim.6530f9263773c5f7858b6b3.world.world.sensor.env.temperature.dining_temperature.data" |
| 43 | + source: LocalRedis |
| 44 | + freq: 1.0 |
| 45 | + attributes: |
| 46 | + - value: float -> sinus(20, 5, 0.02) |
| 47 | +end |
| 48 | + |
| 49 | +Entity TempSensorTvRoom |
| 50 | + type: sensor |
| 51 | + uri: "streamsim.6530f9263773c5f7858b6b3.world.world.sensor.env.temperature.tv_room_temperature.data" |
| 52 | + source: LocalRedis |
| 53 | + freq: 1.0 |
| 54 | + attributes: |
| 55 | + - value: float -> sinus(24, 2, 0.01) |
| 56 | +end |
| 57 | + |
| 58 | +Entity TempSensorHall |
| 59 | + type: sensor |
| 60 | + uri: "streamsim.6530f9263773c5f7858b6b33.world.world.sensor.env.temperature.hall_temperature.data" |
| 61 | + source: LocalRedis |
| 62 | + freq: 1.0 |
| 63 | + attributes: |
| 64 | + - value: float -> sinus(22, 11, 0.01) |
| 65 | +end |
| 66 | + |
| 67 | +Entity AppVariables |
| 68 | + type: sensor |
| 69 | + uri: "appcreator.variables" |
| 70 | + source: LocalRedis |
| 71 | + freq: -1 |
| 72 | + attributes: |
| 73 | + - name: str |
| 74 | + - value: str |
| 75 | + - type: str |
| 76 | +end |
| 77 | + |
| 78 | +// ------------- GOALS Section --------------------------- |
| 79 | + |
| 80 | +Goal<EntityStateChange> Temperature_Dining_Change |
| 81 | + entity: TempSensorDining |
| 82 | +end |
| 83 | + |
| 84 | +Goal<EntityStateChange> Temperature_TvRoom_Change |
| 85 | + entity: TempSensorTvRoom |
| 86 | +end |
| 87 | + |
| 88 | +Goal<EntityStateChange> Temperature_Hall_Change |
| 89 | + entity: TempSensorHall |
| 90 | +end |
| 91 | + |
| 92 | +Goal<EntityPyCondition> Temperature_Average |
| 93 | + condition: |
| 94 | + "AppVariables.name == 'average' and AppVariables.value == (TempSensorDining.value + TempSensorTvRoom.value + TempSensorHall.value) / 3" |
| 95 | + // "AppVariables.name == 'average' and round(AppVariables.value) == round((TempSensorDining.value + TempSensorTvRoom.value + TempSensorHall.value) / 3)" |
| 96 | +end |
| 97 | + |
| 98 | +Goal<Complex> TemperatureChange |
| 99 | + goals: |
| 100 | + - Temperature_Dining_Change |
| 101 | + - Temperature_TvRoom_Change |
| 102 | + - Temperature_Hall_Change |
| 103 | + strategy: AT_LEAST_ONE_ACCOMPLISHED |
| 104 | + // timeConstraints: |
| 105 | + // - FROM_GOAL_START(1) |
| 106 | +end |
| 107 | + |
| 108 | +Goal<Complex> Average_Correct |
| 109 | + goals: |
| 110 | + - TemperatureChange |
| 111 | + - Temperature_Average |
| 112 | + strategy: ALL_ACCOMPLISHED_ORDERED |
| 113 | +end |
| 114 | + |
| 115 | +Goal<Repeater> DoubleValue_x30 |
| 116 | + goal: Average_Correct |
| 117 | + times: 30 |
| 118 | + timeConstraints: |
| 119 | + - FROM_GOAL_START(1) |
| 120 | +end |
| 121 | + |
| 122 | +// ---------------------------------------------------- |
| 123 | + |
| 124 | +Scenario Week_2_Task_2 |
| 125 | + goals: |
| 126 | + - DoubleValue_x30 |
| 127 | + concurrent: False |
| 128 | +end |
0 commit comments