diff options
author | 2020-05-12 02:38:04 +0200 | |
---|---|---|
committer | 2020-05-12 02:38:04 +0200 | |
commit | 53ce0bea21c18061eabfd890f6ea6776fe4e1d08 (patch) | |
tree | 36caf4e3f64fc6088e937b7a13dd0f86d050ba3d /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver | |
parent | removed potential equivalence between real values and integers (diff) | |
download | VIATRA-Generator-53ce0bea21c18061eabfd890f6ea6776fe4e1d08.tar.gz VIATRA-Generator-53ce0bea21c18061eabfd890f6ea6776fe4e1d08.tar.zst VIATRA-Generator-53ce0bea21c18061eabfd890f6ea6776fe4e1d08.zip |
advanced goal heuristics for missing containment and non-cont. edges
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend index 9e4792e0..e75cae41 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend | |||
@@ -55,17 +55,22 @@ class ModelGenerationCompositeObjective implements IObjective{ | |||
55 | //val unfinishedMultiplicitiesFitneses = unfinishedMultiplicityObjectives.map[x|x.getFitness(context)] | 55 | //val unfinishedMultiplicitiesFitneses = unfinishedMultiplicityObjectives.map[x|x.getFitness(context)] |
56 | val unfinishedWFsFitness = unfinishedWFObjective.getFitness(context) | 56 | val unfinishedWFsFitness = unfinishedWFObjective.getFitness(context) |
57 | 57 | ||
58 | 58 | var containmentMultiplicity = 0.0 | |
59 | var multiplicity = 0.0 | 59 | var nonContainmentMultiplicity = 0.0 |
60 | for(multiplicityObjective : unfinishedMultiplicityObjectives) { | 60 | for(multiplicityObjective : unfinishedMultiplicityObjectives) { |
61 | multiplicity+=multiplicityObjective.getFitness(context) | 61 | if(multiplicityObjective.containment) { |
62 | containmentMultiplicity+=multiplicityObjective.getFitness(context) | ||
63 | } else { | ||
64 | nonContainmentMultiplicity+=multiplicityObjective.getFitness(context) | ||
65 | } | ||
62 | } | 66 | } |
63 | var sum = 0.0 | 67 | var sum = 0.0 |
64 | sum += scopeFitnes | 68 | sum += scopeFitnes |
65 | sum +=multiplicity | 69 | sum += containmentMultiplicity |
70 | sum += Math.sqrt(nonContainmentMultiplicity) | ||
66 | sum += unfinishedWFsFitness//*0.5 | 71 | sum += unfinishedWFsFitness//*0.5 |
67 | 72 | ||
68 | println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') | 73 | //println('''Sum=«sum»|Scope=«scopeFitnes»|ContainmentMultiplicity=«containmentMultiplicity»|NonContainmentMultiplicity=«nonContainmentMultiplicity»|WFs=«unfinishedWFsFitness»''') |
69 | 74 | ||
70 | return sum | 75 | return sum |
71 | } | 76 | } |