diff options
author | 2019-05-04 17:56:18 -0400 | |
---|---|---|
committer | 2019-05-04 17:56:18 -0400 | |
commit | b9aaa826e1e7504958b6e75f35e9dcd09086a13e (patch) | |
tree | df7b83804e74efb86fb845862c5523d04d7edeb1 /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains | |
parent | Merge remote-tracking branch 'origin/master' into kris (diff) | |
download | VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.gz VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.zst VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.zip |
Metrics for satellite case study
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql | 142 |
1 files changed, 139 insertions, 3 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql index d0542b4a..7ca948cc 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql | |||
@@ -133,7 +133,8 @@ pattern kaAntennaGainLow(Comm : CommSubsystem) { | |||
133 | 133 | ||
134 | @Constraint(severity = "error", key = {Sat}, | 134 | @Constraint(severity = "error", key = {Sat}, |
135 | message = "3U CubeSats can only cross-link using UHF.") | 135 | message = "3U CubeSats can only cross-link using UHF.") |
136 | pattern threeUCubeSatWithNonUhfCrossLink(Sat : CubeSat3U) { | 136 | pattern threeUCubeSatWithNonUhfCrossLink(Sat : Spacecraft) { |
137 | Spacecraft.kind(Sat, SpacecraftKind::CubeSat3U); | ||
137 | CommunicatingElement.commSubsystem(Sat, SourceComm); | 138 | CommunicatingElement.commSubsystem(Sat, SourceComm); |
138 | neg find commSubsystemBandUhf(SourceComm); | 139 | neg find commSubsystemBandUhf(SourceComm); |
139 | DirectedCommunicationLink.source(Link, SourceComm); | 140 | DirectedCommunicationLink.source(Link, SourceComm); |
@@ -159,6 +160,141 @@ pattern cubeSatWithKaAntenna(Spacecraft : Spacecraft) { | |||
159 | neg find smallSat(Spacecraft); | 160 | neg find smallSat(Spacecraft); |
160 | } | 161 | } |
161 | 162 | ||
162 | private pattern smallSat(Sat : SmallSat) { | 163 | private pattern smallSat(Sat : Spacecraft) { |
163 | SmallSat(Sat); | 164 | Spacecraft.kind(Sat, SpacecraftKind::SmallSat); |
165 | } | ||
166 | |||
167 | // | ||
168 | // Metrics | ||
169 | // | ||
170 | |||
171 | // Coverage | ||
172 | |||
173 | pattern coverageMetric(Coverage : java Double) { | ||
174 | Coverage == sum find missionCoverage(_, #_); | ||
175 | } | ||
176 | |||
177 | private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) { | ||
178 | InterferometryMission.observationTime(Mission, ObservationTime); | ||
179 | ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _); | ||
180 | Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3); | ||
181 | } | ||
182 | |||
183 | // Time | ||
184 | |||
185 | pattern timeMetric(Time : java Double) { | ||
186 | Time == sum find missionTime(_, #_); | ||
187 | } | ||
188 | |||
189 | private pattern missionTime(Mission : InterferometryMission, Time : java Double) { | ||
190 | InterferometryMission.observationTime(Mission, ObservationTime); | ||
191 | TrasmitTime == sum find transmitTime(Mission, _, #_); | ||
192 | Time == eval(TrasmitTime + 60.0 * ObservationTime); | ||
193 | } | ||
194 | |||
195 | private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) { | ||
196 | ConstellationMission.spacecraft(Mission, Spacecraft); | ||
197 | find scienceData(Spacecraft, ScienceData); | ||
198 | IncomingData == sum find incomingData(Spacecraft, _, #_); | ||
199 | find transmitRate(Spacecraft, TransmitRate); | ||
200 | TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate)); | ||
201 | } | ||
202 | |||
203 | private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { | ||
204 | find indirectCommunicationLink(Source, Spacecraft); | ||
205 | find scienceData(Source, Data); | ||
206 | } | ||
207 | |||
208 | private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) { | ||
209 | ConstellationMission.spacecraft(Mission, Spacecraft); | ||
210 | InterferometryMission.observationTime(Mission, ObservationTime); | ||
211 | Data == eval(12.0 * ObservationTime); | ||
212 | } | ||
213 | |||
214 | private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) { | ||
215 | find spacecraftUplink(Spacecraft, TransceiverBand::UHF, Target); | ||
216 | Spacecraft(Target); | ||
217 | TransmitRate == 5.0; | ||
218 | } or { | ||
219 | find spacecraftUplink(Spacecraft, TransceiverBand::X, Target); | ||
220 | Spacecraft(Target); | ||
221 | TransmitRate == 1.6; | ||
222 | } or { | ||
223 | find spacecraftUplink(Spacecraft, TransceiverBand::X, Target); | ||
224 | GroundStationNetwork(Target); | ||
225 | TransmitRate == 0.7; | ||
226 | } or { | ||
227 | find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target); | ||
228 | Spacecraft(Target); | ||
229 | TransmitRate == 220.0; | ||
230 | } or { | ||
231 | find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target); | ||
232 | GroundStationNetwork(Target); | ||
233 | TransmitRate == 80.0; | ||
234 | } | ||
235 | |||
236 | private pattern spacecraftUplink(Spacecraft : Spacecraft, Band : TransceiverBand, Target : CommunicatingElement) { | ||
237 | CommunicatingElement.communicationLink(Spacecraft, Link); | ||
238 | DirectedCommunicationLink.source.band(Link, Band); | ||
239 | DirectedCommunicationLink.target(Link, TargetSubsystem); | ||
240 | CommunicatingElement.commSubsystem(Target, TargetSubsystem); | ||
241 | } | ||
242 | |||
243 | // Cost | ||
244 | |||
245 | pattern costMetric(Cost : java Double) { | ||
246 | Cost == sum find missionCost(_, #_); | ||
247 | } | ||
248 | |||
249 | private pattern missionCost(Mission : InterferometryMission, Cost : java Double) { | ||
250 | InterferometryMission.observationTime(Mission, ObservationTime); | ||
251 | SpacecraftCost == sum find spacecraftCost(Mission, _, #_); | ||
252 | Cost == eval(SpacecraftCost + 100000.0 * ObservationTime); | ||
253 | } | ||
254 | |||
255 | private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) { | ||
256 | ConstellationMission.spacecraft(Mission, Spacecraft); | ||
257 | Spacecraft.kind(Spacecraft, Kind); | ||
258 | KindCount == count find spacecraftOfKind(_, Kind); | ||
259 | find basePrice(Spacecraft, BasePrice); | ||
260 | find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost); | ||
261 | find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost); | ||
262 | Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost); | ||
263 | } | ||
264 | |||
265 | private pattern spacecraftOfKind(Spacecraft : Spacecraft, Kind : SpacecraftKind) { | ||
266 | Spacecraft.kind(Spacecraft, Kind); | ||
267 | } | ||
268 | |||
269 | private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { | ||
270 | Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat3U); | ||
271 | BasePrice == 250000.0; | ||
272 | } or { | ||
273 | Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat6U); | ||
274 | BasePrice == 750000.0; | ||
275 | } or { | ||
276 | Spacecraft.kind(Spacecraft, SpacecraftKind::SmallSat); | ||
277 | BasePrice == 3000000.0; | ||
278 | } | ||
279 | |||
280 | private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) { | ||
281 | find spacecraftWithInterferometryPayload(_, Spacecraft); | ||
282 | Cost == 50000.0; | ||
283 | } or { | ||
284 | neg find spacecraftWithInterferometryPayload(_, Spacecraft); | ||
285 | Cost == 0.0; | ||
286 | } | ||
287 | |||
288 | private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) { | ||
289 | find spacecraftWithTwoCommSubsystems(Spacecraft); | ||
290 | Cost == 100000.0; | ||
291 | } or { | ||
292 | neg find spacecraftWithTwoCommSubsystems(Spacecraft); | ||
293 | Cost == 0.0; | ||
294 | } | ||
295 | |||
296 | private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) { | ||
297 | Spacecraft.commSubsystem(Spacecraft, Subsystem1); | ||
298 | Spacecraft.commSubsystem(Spacecraft, Subsystem2); | ||
299 | Subsystem1 != Subsystem2; | ||
164 | } | 300 | } |