diff options
author | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-02-03 02:35:39 +0100 |
---|---|---|
committer | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-02-03 02:35:39 +0100 |
commit | 14afb998045e508b07633ea63c72b582084f8c4c (patch) | |
tree | 9c03bcfce180a950adb26ed0ec0bcc5c45fdfaec | |
parent | fix derived feature handling + impove dreal calling (diff) | |
download | VIATRA-Generator-14afb998045e508b07633ea63c72b582084f8c4c.tar.gz VIATRA-Generator-14afb998045e508b07633ea63c72b582084f8c4c.tar.zst VIATRA-Generator-14afb998045e508b07633ea63c72b582084f8c4c.zip |
major changes to CS case study, working example, few issues, major assumptions
13 files changed, 164 insertions, 531 deletions
diff --git a/Domains/crossingScenario/.classpath b/Domains/crossingScenario/.classpath index 5bc9ff04..b657c1bb 100644 --- a/Domains/crossingScenario/.classpath +++ b/Domains/crossingScenario/.classpath | |||
@@ -1,7 +1,12 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <classpath> | 2 | <classpath> |
3 | <classpathentry kind="src" path="ecore-gen"/> | 3 | <classpathentry kind="src" path="ecore-gen"/> |
4 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | 4 | <classpathentry kind="src" path="src-gen"/> |
5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
6 | <attributes> | ||
7 | <attribute name="module" value="true"/> | ||
8 | </attributes> | ||
9 | </classpathentry> | ||
5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | 10 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
6 | <classpathentry kind="src" path="src"/> | 11 | <classpathentry kind="src" path="src"/> |
7 | <classpathentry kind="output" path="bin"/> | 12 | <classpathentry kind="output" path="bin"/> |
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java index 1b570b6f..cbfc21cf 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java | |||
@@ -2,8 +2,6 @@ | |||
2 | */ | 2 | */ |
3 | package crossingScenario; | 3 | package crossingScenario; |
4 | 4 | ||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | 5 | import org.eclipse.emf.ecore.EObject; |
8 | 6 | ||
9 | /** | 7 | /** |
@@ -22,9 +20,6 @@ import org.eclipse.emf.ecore.EObject; | |||
22 | * <li>{@link crossingScenario.Actor#getXSpeed <em>XSpeed</em>}</li> | 20 | * <li>{@link crossingScenario.Actor#getXSpeed <em>XSpeed</em>}</li> |
23 | * <li>{@link crossingScenario.Actor#getPlacedOn <em>Placed On</em>}</li> | 21 | * <li>{@link crossingScenario.Actor#getPlacedOn <em>Placed On</em>}</li> |
24 | * <li>{@link crossingScenario.Actor#getYSpeed <em>YSpeed</em>}</li> | 22 | * <li>{@link crossingScenario.Actor#getYSpeed <em>YSpeed</em>}</li> |
25 | * <li>{@link crossingScenario.Actor#getDist_near <em>Dist near</em>}</li> | ||
26 | * <li>{@link crossingScenario.Actor#getDist_med <em>Dist med</em>}</li> | ||
27 | * <li>{@link crossingScenario.Actor#getDist_far <em>Dist far</em>}</li> | ||
28 | * </ul> | 23 | * </ul> |
29 | * | 24 | * |
30 | * @see crossingScenario.CrossingScenarioPackage#getActor() | 25 | * @see crossingScenario.CrossingScenarioPackage#getActor() |
@@ -190,40 +185,4 @@ public interface Actor extends EObject { | |||
190 | */ | 185 | */ |
191 | void setYSpeed(double value); | 186 | void setYSpeed(double value); |
192 | 187 | ||
193 | /** | ||
194 | * Returns the value of the '<em><b>Dist near</b></em>' reference list. | ||
195 | * The list contents are of type {@link crossingScenario.Actor}. | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @return the value of the '<em>Dist near</em>' reference list. | ||
199 | * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_near() | ||
200 | * @model transient="true" volatile="true" derived="true" | ||
201 | * @generated | ||
202 | */ | ||
203 | EList<Actor> getDist_near(); | ||
204 | |||
205 | /** | ||
206 | * Returns the value of the '<em><b>Dist med</b></em>' reference list. | ||
207 | * The list contents are of type {@link crossingScenario.Actor}. | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @return the value of the '<em>Dist med</em>' reference list. | ||
211 | * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_med() | ||
212 | * @model transient="true" volatile="true" derived="true" | ||
213 | * @generated | ||
214 | */ | ||
215 | EList<Actor> getDist_med(); | ||
216 | |||
217 | /** | ||
218 | * Returns the value of the '<em><b>Dist far</b></em>' reference list. | ||
219 | * The list contents are of type {@link crossingScenario.Actor}. | ||
220 | * <!-- begin-user-doc --> | ||
221 | * <!-- end-user-doc --> | ||
222 | * @return the value of the '<em>Dist far</em>' reference list. | ||
223 | * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_far() | ||
224 | * @model transient="true" volatile="true" derived="true" | ||
225 | * @generated | ||
226 | */ | ||
227 | EList<Actor> getDist_far(); | ||
228 | |||
229 | } // Actor | 188 | } // Actor |
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java index 9985f18a..b39553f9 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java | |||
@@ -276,40 +276,13 @@ public interface CrossingScenarioPackage extends EPackage { | |||
276 | int ACTOR__YSPEED = 6; | 276 | int ACTOR__YSPEED = 6; |
277 | 277 | ||
278 | /** | 278 | /** |
279 | * The feature id for the '<em><b>Dist near</b></em>' reference list. | ||
280 | * <!-- begin-user-doc --> | ||
281 | * <!-- end-user-doc --> | ||
282 | * @generated | ||
283 | * @ordered | ||
284 | */ | ||
285 | int ACTOR__DIST_NEAR = 7; | ||
286 | |||
287 | /** | ||
288 | * The feature id for the '<em><b>Dist med</b></em>' reference list. | ||
289 | * <!-- begin-user-doc --> | ||
290 | * <!-- end-user-doc --> | ||
291 | * @generated | ||
292 | * @ordered | ||
293 | */ | ||
294 | int ACTOR__DIST_MED = 8; | ||
295 | |||
296 | /** | ||
297 | * The feature id for the '<em><b>Dist far</b></em>' reference list. | ||
298 | * <!-- begin-user-doc --> | ||
299 | * <!-- end-user-doc --> | ||
300 | * @generated | ||
301 | * @ordered | ||
302 | */ | ||
303 | int ACTOR__DIST_FAR = 9; | ||
304 | |||
305 | /** | ||
306 | * The number of structural features of the '<em>Actor</em>' class. | 279 | * The number of structural features of the '<em>Actor</em>' class. |
307 | * <!-- begin-user-doc --> | 280 | * <!-- begin-user-doc --> |
308 | * <!-- end-user-doc --> | 281 | * <!-- end-user-doc --> |
309 | * @generated | 282 | * @generated |
310 | * @ordered | 283 | * @ordered |
311 | */ | 284 | */ |
312 | int ACTOR_FEATURE_COUNT = 10; | 285 | int ACTOR_FEATURE_COUNT = 7; |
313 | 286 | ||
314 | /** | 287 | /** |
315 | * The number of operations of the '<em>Actor</em>' class. | 288 | * The number of operations of the '<em>Actor</em>' class. |
@@ -550,33 +523,6 @@ public interface CrossingScenarioPackage extends EPackage { | |||
550 | int PEDESTRIAN__YSPEED = ACTOR__YSPEED; | 523 | int PEDESTRIAN__YSPEED = ACTOR__YSPEED; |
551 | 524 | ||
552 | /** | 525 | /** |
553 | * The feature id for the '<em><b>Dist near</b></em>' reference list. | ||
554 | * <!-- begin-user-doc --> | ||
555 | * <!-- end-user-doc --> | ||
556 | * @generated | ||
557 | * @ordered | ||
558 | */ | ||
559 | int PEDESTRIAN__DIST_NEAR = ACTOR__DIST_NEAR; | ||
560 | |||
561 | /** | ||
562 | * The feature id for the '<em><b>Dist med</b></em>' reference list. | ||
563 | * <!-- begin-user-doc --> | ||
564 | * <!-- end-user-doc --> | ||
565 | * @generated | ||
566 | * @ordered | ||
567 | */ | ||
568 | int PEDESTRIAN__DIST_MED = ACTOR__DIST_MED; | ||
569 | |||
570 | /** | ||
571 | * The feature id for the '<em><b>Dist far</b></em>' reference list. | ||
572 | * <!-- begin-user-doc --> | ||
573 | * <!-- end-user-doc --> | ||
574 | * @generated | ||
575 | * @ordered | ||
576 | */ | ||
577 | int PEDESTRIAN__DIST_FAR = ACTOR__DIST_FAR; | ||
578 | |||
579 | /** | ||
580 | * The number of structural features of the '<em>Pedestrian</em>' class. | 526 | * The number of structural features of the '<em>Pedestrian</em>' class. |
581 | * <!-- begin-user-doc --> | 527 | * <!-- begin-user-doc --> |
582 | * <!-- end-user-doc --> | 528 | * <!-- end-user-doc --> |
@@ -668,33 +614,6 @@ public interface CrossingScenarioPackage extends EPackage { | |||
668 | int VEHICLE__YSPEED = ACTOR__YSPEED; | 614 | int VEHICLE__YSPEED = ACTOR__YSPEED; |
669 | 615 | ||
670 | /** | 616 | /** |
671 | * The feature id for the '<em><b>Dist near</b></em>' reference list. | ||
672 | * <!-- begin-user-doc --> | ||
673 | * <!-- end-user-doc --> | ||
674 | * @generated | ||
675 | * @ordered | ||
676 | */ | ||
677 | int VEHICLE__DIST_NEAR = ACTOR__DIST_NEAR; | ||
678 | |||
679 | /** | ||
680 | * The feature id for the '<em><b>Dist med</b></em>' reference list. | ||
681 | * <!-- begin-user-doc --> | ||
682 | * <!-- end-user-doc --> | ||
683 | * @generated | ||
684 | * @ordered | ||
685 | */ | ||
686 | int VEHICLE__DIST_MED = ACTOR__DIST_MED; | ||
687 | |||
688 | /** | ||
689 | * The feature id for the '<em><b>Dist far</b></em>' reference list. | ||
690 | * <!-- begin-user-doc --> | ||
691 | * <!-- end-user-doc --> | ||
692 | * @generated | ||
693 | * @ordered | ||
694 | */ | ||
695 | int VEHICLE__DIST_FAR = ACTOR__DIST_FAR; | ||
696 | |||
697 | /** | ||
698 | * The number of structural features of the '<em>Vehicle</em>' class. | 617 | * The number of structural features of the '<em>Vehicle</em>' class. |
699 | * <!-- begin-user-doc --> | 618 | * <!-- begin-user-doc --> |
700 | * <!-- end-user-doc --> | 619 | * <!-- end-user-doc --> |
@@ -1023,39 +942,6 @@ public interface CrossingScenarioPackage extends EPackage { | |||
1023 | EAttribute getActor_YSpeed(); | 942 | EAttribute getActor_YSpeed(); |
1024 | 943 | ||
1025 | /** | 944 | /** |
1026 | * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_near <em>Dist near</em>}'. | ||
1027 | * <!-- begin-user-doc --> | ||
1028 | * <!-- end-user-doc --> | ||
1029 | * @return the meta object for the reference list '<em>Dist near</em>'. | ||
1030 | * @see crossingScenario.Actor#getDist_near() | ||
1031 | * @see #getActor() | ||
1032 | * @generated | ||
1033 | */ | ||
1034 | EReference getActor_Dist_near(); | ||
1035 | |||
1036 | /** | ||
1037 | * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_med <em>Dist med</em>}'. | ||
1038 | * <!-- begin-user-doc --> | ||
1039 | * <!-- end-user-doc --> | ||
1040 | * @return the meta object for the reference list '<em>Dist med</em>'. | ||
1041 | * @see crossingScenario.Actor#getDist_med() | ||
1042 | * @see #getActor() | ||
1043 | * @generated | ||
1044 | */ | ||
1045 | EReference getActor_Dist_med(); | ||
1046 | |||
1047 | /** | ||
1048 | * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_far <em>Dist far</em>}'. | ||
1049 | * <!-- begin-user-doc --> | ||
1050 | * <!-- end-user-doc --> | ||
1051 | * @return the meta object for the reference list '<em>Dist far</em>'. | ||
1052 | * @see crossingScenario.Actor#getDist_far() | ||
1053 | * @see #getActor() | ||
1054 | * @generated | ||
1055 | */ | ||
1056 | EReference getActor_Dist_far(); | ||
1057 | |||
1058 | /** | ||
1059 | * Returns the meta object for class '{@link crossingScenario.Relation <em>Relation</em>}'. | 945 | * Returns the meta object for class '{@link crossingScenario.Relation <em>Relation</em>}'. |
1060 | * <!-- begin-user-doc --> | 946 | * <!-- begin-user-doc --> |
1061 | * <!-- end-user-doc --> | 947 | * <!-- end-user-doc --> |
@@ -1359,30 +1245,6 @@ public interface CrossingScenarioPackage extends EPackage { | |||
1359 | EAttribute ACTOR__YSPEED = eINSTANCE.getActor_YSpeed(); | 1245 | EAttribute ACTOR__YSPEED = eINSTANCE.getActor_YSpeed(); |
1360 | 1246 | ||
1361 | /** | 1247 | /** |
1362 | * The meta object literal for the '<em><b>Dist near</b></em>' reference list feature. | ||
1363 | * <!-- begin-user-doc --> | ||
1364 | * <!-- end-user-doc --> | ||
1365 | * @generated | ||
1366 | */ | ||
1367 | EReference ACTOR__DIST_NEAR = eINSTANCE.getActor_Dist_near(); | ||
1368 | |||
1369 | /** | ||
1370 | * The meta object literal for the '<em><b>Dist med</b></em>' reference list feature. | ||
1371 | * <!-- begin-user-doc --> | ||
1372 | * <!-- end-user-doc --> | ||
1373 | * @generated | ||
1374 | */ | ||
1375 | EReference ACTOR__DIST_MED = eINSTANCE.getActor_Dist_med(); | ||
1376 | |||
1377 | /** | ||
1378 | * The meta object literal for the '<em><b>Dist far</b></em>' reference list feature. | ||
1379 | * <!-- begin-user-doc --> | ||
1380 | * <!-- end-user-doc --> | ||
1381 | * @generated | ||
1382 | */ | ||
1383 | EReference ACTOR__DIST_FAR = eINSTANCE.getActor_Dist_far(); | ||
1384 | |||
1385 | /** | ||
1386 | * The meta object literal for the '{@link crossingScenario.impl.RelationImpl <em>Relation</em>}' class. | 1248 | * The meta object literal for the '{@link crossingScenario.impl.RelationImpl <em>Relation</em>}' class. |
1387 | * <!-- begin-user-doc --> | 1249 | * <!-- begin-user-doc --> |
1388 | * <!-- end-user-doc --> | 1250 | * <!-- end-user-doc --> |
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java index 52d251e0..9ef288f0 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java | |||
@@ -5,14 +5,8 @@ package crossingScenario.impl; | |||
5 | import crossingScenario.Actor; | 5 | import crossingScenario.Actor; |
6 | import crossingScenario.CrossingScenarioPackage; | 6 | import crossingScenario.CrossingScenarioPackage; |
7 | import crossingScenario.Lane; | 7 | import crossingScenario.Lane; |
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.Notification; | 8 | import org.eclipse.emf.common.notify.Notification; |
12 | import org.eclipse.emf.common.notify.NotificationChain; | 9 | import org.eclipse.emf.common.notify.NotificationChain; |
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | 10 | import org.eclipse.emf.ecore.EClass; |
17 | import org.eclipse.emf.ecore.InternalEObject; | 11 | import org.eclipse.emf.ecore.InternalEObject; |
18 | 12 | ||
@@ -34,9 +28,6 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | |||
34 | * <li>{@link crossingScenario.impl.ActorImpl#getXSpeed <em>XSpeed</em>}</li> | 28 | * <li>{@link crossingScenario.impl.ActorImpl#getXSpeed <em>XSpeed</em>}</li> |
35 | * <li>{@link crossingScenario.impl.ActorImpl#getPlacedOn <em>Placed On</em>}</li> | 29 | * <li>{@link crossingScenario.impl.ActorImpl#getPlacedOn <em>Placed On</em>}</li> |
36 | * <li>{@link crossingScenario.impl.ActorImpl#getYSpeed <em>YSpeed</em>}</li> | 30 | * <li>{@link crossingScenario.impl.ActorImpl#getYSpeed <em>YSpeed</em>}</li> |
37 | * <li>{@link crossingScenario.impl.ActorImpl#getDist_near <em>Dist near</em>}</li> | ||
38 | * <li>{@link crossingScenario.impl.ActorImpl#getDist_med <em>Dist med</em>}</li> | ||
39 | * <li>{@link crossingScenario.impl.ActorImpl#getDist_far <em>Dist far</em>}</li> | ||
40 | * </ul> | 31 | * </ul> |
41 | * | 32 | * |
42 | * @generated | 33 | * @generated |
@@ -397,48 +388,6 @@ public abstract class ActorImpl extends MinimalEObjectImpl.Container implements | |||
397 | * @generated | 388 | * @generated |
398 | */ | 389 | */ |
399 | @Override | 390 | @Override |
400 | public EList<Actor> getDist_near() { | ||
401 | // TODO: implement this method to return the 'Dist near' reference list | ||
402 | // Ensure that you remove @generated or mark it @generated NOT | ||
403 | // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting | ||
404 | // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. | ||
405 | throw new UnsupportedOperationException(); | ||
406 | } | ||
407 | |||
408 | /** | ||
409 | * <!-- begin-user-doc --> | ||
410 | * <!-- end-user-doc --> | ||
411 | * @generated | ||
412 | */ | ||
413 | @Override | ||
414 | public EList<Actor> getDist_med() { | ||
415 | // TODO: implement this method to return the 'Dist med' reference list | ||
416 | // Ensure that you remove @generated or mark it @generated NOT | ||
417 | // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting | ||
418 | // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. | ||
419 | throw new UnsupportedOperationException(); | ||
420 | } | ||
421 | |||
422 | /** | ||
423 | * <!-- begin-user-doc --> | ||
424 | * <!-- end-user-doc --> | ||
425 | * @generated | ||
426 | */ | ||
427 | @Override | ||
428 | public EList<Actor> getDist_far() { | ||
429 | // TODO: implement this method to return the 'Dist far' reference list | ||
430 | // Ensure that you remove @generated or mark it @generated NOT | ||
431 | // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting | ||
432 | // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. | ||
433 | throw new UnsupportedOperationException(); | ||
434 | } | ||
435 | |||
436 | /** | ||
437 | * <!-- begin-user-doc --> | ||
438 | * <!-- end-user-doc --> | ||
439 | * @generated | ||
440 | */ | ||
441 | @Override | ||
442 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | 391 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
443 | switch (featureID) { | 392 | switch (featureID) { |
444 | case CrossingScenarioPackage.ACTOR__PLACED_ON: | 393 | case CrossingScenarioPackage.ACTOR__PLACED_ON: |
@@ -486,12 +435,6 @@ public abstract class ActorImpl extends MinimalEObjectImpl.Container implements | |||
486 | return basicGetPlacedOn(); | 435 | return basicGetPlacedOn(); |
487 | case CrossingScenarioPackage.ACTOR__YSPEED: | 436 | case CrossingScenarioPackage.ACTOR__YSPEED: |
488 | return getYSpeed(); | 437 | return getYSpeed(); |
489 | case CrossingScenarioPackage.ACTOR__DIST_NEAR: | ||
490 | return getDist_near(); | ||
491 | case CrossingScenarioPackage.ACTOR__DIST_MED: | ||
492 | return getDist_med(); | ||
493 | case CrossingScenarioPackage.ACTOR__DIST_FAR: | ||
494 | return getDist_far(); | ||
495 | } | 438 | } |
496 | return super.eGet(featureID, resolve, coreType); | 439 | return super.eGet(featureID, resolve, coreType); |
497 | } | 440 | } |
@@ -526,18 +469,6 @@ public abstract class ActorImpl extends MinimalEObjectImpl.Container implements | |||
526 | case CrossingScenarioPackage.ACTOR__YSPEED: | 469 | case CrossingScenarioPackage.ACTOR__YSPEED: |
527 | setYSpeed((Double)newValue); | 470 | setYSpeed((Double)newValue); |
528 | return; | 471 | return; |
529 | case CrossingScenarioPackage.ACTOR__DIST_NEAR: | ||
530 | getDist_near().clear(); | ||
531 | getDist_near().addAll((Collection<? extends Actor>)newValue); | ||
532 | return; | ||
533 | case CrossingScenarioPackage.ACTOR__DIST_MED: | ||
534 | getDist_med().clear(); | ||
535 | getDist_med().addAll((Collection<? extends Actor>)newValue); | ||
536 | return; | ||
537 | case CrossingScenarioPackage.ACTOR__DIST_FAR: | ||
538 | getDist_far().clear(); | ||
539 | getDist_far().addAll((Collection<? extends Actor>)newValue); | ||
540 | return; | ||
541 | } | 472 | } |
542 | super.eSet(featureID, newValue); | 473 | super.eSet(featureID, newValue); |
543 | } | 474 | } |
@@ -571,15 +502,6 @@ public abstract class ActorImpl extends MinimalEObjectImpl.Container implements | |||
571 | case CrossingScenarioPackage.ACTOR__YSPEED: | 502 | case CrossingScenarioPackage.ACTOR__YSPEED: |
572 | setYSpeed(YSPEED_EDEFAULT); | 503 | setYSpeed(YSPEED_EDEFAULT); |
573 | return; | 504 | return; |
574 | case CrossingScenarioPackage.ACTOR__DIST_NEAR: | ||
575 | getDist_near().clear(); | ||
576 | return; | ||
577 | case CrossingScenarioPackage.ACTOR__DIST_MED: | ||
578 | getDist_med().clear(); | ||
579 | return; | ||
580 | case CrossingScenarioPackage.ACTOR__DIST_FAR: | ||
581 | getDist_far().clear(); | ||
582 | return; | ||
583 | } | 505 | } |
584 | super.eUnset(featureID); | 506 | super.eUnset(featureID); |
585 | } | 507 | } |
@@ -606,12 +528,6 @@ public abstract class ActorImpl extends MinimalEObjectImpl.Container implements | |||
606 | return placedOn != null; | 528 | return placedOn != null; |
607 | case CrossingScenarioPackage.ACTOR__YSPEED: | 529 | case CrossingScenarioPackage.ACTOR__YSPEED: |
608 | return ySpeed != YSPEED_EDEFAULT; | 530 | return ySpeed != YSPEED_EDEFAULT; |
609 | case CrossingScenarioPackage.ACTOR__DIST_NEAR: | ||
610 | return !getDist_near().isEmpty(); | ||
611 | case CrossingScenarioPackage.ACTOR__DIST_MED: | ||
612 | return !getDist_med().isEmpty(); | ||
613 | case CrossingScenarioPackage.ACTOR__DIST_FAR: | ||
614 | return !getDist_far().isEmpty(); | ||
615 | } | 531 | } |
616 | return super.eIsSet(featureID); | 532 | return super.eIsSet(featureID); |
617 | } | 533 | } |
diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java index 7f8f7357..887e02fe 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java | |||
@@ -366,36 +366,6 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin | |||
366 | * @generated | 366 | * @generated |
367 | */ | 367 | */ |
368 | @Override | 368 | @Override |
369 | public EReference getActor_Dist_near() { | ||
370 | return (EReference)actorEClass.getEStructuralFeatures().get(7); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * <!-- begin-user-doc --> | ||
375 | * <!-- end-user-doc --> | ||
376 | * @generated | ||
377 | */ | ||
378 | @Override | ||
379 | public EReference getActor_Dist_med() { | ||
380 | return (EReference)actorEClass.getEStructuralFeatures().get(8); | ||
381 | } | ||
382 | |||
383 | /** | ||
384 | * <!-- begin-user-doc --> | ||
385 | * <!-- end-user-doc --> | ||
386 | * @generated | ||
387 | */ | ||
388 | @Override | ||
389 | public EReference getActor_Dist_far() { | ||
390 | return (EReference)actorEClass.getEStructuralFeatures().get(9); | ||
391 | } | ||
392 | |||
393 | /** | ||
394 | * <!-- begin-user-doc --> | ||
395 | * <!-- end-user-doc --> | ||
396 | * @generated | ||
397 | */ | ||
398 | @Override | ||
399 | public EClass getRelation() { | 369 | public EClass getRelation() { |
400 | return relationEClass; | 370 | return relationEClass; |
401 | } | 371 | } |
@@ -551,9 +521,6 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin | |||
551 | createEAttribute(actorEClass, ACTOR__XSPEED); | 521 | createEAttribute(actorEClass, ACTOR__XSPEED); |
552 | createEReference(actorEClass, ACTOR__PLACED_ON); | 522 | createEReference(actorEClass, ACTOR__PLACED_ON); |
553 | createEAttribute(actorEClass, ACTOR__YSPEED); | 523 | createEAttribute(actorEClass, ACTOR__YSPEED); |
554 | createEReference(actorEClass, ACTOR__DIST_NEAR); | ||
555 | createEReference(actorEClass, ACTOR__DIST_MED); | ||
556 | createEReference(actorEClass, ACTOR__DIST_FAR); | ||
557 | 524 | ||
558 | relationEClass = createEClass(RELATION); | 525 | relationEClass = createEClass(RELATION); |
559 | createEReference(relationEClass, RELATION__TARGET); | 526 | createEReference(relationEClass, RELATION__TARGET); |
@@ -632,9 +599,6 @@ public class CrossingScenarioPackageImpl extends EPackageImpl implements Crossin | |||
632 | 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); | 599 | 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); |
633 | 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); | 600 | 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); |
634 | initEAttribute(getActor_YSpeed(), ecorePackage.getEDouble(), "ySpeed", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 601 | initEAttribute(getActor_YSpeed(), ecorePackage.getEDouble(), "ySpeed", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
635 | initEReference(getActor_Dist_near(), this.getActor(), null, "dist_near", null, 0, -1, Actor.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); | ||
636 | initEReference(getActor_Dist_med(), this.getActor(), null, "dist_med", null, 0, -1, Actor.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); | ||
637 | initEReference(getActor_Dist_far(), this.getActor(), null, "dist_far", null, 0, -1, Actor.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); | ||
638 | 602 | ||
639 | initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 603 | initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
640 | initEReference(getRelation_Target(), this.getActor(), null, "target", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 604 | initEReference(getRelation_Target(), this.getActor(), null, "target", null, 1, 1, Relation.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 7d329d18..8ce9f6ee 100644 --- a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig +++ b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig | |||
@@ -10,7 +10,6 @@ generate { | |||
10 | scope = { | 10 | scope = { |
11 | #node += 0..* | 11 | #node += 0..* |
12 | ,#<Lane> += 0 | 12 | ,#<Lane> += 0 |
13 | //,#<Actor> = 25..* | ||
14 | ,#<Relation> += 0 | 13 | ,#<Relation> += 0 |
15 | //,#<CollisionExists> = 1 | 14 | //,#<CollisionExists> = 1 |
16 | //,#<SeparationDistance> = 0 | 15 | //,#<SeparationDistance> = 0 |
@@ -22,7 +21,7 @@ generate { | |||
22 | runtime = 10000, | 21 | runtime = 10000, |
23 | log-level = none, | 22 | log-level = none, |
24 | "numeric-solver" = "dreal-local", | 23 | "numeric-solver" = "dreal-local", |
25 | "dreal-local-path" = "/home/models/dreal4/bazel-bin/dreal/dreal", | 24 | "dreal-local-path" = "../../Solvers/dreal4/bazel-bin/dreal/dreal", |
26 | "ignored-attributes" = " | 25 | "ignored-attributes" = " |
27 | Pedestrian.xPos=*, | 26 | Pedestrian.xPos=*, |
28 | Pedestrian.yPos=*, | 27 | Pedestrian.yPos=*, |
@@ -40,7 +39,7 @@ generate { | |||
40 | "scopePropagator" = "polyhedral"} | 39 | "scopePropagator" = "polyhedral"} |
41 | 40 | ||
42 | runs = 1 | 41 | runs = 1 |
43 | number = 10 | 42 | number = 3 |
44 | debug = "outputs/debug" | 43 | debug = "outputs/debug" |
45 | log = "outputs/debug/log.txt" | 44 | log = "outputs/debug/log.txt" |
46 | output = "outputs/models" | 45 | output = "outputs/models" |
diff --git a/Domains/crossingScenario/model/crossingScenario.ecore b/Domains/crossingScenario/model/crossingScenario.ecore index 9f979b96..c5cddd7f 100644 --- a/Domains/crossingScenario/model/crossingScenario.ecore +++ b/Domains/crossingScenario/model/crossingScenario.ecore | |||
@@ -35,12 +35,6 @@ | |||
35 | eType="#//Lane" eOpposite="#//Lane/actors"/> | 35 | eType="#//Lane" eOpposite="#//Lane/actors"/> |
36 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="ySpeed" lowerBound="1" | 36 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="ySpeed" lowerBound="1" |
37 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> | 37 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> |
38 | <eStructuralFeatures xsi:type="ecore:EReference" name="dist_near" upperBound="-1" | ||
39 | eType="#//Actor" volatile="true" transient="true" derived="true"/> | ||
40 | <eStructuralFeatures xsi:type="ecore:EReference" name="dist_med" upperBound="-1" | ||
41 | eType="#//Actor" volatile="true" transient="true" derived="true"/> | ||
42 | <eStructuralFeatures xsi:type="ecore:EReference" name="dist_far" upperBound="-1" | ||
43 | eType="#//Actor" volatile="true" transient="true" derived="true"/> | ||
44 | </eClassifiers> | 38 | </eClassifiers> |
45 | <eClassifiers xsi:type="ecore:EClass" name="Relation" abstract="true"> | 39 | <eClassifiers xsi:type="ecore:EClass" name="Relation" abstract="true"> |
46 | <eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1" | 40 | <eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1" |
diff --git a/Domains/crossingScenario/model/crossingScenario.genmodel b/Domains/crossingScenario/model/crossingScenario.genmodel index 1f2368a9..5cd112ec 100644 --- a/Domains/crossingScenario/model/crossingScenario.genmodel +++ b/Domains/crossingScenario/model/crossingScenario.genmodel | |||
@@ -28,9 +28,6 @@ | |||
28 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Actor/xSpeed"/> | 28 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Actor/xSpeed"/> |
29 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Actor/placedOn"/> | 29 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Actor/placedOn"/> |
30 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Actor/ySpeed"/> | 30 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute crossingScenario.ecore#//Actor/ySpeed"/> |
31 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Actor/dist_near"/> | ||
32 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Actor/dist_med"/> | ||
33 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Actor/dist_far"/> | ||
34 | </genClasses> | 31 | </genClasses> |
35 | <genClasses image="false" ecoreClass="crossingScenario.ecore#//Relation"> | 32 | <genClasses image="false" ecoreClass="crossingScenario.ecore#//Relation"> |
36 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Relation/target"/> | 33 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference crossingScenario.ecore#//Relation/target"/> |
diff --git a/Domains/crossingScenario/model/crossingScenario2.aird b/Domains/crossingScenario/model/crossingScenario2.aird index f278e603..daf4df5b 100644 --- a/Domains/crossingScenario/model/crossingScenario2.aird +++ b/Domains/crossingScenario/model/crossingScenario2.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="e5ca3605-ce4f-46cf-a032-4393ade09c76"> | 8 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_MXYWcFZ_Eeugh9dythfu8g" name="crossingScenario class diagram" repPath="#_MV4hoFZ_Eeugh9dythfu8g" changeId="e494051d-6733-4fb7-8f09-4c63797a8d20"> |
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> |
@@ -48,15 +48,6 @@ | |||
48 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | 48 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> |
49 | </endLabelStyleDescription> | 49 | </endLabelStyleDescription> |
50 | </computedStyleDescriptions> | 50 | </computedStyleDescriptions> |
51 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_ahefpltLEeuZZYOcQVw9qw" routingStyle="manhattan"> | ||
52 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> | ||
53 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_ahefp1tLEeuZZYOcQVw9qw" showIcon="false" labelExpression="service:render"> | ||
54 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
55 | </centerLabelStyleDescription> | ||
56 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_ahefqFtLEeuZZYOcQVw9qw" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
57 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
58 | </endLabelStyleDescription> | ||
59 | </computedStyleDescriptions> | ||
60 | </data> | 51 | </data> |
61 | </ownedAnnotationEntries> | 52 | </ownedAnnotationEntries> |
62 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_MYg-4FZ_Eeugh9dythfu8g" source="GMF_DIAGRAMS"> | 53 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_MYg-4FZ_Eeugh9dythfu8g" source="GMF_DIAGRAMS"> |
@@ -364,54 +355,6 @@ | |||
364 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUFtGEeuZZYOcQVw9qw" id="(0.8960270498732037,0.30434782608695654)"/> | 355 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUFtGEeuZZYOcQVw9qw" id="(0.8960270498732037,0.30434782608695654)"/> |
365 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUVtGEeuZZYOcQVw9qw" id="(0.7711864406779662,0.02564102564102564)"/> | 356 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_to_VUVtGEeuZZYOcQVw9qw" id="(0.7711864406779662,0.02564102564102564)"/> |
366 | </edges> | 357 | </edges> |
367 | <edges xmi:type="notation:Edge" xmi:id="_V6FdwFtLEeuZZYOcQVw9qw" type="4001" element="_V5wGk1tLEeuZZYOcQVw9qw" source="_Nbp241Z_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> | ||
368 | <children xmi:type="notation:Node" xmi:id="_V6FdxFtLEeuZZYOcQVw9qw" type="6001"> | ||
369 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_V6FdxVtLEeuZZYOcQVw9qw" y="-55"/> | ||
370 | </children> | ||
371 | <children xmi:type="notation:Node" xmi:id="_V6FdxltLEeuZZYOcQVw9qw" type="6002"> | ||
372 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_V6Fdx1tLEeuZZYOcQVw9qw" x="3" y="7"/> | ||
373 | </children> | ||
374 | <children xmi:type="notation:Node" xmi:id="_V6FdyFtLEeuZZYOcQVw9qw" type="6003"> | ||
375 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_V6FdyVtLEeuZZYOcQVw9qw" x="-3" y="-10"/> | ||
376 | </children> | ||
377 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_V6FdwVtLEeuZZYOcQVw9qw" routing="Rectilinear"/> | ||
378 | <styles xmi:type="notation:FontStyle" xmi:id="_V6FdwltLEeuZZYOcQVw9qw" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> | ||
379 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_V6Fdw1tLEeuZZYOcQVw9qw" points="[130, 81, 138, -22]$[169, 81, 177, -22]$[169, 105, 177, 2]$[130, 105, 138, 2]"/> | ||
380 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_V6FdyltLEeuZZYOcQVw9qw" id="(0.06474820143884892,0.064)"/> | ||
381 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_V6Fdy1tLEeuZZYOcQVw9qw" id="(0.007194244604316547,0.888)"/> | ||
382 | </edges> | ||
383 | <edges xmi:type="notation:Edge" xmi:id="_gKjoAFtLEeuZZYOcQVw9qw" type="4001" element="_gJ0oPFtLEeuZZYOcQVw9qw" source="_Nbp241Z_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> | ||
384 | <children xmi:type="notation:Node" xmi:id="_gKkPEFtLEeuZZYOcQVw9qw" type="6001"> | ||
385 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gKkPEVtLEeuZZYOcQVw9qw" y="-54"/> | ||
386 | </children> | ||
387 | <children xmi:type="notation:Node" xmi:id="_gKkPEltLEeuZZYOcQVw9qw" type="6002"> | ||
388 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gKkPE1tLEeuZZYOcQVw9qw" x="25" y="11"/> | ||
389 | </children> | ||
390 | <children xmi:type="notation:Node" xmi:id="_gKkPFFtLEeuZZYOcQVw9qw" type="6003"> | ||
391 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gKkPFVtLEeuZZYOcQVw9qw" x="-14" y="23"/> | ||
392 | </children> | ||
393 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_gKjoAVtLEeuZZYOcQVw9qw" routing="Rectilinear"/> | ||
394 | <styles xmi:type="notation:FontStyle" xmi:id="_gKjoAltLEeuZZYOcQVw9qw" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> | ||
395 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_gKjoA1tLEeuZZYOcQVw9qw" points="[88, 51, 83, 46]$[128, 51, 123, 46]$[128, 76, 123, 71]$[88, 76, 83, 71]"/> | ||
396 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gKk2IFtLEeuZZYOcQVw9qw" id="(0.3669064748201439,0.0)"/> | ||
397 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gKk2IVtLEeuZZYOcQVw9qw" id="(0.4028776978417266,0.04)"/> | ||
398 | </edges> | ||
399 | <edges xmi:type="notation:Edge" xmi:id="_nAXCMFtLEeuZZYOcQVw9qw" type="4001" element="_nADgPFtLEeuZZYOcQVw9qw" source="_Nbp241Z_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> | ||
400 | <children xmi:type="notation:Node" xmi:id="_nAXCNFtLEeuZZYOcQVw9qw" type="6001"> | ||
401 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nAXCNVtLEeuZZYOcQVw9qw" x="1" y="-52"/> | ||
402 | </children> | ||
403 | <children xmi:type="notation:Node" xmi:id="_nAXCNltLEeuZZYOcQVw9qw" type="6002"> | ||
404 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nAXCN1tLEeuZZYOcQVw9qw" x="7" y="9"/> | ||
405 | </children> | ||
406 | <children xmi:type="notation:Node" xmi:id="_nAXCOFtLEeuZZYOcQVw9qw" type="6003"> | ||
407 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nAXCOVtLEeuZZYOcQVw9qw" x="-7" y="28"/> | ||
408 | </children> | ||
409 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_nAXCMVtLEeuZZYOcQVw9qw" routing="Rectilinear"/> | ||
410 | <styles xmi:type="notation:FontStyle" xmi:id="_nAXCMltLEeuZZYOcQVw9qw" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> | ||
411 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nAXCM1tLEeuZZYOcQVw9qw" points="[33, 12, 19, 9]$[74, 12, 60, 9]$[74, 35, 60, 32]$[33, 35, 19, 32]"/> | ||
412 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nAXCOltLEeuZZYOcQVw9qw" id="(0.762589928057554,0.016)"/> | ||
413 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nAXCO1tLEeuZZYOcQVw9qw" id="(0.8633093525179856,0.04)"/> | ||
414 | </edges> | ||
415 | <edges xmi:type="notation:Edge" xmi:id="_zbrOMFtdEeuZZYOcQVw9qw" type="4001" element="_zbbWkFtdEeuZZYOcQVw9qw" source="_NbrsEFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> | 358 | <edges xmi:type="notation:Edge" xmi:id="_zbrOMFtdEeuZZYOcQVw9qw" type="4001" element="_zbbWkFtdEeuZZYOcQVw9qw" source="_NbrsEFZ_Eeugh9dythfu8g" target="_Nbp241Z_Eeugh9dythfu8g"> |
416 | <children xmi:type="notation:Node" xmi:id="_zbrONFtdEeuZZYOcQVw9qw" type="6001"> | 359 | <children xmi:type="notation:Node" xmi:id="_zbrONFtdEeuZZYOcQVw9qw" type="6001"> |
417 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbrONVtdEeuZZYOcQVw9qw" x="21" y="-13"/> | 360 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbrONVtdEeuZZYOcQVw9qw" x="21" y="-13"/> |
@@ -533,7 +476,7 @@ | |||
533 | <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']"/> | 476 | <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']"/> |
534 | </ownedElements> | 477 | </ownedElements> |
535 | </ownedDiagramElements> | 478 | </ownedDiagramElements> |
536 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_NaHl0FZ_Eeugh9dythfu8g" name="Actor" tooltipText="" outgoingEdges="_V5wGk1tLEeuZZYOcQVw9qw _gJ0oPFtLEeuZZYOcQVw9qw _nADgPFtLEeuZZYOcQVw9qw" incomingEdges="_NbAWoFZ_Eeugh9dythfu8g _NbGdQ1Z_Eeugh9dythfu8g _NbHEWVZ_Eeugh9dythfu8g _NbTRkFZ_Eeugh9dythfu8g _NbT4plZ_Eeugh9dythfu8g _NbVGwFZ_Eeugh9dythfu8g _V5wGk1tLEeuZZYOcQVw9qw _gJ0oPFtLEeuZZYOcQVw9qw _nADgPFtLEeuZZYOcQVw9qw _zbbWkFtdEeuZZYOcQVw9qw" width="12" height="10"> | 479 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_NaHl0FZ_Eeugh9dythfu8g" name="Actor" tooltipText="" incomingEdges="_NbAWoFZ_Eeugh9dythfu8g _NbGdQ1Z_Eeugh9dythfu8g _NbHEWVZ_Eeugh9dythfu8g _NbTRkFZ_Eeugh9dythfu8g _NbT4plZ_Eeugh9dythfu8g _NbVGwFZ_Eeugh9dythfu8g _zbbWkFtdEeuZZYOcQVw9qw" width="12" height="10"> |
537 | <target xmi:type="ecore:EClass" href="crossingScenario.ecore#//Actor"/> | 480 | <target xmi:type="ecore:EClass" href="crossingScenario.ecore#//Actor"/> |
538 | <semanticElements xmi:type="ecore:EClass" href="crossingScenario.ecore#//Actor"/> | 481 | <semanticElements xmi:type="ecore:EClass" href="crossingScenario.ecore#//Actor"/> |
539 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 482 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -801,33 +744,6 @@ | |||
801 | </ownedStyle> | 744 | </ownedStyle> |
802 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 745 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
803 | </ownedDiagramElements> | 746 | </ownedDiagramElements> |
804 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_V5wGk1tLEeuZZYOcQVw9qw" name="[0..*] /dist_near" sourceNode="_NaHl0FZ_Eeugh9dythfu8g" targetNode="_NaHl0FZ_Eeugh9dythfu8g"> | ||
805 | <target xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_near"/> | ||
806 | <semanticElements xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_near"/> | ||
807 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_ahefqVtLEeuZZYOcQVw9qw" description="_ahefpltLEeuZZYOcQVw9qw" routingStyle="manhattan" strokeColor="114,159,207"> | ||
808 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_ahefq1tLEeuZZYOcQVw9qw" showIcon="false" labelColor="39,76,114"/> | ||
809 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_ahefqltLEeuZZYOcQVw9qw" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
810 | </ownedStyle> | ||
811 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
812 | </ownedDiagramElements> | ||
813 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_gJ0oPFtLEeuZZYOcQVw9qw" name="[0..*] /dist_med" sourceNode="_NaHl0FZ_Eeugh9dythfu8g" targetNode="_NaHl0FZ_Eeugh9dythfu8g"> | ||
814 | <target xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_med"/> | ||
815 | <semanticElements xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_med"/> | ||
816 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_lfr5pltLEeuZZYOcQVw9qw" description="_ahefpltLEeuZZYOcQVw9qw" routingStyle="manhattan" strokeColor="114,159,207"> | ||
817 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_lfr5qFtLEeuZZYOcQVw9qw" showIcon="false" labelColor="39,76,114"/> | ||
818 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_lfr5p1tLEeuZZYOcQVw9qw" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
819 | </ownedStyle> | ||
820 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
821 | </ownedDiagramElements> | ||
822 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_nADgPFtLEeuZZYOcQVw9qw" name="[0..*] /dist_far" sourceNode="_NaHl0FZ_Eeugh9dythfu8g" targetNode="_NaHl0FZ_Eeugh9dythfu8g"> | ||
823 | <target xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_far"/> | ||
824 | <semanticElements xmi:type="ecore:EReference" href="crossingScenario.ecore#//Actor/dist_far"/> | ||
825 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_q3u8YFtLEeuZZYOcQVw9qw" description="_ahefpltLEeuZZYOcQVw9qw" routingStyle="manhattan" strokeColor="114,159,207"> | ||
826 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_q3u8YltLEeuZZYOcQVw9qw" showIcon="false" labelColor="39,76,114"/> | ||
827 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_q3u8YVtLEeuZZYOcQVw9qw" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
828 | </ownedStyle> | ||
829 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
830 | </ownedDiagramElements> | ||
831 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_zbbWkFtdEeuZZYOcQVw9qw" name="[1..1] source" sourceNode="_NaKpIVZ_Eeugh9dythfu8g" targetNode="_NaHl0FZ_Eeugh9dythfu8g"> | 747 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_zbbWkFtdEeuZZYOcQVw9qw" name="[1..1] source" sourceNode="_NaKpIVZ_Eeugh9dythfu8g" targetNode="_NaHl0FZ_Eeugh9dythfu8g"> |
832 | <target xmi:type="ecore:EReference" href="crossingScenario.ecore#//Relation/source"/> | 748 | <target xmi:type="ecore:EReference" href="crossingScenario.ecore#//Relation/source"/> |
833 | <semanticElements xmi:type="ecore:EReference" href="crossingScenario.ecore#//Relation/source"/> | 749 | <semanticElements xmi:type="ecore:EReference" href="crossingScenario.ecore#//Relation/source"/> |
diff --git a/Domains/crossingScenario/plugin.xml b/Domains/crossingScenario/plugin.xml index c8846e1b..8e759f1f 100644 --- a/Domains/crossingScenario/plugin.xml +++ b/Domains/crossingScenario/plugin.xml | |||
@@ -1,7 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.0"?><!-- | 1 | <?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.0"?><!-- |
2 | --><plugin> | 2 | --><plugin> |
3 | <extension point="org.eclipse.emf.ecore.generated_package"> | 3 | <extension point="org.eclipse.emf.ecore.generated_package"> |
4 | <!-- @generated crossingScenario --> | 4 | <!-- @generated crossingScenario --> |
5 | <package class="crossingScenario.CrossingScenarioPackage" genModel="model/crossingScenario.genmodel" uri="http://www.example.com/crossingScenario"/> | 5 | <package |
6 | </extension> | 6 | uri="http://www.example.com/crossingScenario" |
7 | class="crossingScenario.CrossingScenarioPackage" | ||
8 | genModel="model/crossingScenario.genmodel"/> | ||
9 | </extension> | ||
7 | </plugin> | 10 | </plugin> |
diff --git a/Domains/crossingScenario/queries/crossingScenarioQueries.vql b/Domains/crossingScenario/queries/crossingScenarioQueries.vql index 32348399..0a28d774 100644 --- a/Domains/crossingScenario/queries/crossingScenarioQueries.vql +++ b/Domains/crossingScenario/queries/crossingScenarioQueries.vql | |||
@@ -91,6 +91,23 @@ pattern define_actor_minYp(cs:CrossingScenario, a:Actor) { | |||
91 | find helper_vert_getYAndBounds(cs, a, yMax, yP); | 91 | find helper_vert_getYAndBounds(cs, a, yMax, yP); |
92 | check(yP <= 0-yMax);} | 92 | check(yP <= 0-yMax);} |
93 | 93 | ||
94 | ////////////ADDED | ||
95 | //to reduce overlap | ||
96 | //NEEDED | ||
97 | @Constraint(severity="error", key={a}, message="5 Actor") | ||
98 | pattern define_actor_wrtLane(a:Actor) { | ||
99 | Actor.placedOn(a, lane); | ||
100 | Lane_Vertical(lane); | ||
101 | Actor.yPos(a, yP); | ||
102 | check(yP > 0.0-1.0); | ||
103 | } or { | ||
104 | Actor.placedOn(a, lane); | ||
105 | Lane_Horizontal(lane); | ||
106 | Actor.xPos(a, xP); | ||
107 | check(xP > 0.0-1.0); | ||
108 | } | ||
109 | ////////////ADDED | ||
110 | |||
94 | //Minimum Distances | 111 | //Minimum Distances |
95 | private pattern helper_getCoords(a1:Actor, | 112 | private pattern helper_getCoords(a1:Actor, |
96 | a2: Actor, x1:java Double, x2:java Double, y1:java Double, y2:java Double) { | 113 | a2: Actor, x1:java Double, x2:java Double, y1:java Double, y2:java Double) { |
@@ -105,8 +122,8 @@ private pattern helper_getCoords(a1:Actor, | |||
105 | pattern define_actor_minimumDistance(a1: Actor, a2: Actor) { | 122 | pattern define_actor_minimumDistance(a1: Actor, a2: Actor) { |
106 | find helper_getCoords(a1, a2, x1, x2, y1, y2); | 123 | find helper_getCoords(a1, a2, x1, x2, y1, y2); |
107 | a1 != a2; | 124 | a1 != a2; |
108 | //check(dx^2 + dy^2 < 5^2) | 125 | //check(dx^2 + dy^2 < 3^2) |
109 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 5*5); | 126 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 3*3); |
110 | } | 127 | } |
111 | 128 | ||
112 | /////---------------- | 129 | /////---------------- |
@@ -219,47 +236,38 @@ pattern define_actor_vehicleLength(v:Vehicle) { | |||
219 | check(l != 2.0); | 236 | check(l != 2.0); |
220 | } | 237 | } |
221 | 238 | ||
222 | ///////---------------- | 239 | /////---------------- |
223 | ///////DERIVED FEATURES | 240 | /////DERIVED FEATURES |
224 | ///////---------------- | 241 | /////---------------- |
225 | // | 242 | /* |
226 | //@QueryBasedFeature | 243 | @QueryBasedFeature |
227 | //pattern dist_near(a1: Actor, a2: Actor) { | 244 | pattern dist_near(a1: Actor, a2: Actor) { |
228 | // find helper_actorsAreNear(a1, a2); | 245 | find helper_getCoords(a1, a2, x1, x2, y1, y2); |
229 | // Actor.dist_near(a1, a2); | 246 | |
230 | //} | 247 | //check(dx^2 + dy^2 < 10^2) |
231 | // | 248 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 10*10); |
232 | //private pattern helper_actorsAreNear(a1: Actor, a2: Actor) { | 249 | Actor.dist_near(a1, a2); |
233 | // find helper_getCoords(a1, a2, x1, x2, y1, y2); | 250 | } |
234 | // //check(dx^2 + dy^2 < 10^2) | 251 | |
235 | // check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 10*10); | 252 | @QueryBasedFeature |
236 | //} | 253 | pattern dist_med(a1: Actor, a2: Actor) { |
237 | // | 254 | find helper_getCoords(a1, a2, x1, x2, y1, y2); |
238 | //@QueryBasedFeature | 255 | |
239 | //pattern dist_med(a1: Actor, a2: Actor) { | 256 | //check(10^2 < dx^2 + dy^2 < 15^2) |
240 | // find helper_actorsAreMed(a1, a2); | 257 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 10*10); |
241 | // Actor.dist_med(a1, a2); | 258 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); |
242 | //} | 259 | Actor.dist_med(a1, a2); |
243 | // | 260 | } |
244 | //private pattern helper_actorsAreMed(a1: Actor, a2: Actor) { | 261 | |
245 | // find helper_getCoords(a1, a2, x1, x2, y1, y2); | 262 | @QueryBasedFeature |
246 | // //check(10^2 < dx^2 + dy^2 < 15^2) | 263 | pattern dist_far(a1: Actor, a2: Actor) { |
247 | // check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 10*10); | 264 | find helper_getCoords(a1, a2, x1, x2, y1, y2); |
248 | // check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); | 265 | |
249 | //} | 266 | //check(dx^2 + dy^2 > 20^2) |
250 | // | 267 | check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 20*20); |
251 | //@QueryBasedFeature | 268 | Actor.dist_far(a1, a2); |
252 | //pattern dist_far(a1: Actor, a2: Actor) { | 269 | } |
253 | // find helper_actorsAreFar(a1, a2); | 270 | */ |
254 | // Actor.dist_far(a1, a2); | ||
255 | //} | ||
256 | // | ||
257 | //private pattern helper_actorsAreFar(a1: Actor, a2: Actor) { | ||
258 | // find helper_getCoords(a1, a2, x1, x2, y1, y2); | ||
259 | // //check(dx^2 + dy^2 > 20^2) | ||
260 | // check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 20*20); | ||
261 | //} | ||
262 | |||
263 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// | 271 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// |
264 | //Relation | 272 | //Relation |
265 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// | 273 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// |
@@ -278,7 +286,7 @@ pattern define_actor_vehicleLength(v:Vehicle) { | |||
278 | 286 | ||
279 | 287 | ||
280 | //<<QUALTATIF ABSTRACTION>> | 288 | //<<QUALTATIF ABSTRACTION>> |
281 | 289 | /* | |
282 | @Constraint(severity="error", key={a1, a2}, message="x") | 290 | @Constraint(severity="error", key={a1, a2}, message="x") |
283 | pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { | 291 | pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { |
284 | CollisionExists.source(ce, a1); | 292 | CollisionExists.source(ce, a1); |
@@ -295,72 +303,9 @@ pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { | |||
295 | Actor.placedOn(a2, hl2); | 303 | Actor.placedOn(a2, hl2); |
296 | Lane_Horizontal(hl2); | 304 | Lane_Horizontal(hl2); |
297 | } | 305 | } |
298 | 306 | */ | |
299 | //<<END TEMP QUALITATIF ABSTRACTION>> | 307 | //<<END TEMP QUALITATIF ABSTRACTION>> |
300 | 308 | ||
301 | //// | ||
302 | //VS VisionBlocked | ||
303 | //// | ||
304 | //TODO Very prone to corner cases | ||
305 | /* | ||
306 | @Constraint(severity="error", key={a1}, message="x") | ||
307 | pattern collisionExists_vsVisionBlockedX1(a1:Actor) { | ||
308 | VisionBlocked.blockedBy(_, a1); | ||
309 | CollisionExists.target(_, a1); | ||
310 | } | ||
311 | @Constraint(severity="error", key={a1}, message="x") | ||
312 | pattern collisionExists_vsVisionBlockedX2(a1:Actor) { | ||
313 | VisionBlocked.blockedBy(_, a1); | ||
314 | CollisionExists.source(_, a1); | ||
315 | } | ||
316 | |||
317 | @Constraint(severity="error", key={a1}, message="x") | ||
318 | pattern collisionExists_vsVisionBlocked1(a1:Actor) { | ||
319 | VisionBlocked.source(_, a1); | ||
320 | neg find helper_source(a1); | ||
321 | } | ||
322 | private pattern helper_source(a1:Actor) { | ||
323 | CollisionExists.source(_, a1); | ||
324 | } | ||
325 | |||
326 | @Constraint(severity="error", key={a1}, message="x") | ||
327 | pattern collisionExists_vsVisionBlocked2(a1:Actor) { | ||
328 | VisionBlocked.target(_, a1); | ||
329 | neg find helper_target(a1); | ||
330 | } | ||
331 | private pattern helper_target(a1:Actor) { | ||
332 | CollisionExists.target(_, a1); | ||
333 | } | ||
334 | */ | ||
335 | /* | ||
336 | @Constraint(severity="error", key={a1}, message="x") | ||
337 | pattern collisionExists_vsVisionBlocked(a1:Actor) { | ||
338 | VisionBlocked.source(vb, a1); | ||
339 | VisionBlocked.target(vb, a2); | ||
340 | CollisionExists.source(ce, a1); | ||
341 | CollisionExists.target(ce, a3); | ||
342 | a2 != a3; | ||
343 | } or { | ||
344 | VisionBlocked.source(vb, a1); | ||
345 | VisionBlocked.target(vb, a2); | ||
346 | CollisionExists.source(ce, a3); | ||
347 | CollisionExists.target(ce, a1); | ||
348 | a2 != a3; | ||
349 | } or { | ||
350 | VisionBlocked.source(vb, a2); | ||
351 | VisionBlocked.target(vb, a1); | ||
352 | CollisionExists.source(ce, a3); | ||
353 | CollisionExists.target(ce, a1); | ||
354 | a2 != a3; | ||
355 | } or { | ||
356 | VisionBlocked.source(vb, a2); | ||
357 | VisionBlocked.target(vb, a1); | ||
358 | CollisionExists.source(ce, a1); | ||
359 | CollisionExists.target(ce, a3); | ||
360 | a2 != a3; | ||
361 | } | ||
362 | */ | ||
363 | //<<END QUALITATIF ABSTRACTION>> | ||
364 | 309 | ||
365 | //// | 310 | //// |
366 | //CollisionExists - Time | 311 | //CollisionExists - Time |
@@ -407,10 +352,10 @@ private pattern helper_getAllYCoords(a1:Actor, a2: Actor, | |||
407 | find helper_getYCoords(a2, l2, yPos2, ySpeed2); | 352 | find helper_getYCoords(a2, l2, yPos2, ySpeed2); |
408 | } | 353 | } |
409 | 354 | ||
410 | private pattern helper_getXCoords(a:Actor, l:java Double, | 355 | private pattern helper_getXCoords(a:Actor, w:java Double, |
411 | xPos:java Double, xSpeed:java Double) { | 356 | xPos:java Double, xSpeed:java Double) { |
412 | 357 | ||
413 | Actor.length(a, l); | 358 | Actor.width(a, w); |
414 | Actor.xPos(a, xPos); | 359 | Actor.xPos(a, xPos); |
415 | Actor.xSpeed(a, xSpeed); | 360 | Actor.xSpeed(a, xSpeed); |
416 | } | 361 | } |
@@ -473,7 +418,7 @@ pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor) { | |||
473 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// | 418 | ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// |
474 | 419 | ||
475 | //<<QUALTATIF ABSTRACTION>> | 420 | //<<QUALTATIF ABSTRACTION>> |
476 | 421 | /* | |
477 | @Constraint(severity="error", key={a1, a2}, message="on 3 different lanes") | 422 | @Constraint(severity="error", key={a1, a2}, message="on 3 different lanes") |
478 | pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { | 423 | pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { |
479 | VisionBlocked.source(vb, a1); | 424 | VisionBlocked.source(vb, a1); |
@@ -491,7 +436,7 @@ pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { | |||
491 | Actor.placedOn(a1, l); | 436 | Actor.placedOn(a1, l); |
492 | Actor.placedOn(a2, l); | 437 | Actor.placedOn(a2, l); |
493 | } | 438 | } |
494 | 439 | */ | |
495 | @Constraint(severity="error", key={a1, a2}, message="on lanes with different orientation") | 440 | @Constraint(severity="error", key={a1, a2}, message="on lanes with different orientation") |
496 | pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) { | 441 | pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) { |
497 | VisionBlocked.source(ce, a1); | 442 | VisionBlocked.source(ce, a1); |
@@ -509,6 +454,30 @@ pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) { | |||
509 | Lane_Horizontal(hl2); | 454 | Lane_Horizontal(hl2); |
510 | } | 455 | } |
511 | 456 | ||
457 | ////////////ADDED | ||
458 | //to make decision for ITE | ||
459 | //NOT NEEDED | ||
460 | /* | ||
461 | @Constraint(severity="error", key={a}, message="5 Actor") | ||
462 | pattern define_vb_blvssrc(a:Actor) { | ||
463 | VisionBlocked.source(vb, a); | ||
464 | VisionBlocked.blockedBy(vb, b); | ||
465 | Actor.placedOn(a, lane); | ||
466 | Lane_Vertical(lane); | ||
467 | Actor.yPos(a, yPa); | ||
468 | Actor.yPos(b, yPb); | ||
469 | check(yPb <= yPa); | ||
470 | } or { | ||
471 | VisionBlocked.source(vb, a); | ||
472 | VisionBlocked.blockedBy(vb, b); | ||
473 | Actor.placedOn(a, lane); | ||
474 | Lane_Horizontal(lane); | ||
475 | Actor.xPos(a, xPa); | ||
476 | Actor.xPos(a, xPb); | ||
477 | check(xPb <= xPa); | ||
478 | } | ||
479 | */ | ||
480 | ////////////ADDED | ||
512 | //<<END QUALITATIF ABSTRACTION>> | 481 | //<<END QUALITATIF ABSTRACTION>> |
513 | 482 | ||
514 | @Constraint(severity="error", key={a1, a2}, message="x") | 483 | @Constraint(severity="error", key={a1, a2}, message="x") |
@@ -582,6 +551,9 @@ pattern visionBlocked_ites_bottom(a1:Actor, a2:Actor) { | |||
582 | > ((y1-y2)/(x1-x2))); | 551 | > ((y1-y2)/(x1-x2))); |
583 | } | 552 | } |
584 | 553 | ||
554 | /////// | ||
555 | //BLOCKER IN BETWEEN | ||
556 | /////// | ||
585 | 557 | ||
586 | private pattern helper_VB_getJustCoords(a1:Actor, a2: Actor, | 558 | private pattern helper_VB_getJustCoords(a1:Actor, a2: Actor, |
587 | x1:java Double, y1:java Double, | 559 | x1:java Double, y1:java Double, |
@@ -600,6 +572,7 @@ private pattern helper_VB_getJustCoords(a1:Actor, a2: Actor, | |||
600 | Actor.yPos(aBlocker, yBlocker); | 572 | Actor.yPos(aBlocker, yBlocker); |
601 | } | 573 | } |
602 | 574 | ||
575 | /* | ||
603 | //INFO may use approximation instead | 576 | //INFO may use approximation instead |
604 | @Constraint(severity="error", key={a1}, message="x") | 577 | @Constraint(severity="error", key={a1}, message="x") |
605 | pattern visionBlocked_xdistBSlargerThanxdistTS(a1:Actor, a2:Actor) { | 578 | pattern visionBlocked_xdistBSlargerThanxdistTS(a1:Actor, a2:Actor) { |
@@ -621,4 +594,49 @@ pattern visionBlocked_xdistBTlargerThanxdistST(a1:Actor, a2:Actor) { | |||
621 | //check(dist(A2, ABlocker) > dist(A2, A1)) | 594 | //check(dist(A2, ABlocker) > dist(A2, A1)) |
622 | check((x2-xBlocker)*(x2-xBlocker) + (y2-yBlocker)*(y2-yBlocker) > (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); | 595 | check((x2-xBlocker)*(x2-xBlocker) + (y2-yBlocker)*(y2-yBlocker) > (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); |
623 | } | 596 | } |
597 | */ | ||
598 | |||
599 | //INFO may use approximation instead | ||
600 | @Constraint(severity="error", key={a1}, message="x") | ||
601 | pattern visionBlocked_xdistBSlargerThanxdistTS(a1:Actor, a2:Actor) { | ||
602 | |||
603 | find helper_VB_getJustCoords(a1, a2, | ||
604 | x1, _, x2, _, xBlocker, _); | ||
605 | |||
606 | //check(dist(A1, ABlocker) > dist(A1, A2)) | ||
607 | check((x1-xBlocker)*(x1-xBlocker) > (x1-x2)*(x1-x2)); | ||
608 | } | ||
609 | |||
610 | //INFO may use approximation instead | ||
611 | @Constraint(severity="error", key={a1}, message="x") | ||
612 | pattern visionBlocked_xdistBTlargerThanxdistST(a1:Actor, a2:Actor) { | ||
613 | |||
614 | find helper_VB_getJustCoords(a1, a2, | ||
615 | x1, _, x2, _, xBlocker, _); | ||
616 | |||
617 | //check(dist(A2, ABlocker) > dist(A2, A1)) | ||
618 | check((x2-xBlocker)*(x2-xBlocker) > (x2-x1)*(x2-x1)); | ||
619 | } | ||
620 | |||
621 | //INFO may use approximation instead | ||
622 | @Constraint(severity="error", key={a1}, message="x") | ||
623 | pattern visionBlocked_ydistBSlargerThanydistTS(a1:Actor, a2:Actor) { | ||
624 | |||
625 | find helper_VB_getJustCoords(a1, a2, | ||
626 | _, y1, _, y2, _, yBlocker); | ||
627 | |||
628 | //check(dist(A1, ABlocker) > dist(A1, A2)) | ||
629 | check((y1-yBlocker)*(y1-yBlocker) > (y1-y2)*(y1-y2)); | ||
630 | } | ||
631 | |||
632 | //INFO may use approximation instead | ||
633 | @Constraint(severity="error", key={a1}, message="x") | ||
634 | pattern visionBlocked_ydistBTlargerThanydistST(a1:Actor, a2:Actor) { | ||
635 | |||
636 | find helper_VB_getJustCoords(a1, a2, | ||
637 | _, y1, _, y2, _, yBlocker); | ||
638 | |||
639 | //check(dist(A2, ABlocker) > dist(A2, A1)) | ||
640 | check((y2-yBlocker)*(y2-yBlocker) > (y2-y1)*(y2-y1)); | ||
641 | } | ||
624 | 642 | ||
diff --git a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java index 5bf70b3a..ad2c6d88 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java +++ b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java | |||
@@ -36,7 +36,7 @@ public class CrossingScenarioMain { | |||
36 | // Files.copy(path, target, StandardCopyOption.REPLACE_EXISTING); | 36 | // Files.copy(path, target, StandardCopyOption.REPLACE_EXISTING); |
37 | 37 | ||
38 | printStats(pathStats); | 38 | printStats(pathStats); |
39 | for (int i = 1; i <= 10; i++) { | 39 | for (int i = 1; i <= 3; i++) { |
40 | DrawScenario.drawScenario("outputs/models/"+i+".xmi", "outputs/drawnModel"+i+".png"); | 40 | DrawScenario.drawScenario("outputs/models/"+i+".xmi", "outputs/drawnModel"+i+".png"); |
41 | System.out.println("DONE " + i); | 41 | System.out.println("DONE " + i); |
42 | } | 42 | } |
diff --git a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java index 3fea18de..e1830a2a 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java +++ b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java | |||
@@ -1,7 +1,6 @@ | |||
1 | package crossingScenario.run; | 1 | package crossingScenario.run; |
2 | 2 | ||
3 | import java.io.FileNotFoundException; | 3 | import java.io.FileNotFoundException; |
4 | import java.io.PrintWriter; | ||
5 | import java.util.ArrayList; | 4 | import java.util.ArrayList; |
6 | import java.util.HashMap; | 5 | import java.util.HashMap; |
7 | import java.util.List; | 6 | import java.util.List; |
@@ -16,10 +15,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet; | |||
16 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; | 15 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; |
17 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; | 16 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; |
18 | 17 | ||
19 | import crossingScenario.Actor; | ||
20 | import crossingScenario.CrossingScenario; | ||
21 | import crossingScenario.CrossingScenarioPackage; | 18 | import crossingScenario.CrossingScenarioPackage; |
22 | import crossingScenario.Lane; | ||
23 | 19 | ||
24 | public class QueryDebug { | 20 | public class QueryDebug { |
25 | public static void main(String[] args) throws FileNotFoundException { | 21 | public static void main(String[] args) throws FileNotFoundException { |
@@ -84,18 +80,22 @@ public class QueryDebug { | |||
84 | EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE); | 80 | EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE); |
85 | ResourceSet rs = new ResourceSetImpl(); | 81 | ResourceSet rs = new ResourceSetImpl(); |
86 | rs.getResource(URI.createFileURI("outputs/models/1.xmi"), true); | 82 | rs.getResource(URI.createFileURI("outputs/models/1.xmi"), true); |
83 | /* | ||
84 | ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(rs)); | ||
85 | // Access pattern matcher | ||
86 | Queries.instance().prepare(engine); | ||
87 | 87 | ||
88 | // ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(rs)); | 88 | for (IQuerySpecification q : Queries.instance().getSpecifications()) { |
89 | // // Access pattern matcher | 89 | ViatraQueryMatcher matcher = q.getMatcher(engine); |
90 | // Queries.instance().prepare(engine); | 90 | System.out.println("MATCHES for " + matcher.getPatternName()); |
91 | // | 91 | for (Object match : matcher.getAllMatches()) { |
92 | // X.Matcher matcher = X.Matcher.on(engine); | 92 | // Print all the matches to the standard output |
93 | // // Get and iterate over all matches | 93 | System.out.println(((IPatternMatch)match).get(0)); |
94 | // System.out.println("MATCHES:"); | 94 | System.out.println(((IPatternMatch)match).get(1)); |
95 | // for (X.Match match : matcher.getAllMatches()) { | 95 | System.out.println("------"); |
96 | // // Print all the matches to the standard output | 96 | } |
97 | // System.out.println(match.getP()); | 97 | } |
98 | // } | 98 | */ |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||