Skip to content
Snippets Groups Projects
Commit 5f9e344c authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Exploration.alg: Exponential penalty funcion for NoEmptyPartitionConstraint.

* Using exponential functions for the penalty calculation of constraints is common practice and favored over pure potential functions.
refs 3257
parent be49c4b9
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ ConstraintEvaluatorBase.java 4a0e50681708c882bf314d689e1ddce322d0cd50 RED
DeadlineConstraintEvaluator.java 6763810616860bd149f90a653776276681ee480e RED
IConstraintEvaluator.java bca49bbdea5e089b0d045fc356ceedcb466df55e RED
MappingEvaluatorConstraint.java f1f44bffbef03f1650a7f026428423838b16b845 RED
NoEmptyPartitionConstraintEvaluator.java 33f7b4215b2ada1e60474e9385150a9ea234b060 YELLOW
NoEmptyPartitionConstraintEvaluator.java 0cd05407f2c2958c5c26d4497b6fdca84c03ad3e YELLOW
PeriodConstraintEvaluator.java 05cf21be06c9ae12593f870efdf9c358efa2d97c RED
SafetyIntegrityLevelConstraintEvaluator.java 9ad7129faaa35d89af4fced7a7121a0a142cb6f1 RED
SameSilInPartitionConstraintEvaluator.java 9f30f5731fb64b73ab2c50868026e9d1af05beb5 RED
SameSilInPartitionConstraintEvaluator.java 571c4f092ea59266d2bcd4870f2297dfc9ae1ad2 RED
......@@ -15,8 +15,6 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.dse.evaluator.constraint;
import static java.lang.Math.pow;
import java.util.ArrayList;
import java.util.Collection;
......@@ -55,7 +53,7 @@ public class NoEmptyPartitionConstraintEvaluator extends
Collection<Partition> emptyPartitions =
LambdaUtils.filter(virtMapping.getRequesters(), res -> phenotype.getRequesters(res)
.isEmpty());
return new DoubleValue(pow(10 * emptyPartitions.size(), 2));
return new DoubleValue(Math.expm1(emptyPartitions.size()));
}
/** {@inheritDoc} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment