From 953227f62ece22f06bc54a47eeec8bf79b25dc27 Mon Sep 17 00:00:00 2001 From: Aren Babikian Date: Tue, 19 Jan 2021 12:46:58 +0100 Subject: add Actor+CollisionExists constrs & adjust dreal parser & measurements --- Domains/crossingScenario/.classpath | 15 +- .../ecore-gen/crossingScenario/Actor.java | 4 +- .../impl/CrossingScenarioPackageImpl.java | 4 +- .../inputs/crossingScenarioGen.vsconfig | 12 +- .../crossingScenario/model/crossingScenario.aird | 2620 ++++++++++---------- .../crossingScenario/model/crossingScenario.ecore | 154 +- .../model/crossingScenario.genmodel | 130 +- .../queries/crossingScenarioQueries.vql | 299 ++- .../crossingScenario/run/CrossingScenarioMain.java | 17 +- .../src/crossingScenario/run/QueryDebug.java | 23 +- .../viatra2logic/NumericDrealProblemSolver.java | 52 +- .../dse/BestFirstStrategyForModelGeneration.java | 3 + .../MODELS2020Plots-temp.ipynb | 269 +- .../plots/plot_RQ2_FamilyTree.pdf | Bin 0 -> 4542 bytes 14 files changed, 1849 insertions(+), 1753 deletions(-) create mode 100644 Tests/MODELS2020-CaseStudies/case.study.pledge.run/plots/plot_RQ2_FamilyTree.pdf diff --git a/Domains/crossingScenario/.classpath b/Domains/crossingScenario/.classpath index 0712d3e2..693aa2b8 100644 --- a/Domains/crossingScenario/.classpath +++ b/Domains/crossingScenario/.classpath @@ -1,9 +1,8 @@ - - - - - + + + + + - - - + + diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java index 035aafcc..31199a91 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java @@ -82,7 +82,7 @@ public interface Actor extends EObject { * @return the value of the 'Length' attribute. * @see #setLength(double) * @see crossingScenario.CrossingScenarioPackage#getActor_Length() - * @model default="0.0" required="true" derived="true" + * @model default="0.0" required="true" * @generated */ double getLength(); @@ -104,7 +104,7 @@ public interface Actor extends EObject { * @return the value of the 'Width' attribute. * @see #setWidth(double) * @see crossingScenario.CrossingScenarioPackage#getActor_Width() - * @model required="true" derived="true" + * @model required="true" * @generated */ double getWidth(); diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java index b87d2a4d..41c1bdd0 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java @@ -754,8 +754,8 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin initEClass(actorEClass, Actor.class, "Actor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getActor_XPos(), ecorePackage.getEDouble(), "xPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getActor_YPos(), ecorePackage.getEDouble(), "yPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_Length(), ecorePackage.getEDouble(), "length", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_Width(), ecorePackage.getEDouble(), "width", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_Length(), ecorePackage.getEDouble(), "length", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_Width(), ecorePackage.getEDouble(), "width", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getActor_XSpeed(), ecorePackage.getEDouble(), "xSpeed", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getActor_Relations(), this.getRelation(), null, "relations", null, 0, -1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getActor_PlacedOn(), this.getLane(), this.getLane_Actors(), "placedOn", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); diff --git a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig index 7f62377e..acd622c5 100644 --- a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig +++ b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig @@ -7,21 +7,23 @@ generate { partial-model = { "inputs/crossingScenarioInit.xmi"} solver = ViatraSolver scope = { - #node = 15..100, + #node = 10..100, #int = {}, # = 10..25, - # = 10..25//, + # = 10..25, + # = 1..10//, //# = 1..10 } config = { runtime = 10000, - log-level = normal, - "numeric-solver" = "z3", + log-level = none, + "numeric-solver" = "dreal-local", "dreal-local-path" = "/home/models/dreal4/bazel-bin/dreal/dreal", "scopePropagator" = "typeHierarchy"} - runs = 1 + runs = 1 + number = 10 debug = "outputs/debug" log = "outputs/debug/log.txt" output = "outputs/models" diff --git a/Domains/crossingScenario/model/crossingScenario.aird b/Domains/crossingScenario/model/crossingScenario.aird index dbb8f664..3620b29d 100644 --- a/Domains/crossingScenario/model/crossingScenario.aird +++ b/Domains/crossingScenario/model/crossingScenario.aird @@ -1,1313 +1,1307 @@ - - - - crossingScenario.ecore - crossingScenario.genmodel - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - bold - - - labelSize - - - - - - - - - - labelSize - bold - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - bold - - - - - - - - - - - bold - - - - - - - - - - - - - - + + + + crossingScenario.ecore + crossingScenario.genmodel + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + bold + + + + + + + + + + + bold + + + + + + + + + + + + + + diff --git a/Domains/crossingScenario/model/crossingScenario.ecore b/Domains/crossingScenario/model/crossingScenario.ecore index f651db9f..b023a2fa 100644 --- a/Domains/crossingScenario/model/crossingScenario.ecore +++ b/Domains/crossingScenario/model/crossingScenario.ecore @@ -1,78 +1,76 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/crossingScenario/model/crossingScenario.genmodel b/Domains/crossingScenario/model/crossingScenario.genmodel index 8f1f1ddb..173681c0 100644 --- a/Domains/crossingScenario/model/crossingScenario.genmodel +++ b/Domains/crossingScenario/model/crossingScenario.genmodel @@ -1,65 +1,65 @@ - - - crossingScenario.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + crossingScenario.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/crossingScenario/queries/crossingScenarioQueries.vql b/Domains/crossingScenario/queries/crossingScenarioQueries.vql index f8bcc92c..03dafc97 100644 --- a/Domains/crossingScenario/queries/crossingScenarioQueries.vql +++ b/Domains/crossingScenario/queries/crossingScenarioQueries.vql @@ -16,7 +16,14 @@ import "http://www.eclipse.org/emf/2002/Ecore" //TODO Hard-code xSize? //TODO Hard-code ySize? + //TODO Hard-code maxTime? +//@Constraint(severity="error", key={l}, message="3 CrossingScenari") +//pattern define_cs_maxTime(cs:CrossingScenario) { +// CrossingScenario.maxTime(cs, mt); +// check(mt != 60.0); +//} + ////////////// //Lane @@ -195,14 +202,62 @@ pattern define_placedOn_actorOnHorizLane(a : Actor, hl:Lane_Horizontal) { //Actor ////////////// -////TODO +//Hard-coded stuff +//TODO THIS IS HARD_CODED +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_maxXp(a:Actor) { + Actor.xPos(a, xP); + check(xP >= 1000.0);} + +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_minXp(a:Actor) { + Actor.xPos(a, xP); + check(xP <= 0-1000.0);} + +//TODO THIS IS HARD_CODED +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_maxYp(a:Actor) { + Actor.yPos(a, yP); + check(yP >= 1000.0);} + +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_minYp(a:Actor) { + Actor.yPos(a, yP); + check(yP <= 0-1000.0);} + +//TODO THIS IS HARD_CODED +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_maxXs(a:Actor) { + Actor.xSpeed(a, xS); + check(xS >= 100.0);} + +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_minXs(a:Actor) { + Actor.xSpeed(a, xS); + check(xS <= 0-100.0);} + +//TODO THIS IS HARD_CODED +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_maxYs(a:Actor) { + Actor.ySpeed(a, yS); + check(yS >= 100.0);} + +@Constraint(severity="error", key={a}, message="x") +pattern define_actor_minYs(a:Actor) { + Actor.ySpeed(a, yS); + check(yS <= 0-100.0);} + + +//END Hard-coded stuff + +////TODO May be required /////////xPos of every actor mmust be within bounds defined in CS //@Constraint(severity="error", key={l}, message="1 Actor") //pattern define_actor_xPosWithinCSbounds(cs:CrossingScenario, a:Actor) { // //} // -////TODO +////TODO May be required /////////yPos of every actor mmust be within bounds defined in CS //@Constraint(severity="error", key={l}, message="2 Actor") //pattern define_actor_yPosWithinCSbounds(cs:CrossingScenario, a:Actor) { @@ -210,38 +265,47 @@ pattern define_placedOn_actorOnHorizLane(a : Actor, hl:Lane_Horizontal) { //} -/////////pedestrian-width (3) -//pattern define_actor_pedestrianWidth(p:Pedestrian) { -// Pedestrian.width(p, 1.0); -//} -// -///////////pedestrian-width (4) -//pattern define_actor_pedestrianLength(p:Pedestrian) { -// Pedestrian.length(p, 1.0); -//} +///////pedestrian-width (3) //TODO Derived? +@Constraint(severity="error", key={p}, message="3 Actor") +pattern define_actor_pedestrianWidth(p:Pedestrian) { + Pedestrian.width(p, w); + check(w != 1.0); +} -///////////actor-width (5) -//pattern define_actor_actorWidth(a:Actor) { -// Actor.placedOn(a, l); -// Lane_Vertical(l); -// Actor.width(p, 1.0); -//} or { -// Actor.placedOn(a, l); -// Lane_Horizontal(l); -// Actor.width(p, 3.0); -//} -// -///////////actor-width (6) -//pattern define_actor_actorLength(a:Actor) { -// Actor.placedOn(a, l); -// Lane_Vertical(l); -// Actor.length(p, 3.0); -//} or { -// Actor.placedOn(a, l); -// Lane_Horizontal(l); -// Actor.length(p, 1.0); -//} +/////////pedestrian-width (4) //TODO Derived? +@Constraint(severity="error", key={p}, message="4 Actor") +pattern define_actor_pedestrianLength(p:Pedestrian) { + Pedestrian.length(p, l); + check(l != 1.0); +} +/////////actor-width (5) //TODO Derived? +@Constraint(severity="error", key={v}, message="5 Actor") +pattern define_actor_vehicleWidth(v:Vehicle) { + Vehicle.placedOn(v, lane); + Lane_Vertical(lane); + Vehicle.width(v, w); + check(w != 1.0); +} or { + Vehicle.placedOn(v, lane); + Lane_Horizontal(lane); + Vehicle.width(v, w); + check(w != 3.0); +} + +/////////actor-width (6) //TODO Derived? +@Constraint(severity="error", key={v}, message="6 Actor") +pattern define_actor_vehicleLength(v:Vehicle) { + Vehicle.placedOn(v, lane); + Lane_Vertical(lane); + Vehicle.length(v, l); + check(l != 3.0); +} or { + Vehicle.placedOn(v, lane); + Lane_Horizontal(lane); + Vehicle.length(v, l); + check(l != 1.0); +} /////////xSpeed of actor on verticalLane is 0 @Constraint(severity="error", key={a}, message="7 Actor") @@ -259,88 +323,107 @@ pattern define_actor_actorOnHoriLaneHasySpeed0(a:Actor, hl:Lane_Horizontal) { check(ySpeed != 0); } -//////////////// -////CollisionExists -//////////////// -// +////////////// +//Relation +////////////// +@Constraint(severity="error", key={a1, a2}, message="1 Relation") +pattern define_relation_noSelfRelation(a1:Actor, a2:Actor) { + Actor.relations(a1, r); + Relation.target(r, a2); + a1 == a2; +} + +//TODO do above but transitively? + +////////////// +//CollisionExists +////////////// + +//TODO THIS IS HARD_CODED +@Constraint(severity="error", key={c}, message="x") +pattern collisionExists_timeWithinBound(c:CollisionExists) { + CollisionExists. collisionTime(c, cTime); + check(cTime >= 60.0);} + +//TODO replace above with this (more general) //@Constraint(severity="error", key={c}, message="x") //pattern collisionExists_timeWithinBound(ss:CrossingScenario, c:CollisionExists) { // CrossingScenario.actors.relations(ss, c); // CrossingScenario.maxTime(ss, maxTime); // CollisionExists. collisionTime(c, cTime); // check(cTime >= maxTime);} -// -//@Constraint(severity="error", key={c}, message="x") -//pattern collisionExists_timeNotNegative(c:CollisionExists) { -// CollisionExists. collisionTime(c, cTime); -// check(cTime <= 0);} -// -//@Constraint(severity="error", key={a1, c}, message="x") -//pattern collisionExists_defineCollision_y1(a1:Actor, a2:Actor, c:CollisionExists) { -// Actor.relations(a1, c); -// CollisionExists.target(c, a2); -// -// Actor.length(a1, l1); -// Actor.yPos(a1, yPos1); -// Actor.ySpeed(a1, ySpeed1); -// Actor.length(a2, l2); -// Actor.yPos(a2, yPos2); -// Actor.ySpeed(a2, ySpeed2); -// CollisionExists. collisionTime(c, cTime); -// //check(y_1_bottom > y_2_top -// check((yPos1 + (ySpeed1 * cTime)) - (l1/2) > (yPos2 + (ySpeed2 * cTime)) + (l2/2)); -//} -// -//@Constraint(severity="error", key={a1, c}, message="x") -//pattern collisionExists_defineCollision_y2(a1:Actor, a2:Actor, c:CollisionExists) { -// //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 -// Actor.relations(a1, c); -// CollisionExists.target(c, a2); -// -// Actor.length(a1, l1); -// Actor.yPos(a1, yPos1); -// Actor.ySpeed(a1, ySpeed1); -// Actor.length(a2, l2); -// Actor.yPos(a2, yPos2); -// Actor.ySpeed(a2, ySpeed2); -// CollisionExists. collisionTime(c, cTime); -// //check(y_1_top < y_2_bottom) -// check((yPos1 + (ySpeed1 * cTime)) + (l1/2) < (yPos2 + (ySpeed2 * cTime)) - (l2/2)); -//} -// -//@Constraint(severity="error", key={a1, c}, message="x") -//pattern collisionExists_defineCollision_x1(a1:Actor, a2:Actor, c:CollisionExists) { -// Actor.relations(a1, c); -// CollisionExists.target(c, a2); -// -// Actor.width(a1, w1); -// Actor.xPos(a1, xPos1); -// Actor.xSpeed(a1, xSpeed1); -// Actor.width(a2, w2); -// Actor.xPos(a2, xPos2); -// Actor.xSpeed(a2, xSpeed2); -// CollisionExists. collisionTime(c, cTime); -// //check(x_1_left > x_2_right) -// check((xPos1 + (xSpeed1 * cTime)) - (w1/2) > (xPos2 + (xSpeed2 * cTime)) + (w2/2)); -//} -// -//@Constraint(severity="error", key={a1, c}, message="x") -//pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor, c:CollisionExists) { -// //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 -// Actor.relations(a1, c); -// CollisionExists.target(c, a2); -// -// Actor.width(a1, w1); -// Actor.xPos(a1, xPos1); -// Actor.xSpeed(a1, xSpeed1); -// Actor.width(a2, w2); -// Actor.xPos(a2, xPos2); -// Actor.xSpeed(a2, xSpeed2); -// CollisionExists. collisionTime(c, cTime); -// //check(x_1_right < x_2_left) -// check((xPos1 + (xSpeed1 * cTime)) + (w1/2) < (xPos2 + (xSpeed2 * cTime)) - (w2/2)); -//} -// + +@Constraint(severity="error", key={c}, message="x") +pattern collisionExists_timeNotNegative(c:CollisionExists) { + CollisionExists. collisionTime(c, cTime); + check(cTime <= 0.0);} + +@Constraint(severity="error", key={a1, c}, message="x") +pattern collisionExists_defineCollision_y1(a1:Actor, a2:Actor, c:CollisionExists) { + Actor.relations(a1, c); + CollisionExists.target(c, a2); + + Actor.length(a1, l1); + Actor.yPos(a1, yPos1); + Actor.ySpeed(a1, ySpeed1); + Actor.length(a2, l2); + Actor.yPos(a2, yPos2); + Actor.ySpeed(a2, ySpeed2); + CollisionExists. collisionTime(c, cTime); + //check(y_1_bottom > y_2_top + check((yPos1 + (ySpeed1 * cTime)) - (l1/2) > (yPos2 + (ySpeed2 * cTime)) + (l2/2)); +} + +@Constraint(severity="error", key={a1, c}, message="x") +pattern collisionExists_defineCollision_y2(a1:Actor, a2:Actor, c:CollisionExists) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + Actor.relations(a1, c); + CollisionExists.target(c, a2); + + Actor.length(a1, l1); + Actor.yPos(a1, yPos1); + Actor.ySpeed(a1, ySpeed1); + Actor.length(a2, l2); + Actor.yPos(a2, yPos2); + Actor.ySpeed(a2, ySpeed2); + CollisionExists. collisionTime(c, cTime); + //check(y_1_top < y_2_bottom) + check((yPos1 + (ySpeed1 * cTime)) + (l1/2) < (yPos2 + (ySpeed2 * cTime)) - (l2/2)); +} + +@Constraint(severity="error", key={a1, c}, message="x") +pattern collisionExists_defineCollision_x1(a1:Actor, a2:Actor, c:CollisionExists) { + Actor.relations(a1, c); + CollisionExists.target(c, a2); + + Actor.width(a1, w1); + Actor.xPos(a1, xPos1); + Actor.xSpeed(a1, xSpeed1); + Actor.width(a2, w2); + Actor.xPos(a2, xPos2); + Actor.xSpeed(a2, xSpeed2); + CollisionExists. collisionTime(c, cTime); + //check(x_1_left > x_2_right) + check((xPos1 + (xSpeed1 * cTime)) - (w1/2) > (xPos2 + (xSpeed2 * cTime)) + (w2/2)); +} + +@Constraint(severity="error", key={a1, c}, message="x") +pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor, c:CollisionExists) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + Actor.relations(a1, c); + CollisionExists.target(c, a2); + + Actor.width(a1, w1); + Actor.xPos(a1, xPos1); + Actor.xSpeed(a1, xSpeed1); + Actor.width(a2, w2); + Actor.xPos(a2, xPos2); + Actor.xSpeed(a2, xSpeed2); + CollisionExists. collisionTime(c, cTime); + //check(x_1_right < x_2_left) + check((xPos1 + (xSpeed1 * cTime)) + (w1/2) < (xPos2 + (xSpeed2 * cTime)) - (w2/2)); +} + //////////////// ////SeparationDistance //////////////// diff --git a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java index c0646edd..9b8f10dc 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java +++ b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java @@ -15,7 +15,13 @@ public class CrossingScenarioMain { throw new IllegalStateException("This is a static utility class and should not be instantiated directly."); } - public static void main(String[] args) throws IOException { + public static void main(String[] args) throws IOException, InterruptedException { +// System.out.println(System.getProperty("java.library.path")); +//// System.setProperty("java.library.path", +//// "/home/models/VIATRA-Generator/Solvers/SMT-Solver/com.microsoft.z3/lib"); +// Thread.sleep(2000); +// System.out.println(System.getProperty("java.library.path")); +// System.loadLibrary("z3java"); String errorMessages = StandaloneScriptExecutor.executeScript("inputs/crossingScenarioGen.vsconfig"); if (errorMessages != null) { System.out.println(errorMessages); @@ -28,10 +34,11 @@ public class CrossingScenarioMain { int t2 = Integer.parseInt(times[4]); int t3 = Integer.parseInt(times[5]); int t4 = Integer.parseInt(times[6]); + int t5 = Integer.parseInt(times[7]); int tot = t1+t2+t3+t4; - System.out.println("domain2logic -> " + t1); - System.out.println("logic2solver -> " + t2); - System.out.println("solver -> " + t3); + System.out.println("preprocessingTime -> ~" + (t1+t2)); + System.out.println("sol0FoundAt -> " + (t5)); + System.out.println("solver -> ~" + t3); System.out.println("postprocessing -> " + t4); System.out.println("TOTAL -> " + tot); @@ -39,6 +46,6 @@ public class CrossingScenarioMain { String p1 = "outputs/models/1.xmi"; String p2 = "outputs/simplePrevLane.tgf"; QueryDebug.checkPrevLanes(p1, p2); - Desktop.getDesktop().open(new File(p2)); +// Desktop.getDesktop().open(new File(p2)); } } diff --git a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java index 51ace4b8..f9041e87 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java +++ b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java @@ -23,11 +23,16 @@ import crossingScenario.Lane; public class QueryDebug { public static void main(String[] args) throws FileNotFoundException { - checkPrevLanes("outputs/models/1.xmi", "outputs/simplePrevLane.tgf"); -// testOnInstance(); +// checkPrevLanes("outputs/models/1.xmi", "outputs/simplePrevLane.tgf"); + testOnInstance(); // miniRETest("21/2"); } + private static Double rndbl(Double in, int places) { + double scale = Math.pow(10, places); + return Math.round(in * scale) / scale; + } + public static void checkPrevLanes(String pathSrc, String pathTgt) throws FileNotFoundException { Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put("*", new XMIResourceFactoryImpl()); EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE); @@ -39,7 +44,7 @@ public class QueryDebug { CrossingScenario cs = ((CrossingScenario) res.getContents().get(0)); for (Actor o : cs.getActors()) { - String nodeName = "(" + o.getXPos()+","+o.getYPos() + ")"; + String nodeName = "A(" + rndbl(o.getXPos(), 1)+","+rndbl(o.getYPos(), 1) + ")"; printer.println(o.hashCode() + " " + nodeName); } @@ -48,7 +53,7 @@ public class QueryDebug { if (cs.getHorizontal_head().equals(o) || cs.getVertical_head().equals(o)) { prefix = "HEAD"; } - String nodeName = prefix + "(" + o.getReferenceCoord() + ")" + + String nodeName = prefix + "L(" + rndbl(o.getReferenceCoord(), 3) + ")" + o.eClass().getName().substring(5, 9); printer.println(o.hashCode() + " " + nodeName); } @@ -57,7 +62,7 @@ public class QueryDebug { if (o.getPrevLane() != null){ int curName = o.hashCode(); int curPrev = o.getPrevLane().hashCode(); - double edgeLabel = o.getPrevLane().getNumWidth(); + double edgeLabel = rndbl(o.getPrevLane().getNumWidth(), 1); printer.println(curName + " " + curPrev + " " + edgeLabel); } } @@ -82,14 +87,14 @@ public class QueryDebug { // ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(rs)); // // Access pattern matcher -// CrossingScenarioQueries.instance().prepare(engine); +// Queries.instance().prepare(engine); // -// Define_referenceCoord_laneWithPrevHasCorrectRefCoord.Matcher matcher = Define_referenceCoord_laneWithPrevHasCorrectRefCoord.Matcher.on(engine); +// X.Matcher matcher = X.Matcher.on(engine); // // Get and iterate over all matches // System.out.println("MATCHES:"); -// for (Define_referenceCoord_laneWithPrevHasCorrectRefCoord.Match match : matcher.getAllMatches()) { +// for (X.Match match : matcher.getAllMatches()) { // // Print all the matches to the standard output -// System.out.println(match.getL()); +// System.out.println(match.getP()); // } } diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java index 1ce3af06..30e68260 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java @@ -23,6 +23,7 @@ import org.eclipse.xtext.xbase.XBinaryOperation; import org.eclipse.xtext.xbase.XExpression; import org.eclipse.xtext.xbase.XFeatureCall; import org.eclipse.xtext.xbase.XNumberLiteral; +import org.eclipse.xtext.xbase.XUnaryOperation; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement; @@ -35,6 +36,7 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ private String containerName = ""; private String drealLocalPath = ""; private final String smtFileName = "tmp/smt.smt2"; + private final File localTempFile = File.createTempFile("smt", ".smt2"); private Map varMap; private Map curVar2Decl; @@ -76,11 +78,12 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ } private Process callDrealDocker(List numProbContents, boolean getModel) throws IOException, InterruptedException { + //TODO currently not working for Linux String numProbContentStr = String.join("\\n", numProbContents); List drealCmd = new ArrayList(Arrays.asList( "docker", "exec", containerName, "bash", "-c", - "\""+ "printf", + "\"printf " + "\'" + numProbContentStr + "\'", ">", smtFileName, @@ -89,14 +92,14 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ if (getModel) {drealCmd.add("--model");} drealCmd.add(smtFileName + "\""); +// System.out.println(drealCmd); +// return runProcess(drealCmd, TIMEOUT_DOCKER); } private Process callDrealLocal(List numProbContents, boolean getModel) throws IOException, InterruptedException { //print numProbConents to temp file - File tempFile = File.createTempFile("smt", ".smt2"); - - PrintWriter printer = new PrintWriter(tempFile); + PrintWriter printer = new PrintWriter(localTempFile); for (String s : numProbContents) { printer.println(s); } @@ -106,9 +109,9 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ List drealCmd = new ArrayList(); drealCmd.add(drealLocalPath); if (getModel) {drealCmd.add("--model");} - drealCmd.add(tempFile.getAbsolutePath()); + drealCmd.add(localTempFile.getAbsolutePath()); - System.out.println(drealCmd); +// System.out.println(drealCmd); return runProcess(drealCmd, TIMEOUT_LOCAL); } @@ -244,6 +247,13 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ } expr = "(" + operator + " " + left_operand + " " + right_operand + ")"; + } + else if (e instanceof XUnaryOperation){ + String name = ((XUnaryOperation) e).getFeature().getQualifiedName(); + System.out.println(name); + String op = ((XUnaryOperation) e).getOperand().toString(); + System.out.println(op); + throw new Exception ("Unsupported expression " + e.getClass().getSimpleName()); } else { throw new Exception ("Unsupported expression " + e.getClass().getSimpleName()); } @@ -327,7 +337,7 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ //DEBUG - Print things // printOutput(numProbContent); // printOutput(outputs.get(0)); -// System.out.println(result); + System.out.println(result); //END DEBUG return result; @@ -335,15 +345,25 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ private Map parseDrealOutput(List output) { Map res = new HashMap(); - String re = "(\\w+) : \\[([0-9\\-+.e]+), ([0-9\\-+.e]+)\\]"; - Pattern p = Pattern.compile(re); + String re1 = "(\\w+) : \\[([0-9\\-+.e]+), ([0-9\\-+.e]+)\\]"; + Pattern p1 = Pattern.compile(re1); + String re2 = "(\\w+) : <([0-9\\-+.e]+), ([0-9\\-+.e]+)>"; + Pattern p2 = Pattern.compile(re2); for (String varVal : output) { - Matcher m = p.matcher(varVal); - if (m.matches()) { - String name = m.group(1); - String lowerB = m.group(2); - String upperB = m.group(2); + Matcher m1 = p1.matcher(varVal); + Matcher m2 = p2.matcher(varVal); + if (m1.matches()) { + String name = m1.group(1); + String lowerB = m1.group(2); + String upperB = m1.group(3); res.put(name, lowerB); + } else { + if (m2.matches()) { + String name = m2.group(1); + String lowerB = m2.group(2); + String upperB = m2.group(3); + res.put(name, lowerB); + } } } return res; @@ -363,8 +383,8 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ long startSolvingProblem = System.nanoTime(); Process outputProcess; - if (this.useDocker) outputProcess = callDrealDocker(numProbContent, false); - else outputProcess = callDrealLocal(numProbContent, false); + if (this.useDocker) outputProcess = callDrealDocker(numProbContent, true); + else outputProcess = callDrealLocal(numProbContent, true); List> outputs = getProcessOutput(outputProcess); boolean result = getDrealResult(outputProcess.exitValue(), outputs); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java index 4b7cead1..a8d2381c 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java @@ -37,6 +37,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.PartialInterpretation2Logic; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedPartialInterpretationStateCoder; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualisation; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualiser; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod; @@ -304,6 +305,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { public List times = new LinkedList(); private void saveTimes() { + long statecoderTime = ((NeighbourhoodBasedPartialInterpretationStateCoder)this.context.getStateCoder()).getStatecoderRuntime()/1000000; long forwardTime = context.getDesignSpaceManager().getForwardTime()/1000000; long backtrackingTime = context.getDesignSpaceManager().getBacktrackingTime()/1000000; long activationSelection = this.activationSelector.getRuntime()/1000000; @@ -314,6 +316,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { long numericalSolverInterpreting = this.numericSolver.getSolverSolution()/1000000; this.times.add( "(TransformationExecutionTime"+method.getStatistics().transformationExecutionTime/1000000+ + "|StateCoderTime:"+statecoderTime+ "|ForwardTime:"+forwardTime+ "|Backtrackingtime:"+backtrackingTime+ "|GlobalConstraintEvaluationTime:"+(globalConstraintEvaluationTime/1000000)+ diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/MODELS2020Plots-temp.ipynb b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/MODELS2020Plots-temp.ipynb index 3ced7f5b..b91d8e53 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/MODELS2020Plots-temp.ipynb +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/MODELS2020Plots-temp.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 1, "metadata": { "scrolled": true }, @@ -25,6 +25,23 @@ "name": "stderr", "output_type": "stream", "text": [ + "Loading required package: tidyverse\n", + "\n", + "── \u001b[1mAttaching packages\u001b[22m ─────────────────────────────────────── tidyverse 1.3.0 ──\n", + "\n", + "\u001b[32m✔\u001b[39m \u001b[34mggplot2\u001b[39m 3.3.2 \u001b[32m✔\u001b[39m \u001b[34mpurrr \u001b[39m 0.3.4\n", + "\u001b[32m✔\u001b[39m \u001b[34mtibble \u001b[39m 3.0.3 \u001b[32m✔\u001b[39m \u001b[34mdplyr \u001b[39m 1.0.0\n", + "\u001b[32m✔\u001b[39m \u001b[34mtidyr \u001b[39m 1.1.0 \u001b[32m✔\u001b[39m \u001b[34mstringr\u001b[39m 1.4.0\n", + "\u001b[32m✔\u001b[39m \u001b[34mreadr \u001b[39m 1.3.1 \u001b[32m✔\u001b[39m \u001b[34mforcats\u001b[39m 0.5.0\n", + "\n", + "Warning message:\n", + "“package ‘ggplot2’ was built under R version 4.0.1”\n", + "Warning message:\n", + "“package ‘tibble’ was built under R version 4.0.2”\n", + "── \u001b[1mConflicts\u001b[22m ────────────────────────────────────────── tidyverse_conflicts() ──\n", + "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mfilter()\u001b[39m masks \u001b[34mstats\u001b[39m::filter()\n", + "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mlag()\u001b[39m masks \u001b[34mstats\u001b[39m::lag()\n", + "\n", "Warning message in dir.create(\"plots\"):\n", "“'plots' already exists”\n" ] @@ -37,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 2, "metadata": { "scrolled": false }, @@ -48,7 +65,7 @@ " str <- sub('Backtrackingtime', 'BacktrackingTime', str)\n", " str <- gsub('\\\\(|\\\\)', '', str)\n", " str <- lapply(strsplit(str, '\\\\||:'), function (v) {\n", - " dim(v) <- c(2, 11)\n", + " dim(v) <- c(2, 12)\n", " values <- as.double(v[2,])\n", " names(values) <- v[1,]\n", " as.data.frame(t(values))\n", @@ -76,13 +93,12 @@ " Solution0FoundAt = Solution0FoundAt,\n", " additionalTime = Solution9FoundAt - Solution0FoundAt,\n", " Solution1DetailedStatistics = ProcessDetailedStatistics(Solution1DetailedStatistics)\n", - " ) %>% unnest()\n", - "# %>% unnest() %>% mutate(\n", - "# # (Logical) constraint evluation should count as refinement.\n", - "# ForwardTime = ForwardTime + GlobalConstraintEvaluationTime + FitnessCalculationTime,\n", - "# preprocessingTime = preprocessingTime,\n", - "# BacktrackingTime = Solution0FoundAt - (StateCoderTime + ForwardTime + NumericalSolverSumTime)\n", - "# ) %>% select(n, Run, preprocessingTime, StateCoderTime, ForwardTime, BacktrackingTime, NumericalSolverSumTime, additionalTime)\n", + " ) %>% unnest() %>% mutate(\n", + " # (Logical) constraint evluation should count as refinement.\n", + " ForwardTime = ForwardTime + GlobalConstraintEvaluationTime + FitnessCalculationTime,\n", + " preprocessingTime = preprocessingTime,\n", + " BacktrackingTime = Solution0FoundAt - (StateCoderTime + ForwardTime + NumericalSolverSumTime)\n", + " ) %>% select(n, Run, preprocessingTime, StateCoderTime, ForwardTime, BacktrackingTime, NumericalSolverSumTime, additionalTime)\n", "}\n", "Load1Log <- function(filename, size) {\n", " read_csv(filename, col_types = cols(\n", @@ -104,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -130,7 +146,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -159,7 +175,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -175,165 +191,134 @@ "data": { "text/html": [ "\n", - "\n", + "\n", "\n", - "\t\n", - "\t\n", + "\t\n", + "\t\n", "\n", "\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", + "\t\n", "\n", "
A tibble: 10 × 16A tibble: 1 × 8
nRunpreprocessingTimeSolution0FoundAtadditionalTimeTransformationExecutionTimeForwardTimeBacktrackingTimeGlobalConstraintEvaluationTimeFitnessCalculationTimeActivationSelectionTimeSolutionCopyTimeNumericalSolverSumTimeNumericalSolverProblemFormingTimeNumericalSolverSolvingTimeNumericalSolverInterpretingSolution
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
nRunpreprocessingTimeStateCoderTimeForwardTimeBacktrackingTimeNumericalSolverSumTimeadditionalTime
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
20 110385248398031225108101014675223922390
20 2 7244132362820155 76 61003780201920190
20 3 7355329443720195106 62004876258825880
20 4 6944261492016150 69 51003925208520850
20 5 8885959508618200 93 81005490294629460
20 6 6656310432017195 90 61005870316731670
20 7 6045024573814165 74 41004662246424640
20 8 5895733391715181 81 41005337282728270
20 9 7054719425914156 71 41024367239023900
2010 5544061399013141 68 31003741199119910
2011473599418901272439114750
\n" ], "text/latex": [ - "A tibble: 10 × 16\n", - "\\begin{tabular}{llllllllllllllll}\n", - " n & Run & preprocessingTime & Solution0FoundAt & additionalTime & TransformationExecutionTime & ForwardTime & BacktrackingTime & GlobalConstraintEvaluationTime & FitnessCalculationTime & ActivationSelectionTime & SolutionCopyTime & NumericalSolverSumTime & NumericalSolverProblemFormingTime & NumericalSolverSolvingTime & NumericalSolverInterpretingSolution\\\\\n", - " & & & & & & & & & & & & & & & \\\\\n", + "A tibble: 1 × 8\n", + "\\begin{tabular}{llllllll}\n", + " n & Run & preprocessingTime & StateCoderTime & ForwardTime & BacktrackingTime & NumericalSolverSumTime & additionalTime\\\\\n", + " & & & & & & & \\\\\n", "\\hline\n", - "\t 20 & 1 & 1038 & 5248 & 3980 & 31 & 225 & 108 & 10 & 1 & 0 & 1 & 4675 & 2239 & 2239 & 0\\\\\n", - "\t 20 & 2 & 724 & 4132 & 3628 & 20 & 155 & 76 & 6 & 1 & 0 & 0 & 3780 & 2019 & 2019 & 0\\\\\n", - "\t 20 & 3 & 735 & 5329 & 4437 & 20 & 195 & 106 & 6 & 2 & 0 & 0 & 4876 & 2588 & 2588 & 0\\\\\n", - "\t 20 & 4 & 694 & 4261 & 4920 & 16 & 150 & 69 & 5 & 1 & 0 & 0 & 3925 & 2085 & 2085 & 0\\\\\n", - "\t 20 & 5 & 888 & 5959 & 5086 & 18 & 200 & 93 & 8 & 1 & 0 & 0 & 5490 & 2946 & 2946 & 0\\\\\n", - "\t 20 & 6 & 665 & 6310 & 4320 & 17 & 195 & 90 & 6 & 1 & 0 & 0 & 5870 & 3167 & 3167 & 0\\\\\n", - "\t 20 & 7 & 604 & 5024 & 5738 & 14 & 165 & 74 & 4 & 1 & 0 & 0 & 4662 & 2464 & 2464 & 0\\\\\n", - "\t 20 & 8 & 589 & 5733 & 3917 & 15 & 181 & 81 & 4 & 1 & 0 & 0 & 5337 & 2827 & 2827 & 0\\\\\n", - "\t 20 & 9 & 705 & 4719 & 4259 & 14 & 156 & 71 & 4 & 1 & 0 & 2 & 4367 & 2390 & 2390 & 0\\\\\n", - "\t 20 & 10 & 554 & 4061 & 3990 & 13 & 141 & 68 & 3 & 1 & 0 & 0 & 3741 & 1991 & 1991 & 0\\\\\n", + "\t 20 & 1 & 14735 & 994 & 1890 & 1272 & 4391 & 14750\\\\\n", "\\end{tabular}\n" ], "text/markdown": [ "\n", - "A tibble: 10 × 16\n", + "A tibble: 1 × 8\n", "\n", - "| n <dbl> | Run <dbl> | preprocessingTime <dbl> | Solution0FoundAt <dbl> | additionalTime <dbl> | TransformationExecutionTime <dbl> | ForwardTime <dbl> | BacktrackingTime <dbl> | GlobalConstraintEvaluationTime <dbl> | FitnessCalculationTime <dbl> | ActivationSelectionTime <dbl> | SolutionCopyTime <dbl> | NumericalSolverSumTime <dbl> | NumericalSolverProblemFormingTime <dbl> | NumericalSolverSolvingTime <dbl> | NumericalSolverInterpretingSolution <dbl> |\n", - "|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n", - "| 20 | 1 | 1038 | 5248 | 3980 | 31 | 225 | 108 | 10 | 1 | 0 | 1 | 4675 | 2239 | 2239 | 0 |\n", - "| 20 | 2 | 724 | 4132 | 3628 | 20 | 155 | 76 | 6 | 1 | 0 | 0 | 3780 | 2019 | 2019 | 0 |\n", - "| 20 | 3 | 735 | 5329 | 4437 | 20 | 195 | 106 | 6 | 2 | 0 | 0 | 4876 | 2588 | 2588 | 0 |\n", - "| 20 | 4 | 694 | 4261 | 4920 | 16 | 150 | 69 | 5 | 1 | 0 | 0 | 3925 | 2085 | 2085 | 0 |\n", - "| 20 | 5 | 888 | 5959 | 5086 | 18 | 200 | 93 | 8 | 1 | 0 | 0 | 5490 | 2946 | 2946 | 0 |\n", - "| 20 | 6 | 665 | 6310 | 4320 | 17 | 195 | 90 | 6 | 1 | 0 | 0 | 5870 | 3167 | 3167 | 0 |\n", - "| 20 | 7 | 604 | 5024 | 5738 | 14 | 165 | 74 | 4 | 1 | 0 | 0 | 4662 | 2464 | 2464 | 0 |\n", - "| 20 | 8 | 589 | 5733 | 3917 | 15 | 181 | 81 | 4 | 1 | 0 | 0 | 5337 | 2827 | 2827 | 0 |\n", - "| 20 | 9 | 705 | 4719 | 4259 | 14 | 156 | 71 | 4 | 1 | 0 | 2 | 4367 | 2390 | 2390 | 0 |\n", - "| 20 | 10 | 554 | 4061 | 3990 | 13 | 141 | 68 | 3 | 1 | 0 | 0 | 3741 | 1991 | 1991 | 0 |\n", + "| n <dbl> | Run <dbl> | preprocessingTime <dbl> | StateCoderTime <dbl> | ForwardTime <dbl> | BacktrackingTime <dbl> | NumericalSolverSumTime <dbl> | additionalTime <dbl> |\n", + "|---|---|---|---|---|---|---|---|\n", + "| 20 | 1 | 14735 | 994 | 1890 | 1272 | 4391 | 14750 |\n", "\n" ], "text/plain": [ - " n Run preprocessingTime Solution0FoundAt additionalTime\n", - "1 20 1 1038 5248 3980 \n", - "2 20 2 724 4132 3628 \n", - "3 20 3 735 5329 4437 \n", - "4 20 4 694 4261 4920 \n", - "5 20 5 888 5959 5086 \n", - "6 20 6 665 6310 4320 \n", - "7 20 7 604 5024 5738 \n", - "8 20 8 589 5733 3917 \n", - "9 20 9 705 4719 4259 \n", - "10 20 10 554 4061 3990 \n", - " TransformationExecutionTime ForwardTime BacktrackingTime\n", - "1 31 225 108 \n", - "2 20 155 76 \n", - "3 20 195 106 \n", - "4 16 150 69 \n", - "5 18 200 93 \n", - "6 17 195 90 \n", - "7 14 165 74 \n", - "8 15 181 81 \n", - "9 14 156 71 \n", - "10 13 141 68 \n", - " GlobalConstraintEvaluationTime FitnessCalculationTime\n", - "1 10 1 \n", - "2 6 1 \n", - "3 6 2 \n", - "4 5 1 \n", - "5 8 1 \n", - "6 6 1 \n", - "7 4 1 \n", - "8 4 1 \n", - "9 4 1 \n", - "10 3 1 \n", - " ActivationSelectionTime SolutionCopyTime NumericalSolverSumTime\n", - "1 0 1 4675 \n", - "2 0 0 3780 \n", - "3 0 0 4876 \n", - "4 0 0 3925 \n", - "5 0 0 5490 \n", - "6 0 0 5870 \n", - "7 0 0 4662 \n", - "8 0 0 5337 \n", - "9 0 2 4367 \n", - "10 0 0 3741 \n", - " NumericalSolverProblemFormingTime NumericalSolverSolvingTime\n", - "1 2239 2239 \n", - "2 2019 2019 \n", - "3 2588 2588 \n", - "4 2085 2085 \n", - "5 2946 2946 \n", - "6 3167 3167 \n", - "7 2464 2464 \n", - "8 2827 2827 \n", - "9 2390 2390 \n", - "10 1991 1991 \n", - " NumericalSolverInterpretingSolution\n", - "1 0 \n", - "2 0 \n", - "3 0 \n", - "4 0 \n", - "5 0 \n", - "6 0 \n", - "7 0 \n", - "8 0 \n", - "9 0 \n", - "10 0 " + " n Run preprocessingTime StateCoderTime ForwardTime BacktrackingTime\n", + "1 20 1 14735 994 1890 1272 \n", + " NumericalSolverSumTime additionalTime\n", + "1 4391 14750 " ] }, "metadata": {}, "output_type": "display_data" }, { - "ename": "ERROR", - "evalue": "Error: Problem with `summarise()` input `StateCoderTime`.\n\u001b[31m✖\u001b[39m object 'StateCoderTime' not found\n\u001b[34mℹ\u001b[39m Input `StateCoderTime` is `median(StateCoderTime)/1000`.\n\u001b[34mℹ\u001b[39m The error occurred in group 1: n = 20.\n", - "output_type": "error", - "traceback": [ - "Error: Problem with `summarise()` input `StateCoderTime`.\n\u001b[31m✖\u001b[39m object 'StateCoderTime' not found\n\u001b[34mℹ\u001b[39m Input `StateCoderTime` is `median(StateCoderTime)/1000`.\n\u001b[34mℹ\u001b[39m The error occurred in group 1: n = 20.\nTraceback:\n", - "1. FamilyTreeRQ2Raw %>% ProcessRQ2", - "2. ProcessRQ2(.)", - "3. df %>% group_by(n) %>% summarize(.groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n . StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n . BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n . additionalTime = median(additionalTime)/1000) # at line 8-16 of file ", - "4. summarize(., .groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n . StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n . BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n . additionalTime = median(additionalTime)/1000)", - "5. summarise.grouped_df(., .groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n . StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n . BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n . additionalTime = median(additionalTime)/1000)", - "6. summarise_cols(.data, ...)", - "7. withCallingHandlers({\n . for (i in seq_along(dots)) {\n . quo <- dots[[i]]\n . chunks[[i]] <- mask$eval_all_summarise(quo)\n . mask$across_cache_reset()\n . result_type <- types[[i]] <- withCallingHandlers(vec_ptype_common(!!!chunks[[i]]), \n . vctrs_error_incompatible_type = function(cnd) {\n . abort(class = \"dplyr:::error_summarise_incompatible_combine\", \n . parent = cnd)\n . })\n . if ((is.null(dots_names) || dots_names[i] == \"\") && is.data.frame(result_type)) {\n . map2(seq_along(result_type), names(result_type), \n . function(j, nm) {\n . mask$add(nm, pluck(chunks[[i]], j))\n . })\n . }\n . else {\n . mask$add(auto_named_dots[i], chunks[[i]])\n . }\n . }\n . recycle_info <- .Call(dplyr_summarise_recycle_chunks, chunks, \n . mask$get_rows(), types)\n . chunks <- recycle_info$chunks\n . sizes <- recycle_info$sizes\n . for (i in seq_along(dots)) {\n . result <- vec_c(!!!chunks[[i]], .ptype = types[[i]])\n . if ((is.null(dots_names) || dots_names[i] == \"\") && is.data.frame(result)) {\n . cols[names(result)] <- result\n . }\n . else {\n . cols[[auto_named_dots[i]]] <- result\n . }\n . }\n . }, error = function(e) {\n . local_call_step(dots = dots, .index = i, .fn = \"summarise\", \n . .dot_data = inherits(e, \"rlang_error_data_pronoun_not_found\"))\n . call_step <- peek_call_step()\n . error_name <- call_step$error_name\n . if (inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n . bullets <- c(x = glue(\"Input `{error_name}` must return compatible vectors across groups\", \n . .envir = peek_call_step()), i = cnd_bullet_combine_details(e$parent$x, \n . e$parent$x_arg), i = cnd_bullet_combine_details(e$parent$y, \n . e$parent$y_arg))\n . }\n . else if (inherits(e, \"dplyr:::summarise_unsupported_type\")) {\n . bullets <- c(x = glue(\"Input `{error_name}` must be a vector, not {friendly_type_of(result)}.\", \n . result = e$result), i = cnd_bullet_rowwise_unlist())\n . }\n . else if (inherits(e, \"dplyr:::summarise_incompatible_size\")) {\n . peek_mask()$set_current_group(e$group)\n . bullets <- c(x = glue(\"Input `{error_name}` must be size {or_1(expected_size)}, not {size}.\", \n . expected_size = e$expected_size, size = e$size), \n . i = glue(\"An earlier column had size {expected_size}.\", \n . expected_size = e$expected_size))\n . }\n . else {\n . bullets <- c(x = conditionMessage(e))\n . }\n . bullets <- c(cnd_bullet_header(), bullets, i = cnd_bullet_input_info())\n . if (!inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n . bullets <- c(bullets, i = cnd_bullet_cur_group_label())\n . }\n . abort(bullets, class = \"dplyr_error\")\n . })", - "8. mask$eval_all_summarise(quo)", - "9. median(StateCoderTime)", - "10. .handleSimpleError(function (e) \n . {\n . local_call_step(dots = dots, .index = i, .fn = \"summarise\", \n . .dot_data = inherits(e, \"rlang_error_data_pronoun_not_found\"))\n . call_step <- peek_call_step()\n . error_name <- call_step$error_name\n . if (inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n . bullets <- c(x = glue(\"Input `{error_name}` must return compatible vectors across groups\", \n . .envir = peek_call_step()), i = cnd_bullet_combine_details(e$parent$x, \n . e$parent$x_arg), i = cnd_bullet_combine_details(e$parent$y, \n . e$parent$y_arg))\n . }\n . else if (inherits(e, \"dplyr:::summarise_unsupported_type\")) {\n . bullets <- c(x = glue(\"Input `{error_name}` must be a vector, not {friendly_type_of(result)}.\", \n . result = e$result), i = cnd_bullet_rowwise_unlist())\n . }\n . else if (inherits(e, \"dplyr:::summarise_incompatible_size\")) {\n . peek_mask()$set_current_group(e$group)\n . bullets <- c(x = glue(\"Input `{error_name}` must be size {or_1(expected_size)}, not {size}.\", \n . expected_size = e$expected_size, size = e$size), \n . i = glue(\"An earlier column had size {expected_size}.\", \n . expected_size = e$expected_size))\n . }\n . else {\n . bullets <- c(x = conditionMessage(e))\n . }\n . bullets <- c(cnd_bullet_header(), bullets, i = cnd_bullet_input_info())\n . if (!inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n . bullets <- c(bullets, i = cnd_bullet_cur_group_label())\n . }\n . abort(bullets, class = \"dplyr_error\")\n . }, \"object 'StateCoderTime' not found\", base::quote(median(StateCoderTime)))", - "11. h(simpleError(msg, call))", - "12. abort(bullets, class = \"dplyr_error\")", - "13. signal_abort(cnd)" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\t\n", + "\t\n", + "\n", + "\n", + "\t\n", + "\n", + "
A tibble: 1 × 7
npreprocessingTimeStateCoderTimeForwardTimeBacktrackingTimeNumericalSolverSumTimeadditionalTime
<dbl><dbl><dbl><dbl><dbl><dbl><dbl>
2014.7350.9941.891.2724.39114.75
\n" + ], + "text/latex": [ + "A tibble: 1 × 7\n", + "\\begin{tabular}{lllllll}\n", + " n & preprocessingTime & StateCoderTime & ForwardTime & BacktrackingTime & NumericalSolverSumTime & additionalTime\\\\\n", + " & & & & & & \\\\\n", + "\\hline\n", + "\t 20 & 14.735 & 0.994 & 1.89 & 1.272 & 4.391 & 14.75\\\\\n", + "\\end{tabular}\n" + ], + "text/markdown": [ + "\n", + "A tibble: 1 × 7\n", + "\n", + "| n <dbl> | preprocessingTime <dbl> | StateCoderTime <dbl> | ForwardTime <dbl> | BacktrackingTime <dbl> | NumericalSolverSumTime <dbl> | additionalTime <dbl> |\n", + "|---|---|---|---|---|---|---|\n", + "| 20 | 14.735 | 0.994 | 1.89 | 1.272 | 4.391 | 14.75 |\n", + "\n" + ], + "text/plain": [ + " n preprocessingTime StateCoderTime ForwardTime BacktrackingTime\n", + "1 20 14.735 0.994 1.89 1.272 \n", + " NumericalSolverSumTime additionalTime\n", + "1 4.391 14.75 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "14.735" + ], + "text/latex": [ + "14.735" + ], + "text/markdown": [ + "14.735" + ], + "text/plain": [ + "[1] 14.735" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAC+lBMVEUAAAABAQECAgIDAwME\nBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg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W5uJg+tPJQSCu/NPh3T+WVxZc6Ia3ab4fOxdB6\n63YMfiPd/t6yXL3l8N8FDYfUZWsdlxRfbC33f1PsH7jfCGl0tENa95t7Fnd3Qip327F9m+AD\nmz+9dtu3ti5Q7t+kdfm/19btO3RXnrV6OKR1b99ufvtxzcHFP3dCOnWz2wb/5IV1OwavkS45\ntSzv/q3hTQ6H9PJbu+vI9g3yB4sLS9dIPRDS6GiHVJ5btKd5O6Qbxxz0jW+dXFzQvuF26Ff/\n584TW1P71rETrvz22WOPW+/29/e23OrEz1723ycUH+vcbLi2mNq+AX7z/PXW7Tirc9fupMvK\n8oszhjf5Qkgvu7VHt5pw+c1f3ud1D5blsvEzSqoR0ujohLRgk4vLwZDKm967xfg9rmgN1pz5\nhnHv/vqp41rDf/pPW419x6dXr//f2t07863jN9vhD79SdkI67fkbBOest27H94ovtNe4qyxP\n+9zwJl8I6eW3dveHth+744d+XLZvR1wzCoeimYTUBKvf+vuJj/njbZ9JfExfElIjXFl8v/cP\nuW/Mp3v/kH4lpEZYe+DuK3r+jAP26Pkz+peQmmGg8/NIPfnz1y9I7EmfEhIECAkChAQBQoIA\nIUGAkCBASBAgJAj4/xrea7N1kYKMAAAAAElFTkSuQmCC", + "text/plain": [ + "plot without title" + ] + }, + "metadata": { + "image/png": { + "height": 420, + "width": 420 + }, + "text/plain": { + "height": 420, + "width": 420 + } + }, + "output_type": "display_data" } ], "source": [ "FamilyTreeRQ2Raw <- rbind(\n", "# Load10Log(\"measurements/stats/FamilyTree//size010to-1r10n10rt300nsdrealstats_06-0249.csv\", 10),\n", - " Load10Log(\"measurements/stats/FamilyTree//size020to-1r10n10rt3600nsz3stats_06-0205.csv\", 20)\n", + " Load10Log(\"measurements1/stats.csv\", 20)\n", ")\n", "FamilyTreeRQ2Raw\n", "FamilyTreeRQ2 <- FamilyTreeRQ2Raw %>% ProcessRQ2\n", "FamilyTreeRQ2\n", - "# median(FamilyTreeRQ2Raw$preprocessingTime) / 1000.0\n", - "# FamilyTreeRQ2 %>% RQ2Plot('FamilyTree')" + "median(FamilyTreeRQ2Raw$preprocessingTime) / 1000.0\n", + "FamilyTreeRQ2 %>% RQ2Plot('FamilyTree')" ] }, { @@ -356,7 +341,7 @@ "mimetype": "text/x-r-source", "name": "R", "pygments_lexer": "r", - "version": "4.0.3" + "version": "4.0.0" } }, "nbformat": 4, diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/plots/plot_RQ2_FamilyTree.pdf b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/plots/plot_RQ2_FamilyTree.pdf new file mode 100644 index 00000000..51da9fe0 Binary files /dev/null and b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/plots/plot_RQ2_FamilyTree.pdf differ -- cgit v1.2.3-54-g00ecf