diff options
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf')
5 files changed, 162 insertions, 248 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend index 43b2902f..3a8688e9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend | |||
@@ -1,13 +1,13 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | 1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo |
2 | 2 | ||
3 | //import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric | 3 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric |
4 | // | 4 | |
5 | //class CostObjective extends MetricBasedGuidanceFunction { | 5 | class CostObjective extends MetricBasedGuidanceFunction { |
6 | // new() { | 6 | new() { |
7 | // super(CostMetric.instance) | 7 | super(CostMetric.instance) |
8 | // } | 8 | } |
9 | // | 9 | |
10 | // override getName() { | 10 | override getName() { |
11 | // "Cost" | 11 | "Cost" |
12 | // } | 12 | } |
13 | //} | 13 | } |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend deleted file mode 100644 index ddf5748e..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | import java.util.Properties | ||
4 | import org.moeaframework.Executor | ||
5 | import org.moeaframework.Instrumenter | ||
6 | import org.moeaframework.algorithm.PeriodicAction | ||
7 | import org.moeaframework.core.TerminationCondition | ||
8 | import org.moeaframework.core.spi.AlgorithmFactory | ||
9 | import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run | ||
10 | import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation | ||
11 | import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec | ||
12 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter | ||
13 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator | ||
14 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation | ||
15 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider | ||
16 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector | ||
17 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem | ||
18 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory | ||
19 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch | ||
20 | |||
21 | class ExcludedMoeaOptimisation extends MoeaOptimisation { | ||
22 | SolutionGenerator solutionGenerator | ||
23 | Instrumenter algorithmStepSizeInstrumenter | ||
24 | |||
25 | override execute(SolverSpec solverSpec, SolutionGenerator solutionGenerator) { | ||
26 | this.solutionGenerator = solutionGenerator | ||
27 | super.execute(solverSpec, solutionGenerator) | ||
28 | } | ||
29 | |||
30 | override Instrumenter runOptimisation(SolverSpec solverSpec, Properties optimisationProperties) { | ||
31 | val algorithmFactory = new AlgorithmFactory | ||
32 | algorithmFactory.addProvider(new MoeaOptimisationAlgorithmProvider) | ||
33 | |||
34 | algorithmStepSizeInstrumenter = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( | ||
35 | MoeaOptimisationProblem, solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector(). | ||
36 | attachPopulationSizeCollector.attach(new PopulationCollector()).withFrequency(1).withFrequencyType( | ||
37 | PeriodicAction.FrequencyType.STEPS) | ||
38 | |||
39 | var stepSizeStrategy = new MutationStepSizeStrategyFactory(solverSpec.algorithm, algorithmStepSizeInstrumenter). | ||
40 | strategy | ||
41 | |||
42 | solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy) | ||
43 | |||
44 | // TODO: Place this in a better location. | ||
45 | // Exclude JDK packages from Instrumenter | ||
46 | this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk") | ||
47 | |||
48 | new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.algorithm.name) // Initialize problem with our solution generator | ||
49 | .withProblemClass(MoeaOptimisationProblem, solutionGenerator).withProperties(optimisationProperties). | ||
50 | withInstrumenter(algorithmStepSizeInstrumenter).withTerminationCondition( | ||
51 | optimisationProperties.get("terminationCondition") as TerminationCondition).run() | ||
52 | |||
53 | return algorithmStepSizeInstrumenter | ||
54 | } | ||
55 | } | ||
56 | |||
57 | class ExcludedOptimisationInterpreter extends OptimisationInterpreter { | ||
58 | val Optimisation model | ||
59 | |||
60 | new(String projectPath, Optimisation model) { | ||
61 | super(projectPath, model) | ||
62 | this.model = model | ||
63 | } | ||
64 | |||
65 | override start() { | ||
66 | // This model provider loads the model given by the user in the DSL | ||
67 | var solutionGenerator = new SolutionGenerator(model, getBreedingOperators, getMutationOperators, | ||
68 | getModelProvider, getMetamodel); | ||
69 | |||
70 | return new ExcludedMoeaOptimisation().execute(model.solver, solutionGenerator) | ||
71 | } | ||
72 | |||
73 | } | ||
74 | |||
75 | class ExcludedRun extends Run { | ||
76 | override runBatch(String moptProjectPath, Optimisation optimisationModel, Integer batch, boolean singleBatch) { | ||
77 | val optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); | ||
78 | val startTime = System.nanoTime(); | ||
79 | val optimisationOutcome = optimisationInterpreter.start(); | ||
80 | val endTime = System.nanoTime(); | ||
81 | val experimentDuration = ((endTime - startTime) / 1000000); | ||
82 | val generatedRules = optimisationInterpreter.getRulegenOperators(); | ||
83 | return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); | ||
84 | } | ||
85 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend index c5a30f94..58034c43 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend | |||
@@ -9,7 +9,7 @@ import org.eclipse.emf.ecore.EPackage | |||
9 | import org.eclipse.emf.ecore.resource.Resource | 9 | import org.eclipse.emf.ecore.resource.Resource |
10 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 10 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
11 | import satellite.SatellitePackage | 11 | import satellite.SatellitePackage |
12 | import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup | 12 | import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run |
13 | 13 | ||
14 | class SatelliteMdeOptimiserMain { | 14 | class SatelliteMdeOptimiserMain { |
15 | static val PROJECT_PATH = "." | 15 | static val PROJECT_PATH = "." |
@@ -25,8 +25,7 @@ class SatelliteMdeOptimiserMain { | |||
25 | EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE) | 25 | EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE) |
26 | fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", | 26 | fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", |
27 | #{"satellite.ecore" -> SatellitePackage.eNS_URI}) | 27 | #{"satellite.ecore" -> SatellitePackage.eNS_URI}) |
28 | val injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); | 28 | Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) |
29 | injector.getInstance(ExcludedRun).run(PROJECT_PATH, MOPT_PATH) | ||
30 | } | 29 | } |
31 | 30 | ||
32 | private def static void fixupHenshinModel(String originalPath, String outputPath, Map<String, String> remapMap) { | 31 | private def static void fixupHenshinModel(String originalPath, String outputPath, Map<String, String> remapMap) { |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt index 138ea309..e9bd1a64 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt | |||
@@ -10,13 +10,14 @@ goal { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | search { | 12 | search { |
13 | mutate using <satellite_fixup.henshin> unit "addCubeSat3U" | 13 | // mutate using <satellite_fixup.henshin> unit "addCubeSat3U" |
14 | // mutate { "CubeSat3U" } | 14 | mutate { "CubeSat3U" } |
15 | // mutate { "CubeSat6U" } | 15 | mutate { "CubeSat6U" } |
16 | // mutate { "SmallSat" } | 16 | mutate { "SmallSat" } |
17 | // mutate { "InterferometryPayload" } | 17 | mutate { "InterferometryPayload" } |
18 | // mutate { "CommSubsystem" } | 18 | mutate { "UHFCommSubsystem" } |
19 | // mutate { "DirectedCommunicationLink" } | 19 | mutate { "XCommSubsystem" } |
20 | mutate { "KaCommSubsystem" } | ||
20 | } | 21 | } |
21 | 22 | ||
22 | solver { | 23 | solver { |
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 bdda6ec7..711c7ce6 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 | |||
@@ -158,147 +158,146 @@ pattern smallSat(Sat : SmallSat) { | |||
158 | SmallSat(Sat); | 158 | SmallSat(Sat); |
159 | } | 159 | } |
160 | 160 | ||
161 | //// | ||
162 | //// Metrics | ||
163 | //// | ||
164 | // | 161 | // |
165 | //// Coverage | 162 | // Metrics |
166 | // | 163 | // |
167 | //pattern coverageMetric(Coverage : java Double) { | 164 | |
168 | // Coverage == sum find missionCoverage(_, #_); | 165 | // Coverage |
169 | //} | 166 | |
170 | // | 167 | pattern coverageMetric(Coverage : java Double) { |
171 | //private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) { | 168 | Coverage == sum find missionCoverage(_, #_); |
172 | // InterferometryMission.observationTime(Mission, ObservationTime); | 169 | } |
173 | // ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _); | 170 | |
174 | // Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3); | 171 | private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) { |
175 | //} | 172 | InterferometryMission.observationTime(Mission, ObservationTime); |
176 | // | 173 | ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _); |
177 | //// Time | 174 | Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3); |
178 | // | 175 | } |
179 | //pattern timeMetric(Time : java Double) { | 176 | |
180 | // Time == sum find missionTime(_, #_); | 177 | // Time |
181 | //} | 178 | |
182 | // | 179 | pattern timeMetric(Time : java Double) { |
183 | //private pattern missionTime(Mission : InterferometryMission, Time : java Double) { | 180 | Time == sum find missionTime(_, #_); |
184 | // InterferometryMission.observationTime(Mission, ObservationTime); | 181 | } |
185 | // TrasmitTime == sum find transmitTime(Mission, _, #_); | 182 | |
186 | // Time == eval(TrasmitTime + 60.0 * ObservationTime); | 183 | private pattern missionTime(Mission : InterferometryMission, Time : java Double) { |
187 | //} | 184 | InterferometryMission.observationTime(Mission, ObservationTime); |
188 | // | 185 | TrasmitTime == sum find transmitTime(Mission, _, #_); |
189 | //private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) { | 186 | Time == eval(TrasmitTime + 60.0 * ObservationTime); |
190 | // ConstellationMission.spacecraft(Mission, Spacecraft); | 187 | } |
191 | // find scienceData(Spacecraft, ScienceData); | 188 | |
192 | // IncomingData == sum find incomingData(Spacecraft, _, #_); | 189 | private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) { |
193 | // find transmitRate(Spacecraft, TransmitRate); | 190 | ConstellationMission.spacecraft(Mission, Spacecraft); |
194 | // TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate)); | 191 | find scienceData(Spacecraft, ScienceData); |
195 | //} | 192 | IncomingData == sum find incomingData(Spacecraft, _, #_); |
196 | // | 193 | find transmitRate(Spacecraft, TransmitRate); |
197 | //private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { | 194 | TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate)); |
198 | // find indirectCommunicationLink(Source, Spacecraft); | 195 | } |
199 | // find scienceData(Source, Data); | 196 | |
200 | //} | 197 | private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { |
201 | // | 198 | find indirectCommunicationLink(Source, Spacecraft); |
202 | //private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) { | 199 | find scienceData(Source, Data); |
203 | // ConstellationMission.spacecraft(Mission, Spacecraft); | 200 | } |
204 | // InterferometryMission.observationTime(Mission, ObservationTime); | 201 | |
205 | // Data == eval(12.0 * ObservationTime); | 202 | private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) { |
206 | //} | 203 | ConstellationMission.spacecraft(Mission, Spacecraft); |
207 | // | 204 | InterferometryMission.observationTime(Mission, ObservationTime); |
208 | //private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) { | 205 | Data == eval(12.0 * ObservationTime); |
209 | // find spacecraftUplink(Spacecraft, Comm, Target); | 206 | } |
210 | // UHFCommSubsystem(Comm); | 207 | |
211 | // Spacecraft(Target); | 208 | private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) { |
212 | // TransmitRate == 5.0; | 209 | find spacecraftUplink(Spacecraft, Comm, Target); |
213 | //} or { | 210 | UHFCommSubsystem(Comm); |
214 | // find spacecraftUplink(Spacecraft, Comm, Target); | 211 | Spacecraft(Target); |
215 | // XCommSubsystem(Comm); | 212 | TransmitRate == 5.0; |
216 | // Spacecraft(Target); | 213 | } or { |
217 | // TransmitRate == 1.6; | 214 | find spacecraftUplink(Spacecraft, Comm, Target); |
218 | //} or { | 215 | XCommSubsystem(Comm); |
219 | // find spacecraftUplink(Spacecraft, Comm, Target); | 216 | Spacecraft(Target); |
220 | // XCommSubsystem(Comm); | 217 | TransmitRate == 1.6; |
221 | // GroundStationNetwork(Target); | 218 | } or { |
222 | // TransmitRate == 0.7; | 219 | find spacecraftUplink(Spacecraft, Comm, Target); |
223 | //} or { | 220 | XCommSubsystem(Comm); |
224 | // find spacecraftUplink(Spacecraft, Comm, Target); | 221 | GroundStationNetwork(Target); |
225 | // KaCommSubsystem(Comm); | 222 | TransmitRate == 0.7; |
226 | // Spacecraft(Target); | 223 | } or { |
227 | // TransmitRate == 220.0; | 224 | find spacecraftUplink(Spacecraft, Comm, Target); |
228 | //} or { | 225 | KaCommSubsystem(Comm); |
229 | // find spacecraftUplink(Spacecraft, Comm, Target); | 226 | Spacecraft(Target); |
230 | // KaCommSubsystem(Comm); | 227 | TransmitRate == 220.0; |
231 | // GroundStationNetwork(Target); | 228 | } or { |
232 | // TransmitRate == 80.0; | 229 | find spacecraftUplink(Spacecraft, Comm, Target); |
233 | //} | 230 | KaCommSubsystem(Comm); |
234 | // | 231 | GroundStationNetwork(Target); |
235 | //private pattern spacecraftUplink(Spacecraft : Spacecraft, TargetSubsystem : CommSubsystem, Target : CommunicatingElement) { | 232 | TransmitRate == 80.0; |
236 | // CommunicatingElement.communicationLink(Spacecraft, Link); | 233 | } |
237 | // DirectedCommunicationLink.target(Link, TargetSubsystem); | 234 | |
238 | // CommunicatingElement.commSubsystem(Target, TargetSubsystem); | 235 | private pattern spacecraftUplink(Spacecraft : Spacecraft, TargetSubsystem : CommSubsystem, Target : CommunicatingElement) { |
239 | //} | 236 | CommunicatingElement.commSubsystem.target(Spacecraft, TargetSubsystem); |
240 | // | 237 | CommunicatingElement.commSubsystem(Target, TargetSubsystem); |
241 | //// Cost | 238 | } |
242 | // | 239 | |
243 | //pattern costMetric(Cost : java Double) { | 240 | // Cost |
244 | // Cost == sum find missionCost(_, #_); | 241 | |
245 | //} | 242 | pattern costMetric(Cost : java Double) { |
246 | // | 243 | Cost == sum find missionCost(_, #_); |
247 | //private pattern missionCost(Mission : InterferometryMission, Cost : java Double) { | 244 | } |
248 | // InterferometryMission.observationTime(Mission, ObservationTime); | 245 | |
249 | // SpacecraftCost == sum find spacecraftCost(Mission, _, #_); | 246 | private pattern missionCost(Mission : InterferometryMission, Cost : java Double) { |
250 | // Cost == eval(SpacecraftCost + 100000.0 * ObservationTime); | 247 | InterferometryMission.observationTime(Mission, ObservationTime); |
251 | //} | 248 | SpacecraftCost == sum find spacecraftCost(Mission, _, #_); |
252 | // | 249 | Cost == eval(SpacecraftCost + 100000.0 * ObservationTime); |
253 | //private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) { | 250 | } |
254 | // ConstellationMission.spacecraft(Mission, Spacecraft); | 251 | |
255 | // find spacecraftOfKindCount(Spacecraft, KindCount); | 252 | private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) { |
256 | // find basePrice(Spacecraft, BasePrice); | 253 | ConstellationMission.spacecraft(Mission, Spacecraft); |
257 | // find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost); | 254 | find spacecraftOfKindCount(Spacecraft, KindCount); |
258 | // find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost); | 255 | find basePrice(Spacecraft, BasePrice); |
259 | // Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost); | 256 | find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost); |
260 | //} | 257 | find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost); |
261 | // | 258 | Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost); |
262 | //private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) { | 259 | } |
263 | // CubeSat3U(Sat); | 260 | |
264 | // Count == count find cubeSat3U(_); | 261 | private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) { |
265 | //} or { | 262 | CubeSat3U(Sat); |
266 | // CubeSat6U(Sat); | 263 | Count == count find cubeSat3U(_); |
267 | // Count == count find cubeSat6U(_); | 264 | } or { |
268 | //} or { | 265 | CubeSat6U(Sat); |
269 | // SmallSat(Sat); | 266 | Count == count find cubeSat6U(_); |
270 | // Count == count find smallSat(_); | 267 | } or { |
271 | //} | 268 | SmallSat(Sat); |
272 | // | 269 | Count == count find smallSat(_); |
273 | //private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { | 270 | } |
274 | // CubeSat3U(Spacecraft); | 271 | |
275 | // BasePrice == 250000.0; | 272 | private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { |
276 | //} or { | 273 | CubeSat3U(Spacecraft); |
277 | // CubeSat6U(Spacecraft); | 274 | BasePrice == 250000.0; |
278 | // BasePrice == 750000.0; | 275 | } or { |
279 | //} or { | 276 | CubeSat6U(Spacecraft); |
280 | // SmallSat(Spacecraft); | 277 | BasePrice == 750000.0; |
281 | // BasePrice == 3000000.0; | 278 | } or { |
282 | //} | 279 | SmallSat(Spacecraft); |
283 | // | 280 | BasePrice == 3000000.0; |
284 | //private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) { | 281 | } |
285 | // find spacecraftWithInterferometryPayload(_, Spacecraft); | 282 | |
286 | // Cost == 50000.0; | 283 | private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) { |
287 | //} or { | 284 | find spacecraftWithInterferometryPayload(_, Spacecraft); |
288 | // neg find spacecraftWithInterferometryPayload(_, Spacecraft); | 285 | Cost == 50000.0; |
289 | // Cost == 0.0; | 286 | } or { |
290 | //} | 287 | neg find spacecraftWithInterferometryPayload(_, Spacecraft); |
291 | // | 288 | Cost == 0.0; |
292 | //private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) { | 289 | } |
293 | // find spacecraftWithTwoCommSubsystems(Spacecraft); | 290 | |
294 | // Cost == 100000.0; | 291 | private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) { |
295 | //} or { | 292 | find spacecraftWithTwoCommSubsystems(Spacecraft); |
296 | // neg find spacecraftWithTwoCommSubsystems(Spacecraft); | 293 | Cost == 100000.0; |
297 | // Cost == 0.0; | 294 | } or { |
298 | //} | 295 | neg find spacecraftWithTwoCommSubsystems(Spacecraft); |
299 | // | 296 | Cost == 0.0; |
300 | //private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) { | 297 | } |
301 | // Spacecraft.commSubsystem(Spacecraft, Subsystem1); | 298 | |
302 | // Spacecraft.commSubsystem(Spacecraft, Subsystem2); | 299 | private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) { |
303 | // Subsystem1 != Subsystem2; | 300 | Spacecraft.commSubsystem(Spacecraft, Subsystem1); |
304 | //} \ No newline at end of file | 301 | Spacecraft.commSubsystem(Spacecraft, Subsystem2); |
302 | Subsystem1 != Subsystem2; | ||
303 | } | ||