diff options
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend index 7ec0f84d..0203a6b6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend | |||
@@ -19,11 +19,11 @@ class CbcCpsMain { | |||
19 | new IllegalStateException("This is a static utility class and should not be instantiated directly.") | 19 | new IllegalStateException("This is a static utility class and should not be instantiated directly.") |
20 | } | 20 | } |
21 | 21 | ||
22 | static def void main(String[] args) { | 22 | public static def void main(String[] args) { |
23 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, | 23 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, |
24 | new XMIResourceFactoryImpl) | 24 | new XMIResourceFactoryImpl) |
25 | EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) | 25 | EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) |
26 | val generator = new CpsGenerator(1, 4, 1) | 26 | val generator = new CpsGenerator(1, 4, 2) |
27 | val problem = generator.generateCpsProblem | 27 | val problem = generator.generateCpsProblem |
28 | val toLp = new CpsToLpTranslator(problem, 10, true) | 28 | val toLp = new CpsToLpTranslator(problem, 10, true) |
29 | val lp = toLp.lpProblem | 29 | val lp = toLp.lpProblem |
@@ -49,5 +49,6 @@ class CbcCpsMain { | |||
49 | } finally { | 49 | } finally { |
50 | reader.close | 50 | reader.close |
51 | } | 51 | } |
52 | println("Additional cost: " + problem.requests.flatMap[requirements.map[count]].reduce[p1, p2|p1 + p2] * 5) | ||
52 | } | 53 | } |
53 | } | 54 | } |