diff options
author | 2019-05-21 17:00:01 -0400 | |
---|---|---|
committer | 2019-05-21 17:00:01 -0400 | |
commit | fd3684b5440dacca0c4bf4be15930555a79e2100 (patch) | |
tree | 24120a5c7fdae1532529fa0c4687dc1078cd1cde /Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java | |
parent | Interval hull aggregation operator (diff) | |
download | VIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.tar.gz VIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.tar.zst VIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.zip |
VIATRA DSE and COIN-OR CBC implementations of CPS case study
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java new file mode 100644 index 00000000..7d81f84b --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java | |||
@@ -0,0 +1,46 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.cps.dse; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; | ||
4 | import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; | ||
5 | import hu.bme.mit.inf.dslreasoner.domains.cps.dse.RuleBasedCpsSolver; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsQueries; | ||
8 | import java.util.Map; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | import org.eclipse.emf.ecore.EStructuralFeature; | ||
11 | import org.eclipse.emf.ecore.resource.Resource; | ||
12 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; | ||
13 | import org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory; | ||
14 | import org.eclipse.viatra.addon.querybasedfeatures.runtime.handler.QueryBasedFeatures; | ||
15 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer; | ||
16 | import org.eclipse.viatra.query.runtime.extensibility.SingletonQueryGroupProvider; | ||
17 | import org.eclipse.viatra.query.runtime.registry.IQuerySpecificationRegistry; | ||
18 | import org.eclipse.viatra.query.runtime.registry.QuerySpecificationRegistry; | ||
19 | import org.eclipse.viatra.query.runtime.registry.connector.QueryGroupProviderSourceConnector; | ||
20 | |||
21 | @SuppressWarnings("all") | ||
22 | public class RuleBasedCpsMain { | ||
23 | private RuleBasedCpsMain() { | ||
24 | new IllegalStateException("This is a static utility class and should not be instantiated directly."); | ||
25 | } | ||
26 | |||
27 | public static void main(final String[] args) { | ||
28 | DesignSpaceExplorer.turnOnLogging(DesignSpaceExplorer.DseLoggingLevel.VERBOSE_FULL); | ||
29 | Map<String, Object> _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); | ||
30 | XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); | ||
31 | _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); | ||
32 | QueryBasedFeatureSettingDelegateFactory _queryBasedFeatureSettingDelegateFactory = new QueryBasedFeatureSettingDelegateFactory(); | ||
33 | EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(QueryBasedFeatures.ANNOTATION_SOURCE, _queryBasedFeatureSettingDelegateFactory); | ||
34 | EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); | ||
35 | IQuerySpecificationRegistry _instance = QuerySpecificationRegistry.getInstance(); | ||
36 | CpsQueries _instance_1 = CpsQueries.instance(); | ||
37 | SingletonQueryGroupProvider _singletonQueryGroupProvider = new SingletonQueryGroupProvider(_instance_1); | ||
38 | QueryGroupProviderSourceConnector _queryGroupProviderSourceConnector = new QueryGroupProviderSourceConnector("CpsQueries", _singletonQueryGroupProvider, | ||
39 | true); | ||
40 | _instance.addSource(_queryGroupProviderSourceConnector); | ||
41 | final CpsGenerator generator = new CpsGenerator(1, 4, 1); | ||
42 | final CyberPhysicalSystem problem = generator.generateCpsProblem(); | ||
43 | final RuleBasedCpsSolver solver = new RuleBasedCpsSolver(); | ||
44 | solver.solve(problem); | ||
45 | } | ||
46 | } | ||