Skip to content
Snippets Groups Projects
Commit fc8d9a60 authored by Johannes Mey's avatar Johannes Mey
Browse files

add first test of eris contract

parent b7dbb61f
No related branches found
No related tags found
No related merge requests found
......@@ -200,4 +200,12 @@ public abstract class HandwrittenTestSuite {
Assignment config_1i0m0 = assertAssignment(modelAndSolution, 0, "config_1i0m0", "r0");
assertComponentRequirement(config_0i0m0,"other", config_1i0m0);
}
@Test
public void test_multi_eris_01() throws IOException, Parser.Exception, SolvingException {
Tuple<Root, Solution> modelAndSolution = loadAndSolve("test_eris_01.txt");
assertValidSolution(modelAndSolution);
Assignment a0 = assertAssignment(modelAndSolution, 0, "ap4", "r0");
Assignment a1 = assertAssignment(modelAndSolution, 1, "ap2", "r0");
}
}
container resource type ComputeNode {
// empty, just a dummy type
}
resource r0:ComputeNode * 5 {
// empty
}
property runtime [ms]
property system [boolean]
component lp0_node0_row0 {
using property runtime
using property system
contract ap1 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 5
}
contract ap2 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 2
}
contract ap3 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
}
contract ap4 {
requires resource compute_resource_0 of type ComputeNode with {
// no hardware requirements
}
providing runtime = 7
providing system = 1
}
}
request for lp0_node0_row0 {
requiring system = 1
}
request for lp0_node0_row0 {
}
minimize sum(runtime)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment