Commit 44949afd authored by Johannes Eder's avatar Johannes Eder
Browse files

Merge branch '3546' into 'master'

3546

See merge request af3/af3!359
parents 8cd546d7 7bfc6c06
......@@ -8,12 +8,12 @@ DSMLtoSMTTransformator.java 0e750ee0a344b1913774d1a83a8568ff09f49436 GREEN
DefaultExpressionTransformator.java 34733e33b3a55eef0fdda724b74fe181beaa7f2d GREEN
DeploScheduleRun.java 2b07bd6b40cf4ce2eabc12198f6db3b9655bed25 GREEN
DeploymentRun.java 4b2d0a6d64bb5a6efabc2ee9bf933cc523843ac8 GREEN
EnergyConstraintDefinition.java cc18ecec975ce706ebcb83e282c9a17fe4608596 GREEN
EnergyConstraintDefinition.java c43979cfc30e626d597de6860a13dc42c30b677c GREEN
ExpressionTransformator.java 81dfc30221e519aa8175693353ace8992687327f GREEN
IDSMLTransformationService.java 0bbcefa52d1127250697ca3d92a1b810db1b8871 GREEN
NonQuantifiedExpressionTransformator.java 9ee437aeaf518d94b81e34a275cd01b87cfca1bf GREEN
QuantifiedExpressionTransformator.java 01e7162b24d16adb23f646cf02340879e8a18205 GREEN
SMTTransformationUtils.java 14f70ea23c0589b5105dae9f7034a99eb3f72606 GREEN
ScheduleRun.java 43d869a9adfbebe34c34f1ebb0bc8e0600f45b9d GREEN
SolverRun.java ff3c69cf4fed2007f7f6bbeaefb4a2343d3c2e8d YELLOW
SolverRun.java ff3c69cf4fed2007f7f6bbeaefb4a2343d3c2e8d GREEN
TimingConstraintDefinition.java 92281277d99bb52b72c1cb898bba944b3b9a24f7 GREEN
......@@ -28,7 +28,6 @@ import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createAnd
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createArithmeticLiteral;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createBooleanLiteral;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createEquals;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createMaximum;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createMinimize;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createModelElementLiteral;
import static org.fortiss.af3.exploration.util.DSMLModelElementFactory.createMul;
......@@ -45,7 +44,6 @@ import java.util.List;
import org.eclipse.emf.common.util.EList;
import org.fortiss.af3.exploration.dseml.model.arithmetic.ArithmeticLiteral;
import org.fortiss.af3.exploration.dseml.model.arithmetic.ArithmeticPropertyLiteral;
import org.fortiss.af3.exploration.dseml.model.arithmetic.Maximum;
import org.fortiss.af3.exploration.dseml.model.arithmetic.Mul;
import org.fortiss.af3.exploration.dseml.model.arithmetic.Plus;
import org.fortiss.af3.exploration.dseml.model.arithmetic.Sum;
......@@ -233,40 +231,6 @@ public class EnergyConstraintDefinition {
return objectives;
}
/**
* Creates an objective that minimizes latency, by using a Maximum function.
* It defines a Maximum function over the ending time of all tasks.
* Then it minimizes the value of such a function.
* TODO(#3546, MV) Note that such a Maximum function is not implemented yet (wrt the translation
* into SMT) and this method is only here for possible future usage.
*/
public static List<IFunction>
createMinimizeOverallTimeObjective(SuperSet<ResourceAllocation> resAllocSS) {
// Formula to be defined:
// minimize(Maximum(start_time(ra) + duration(ra))_{over resource allocations}))
List<IFunction> objectives = new ArrayList<>();
Set<ResourceAllocation> set =
createSet(resAllocSS, "aResourceAllocationsSet", ResourceAllocation.class);
set.getEntries().addAll(resAllocSS.getEntries());
ArithmeticPropertyLiteral<ResourceAllocation, Number> startSet =
createStartTimeLiteral(set);
ArithmeticPropertyLiteral<ResourceAllocation, Number> durationSet =
createDurationLiteral(set);
Plus endTime = createPlus(startSet, durationSet);
BooleanLiteral triviallyTrue = createBooleanLiteral(true);
Maximum maximum =
createMaximum(resAllocSS.getCastedSet(IModelElement.class), triviallyTrue, endTime);
Minimize minimum = createMinimize(maximum);
objectives.add(minimum);
return objectives;
}
/**
* Creates constraints that force each ECU to work at one of the admissible frequencies.
* Note that this constraint is also used for pure (i.e., not joint with a deployment)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment