1 | package de.uka.ipd.sdq.dsexplore.qml.pcm.datastructures.builder; |
2 | |
3 | import org.opt4j.core.Constraint.Direction; |
4 | |
5 | import de.uka.ipd.sdq.dsexplore.qml.pcm.datastructures.UsageScenarioBasedInfeasibilityConstraint; |
6 | import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario; |
7 | |
8 | public class UsageScenarioBasedInfeasibilityConstraintBuilder extends InfeasibilityConstraintBuilder{ |
9 | |
10 | private UsageScenario usageScenario; |
11 | |
12 | public UsageScenarioBasedInfeasibilityConstraintBuilder( |
13 | UsageScenario usageScenario) { |
14 | this.usageScenario = usageScenario; |
15 | } |
16 | |
17 | @Override |
18 | public UsageScenarioBasedInfeasibilityConstraint createInfeasibilityConstraint(String name, |
19 | Direction direction, double limit) { |
20 | return new UsageScenarioBasedInfeasibilityConstraint(name+"_"+this.usageScenario.getId(), direction, limit, this.usageScenario); |
21 | } |
22 | |
23 | |
24 | |
25 | |
26 | } |