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