aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Aren Babikian <aren.babikian@mail.mcgill.ca>2021-01-22 04:27:36 +0100
committerLibravatar Aren Babikian <aren.babikian@mail.mcgill.ca>2021-01-22 04:27:36 +0100
commitbb6fa1913dc4eb0e9d3bfd680797ee38c77e77c8 (patch)
treeceb0e2135361fbb7ad2a99f65c21cae17bc70ad5
parentimplement ignored attribute values as a config option (diff)
downloadVIATRA-Generator-bb6fa1913dc4eb0e9d3bfd680797ee38c77e77c8.tar.gz
VIATRA-Generator-bb6fa1913dc4eb0e9d3bfd680797ee38c77e77c8.tar.zst
VIATRA-Generator-bb6fa1913dc4eb0e9d3bfd680797ee38c77e77c8.zip
Issue where blocker is not between source and target
-rw-r--r--Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java48
-rw-r--r--Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java58
-rw-r--r--Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java112
-rw-r--r--Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java24
-rw-r--r--Domains/crossingScenario/inputs/cSinit4x4.xmi7
-rw-r--r--Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig2
-rw-r--r--Domains/crossingScenario/model/crossingScenario.aird42
-rw-r--r--Domains/crossingScenario/model/crossingScenario.ecore4
-rw-r--r--Domains/crossingScenario/model/crossingScenario.genmodel2
-rw-r--r--Domains/crossingScenario/queries/crossingScenarioQueries.vql280
-rw-r--r--Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java23
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend13
12 files changed, 506 insertions, 109 deletions
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java
index 0e9f4981..0f8eb79b 100644
--- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java
+++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java
@@ -21,6 +21,8 @@ import org.eclipse.emf.ecore.EObject;
21 * <li>{@link crossingScenario.CrossingScenario#getLanes <em>Lanes</em>}</li> 21 * <li>{@link crossingScenario.CrossingScenario#getLanes <em>Lanes</em>}</li>
22 * <li>{@link crossingScenario.CrossingScenario#getMaxTime <em>Max Time</em>}</li> 22 * <li>{@link crossingScenario.CrossingScenario#getMaxTime <em>Max Time</em>}</li>
23 * <li>{@link crossingScenario.CrossingScenario#getRelations <em>Relations</em>}</li> 23 * <li>{@link crossingScenario.CrossingScenario#getRelations <em>Relations</em>}</li>
24 * <li>{@link crossingScenario.CrossingScenario#getMaxXSpeed <em>Max XSpeed</em>}</li>
25 * <li>{@link crossingScenario.CrossingScenario#getMaxYSpeed <em>Max YSpeed</em>}</li>
24 * </ul> 26 * </ul>
25 * 27 *
26 * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario() 28 * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario()
@@ -130,4 +132,50 @@ public interface CrossingScenario extends EObject {
130 */ 132 */
131 EList<Relation> getRelations(); 133 EList<Relation> getRelations();
132 134
135 /**
136 * Returns the value of the '<em><b>Max XSpeed</b></em>' attribute.
137 * The default value is <code>"0.0"</code>.
138 * <!-- begin-user-doc -->
139 * <!-- end-user-doc -->
140 * @return the value of the '<em>Max XSpeed</em>' attribute.
141 * @see #setMaxXSpeed(double)
142 * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxXSpeed()
143 * @model default="0.0"
144 * @generated
145 */
146 double getMaxXSpeed();
147
148 /**
149 * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxXSpeed <em>Max XSpeed</em>}' attribute.
150 * <!-- begin-user-doc -->
151 * <!-- end-user-doc -->
152 * @param value the new value of the '<em>Max XSpeed</em>' attribute.
153 * @see #getMaxXSpeed()
154 * @generated
155 */
156 void setMaxXSpeed(double value);
157
158 /**
159 * Returns the value of the '<em><b>Max YSpeed</b></em>' attribute.
160 * The default value is <code>"0.0"</code>.
161 * <!-- begin-user-doc -->
162 * <!-- end-user-doc -->
163 * @return the value of the '<em>Max YSpeed</em>' attribute.
164 * @see #setMaxYSpeed(double)
165 * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxYSpeed()
166 * @model default="0.0"
167 * @generated
168 */
169 double getMaxYSpeed();
170
171 /**
172 * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxYSpeed <em>Max YSpeed</em>}' attribute.
173 * <!-- begin-user-doc -->
174 * <!-- end-user-doc -->
175 * @param value the new value of the '<em>Max YSpeed</em>' attribute.
176 * @see #getMaxYSpeed()
177 * @generated
178 */
179 void setMaxYSpeed(double value);
180
133} // CrossingScenario 181} // CrossingScenario
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java
index 45443103..bafc5e69 100644
--- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java
+++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java
@@ -122,13 +122,31 @@ public interface CrossingScenarioPackage extends EPackage {
122 int CROSSING_SCENARIO__RELATIONS = 5; 122 int CROSSING_SCENARIO__RELATIONS = 5;
123 123
124 /** 124 /**
125 * The feature id for the '<em><b>Max XSpeed</b></em>' attribute.
126 * <!-- begin-user-doc -->
127 * <!-- end-user-doc -->
128 * @generated
129 * @ordered
130 */
131 int CROSSING_SCENARIO__MAX_XSPEED = 6;
132
133 /**
134 * The feature id for the '<em><b>Max YSpeed</b></em>' attribute.
135 * <!-- begin-user-doc -->
136 * <!-- end-user-doc -->
137 * @generated
138 * @ordered
139 */
140 int CROSSING_SCENARIO__MAX_YSPEED = 7;
141
142 /**
125 * The number of structural features of the '<em>Crossing Scenario</em>' class. 143 * The number of structural features of the '<em>Crossing Scenario</em>' class.
126 * <!-- begin-user-doc --> 144 * <!-- begin-user-doc -->
127 * <!-- end-user-doc --> 145 * <!-- end-user-doc -->
128 * @generated 146 * @generated
129 * @ordered 147 * @ordered
130 */ 148 */
131 int CROSSING_SCENARIO_FEATURE_COUNT = 6; 149 int CROSSING_SCENARIO_FEATURE_COUNT = 8;
132 150
133 /** 151 /**
134 * The number of operations of the '<em>Crossing Scenario</em>' class. 152 * The number of operations of the '<em>Crossing Scenario</em>' class.
@@ -1068,6 +1086,28 @@ public interface CrossingScenarioPackage extends EPackage {
1068 EReference getCrossingScenario_Relations(); 1086 EReference getCrossingScenario_Relations();
1069 1087
1070 /** 1088 /**
1089 * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxXSpeed <em>Max XSpeed</em>}'.
1090 * <!-- begin-user-doc -->
1091 * <!-- end-user-doc -->
1092 * @return the meta object for the attribute '<em>Max XSpeed</em>'.
1093 * @see crossingScenario.CrossingScenario#getMaxXSpeed()
1094 * @see #getCrossingScenario()
1095 * @generated
1096 */
1097 EAttribute getCrossingScenario_MaxXSpeed();
1098
1099 /**
1100 * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxYSpeed <em>Max YSpeed</em>}'.
1101 * <!-- begin-user-doc -->
1102 * <!-- end-user-doc -->
1103 * @return the meta object for the attribute '<em>Max YSpeed</em>'.
1104 * @see crossingScenario.CrossingScenario#getMaxYSpeed()
1105 * @see #getCrossingScenario()
1106 * @generated
1107 */
1108 EAttribute getCrossingScenario_MaxYSpeed();
1109
1110 /**
1071 * Returns the meta object for class '{@link crossingScenario.Lane <em>Lane</em>}'. 1111 * Returns the meta object for class '{@link crossingScenario.Lane <em>Lane</em>}'.
1072 * <!-- begin-user-doc --> 1112 * <!-- begin-user-doc -->
1073 * <!-- end-user-doc --> 1113 * <!-- end-user-doc -->
@@ -1476,6 +1516,22 @@ public interface CrossingScenarioPackage extends EPackage {
1476 EReference CROSSING_SCENARIO__RELATIONS = eINSTANCE.getCrossingScenario_Relations(); 1516 EReference CROSSING_SCENARIO__RELATIONS = eINSTANCE.getCrossingScenario_Relations();
1477 1517
1478 /** 1518 /**
1519 * The meta object literal for the '<em><b>Max XSpeed</b></em>' attribute feature.
1520 * <!-- begin-user-doc -->
1521 * <!-- end-user-doc -->
1522 * @generated
1523 */
1524 EAttribute CROSSING_SCENARIO__MAX_XSPEED = eINSTANCE.getCrossingScenario_MaxXSpeed();
1525
1526 /**
1527 * The meta object literal for the '<em><b>Max YSpeed</b></em>' attribute feature.
1528 * <!-- begin-user-doc -->
1529 * <!-- end-user-doc -->
1530 * @generated
1531 */
1532 EAttribute CROSSING_SCENARIO__MAX_YSPEED = eINSTANCE.getCrossingScenario_MaxYSpeed();
1533
1534 /**
1479 * The meta object literal for the '{@link crossingScenario.impl.LaneImpl <em>Lane</em>}' class. 1535 * The meta object literal for the '{@link crossingScenario.impl.LaneImpl <em>Lane</em>}' class.
1480 * <!-- begin-user-doc --> 1536 * <!-- begin-user-doc -->
1481 * <!-- end-user-doc --> 1537 * <!-- end-user-doc -->
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java
index b2b0d579..28667b0c 100644
--- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java
+++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java
@@ -37,6 +37,8 @@ import org.eclipse.emf.ecore.util.InternalEList;
37 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getLanes <em>Lanes</em>}</li> 37 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getLanes <em>Lanes</em>}</li>
38 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getMaxTime <em>Max Time</em>}</li> 38 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getMaxTime <em>Max Time</em>}</li>
39 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getRelations <em>Relations</em>}</li> 39 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getRelations <em>Relations</em>}</li>
40 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getMaxXSpeed <em>Max XSpeed</em>}</li>
41 * <li>{@link crossingScenario.impl.CrossingScenarioImpl#getMaxYSpeed <em>Max YSpeed</em>}</li>
40 * </ul> 42 * </ul>
41 * 43 *
42 * @generated 44 * @generated
@@ -133,6 +135,46 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
133 protected EList<Relation> relations; 135 protected EList<Relation> relations;
134 136
135 /** 137 /**
138 * The default value of the '{@link #getMaxXSpeed() <em>Max XSpeed</em>}' attribute.
139 * <!-- begin-user-doc -->
140 * <!-- end-user-doc -->
141 * @see #getMaxXSpeed()
142 * @generated
143 * @ordered
144 */
145 protected static final double MAX_XSPEED_EDEFAULT = 0.0;
146
147 /**
148 * The cached value of the '{@link #getMaxXSpeed() <em>Max XSpeed</em>}' attribute.
149 * <!-- begin-user-doc -->
150 * <!-- end-user-doc -->
151 * @see #getMaxXSpeed()
152 * @generated
153 * @ordered
154 */
155 protected double maxXSpeed = MAX_XSPEED_EDEFAULT;
156
157 /**
158 * The default value of the '{@link #getMaxYSpeed() <em>Max YSpeed</em>}' attribute.
159 * <!-- begin-user-doc -->
160 * <!-- end-user-doc -->
161 * @see #getMaxYSpeed()
162 * @generated
163 * @ordered
164 */
165 protected static final double MAX_YSPEED_EDEFAULT = 0.0;
166
167 /**
168 * The cached value of the '{@link #getMaxYSpeed() <em>Max YSpeed</em>}' attribute.
169 * <!-- begin-user-doc -->
170 * <!-- end-user-doc -->
171 * @see #getMaxYSpeed()
172 * @generated
173 * @ordered
174 */
175 protected double maxYSpeed = MAX_YSPEED_EDEFAULT;
176
177 /**
136 * <!-- begin-user-doc --> 178 * <!-- begin-user-doc -->
137 * <!-- end-user-doc --> 179 * <!-- end-user-doc -->
138 * @generated 180 * @generated
@@ -265,6 +307,52 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
265 * @generated 307 * @generated
266 */ 308 */
267 @Override 309 @Override
310 public double getMaxXSpeed() {
311 return maxXSpeed;
312 }
313
314 /**
315 * <!-- begin-user-doc -->
316 * <!-- end-user-doc -->
317 * @generated
318 */
319 @Override
320 public void setMaxXSpeed(double newMaxXSpeed) {
321 double oldMaxXSpeed = maxXSpeed;
322 maxXSpeed = newMaxXSpeed;
323 if (eNotificationRequired())
324 eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED, oldMaxXSpeed, maxXSpeed));
325 }
326
327 /**
328 * <!-- begin-user-doc -->
329 * <!-- end-user-doc -->
330 * @generated
331 */
332 @Override
333 public double getMaxYSpeed() {
334 return maxYSpeed;
335 }
336
337 /**
338 * <!-- begin-user-doc -->
339 * <!-- end-user-doc -->
340 * @generated
341 */
342 @Override
343 public void setMaxYSpeed(double newMaxYSpeed) {
344 double oldMaxYSpeed = maxYSpeed;
345 maxYSpeed = newMaxYSpeed;
346 if (eNotificationRequired())
347 eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED, oldMaxYSpeed, maxYSpeed));
348 }
349
350 /**
351 * <!-- begin-user-doc -->
352 * <!-- end-user-doc -->
353 * @generated
354 */
355 @Override
268 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 356 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
269 switch (featureID) { 357 switch (featureID) {
270 case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: 358 case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS:
@@ -297,6 +385,10 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
297 return getMaxTime(); 385 return getMaxTime();
298 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: 386 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS:
299 return getRelations(); 387 return getRelations();
388 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED:
389 return getMaxXSpeed();
390 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED:
391 return getMaxYSpeed();
300 } 392 }
301 return super.eGet(featureID, resolve, coreType); 393 return super.eGet(featureID, resolve, coreType);
302 } 394 }
@@ -331,6 +423,12 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
331 getRelations().clear(); 423 getRelations().clear();
332 getRelations().addAll((Collection<? extends Relation>)newValue); 424 getRelations().addAll((Collection<? extends Relation>)newValue);
333 return; 425 return;
426 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED:
427 setMaxXSpeed((Double)newValue);
428 return;
429 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED:
430 setMaxYSpeed((Double)newValue);
431 return;
334 } 432 }
335 super.eSet(featureID, newValue); 433 super.eSet(featureID, newValue);
336 } 434 }
@@ -361,6 +459,12 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
361 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: 459 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS:
362 getRelations().clear(); 460 getRelations().clear();
363 return; 461 return;
462 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED:
463 setMaxXSpeed(MAX_XSPEED_EDEFAULT);
464 return;
465 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED:
466 setMaxYSpeed(MAX_YSPEED_EDEFAULT);
467 return;
364 } 468 }
365 super.eUnset(featureID); 469 super.eUnset(featureID);
366 } 470 }
@@ -385,6 +489,10 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
385 return maxTime != MAX_TIME_EDEFAULT; 489 return maxTime != MAX_TIME_EDEFAULT;
386 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: 490 case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS:
387 return relations != null && !relations.isEmpty(); 491 return relations != null && !relations.isEmpty();
492 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED:
493 return maxXSpeed != MAX_XSPEED_EDEFAULT;
494 case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED:
495 return maxYSpeed != MAX_YSPEED_EDEFAULT;
388 } 496 }
389 return super.eIsSet(featureID); 497 return super.eIsSet(featureID);
390 } 498 }
@@ -405,6 +513,10 @@ public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implement
405 result.append(ySize); 513 result.append(ySize);
406 result.append(", maxTime: "); 514 result.append(", maxTime: ");
407 result.append(maxTime); 515 result.append(maxTime);
516 result.append(", maxXSpeed: ");
517 result.append(maxXSpeed);
518 result.append(", maxYSpeed: ");
519 result.append(maxYSpeed);
408 result.append(')'); 520 result.append(')');
409 return result.toString(); 521 return result.toString();
410 } 522 }
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java
index b8261c86..292fcb9c 100644
--- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java
+++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java
@@ -277,6 +277,26 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin
277 * @generated 277 * @generated
278 */ 278 */
279 @Override 279 @Override
280 public EAttribute getCrossingScenario_MaxXSpeed() {
281 return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(6);
282 }
283
284 /**
285 * <!-- begin-user-doc -->
286 * <!-- end-user-doc -->
287 * @generated
288 */
289 @Override
290 public EAttribute getCrossingScenario_MaxYSpeed() {
291 return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(7);
292 }
293
294 /**
295 * <!-- begin-user-doc -->
296 * <!-- end-user-doc -->
297 * @generated
298 */
299 @Override
280 public EClass getLane() { 300 public EClass getLane() {
281 return laneEClass; 301 return laneEClass;
282 } 302 }
@@ -617,6 +637,8 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin
617 createEReference(crossingScenarioEClass, CROSSING_SCENARIO__LANES); 637 createEReference(crossingScenarioEClass, CROSSING_SCENARIO__LANES);
618 createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_TIME); 638 createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_TIME);
619 createEReference(crossingScenarioEClass, CROSSING_SCENARIO__RELATIONS); 639 createEReference(crossingScenarioEClass, CROSSING_SCENARIO__RELATIONS);
640 createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_XSPEED);
641 createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_YSPEED);
620 642
621 laneEClass = createEClass(LANE); 643 laneEClass = createEClass(LANE);
622 createEAttribute(laneEClass, LANE__REFERENCE_COORD); 644 createEAttribute(laneEClass, LANE__REFERENCE_COORD);
@@ -712,6 +734,8 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin
712 initEReference(getCrossingScenario_Lanes(), this.getLane(), null, "lanes", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 734 initEReference(getCrossingScenario_Lanes(), this.getLane(), null, "lanes", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
713 initEAttribute(getCrossingScenario_MaxTime(), ecorePackage.getEDouble(), "maxTime", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 735 initEAttribute(getCrossingScenario_MaxTime(), ecorePackage.getEDouble(), "maxTime", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
714 initEReference(getCrossingScenario_Relations(), this.getRelation(), null, "relations", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 736 initEReference(getCrossingScenario_Relations(), this.getRelation(), null, "relations", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
737 initEAttribute(getCrossingScenario_MaxXSpeed(), ecorePackage.getEDouble(), "maxXSpeed", "0.0", 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
738 initEAttribute(getCrossingScenario_MaxYSpeed(), ecorePackage.getEDouble(), "maxYSpeed", "0.0", 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
715 739
716 initEClass(laneEClass, Lane.class, "Lane", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 740 initEClass(laneEClass, Lane.class, "Lane", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
717 initEAttribute(getLane_ReferenceCoord(), ecorePackage.getEDouble(), "referenceCoord", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 741 initEAttribute(getLane_ReferenceCoord(), ecorePackage.getEDouble(), "referenceCoord", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/Domains/crossingScenario/inputs/cSinit4x4.xmi b/Domains/crossingScenario/inputs/cSinit4x4.xmi
index dd9b41de..24c29774 100644
--- a/Domains/crossingScenario/inputs/cSinit4x4.xmi
+++ b/Domains/crossingScenario/inputs/cSinit4x4.xmi
@@ -7,7 +7,9 @@
7 xsi:schemaLocation="http://www.example.com/crossingScenario ../model/crossingScenario.ecore" 7 xsi:schemaLocation="http://www.example.com/crossingScenario ../model/crossingScenario.ecore"
8 xSize="100.0" 8 xSize="100.0"
9 ySize="100.0" 9 ySize="100.0"
10 maxTime="60.0"> 10 maxTime="60.0"
11 maxXSpeed="100.0"
12 maxYSpeed="100.0">
11 <lanes xsi:type="crossingScenario:Lane_Horizontal"/> 13 <lanes xsi:type="crossingScenario:Lane_Horizontal"/>
12 <lanes xsi:type="crossingScenario:Lane_Horizontal" 14 <lanes xsi:type="crossingScenario:Lane_Horizontal"
13 referenceCoord="5.0"/> 15 referenceCoord="5.0"/>
@@ -24,4 +26,7 @@
24 referenceCoord="15.0"/> 26 referenceCoord="15.0"/>
25 <relations 27 <relations
26 xsi:type="crossingScenario:VisionBlocked"/> 28 xsi:type="crossingScenario:VisionBlocked"/>
29 <relations
30 xsi:type="crossingScenario:CollisionExists"
31 collisionTime="-1.0"/>
27</crossingScenario:CrossingScenario> 32</crossingScenario:CrossingScenario>
diff --git a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig
index bee56db6..1d47952d 100644
--- a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig
+++ b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig
@@ -23,7 +23,7 @@ generate {
23 log-level = none, 23 log-level = none,
24 "numeric-solver" = "dreal-local", 24 "numeric-solver" = "dreal-local",
25 "dreal-local-path" = "/home/models/dreal4/bazel-bin/dreal/dreal", 25 "dreal-local-path" = "/home/models/dreal4/bazel-bin/dreal/dreal",
26 "ignored-attributes" = "CrossingScenario.maxTime=60", 26 "ignored-attributes" = "CollisionExists.collisionTime=*",
27 "scopePropagator" = "polyhedral"} 27 "scopePropagator" = "polyhedral"}
28 28
29 runs = 1 29 runs = 1
diff --git a/Domains/crossingScenario/model/crossingScenario.aird b/Domains/crossingScenario/model/crossingScenario.aird
index 0a776802..d4aa8c13 100644
--- a/Domains/crossingScenario/model/crossingScenario.aird
+++ b/Domains/crossingScenario/model/crossingScenario.aird
@@ -5,7 +5,7 @@
5 <semanticResources>crossingScenario.genmodel</semanticResources> 5 <semanticResources>crossingScenario.genmodel</semanticResources>
6 <ownedViews xmi:type="viewpoint:DView" uid="_LaDLgFZ_Eeugh9dythfu8g"> 6 <ownedViews xmi:type="viewpoint:DView" uid="_LaDLgFZ_Eeugh9dythfu8g">
7 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> 7 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
8 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_MXYWcFZ_Eeugh9dythfu8g" name="crossingScenario class diagram" repPath="#_MV4hoFZ_Eeugh9dythfu8g" changeId="fa4b3d36-f766-4838-b660-63e511bbcfd6"> 8 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_MXYWcFZ_Eeugh9dythfu8g" name="crossingScenario class diagram" repPath="#_MV4hoFZ_Eeugh9dythfu8g" changeId="d6fec7a7-9b74-467e-985e-6ef0d2deb4c9">
9 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> 9 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
10 <target xmi:type="ecore:EPackage" href="crossingScenario.ecore#/"/> 10 <target xmi:type="ecore:EPackage" href="crossingScenario.ecore#/"/>
11 </ownedRepresentationDescriptors> 11 </ownedRepresentationDescriptors>
@@ -76,11 +76,19 @@
76 <styles xmi:type="notation:FontStyle" xmi:id="_Nb2rMVZ_Eeugh9dythfu8g" fontName="Segoe UI" fontHeight="8"/> 76 <styles xmi:type="notation:FontStyle" xmi:id="_Nb2rMVZ_Eeugh9dythfu8g" fontName="Segoe UI" fontHeight="8"/>
77 <layoutConstraint xmi:type="notation:Location" xmi:id="_Nb2rMlZ_Eeugh9dythfu8g"/> 77 <layoutConstraint xmi:type="notation:Location" xmi:id="_Nb2rMlZ_Eeugh9dythfu8g"/>
78 </children> 78 </children>
79 <children xmi:type="notation:Node" xmi:id="_Ofeg8FxJEeuaT5KYRde9jw" type="3010" element="_Od7BwFxJEeuaT5KYRde9jw">
80 <styles xmi:type="notation:FontStyle" xmi:id="_Ofeg8VxJEeuaT5KYRde9jw" fontColor="2697711" fontName="Cantarell" fontHeight="8"/>
81 <layoutConstraint xmi:type="notation:Location" xmi:id="_Ofeg8lxJEeuaT5KYRde9jw"/>
82 </children>
83 <children xmi:type="notation:Node" xmi:id="_R5ZqIFxJEeuaT5KYRde9jw" type="3010" element="_R4V6MFxJEeuaT5KYRde9jw">
84 <styles xmi:type="notation:FontStyle" xmi:id="_R5ZqIVxJEeuaT5KYRde9jw" fontColor="2697711" fontName="Cantarell" fontHeight="8"/>
85 <layoutConstraint xmi:type="notation:Location" xmi:id="_R5ZqIlxJEeuaT5KYRde9jw"/>
86 </children>
79 <styles xmi:type="notation:SortingStyle" xmi:id="_NbmMglZ_Eeugh9dythfu8g"/> 87 <styles xmi:type="notation:SortingStyle" xmi:id="_NbmMglZ_Eeugh9dythfu8g"/>
80 <styles xmi:type="notation:FilteringStyle" xmi:id="_NbmMg1Z_Eeugh9dythfu8g"/> 88 <styles xmi:type="notation:FilteringStyle" xmi:id="_NbmMg1Z_Eeugh9dythfu8g"/>
81 </children> 89 </children>
82 <styles xmi:type="notation:ShapeStyle" xmi:id="_Nbk-YVZ_Eeugh9dythfu8g" fontName="Segoe UI" fontHeight="8"/> 90 <styles xmi:type="notation:ShapeStyle" xmi:id="_Nbk-YVZ_Eeugh9dythfu8g" fontName="Segoe UI" fontHeight="8"/>
83 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nbk-YlZ_Eeugh9dythfu8g" x="156" y="24" height="87"/> 91 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nbk-YlZ_Eeugh9dythfu8g" x="156" y="24" height="117"/>
84 </children> 92 </children>
85 <children xmi:type="notation:Node" xmi:id="_NbmzkFZ_Eeugh9dythfu8g" type="2003" element="_NaCGQFZ_Eeugh9dythfu8g"> 93 <children xmi:type="notation:Node" xmi:id="_NbmzkFZ_Eeugh9dythfu8g" type="2003" element="_NaCGQFZ_Eeugh9dythfu8g">
86 <children xmi:type="notation:Node" xmi:id="_NbnaoFZ_Eeugh9dythfu8g" type="5007"/> 94 <children xmi:type="notation:Node" xmi:id="_NbnaoFZ_Eeugh9dythfu8g" type="5007"/>
@@ -394,7 +402,7 @@
394 <styles xmi:type="notation:DiagramStyle" xmi:id="_MYg-4lZ_Eeugh9dythfu8g"/> 402 <styles xmi:type="notation:DiagramStyle" xmi:id="_MYg-4lZ_Eeugh9dythfu8g"/>
395 <edges xmi:type="notation:Edge" xmi:id="_NcAcMFZ_Eeugh9dythfu8g" type="4001" element="_NbAWoFZ_Eeugh9dythfu8g" source="_Nbk-YFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> 403 <edges xmi:type="notation:Edge" xmi:id="_NcAcMFZ_Eeugh9dythfu8g" type="4001" element="_NbAWoFZ_Eeugh9dythfu8g" source="_Nbk-YFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g">
396 <children xmi:type="notation:Node" xmi:id="_NcBqUFZ_Eeugh9dythfu8g" type="6001"> 404 <children xmi:type="notation:Node" xmi:id="_NcBqUFZ_Eeugh9dythfu8g" type="6001">
397 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcBqUVZ_Eeugh9dythfu8g" x="-2" y="-53"/> 405 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcBqUVZ_Eeugh9dythfu8g" x="-15" y="-55"/>
398 </children> 406 </children>
399 <children xmi:type="notation:Node" xmi:id="_NcC4cFZ_Eeugh9dythfu8g" type="6002"> 407 <children xmi:type="notation:Node" xmi:id="_NcC4cFZ_Eeugh9dythfu8g" type="6002">
400 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcC4cVZ_Eeugh9dythfu8g" x="15"/> 408 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcC4cVZ_Eeugh9dythfu8g" x="15"/>
@@ -410,7 +418,7 @@
410 </edges> 418 </edges>
411 <edges xmi:type="notation:Edge" xmi:id="_NcNQgFZ_Eeugh9dythfu8g" type="4001" element="_NbCL0FZ_Eeugh9dythfu8g" source="_Nbk-YFZ_Eeugh9dythfu8g" target="_NbmzkFZ_Eeugh9dythfu8g"> 419 <edges xmi:type="notation:Edge" xmi:id="_NcNQgFZ_Eeugh9dythfu8g" type="4001" element="_NbCL0FZ_Eeugh9dythfu8g" source="_Nbk-YFZ_Eeugh9dythfu8g" target="_NbmzkFZ_Eeugh9dythfu8g">
412 <children xmi:type="notation:Node" xmi:id="_NcNQhFZ_Eeugh9dythfu8g" type="6001"> 420 <children xmi:type="notation:Node" xmi:id="_NcNQhFZ_Eeugh9dythfu8g" type="6001">
413 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcNQhVZ_Eeugh9dythfu8g" x="61" y="30"/> 421 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcNQhVZ_Eeugh9dythfu8g" x="41" y="39"/>
414 </children> 422 </children>
415 <children xmi:type="notation:Node" xmi:id="_NcN3kFZ_Eeugh9dythfu8g" type="6002"> 423 <children xmi:type="notation:Node" xmi:id="_NcN3kFZ_Eeugh9dythfu8g" type="6002">
416 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcN3kVZ_Eeugh9dythfu8g" x="-5"/> 424 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NcN3kVZ_Eeugh9dythfu8g" x="-5"/>
@@ -421,7 +429,7 @@
421 <styles xmi:type="notation:ConnectorStyle" xmi:id="_NcNQgVZ_Eeugh9dythfu8g" routing="Rectilinear"/> 429 <styles xmi:type="notation:ConnectorStyle" xmi:id="_NcNQgVZ_Eeugh9dythfu8g" routing="Rectilinear"/>
422 <styles xmi:type="notation:FontStyle" xmi:id="_NcNQglZ_Eeugh9dythfu8g" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> 430 <styles xmi:type="notation:FontStyle" xmi:id="_NcNQglZ_Eeugh9dythfu8g" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
423 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_NcNQg1Z_Eeugh9dythfu8g" points="[14, 0, 0, -157]$[14, 157, 0, 0]"/> 431 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_NcNQg1Z_Eeugh9dythfu8g" points="[14, 0, 0, -157]$[14, 157, 0, 0]"/>
424 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NcN3lFZ_Eeugh9dythfu8g" id="(0.06451612903225806,1.0)"/> 432 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NcN3lFZ_Eeugh9dythfu8g" id="(0.06451612903225806,0.7391304347826086)"/>
425 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NcN3lVZ_Eeugh9dythfu8g" id="(0.6941747572815534,0.0)"/> 433 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NcN3lVZ_Eeugh9dythfu8g" id="(0.6941747572815534,0.0)"/>
426 </edges> 434 </edges>
427 <edges xmi:type="notation:Edge" xmi:id="_NcQ64lZ_Eeugh9dythfu8g" type="4001" element="_NbGdQ1Z_Eeugh9dythfu8g" source="_NbrsEFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> 435 <edges xmi:type="notation:Edge" xmi:id="_NcQ64lZ_Eeugh9dythfu8g" type="4001" element="_NbGdQ1Z_Eeugh9dythfu8g" source="_NbrsEFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g">
@@ -614,7 +622,7 @@
614 <element xsi:nil="true"/> 622 <element xsi:nil="true"/>
615 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mMm9I1aBEeugh9dythfu8g" points="[10, 16, -15, -26]$[25, 42, 0, 0]"/> 623 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mMm9I1aBEeugh9dythfu8g" points="[10, 16, -15, -26]$[25, 42, 0, 0]"/>
616 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mMqngFaBEeugh9dythfu8g" id="(0.925,0.3116883116883117)"/> 624 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mMqngFaBEeugh9dythfu8g" id="(0.925,0.3116883116883117)"/>
617 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mMqngVaBEeugh9dythfu8g" id="(0.0064516129032258064,0.5882352941176471)"/> 625 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mMqngVaBEeugh9dythfu8g" id="(0.006802721088435374,0.3082706766917293)"/>
618 </edges> 626 </edges>
619 <edges xmi:type="notation:Connector" xmi:id="_79OJwFaBEeugh9dythfu8g" type="NoteAttachment" source="_xVl5MFaAEeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g" lineWidth="1"> 627 <edges xmi:type="notation:Connector" xmi:id="_79OJwFaBEeugh9dythfu8g" type="NoteAttachment" source="_xVl5MFaAEeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g" lineWidth="1">
620 <styles xmi:type="notation:ArrowStyle" xmi:id="_79OJwVaBEeugh9dythfu8g"/> 628 <styles xmi:type="notation:ArrowStyle" xmi:id="_79OJwVaBEeugh9dythfu8g"/>
@@ -693,7 +701,7 @@
693 <styles xmi:type="notation:LineTypeStyle" xmi:id="_fP8BkFtFEeuZZYOcQVw9qw"/> 701 <styles xmi:type="notation:LineTypeStyle" xmi:id="_fP8BkFtFEeuZZYOcQVw9qw"/>
694 <element xsi:nil="true"/> 702 <element xsi:nil="true"/>
695 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_fP8BkVtFEeuZZYOcQVw9qw" points="[-1, 0, 95, -36]$[-96, 0, 0, -36]$[-96, 27, 0, -9]"/> 703 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_fP8BkVtFEeuZZYOcQVw9qw" points="[-1, 0, 95, -36]$[-96, 0, 0, -36]$[-96, 27, 0, -9]"/>
696 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fQJc8FtFEeuZZYOcQVw9qw" id="(0.006802721088435374,0.8941176470588236)"/> 704 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fQJc8FtFEeuZZYOcQVw9qw" id="(0.0,0.706766917293233)"/>
697 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fQJc8VtFEeuZZYOcQVw9qw" id="(0.4076923076923077,0.09)"/> 705 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fQJc8VtFEeuZZYOcQVw9qw" id="(0.4076923076923077,0.09)"/>
698 </edges> 706 </edges>
699 <edges xmi:type="notation:Connector" xmi:id="_gqf7EFtFEeuZZYOcQVw9qw" type="NoteAttachment" source="_Pao80FtFEeuZZYOcQVw9qw" target="_NbmzkFZ_Eeugh9dythfu8g" lineWidth="1"> 707 <edges xmi:type="notation:Connector" xmi:id="_gqf7EFtFEeuZZYOcQVw9qw" type="NoteAttachment" source="_Pao80FtFEeuZZYOcQVw9qw" target="_NbmzkFZ_Eeugh9dythfu8g" lineWidth="1">
@@ -717,7 +725,7 @@
717 <styles xmi:type="notation:ConnectorStyle" xmi:id="_to4AkVtGEeuZZYOcQVw9qw" routing="Rectilinear"/> 725 <styles xmi:type="notation:ConnectorStyle" xmi:id="_to4AkVtGEeuZZYOcQVw9qw" routing="Rectilinear"/>
718 <styles xmi:type="notation:FontStyle" xmi:id="_to4AkltGEeuZZYOcQVw9qw" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> 726 <styles xmi:type="notation:FontStyle" xmi:id="_to4AkltGEeuZZYOcQVw9qw" fontColor="7490599" fontName="Cantarell" fontHeight="8"/>
719 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_to5OsFtGEeuZZYOcQVw9qw" points="[7, -11, -453, -173]$[457, -11, -3, -173]$[457, 161, -3, -1]"/> 727 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_to5OsFtGEeuZZYOcQVw9qw" points="[7, -11, -453, -173]$[457, -11, -3, -173]$[457, 161, -3, -1]"/>
720 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUFtGEeuZZYOcQVw9qw" id="(0.9523809523809523,0.4117647058823529)"/> 728 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUFtGEeuZZYOcQVw9qw" id="(0.9523809523809523,0.30434782608695654)"/>
721 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUVtGEeuZZYOcQVw9qw" id="(0.7711864406779662,0.02564102564102564)"/> 729 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUVtGEeuZZYOcQVw9qw" id="(0.7711864406779662,0.02564102564102564)"/>
722 </edges> 730 </edges>
723 <edges xmi:type="notation:Edge" xmi:id="_V6FdwFtLEeuZZYOcQVw9qw" type="4001" element="_V5wGk1tLEeuZZYOcQVw9qw" source="_Nbp241Z_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> 731 <edges xmi:type="notation:Edge" xmi:id="_V6FdwFtLEeuZZYOcQVw9qw" type="4001" element="_V5wGk1tLEeuZZYOcQVw9qw" source="_Nbp241Z_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g">
@@ -792,7 +800,7 @@
792 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 800 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
793 <arrangeConstraints>KEEP_SIZE</arrangeConstraints> 801 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
794 <arrangeConstraints>KEEP_RATIO</arrangeConstraints> 802 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
795 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_NZ_qAFZ_Eeugh9dythfu8g" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> 803 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_TauS8VxJEeuaT5KYRde9jw" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
796 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> 804 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
797 </ownedStyle> 805 </ownedStyle>
798 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 806 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
@@ -820,6 +828,22 @@
820 </ownedStyle> 828 </ownedStyle>
821 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> 829 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
822 </ownedElements> 830 </ownedElements>
831 <ownedElements xmi:type="diagram:DNodeListElement" uid="_Od7BwFxJEeuaT5KYRde9jw" name="maxXSpeed : EDouble = 0.0" tooltipText="">
832 <target xmi:type="ecore:EAttribute" href="crossingScenario.ecore#//CrossingScenario/maxXSpeed"/>
833 <semanticElements xmi:type="ecore:EAttribute" href="crossingScenario.ecore#//CrossingScenario/maxXSpeed"/>
834 <ownedStyle xmi:type="diagram:BundledImage" uid="_RQzZEVxJEeuaT5KYRde9jw" labelAlignment="LEFT">
835 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
836 </ownedStyle>
837 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
838 </ownedElements>
839 <ownedElements xmi:type="diagram:DNodeListElement" uid="_R4V6MFxJEeuaT5KYRde9jw" name="maxYSpeed : EDouble = 0.0" tooltipText="">
840 <target xmi:type="ecore:EAttribute" href="crossingScenario.ecore#//CrossingScenario/maxYSpeed"/>
841 <semanticElements xmi:type="ecore:EAttribute" href="crossingScenario.ecore#//CrossingScenario/maxYSpeed"/>
842 <ownedStyle xmi:type="diagram:BundledImage" uid="_Ta3c4VxJEeuaT5KYRde9jw" labelAlignment="LEFT">
843 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
844 </ownedStyle>
845 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
846 </ownedElements>
823 </ownedDiagramElements> 847 </ownedDiagramElements>
824 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_NaCGQFZ_Eeugh9dythfu8g" name="Lane" tooltipText="" outgoingEdges="_NbVGwFZ_Eeugh9dythfu8g" incomingEdges="_NbCL0FZ_Eeugh9dythfu8g _sbU64Fh-Eeu-o58Hgezqgw _tvUSVlh-Eeu-o58Hgezqgw" width="12" height="10"> 848 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_NaCGQFZ_Eeugh9dythfu8g" name="Lane" tooltipText="" outgoingEdges="_NbVGwFZ_Eeugh9dythfu8g" incomingEdges="_NbCL0FZ_Eeugh9dythfu8g _sbU64Fh-Eeu-o58Hgezqgw _tvUSVlh-Eeu-o58Hgezqgw" width="12" height="10">
825 <target xmi:type="ecore:EClass" href="crossingScenario.ecore#//Lane"/> 849 <target xmi:type="ecore:EClass" href="crossingScenario.ecore#//Lane"/>
diff --git a/Domains/crossingScenario/model/crossingScenario.ecore b/Domains/crossingScenario/model/crossingScenario.ecore
index c1aab2b8..05dba008 100644
--- a/Domains/crossingScenario/model/crossingScenario.ecore
+++ b/Domains/crossingScenario/model/crossingScenario.ecore
@@ -12,6 +12,10 @@
12 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxTime" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> 12 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxTime" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
13 <eStructuralFeatures xsi:type="ecore:EReference" name="relations" upperBound="-1" 13 <eStructuralFeatures xsi:type="ecore:EReference" name="relations" upperBound="-1"
14 eType="#//Relation" containment="true"/> 14 eType="#//Relation" containment="true"/>
15 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxXSpeed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
16 defaultValueLiteral="0.0"/>
17 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxYSpeed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
18 defaultValueLiteral="0.0"/>
15 </eClassifiers> 19 </eClassifiers>
16 <eClassifiers xsi:type="ecore:EClass" name="Lane" abstract="true"> 20 <eClassifiers xsi:type="ecore:EClass" name="Lane" abstract="true">
17 <eStructuralFeatures xsi:type="ecore:EAttribute" name="referenceCoord" lowerBound="1" 21 <eStructuralFeatures xsi:type="ecore:EAttribute" name="referenceCoord" lowerBound="1"
diff --git a/Domains/crossingScenario/model/crossingScenario.genmodel b/Domains/crossingScenario/model/crossingScenario.genmodel
index a5d7c5eb..51923418 100644
--- a/Domains/crossingScenario/model/crossingScenario.genmodel
+++ b/Domains/crossingScenario/model/crossingScenario.genmodel
@@ -18,6 +18,8 @@
18 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//CrossingScenario/lanes"/> 18 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//CrossingScenario/lanes"/>
19 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//CrossingScenario/maxTime"/> 19 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//CrossingScenario/maxTime"/>
20 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//CrossingScenario/relations"/> 20 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//CrossingScenario/relations"/>
21 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//CrossingScenario/maxXSpeed"/>
22 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//CrossingScenario/maxYSpeed"/>
21 </genClasses> 23 </genClasses>
22 <genClasses ecoreClass="crossingScenario.ecore#//Lane"> 24 <genClasses ecoreClass="crossingScenario.ecore#//Lane">
23 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Lane/referenceCoord"/> 25 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Lane/referenceCoord"/>
diff --git a/Domains/crossingScenario/queries/crossingScenarioQueries.vql b/Domains/crossingScenario/queries/crossingScenarioQueries.vql
index 2b67e14c..d1c72820 100644
--- a/Domains/crossingScenario/queries/crossingScenarioQueries.vql
+++ b/Domains/crossingScenario/queries/crossingScenarioQueries.vql
@@ -223,17 +223,23 @@ pattern define_placedOn_actorOnHorizLane(a : Actor, hl:Lane_Horizontal) {
223//Actor 223//Actor
224///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 224///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
225 225
226/////----------------
226//Xpos and Ypos Bounds 227//Xpos and Ypos Bounds
228/////----------------
227 229
228private pattern helper_getXAndBounds(cs:CrossingScenario, a:Actor, 230private pattern helper_horiz_getXAndBounds(cs:CrossingScenario, a:Actor,
229 xMax:java Double, xP:java Double) { 231 xMax:java Double, xP:java Double) {
232 Actor.placedOn(a, hl);
233 Lane_Horizontal(hl);
230 CrossingScenario.actors(cs, a); 234 CrossingScenario.actors(cs, a);
231 CrossingScenario.xSize(cs, xMax); 235 CrossingScenario.xSize(cs, xMax);
232 Actor.xPos(a, xP); 236 Actor.xPos(a, xP);
233} 237}
234 238
235private pattern helper_getYAndBounds(cs:CrossingScenario, a:Actor, 239private pattern helper_vert_getYAndBounds(cs:CrossingScenario, a:Actor,
236 yMax:java Double, yP:java Double) { 240 yMax:java Double, yP:java Double) {
241 Actor.placedOn(a, vl);
242 Lane_Vertical(vl);
237 CrossingScenario.actors(cs, a); 243 CrossingScenario.actors(cs, a);
238 CrossingScenario.ySize(cs, yMax); 244 CrossingScenario.ySize(cs, yMax);
239 Actor.yPos(a, yP); 245 Actor.yPos(a, yP);
@@ -241,87 +247,109 @@ private pattern helper_getYAndBounds(cs:CrossingScenario, a:Actor,
241 247
242@Constraint(severity="error", key={cs}, message="x") 248@Constraint(severity="error", key={cs}, message="x")
243pattern define_actor_maxXp(cs:CrossingScenario, a:Actor) { 249pattern define_actor_maxXp(cs:CrossingScenario, a:Actor) {
244 Actor.placedOn(a, hl); 250 find helper_horiz_getXAndBounds(cs, a, xMax, xP);
245 Lane_Horizontal(hl);
246 find helper_getXAndBounds(cs, a, xMax, xP);
247 check(xP >= xMax);} 251 check(xP >= xMax);}
248 252
249@Constraint(severity="error", key={cs}, message="x") 253@Constraint(severity="error", key={cs}, message="x")
250pattern define_actor_minXp(cs:CrossingScenario, a:Actor) { 254pattern define_actor_minXp(cs:CrossingScenario, a:Actor) {
251 Actor.placedOn(a, hl); 255 find helper_horiz_getXAndBounds(cs, a, xMax, xP);
252 Lane_Horizontal(hl);
253 find helper_getXAndBounds(cs, a, xMax, xP);
254 check(xP <= 0-xMax);} 256 check(xP <= 0-xMax);}
255 257
256@Constraint(severity="error", key={cs}, message="x") 258@Constraint(severity="error", key={cs}, message="x")
257pattern define_actor_maxYp(cs:CrossingScenario, a:Actor) { 259pattern define_actor_maxYp(cs:CrossingScenario, a:Actor) {
258 Actor.placedOn(a, vl); 260 find helper_vert_getYAndBounds(cs, a, yMax, yP);
259 Lane_Vertical(vl);
260 find helper_getYAndBounds(cs, a, yMax, yP);
261 check(yP >= yMax);} 261 check(yP >= yMax);}
262 262
263@Constraint(severity="error", key={cs}, message="x") 263@Constraint(severity="error", key={cs}, message="x")
264pattern define_actor_minYp(cs:CrossingScenario, a:Actor) { 264pattern define_actor_minYp(cs:CrossingScenario, a:Actor) {
265 Actor.placedOn(a, vl); 265 find helper_vert_getYAndBounds(cs, a, yMax, yP);
266 Lane_Vertical(vl);
267 find helper_getYAndBounds(cs, a, yMax, yP);
268 check(yP <= 0-yMax);} 266 check(yP <= 0-yMax);}
269 267
268/////----------------
270//Xspeed and Yspeed bounds 269//Xspeed and Yspeed bounds
270/////----------------
271 271
272//TODO THIS IS HARD_CODED 272//TODO THIS IS HARD_CODED
273//@Constraint(severity="error", key={a}, message="x")
274//pattern define_actor_maxXs(a:Actor) {
275// Actor.xSpeed(a, xS);
276// check(xS >= 100.0);}
277//
278//@Constraint(severity="error", key={a}, message="x")
279//pattern define_actor_minXs(a:Actor) {
280// Actor.xSpeed(a, xS);
281// check(xS <= 0-100.0);}
282//
283////TODO THIS IS HARD_CODED
284//@Constraint(severity="error", key={a}, message="x")
285//pattern define_actor_maxYs(a:Actor) {
286// Actor.ySpeed(a, yS);
287// check(yS >= 100.0);}
288//
289//@Constraint(severity="error", key={a}, message="x")
290//pattern define_actor_minYs(a:Actor) {
291// Actor.ySpeed(a, yS);
292// check(yS <= 0-100.0);}
293//END Hard-coded stuff
294
295////TODO May be required
296/////////xPos of every actor mmust be within bounds defined in CS
297//@Constraint(severity="error", key={l}, message="1 Actor")
298//pattern define_actor_xPosWithinCSbounds(cs:CrossingScenario, a:Actor) {
299//
300//}
301//
302////TODO May be required
303/////////yPos of every actor mmust be within bounds defined in CS
304//@Constraint(severity="error", key={l}, message="2 Actor")
305//pattern define_actor_yPosWithinCSbounds(cs:CrossingScenario, a:Actor) {
306//
307//}
308 273
274/////////VERTICAL LANE
275@Constraint(severity="error", key={a}, message="7 Actor")
276pattern define_actor_actorOnVertLaneHasxSpeed0(a:Actor) {
277 Actor.placedOn(a, vl);
278 Lane_Vertical(vl);
279 Actor.xSpeed(a, xSpeed);
280 check(xSpeed != 0);
281}
282
283private pattern helper_vert_getYSpeedAndBounds(cs:CrossingScenario, a:Actor,
284 ySpeedMax:java Double, ySpeed:java Double) {
285 Actor.placedOn(a, vl);
286 Lane_Vertical(vl);
287 CrossingScenario.actors(cs, a);
288 CrossingScenario.maxYSpeed(cs, ySpeedMax);
289 Actor.ySpeed(a, ySpeed);
290}
291
292@Constraint(severity="error", key={cs}, message="x")
293pattern define_actor_actorOnVertLaneMinYs(cs:CrossingScenario, a:Actor) {
294 find helper_vert_getYSpeedAndBounds(cs, a, ySMax, yS);
295 check(yS <= 0-ySMax);
296}
297
298@Constraint(severity="error", key={cs}, message="x")
299pattern define_actor_actorOnVertLaneMaxYs(cs:CrossingScenario, a:Actor) {
300 find helper_vert_getYSpeedAndBounds(cs, a, ySMax, yS);
301 check(yS >= ySMax);
302}
303
304/////////HORIZONTAL LANE
305@Constraint(severity="error", key={a}, message="7 Actor")
306pattern define_actor_actorOnHorizLaneHasySpeed0(a:Actor) {
307 Actor.placedOn(a, hl);
308 Lane_Horizontal(hl);
309 Actor.ySpeed(a, ySpeed);
310 check(ySpeed != 0);
311}
312
313private pattern helper_horiz_getXSpeedAndBounds(cs:CrossingScenario, a:Actor,
314 xSpeedMax:java Double, xSpeed:java Double) {
315 Actor.placedOn(a, hl);
316 Lane_Horizontal(hl);
317 CrossingScenario.actors(cs, a);
318 CrossingScenario.maxXSpeed(cs, xSpeedMax);
319 Actor.xSpeed(a, xSpeed);
320}
321
322@Constraint(severity="error", key={cs}, message="x")
323pattern define_actor_actorOnHorizLaneMinXs(cs:CrossingScenario, a:Actor) {
324 find helper_horiz_getXSpeedAndBounds(cs, a, xSMax, xS);
325 check(xS <= 0-xSMax);
326}
327
328@Constraint(severity="error", key={cs}, message="x")
329pattern define_actor_actorOnHorizLaneMaxXs(cs:CrossingScenario, a:Actor) {
330 find helper_horiz_getXSpeedAndBounds(cs, a, xSMax, xS);
331 check(xS >= xSMax);
332}
333
334/////----------------
335/////WIDTH and LENGTH
336/////----------------
309 337
310///////pedestrian-width (3) //TODO Derived? 338///////pedestrian-width (3)
311@Constraint(severity="error", key={p}, message="3 Actor") 339@Constraint(severity="error", key={p}, message="3 Actor")
312pattern define_actor_pedestrianWidth(p:Pedestrian) { 340pattern define_actor_pedestrianWidth(p:Pedestrian) {
313 Pedestrian.width(p, w); 341 Pedestrian.width(p, w);
314 check(w != 1.0); 342 check(w != 1.0);
315} 343}
316 344
317/////////pedestrian-width (4) //TODO Derived? 345/////////pedestrian-width (4)
318@Constraint(severity="error", key={p}, message="4 Actor") 346@Constraint(severity="error", key={p}, message="4 Actor")
319pattern define_actor_pedestrianLength(p:Pedestrian) { 347pattern define_actor_pedestrianLength(p:Pedestrian) {
320 Pedestrian.length(p, l); 348 Pedestrian.length(p, l);
321 check(l != 1.0); 349 check(l != 1.0);
322} 350}
323 351
324/////////actor-width (5) //TODO Derived? 352/////////actor-width (5)
325@Constraint(severity="error", key={v}, message="5 Actor") 353@Constraint(severity="error", key={v}, message="5 Actor")
326pattern define_actor_vehicleWidth(v:Vehicle) { 354pattern define_actor_vehicleWidth(v:Vehicle) {
327 Vehicle.placedOn(v, lane); 355 Vehicle.placedOn(v, lane);
@@ -335,7 +363,7 @@ pattern define_actor_vehicleWidth(v:Vehicle) {
335 check(w != 3.0); 363 check(w != 3.0);
336} 364}
337 365
338/////////actor-width (6) //TODO Derived? 366/////////actor-width (6)
339@Constraint(severity="error", key={v}, message="6 Actor") 367@Constraint(severity="error", key={v}, message="6 Actor")
340pattern define_actor_vehicleLength(v:Vehicle) { 368pattern define_actor_vehicleLength(v:Vehicle) {
341 Vehicle.placedOn(v, lane); 369 Vehicle.placedOn(v, lane);
@@ -349,23 +377,10 @@ pattern define_actor_vehicleLength(v:Vehicle) {
349 check(l != 1.0); 377 check(l != 1.0);
350} 378}
351 379
352/////////xSpeed of actor on verticalLane is 0 380/////----------------
353@Constraint(severity="error", key={a}, message="7 Actor") 381/////DERIVED FEATURES
354pattern define_actor_actorOnVertLaneHasxSpeed0(a:Actor, vl:Lane_Vertical) { 382/////----------------
355 Actor.placedOn(a, vl);
356 Actor.xSpeed(a, xSpeed);
357 check(xSpeed != 0);
358}
359
360/////////ySpeed of actor on horizontalLane is 0
361@Constraint(severity="error", key={a}, message="8 Actor")
362pattern define_actor_actorOnHoriLaneHasySpeed0(a:Actor, hl:Lane_Horizontal) {
363 Actor.placedOn(a, hl);
364 Actor.ySpeed(a, ySpeed);
365 check(ySpeed != 0);
366}
367 383
368//<<NEW>> Derived Features
369private pattern helper_getCoords(a1:Actor, 384private pattern helper_getCoords(a1:Actor,
370 a2: Actor, x1:java Double, x2:java Double, y1:java Double, y2:java Double) { 385 a2: Actor, x1:java Double, x2:java Double, y1:java Double, y2:java Double) {
371 Actor.xPos(a1, x1); 386 Actor.xPos(a1, x1);
@@ -410,8 +425,6 @@ private pattern helper_actorsAreFar(a1: Actor, a2: Actor) {
410 //check(dx^2 + dy^2 > 20^2) 425 //check(dx^2 + dy^2 > 20^2)
411 check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 20*20); 426 check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 20*20);
412} 427}
413
414//<<END NEW>>
415 428
416///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 429///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
417//Relation 430//Relation
@@ -428,7 +441,57 @@ pattern define_relation_noSelfRelation(a1:Actor, a2:Actor) {
428//////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 441//////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
429//CollisionExists 442//CollisionExists
430///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 443///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
431 444
445
446//<<QUALTATIF ABSTRACTION>>
447
448@Constraint(severity="error", key={a1, a2}, message="x")
449pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) {
450 CollisionExists.source(ce, a1);
451 CollisionExists.target(ce, a2);
452 Actor.placedOn(a1, vl1);
453 Lane_Vertical(vl1);
454 Actor.placedOn(a2, vl2);
455 Lane_Vertical(vl2);
456} or {
457 CollisionExists.source(ce, a1);
458 CollisionExists.target(ce, a2);
459 Actor.placedOn(a1, hl1);
460 Lane_Horizontal(hl1);
461 Actor.placedOn(a2, hl2);
462 Lane_Horizontal(hl2);
463}
464
465//<<END QUALITATIF ABSTRACTION>>
466/*
467////
468//VS VisionBlocked
469////
470//TODO Very prone to corner cases
471
472@Constraint(severity="error", key={a1, a2}, message="x")
473pattern collisionExists_vsVisionBlocked(a1:Actor, a2:Actor) {
474 VisionBlocked.source(vb, a1);
475 VisionBlocked.target(vb, a2);
476 neg find helper_collidingActors(a1, a2);
477} or {
478 VisionBlocked.source(vb, a1);
479 VisionBlocked.target(vb, a2);
480 neg find helper_collidingActors(a2, a1);
481}
482
483private pattern helper_collidingActors(a1:Actor, a2:Actor){
484 CollisionExists.source(vb, a1);
485 CollisionExists.target(vb, a2);
486}
487
488//<<END QUALITATIF ABSTRACTION>>
489
490////
491//CollisionExists - Time
492////
493
494
432@Constraint(severity="error", key={c}, message="x") 495@Constraint(severity="error", key={c}, message="x")
433pattern collisionExists_timeWithinBound(ss:CrossingScenario, c:CollisionExists) { 496pattern collisionExists_timeWithinBound(ss:CrossingScenario, c:CollisionExists) {
434 CrossingScenario.relations(ss, c); 497 CrossingScenario.relations(ss, c);
@@ -441,6 +504,10 @@ pattern collisionExists_timeNotNegative(c:CollisionExists) {
441 CollisionExists. collisionTime(c, cTime); 504 CollisionExists. collisionTime(c, cTime);
442 check(cTime <= 0.0);} 505 check(cTime <= 0.0);}
443 506
507////
508//CollisionExists - Physical Positioniung
509////
510
444private pattern helper_getCollExistsTime(a1:Actor, a2: Actor, cTime:java Double) { 511private pattern helper_getCollExistsTime(a1:Actor, a2: Actor, cTime:java Double) {
445 CollisionExists.source(c, a1); 512 CollisionExists.source(c, a1);
446 CollisionExists.target(c, a2); 513 CollisionExists.target(c, a2);
@@ -459,6 +526,8 @@ private pattern helper_getAllYCoords(a1:Actor, a2: Actor,
459 l1:java Double, l2:java Double, yPos1:java Double, yPos2:java Double, 526 l1:java Double, l2:java Double, yPos1:java Double, yPos2:java Double,
460 ySpeed1:java Double, ySpeed2:java Double) { 527 ySpeed1:java Double, ySpeed2:java Double) {
461 528
529 CollisionExists.source(c, a1);
530 CollisionExists.target(c, a2);
462 find helper_getYCoords(a1, l1, yPos1, ySpeed1); 531 find helper_getYCoords(a1, l1, yPos1, ySpeed1);
463 find helper_getYCoords(a2, l2, yPos2, ySpeed2); 532 find helper_getYCoords(a2, l2, yPos2, ySpeed2);
464} 533}
@@ -474,9 +543,11 @@ private pattern helper_getXCoords(a:Actor, l:java Double,
474private pattern helper_getAllXCoords(a1:Actor, a2: Actor, 543private pattern helper_getAllXCoords(a1:Actor, a2: Actor,
475 w1:java Double, w2:java Double, xPos1:java Double, xPos2:java Double, 544 w1:java Double, w2:java Double, xPos1:java Double, xPos2:java Double,
476 xSpeed1:java Double, xSpeed2:java Double) { 545 xSpeed1:java Double, xSpeed2:java Double) {
477 546
478 find helper_getYCoords(a1, w1, xPos1, xSpeed1); 547 CollisionExists.source(c, a1);
479 find helper_getYCoords(a2, w2, xPos2, xSpeed2); 548 CollisionExists.target(c, a2);
549 find helper_getXCoords(a1, w1, xPos1, xSpeed1);
550 find helper_getXCoords(a2, w2, xPos2, xSpeed2);
480} 551}
481 552
482@Constraint(severity="error", key={a1}, message="x") 553@Constraint(severity="error", key={a1}, message="x")
@@ -504,7 +575,7 @@ pattern collisionExists_defineCollision_y2(a1:Actor, a2:Actor) {
504pattern collisionExists_defineCollision_x1(a1:Actor, a2:Actor) { 575pattern collisionExists_defineCollision_x1(a1:Actor, a2:Actor) {
505 576
506 find helper_getCollExistsTime(a1, a2, cTime); 577 find helper_getCollExistsTime(a1, a2, cTime);
507 find helper_getAllYCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2); 578 find helper_getAllXCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2);
508 579
509 //check(x_1_left > x_2_right) 580 //check(x_1_left > x_2_right)
510 check((xPos1 + (xSpeed1 * cTime)) - (w1/2) > (xPos2 + (xSpeed2 * cTime)) + (w2/2)); 581 check((xPos1 + (xSpeed1 * cTime)) - (w1/2) > (xPos2 + (xSpeed2 * cTime)) + (w2/2));
@@ -515,13 +586,13 @@ pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor) {
515 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 586 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1
516 587
517 find helper_getCollExistsTime(a1, a2, cTime); 588 find helper_getCollExistsTime(a1, a2, cTime);
518 find helper_getAllYCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2); 589 find helper_getAllXCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2);
519 590
520 //check(x_1_right < x_2_left) 591 //check(x_1_right < x_2_left)
521 check((xPos1 + (xSpeed1 * cTime)) + (w1/2) < (xPos2 + (xSpeed2 * cTime)) - (w2/2)); 592 check((xPos1 + (xSpeed1 * cTime)) + (w1/2) < (xPos2 + (xSpeed2 * cTime)) - (w2/2));
522} 593}
523 594
524 595*/
525///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 596///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
526//VisionBlocked 597//VisionBlocked
527///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 598///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
@@ -545,6 +616,24 @@ pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) {
545 Actor.placedOn(a1, l); 616 Actor.placedOn(a1, l);
546 Actor.placedOn(a2, l); 617 Actor.placedOn(a2, l);
547} 618}
619
620@Constraint(severity="error", key={a1, a2}, message="x")
621pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) {
622 VisionBlocked.source(ce, a1);
623 VisionBlocked.target(ce, a2);
624 Actor.placedOn(a1, vl1);
625 Lane_Vertical(vl1);
626 Actor.placedOn(a2, vl2);
627 Lane_Vertical(vl2);
628} or {
629 VisionBlocked.source(ce, a1);
630 VisionBlocked.target(ce, a2);
631 Actor.placedOn(a1, hl1);
632 Lane_Horizontal(hl1);
633 Actor.placedOn(a2, hl2);
634 Lane_Horizontal(hl2);
635}
636
548//<<END QUALITATIF ABSTRACTION>> 637//<<END QUALITATIF ABSTRACTION>>
549 638
550@Constraint(severity="error", key={a1, a2}, message="x") 639@Constraint(severity="error", key={a1, a2}, message="x")
@@ -571,8 +660,7 @@ pattern visionBlocked_ites_notOnSameVertLine(a1:Actor, a2:Actor, vb:VisionBlocke
571 check(x1 == x2); 660 check(x1 == x2);
572} 661}
573 662
574//OPTIONS 1: everything is from a single check expression containing ITEs 663//TODO refactor?
575//Currently unhandled bygenerator
576@Constraint(severity="error", key={a1, vb}, message="x") 664@Constraint(severity="error", key={a1, vb}, message="x")
577pattern visionBlocked_ites_top(a1:Actor, a2:Actor, vb:VisionBlocked) { 665pattern visionBlocked_ites_top(a1:Actor, a2:Actor, vb:VisionBlocked) {
578 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 666 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1
@@ -596,6 +684,7 @@ pattern visionBlocked_ites_top(a1:Actor, a2:Actor, vb:VisionBlocked) {
596 < ((y1-y2)/(x1-x2))); 684 < ((y1-y2)/(x1-x2)));
597} 685}
598 686
687//TODO refactor?
599@Constraint(severity="error", key={a1, vb}, message="x") 688@Constraint(severity="error", key={a1, vb}, message="x")
600pattern visionBlocked_ites_bottom(a1:Actor, a2:Actor, vb:VisionBlocked) { 689pattern visionBlocked_ites_bottom(a1:Actor, a2:Actor, vb:VisionBlocked) {
601 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 690 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1
@@ -619,6 +708,35 @@ pattern visionBlocked_ites_bottom(a1:Actor, a2:Actor, vb:VisionBlocked) {
619 > ((y1-y2)/(x1-x2))); 708 > ((y1-y2)/(x1-x2)));
620} 709}
621 710
711@Constraint(severity="error", key={a1, a2}, message="x")
712pattern visionBlocked_blockerNotToRightOfBoth(a1:Actor, a2:Actor) {
713 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1
714 VisionBlocked.source(vb, a1);
715 VisionBlocked.target(vb, a2);
716 VisionBlocked.blockedBy(vb, aBlocker);
717
718 Actor.xPos(a1, x1);
719 Actor.xPos(a2, x2);
720 Actor.xPos(aBlocker, xBlocker);
721
722 check( x1 < xBlocker && x2 < xBlocker);
723}
724
725@Constraint(severity="error", key={a1, a2}, message="x")
726pattern visionBlocked_blockerNotToLeftOfBoth(a1:Actor, a2:Actor) {
727 //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1
728 VisionBlocked.source(vb, a1);
729 VisionBlocked.target(vb, a2);
730 VisionBlocked.blockedBy(vb, aBlocker);
731
732 Actor.xPos(a1, x1);
733 Actor.xPos(a2, x2);
734 Actor.xPos(aBlocker, xBlocker);
735
736 check( x1 > xBlocker && x2 > xBlocker);
737}
738
739
622/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 740/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
623//SeparationDistance 741//SeparationDistance
624/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// 742/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*//////
diff --git a/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java b/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java
index 02abbd28..0ccfc4a1 100644
--- a/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java
+++ b/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java
@@ -2,17 +2,11 @@ package crossingScenario.run;
2 2
3import java.awt.BasicStroke; 3import java.awt.BasicStroke;
4import java.awt.Color; 4import java.awt.Color;
5import java.awt.Desktop;
6import java.awt.Graphics2D; 5import java.awt.Graphics2D;
7import java.awt.image.BufferedImage; 6import java.awt.image.BufferedImage;
8import java.io.File; 7import java.io.File;
9import java.io.IOException; 8import java.io.IOException;
10import java.io.PrintWriter; 9import java.util.stream.Collectors;
11import java.nio.file.Path;
12import java.util.ArrayList;
13import java.util.List;
14import java.util.regex.Matcher;
15import java.util.regex.Pattern;
16 10
17import javax.imageio.ImageIO; 11import javax.imageio.ImageIO;
18 12
@@ -29,6 +23,7 @@ import crossingScenario.CrossingScenarioPackage;
29import crossingScenario.Lane; 23import crossingScenario.Lane;
30import crossingScenario.Lane_Horizontal; 24import crossingScenario.Lane_Horizontal;
31import crossingScenario.Lane_Vertical; 25import crossingScenario.Lane_Vertical;
26import crossingScenario.VisionBlocked;
32 27
33public class DrawScenario { 28public class DrawScenario {
34 public static final int SIZE = 1000; 29 public static final int SIZE = 1000;
@@ -71,9 +66,13 @@ public class DrawScenario {
71 66
72 //lanes 67 //lanes
73 g.setPaint(Color.RED); 68 g.setPaint(Color.RED);
69 //origin
74 g.drawRect(-5, -5, 10, 10); 70 g.drawRect(-5, -5, 10, 10);
71 //Axes
72 g.drawLine(-xSize/2, 0, xSize/2, 0);
73 g.drawLine(0, -ySize/2, 0, ySize/2);
75 for (Lane l : cs.getLanes()) { 74 for (Lane l : cs.getLanes()) {
76 int ref = (int) (l.getReferenceCoord() * multiplier); 75 int ref = (int) ((l.getReferenceCoord() +5)* multiplier);
77 if (l instanceof Lane_Horizontal) { 76 if (l instanceof Lane_Horizontal) {
78 g.drawLine(-xSize/2, ref, xSize/2, ref); 77 g.drawLine(-xSize/2, ref, xSize/2, ref);
79 } 78 }
@@ -82,7 +81,6 @@ public class DrawScenario {
82 } 81 }
83 } 82 }
84 83
85 g.setPaint(Color.GREEN);
86 for (Actor a : cs.getActors()) { 84 for (Actor a : cs.getActors()) {
87 //Draw actor 85 //Draw actor
88 int left = (int) ((a.getXPos()-a.getWidth()/2) * multiplier); 86 int left = (int) ((a.getXPos()-a.getWidth()/2) * multiplier);
@@ -94,6 +92,13 @@ public class DrawScenario {
94// System.out.println(width); 92// System.out.println(width);
95// System.out.println(length); 93// System.out.println(length);
96// System.out.println(); 94// System.out.println();
95 if (!cs.getRelations().stream().filter(r -> r instanceof VisionBlocked)
96 .filter(r -> ((VisionBlocked) r).getBlockedBy().equals(a)).
97 collect(Collectors.toList()).isEmpty())
98 g.setPaint(Color.BLACK);
99 else
100 g.setPaint(Color.GREEN);
101
97 g.drawRect(left, bot, width, length); 102 g.drawRect(left, bot, width, length);
98 103
99 //Draw Speed? 104 //Draw Speed?
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
index f2f43aaa..f74c2ab4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
@@ -207,13 +207,12 @@ class InstanceModel2PartialInterpretation {
207 } 207 }
208 } 208 }
209 // DEBUG 209 // DEBUG
210// println("DEBUG BEGINNING") 210 if (isIgnored) {
211// println(object) 211 println("IGNORED")
212// println(attribute) 212 println(object)
213// println(value) 213 println(attribute)
214// 214 println(object.eGet(attribute))
215// println("MAYIGNORE " + mayIgnored) 215 }
216// println("ISIGNORED " + isIgnored)
217 // END DEBUG 216 // END DEBUG
218 return isIgnored 217 return isIgnored
219 } 218 }