From afa54bfd0d14cdcc53abe95aef27fe96a447d770 Mon Sep 17 00:00:00 2001 From: Aren Babikian Date: Sun, 24 Jan 2021 03:20:04 +0100 Subject: Simple working version. Still diversity issue --- Domains/crossingScenario/.classpath | 2 +- .../ecore-gen/crossingScenario/Actor.java | 458 +-- .../crossingScenario/CollisionDoesNotExist.java | 17 - .../crossingScenario/CollisionExists.java | 90 +- .../crossingScenario/CrossingScenario.java | 362 +-- .../crossingScenario/CrossingScenarioFactory.java | 210 +- .../crossingScenario/CrossingScenarioPackage.java | 3433 +++++++++----------- .../ecore-gen/crossingScenario/Distance.java | 228 -- .../ecore-gen/crossingScenario/Lane.java | 126 +- .../crossingScenario/Lane_Horizontal.java | 34 +- .../ecore-gen/crossingScenario/Lane_Vertical.java | 34 +- .../ecore-gen/crossingScenario/Orientation.java | 209 -- .../ecore-gen/crossingScenario/Pedestrian.java | 34 +- .../ecore-gen/crossingScenario/Relation.java | 138 +- .../crossingScenario/SeparationDistance.java | 48 - .../ecore-gen/crossingScenario/Size.java | 228 -- .../crossingScenario/SpatialRelation.java | 34 +- .../crossingScenario/TemporalRelation.java | 34 +- .../ecore-gen/crossingScenario/Vehicle.java | 34 +- .../ecore-gen/crossingScenario/VisionBlocked.java | 90 +- .../ecore-gen/crossingScenario/impl/ActorImpl.java | 1289 ++++---- .../impl/CollisionDoesNotExistImpl.java | 37 - .../crossingScenario/impl/CollisionExistsImpl.java | 328 +- .../impl/CrossingScenarioFactoryImpl.java | 413 +-- .../impl/CrossingScenarioImpl.java | 1049 +++--- .../impl/CrossingScenarioPackageImpl.java | 1500 ++++----- .../ecore-gen/crossingScenario/impl/LaneImpl.java | 479 +-- .../crossingScenario/impl/Lane_HorizontalImpl.java | 74 +- .../crossingScenario/impl/Lane_VerticalImpl.java | 74 +- .../crossingScenario/impl/PedestrianImpl.java | 74 +- .../crossingScenario/impl/RelationImpl.java | 442 +-- .../impl/SeparationDistanceImpl.java | 165 - .../crossingScenario/impl/SpatialRelationImpl.java | 74 +- .../impl/TemporalRelationImpl.java | 74 +- .../crossingScenario/impl/VehicleImpl.java | 74 +- .../crossingScenario/impl/VisionBlockedImpl.java | 316 +- .../util/CrossingScenarioAdapterFactory.java | 672 ++-- .../util/CrossingScenarioSwitch.java | 748 ++--- Domains/crossingScenario/inputs/cSinit4x4.xmi | 10 +- .../inputs/crossingScenarioGen.vsconfig | 17 +- .../crossingScenario/model/crossingScenario.aird | 254 +- .../crossingScenario/model/crossingScenario.ecore | 10 - .../model/crossingScenario.genmodel | 9 - .../queries/crossingScenarioQueries.vql | 325 +- .../queries/moreCompleteQueries2._v_q_l | 891 +++++ .../crossingScenario/run/CrossingScenarioMain.java | 5 +- .../src/crossingScenario/run/DrawScenario.java | 10 +- .../viatra2logic/NumericDrealProblemSolver.java | 2 +- 48 files changed, 7200 insertions(+), 8058 deletions(-) delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/CollisionDoesNotExist.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/Distance.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/Orientation.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/SeparationDistance.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/Size.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionDoesNotExistImpl.java delete mode 100644 Domains/crossingScenario/ecore-gen/crossingScenario/impl/SeparationDistanceImpl.java create mode 100644 Domains/crossingScenario/queries/moreCompleteQueries2._v_q_l diff --git a/Domains/crossingScenario/.classpath b/Domains/crossingScenario/.classpath index 693aa2b8..5bc9ff04 100644 --- a/Domains/crossingScenario/.classpath +++ b/Domains/crossingScenario/.classpath @@ -3,6 +3,6 @@ - + diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java index 729ad25f..1b570b6f 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Actor.java @@ -1,229 +1,229 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Actor'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.Actor#getXPos XPos}
  • - *
  • {@link crossingScenario.Actor#getYPos YPos}
  • - *
  • {@link crossingScenario.Actor#getLength Length}
  • - *
  • {@link crossingScenario.Actor#getWidth Width}
  • - *
  • {@link crossingScenario.Actor#getXSpeed XSpeed}
  • - *
  • {@link crossingScenario.Actor#getPlacedOn Placed On}
  • - *
  • {@link crossingScenario.Actor#getYSpeed YSpeed}
  • - *
  • {@link crossingScenario.Actor#getDist_near Dist near}
  • - *
  • {@link crossingScenario.Actor#getDist_med Dist med}
  • - *
  • {@link crossingScenario.Actor#getDist_far Dist far}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getActor() - * @model abstract="true" - * @generated - */ -public interface Actor extends EObject { - /** - * Returns the value of the 'XPos' attribute. - * - * - * @return the value of the 'XPos' attribute. - * @see #setXPos(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_XPos() - * @model required="true" - * @generated - */ - double getXPos(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getXPos XPos}' attribute. - * - * - * @param value the new value of the 'XPos' attribute. - * @see #getXPos() - * @generated - */ - void setXPos(double value); - - /** - * Returns the value of the 'YPos' attribute. - * - * - * @return the value of the 'YPos' attribute. - * @see #setYPos(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_YPos() - * @model required="true" - * @generated - */ - double getYPos(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getYPos YPos}' attribute. - * - * - * @param value the new value of the 'YPos' attribute. - * @see #getYPos() - * @generated - */ - void setYPos(double value); - - /** - * Returns the value of the 'Length' attribute. - * The default value is "0.0". - * - * - * @return the value of the 'Length' attribute. - * @see #setLength(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_Length() - * @model default="0.0" required="true" - * @generated - */ - double getLength(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getLength Length}' attribute. - * - * - * @param value the new value of the 'Length' attribute. - * @see #getLength() - * @generated - */ - void setLength(double value); - - /** - * Returns the value of the 'Width' attribute. - * - * - * @return the value of the 'Width' attribute. - * @see #setWidth(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_Width() - * @model required="true" - * @generated - */ - double getWidth(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getWidth Width}' attribute. - * - * - * @param value the new value of the 'Width' attribute. - * @see #getWidth() - * @generated - */ - void setWidth(double value); - - /** - * Returns the value of the 'XSpeed' attribute. - * The default value is "0.0". - * - * - * @return the value of the 'XSpeed' attribute. - * @see #setXSpeed(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_XSpeed() - * @model default="0.0" required="true" - * @generated - */ - double getXSpeed(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getXSpeed XSpeed}' attribute. - * - * - * @param value the new value of the 'XSpeed' attribute. - * @see #getXSpeed() - * @generated - */ - void setXSpeed(double value); - - /** - * Returns the value of the 'Placed On' reference. - * It is bidirectional and its opposite is '{@link crossingScenario.Lane#getActors Actors}'. - * - * - * @return the value of the 'Placed On' reference. - * @see #setPlacedOn(Lane) - * @see crossingScenario.CrossingScenarioPackage#getActor_PlacedOn() - * @see crossingScenario.Lane#getActors - * @model opposite="actors" required="true" - * @generated - */ - Lane getPlacedOn(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getPlacedOn Placed On}' reference. - * - * - * @param value the new value of the 'Placed On' reference. - * @see #getPlacedOn() - * @generated - */ - void setPlacedOn(Lane value); - - /** - * Returns the value of the 'YSpeed' attribute. - * - * - * @return the value of the 'YSpeed' attribute. - * @see #setYSpeed(double) - * @see crossingScenario.CrossingScenarioPackage#getActor_YSpeed() - * @model required="true" - * @generated - */ - double getYSpeed(); - - /** - * Sets the value of the '{@link crossingScenario.Actor#getYSpeed YSpeed}' attribute. - * - * - * @param value the new value of the 'YSpeed' attribute. - * @see #getYSpeed() - * @generated - */ - void setYSpeed(double value); - - /** - * Returns the value of the 'Dist near' reference list. - * The list contents are of type {@link crossingScenario.Actor}. - * - * - * @return the value of the 'Dist near' reference list. - * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_near() - * @model transient="true" volatile="true" derived="true" - * @generated - */ - EList getDist_near(); - - /** - * Returns the value of the 'Dist med' reference list. - * The list contents are of type {@link crossingScenario.Actor}. - * - * - * @return the value of the 'Dist med' reference list. - * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_med() - * @model transient="true" volatile="true" derived="true" - * @generated - */ - EList getDist_med(); - - /** - * Returns the value of the 'Dist far' reference list. - * The list contents are of type {@link crossingScenario.Actor}. - * - * - * @return the value of the 'Dist far' reference list. - * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_far() - * @model transient="true" volatile="true" derived="true" - * @generated - */ - EList getDist_far(); - -} // Actor +/** + */ +package crossingScenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Actor'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.Actor#getXPos XPos}
  • + *
  • {@link crossingScenario.Actor#getYPos YPos}
  • + *
  • {@link crossingScenario.Actor#getLength Length}
  • + *
  • {@link crossingScenario.Actor#getWidth Width}
  • + *
  • {@link crossingScenario.Actor#getXSpeed XSpeed}
  • + *
  • {@link crossingScenario.Actor#getPlacedOn Placed On}
  • + *
  • {@link crossingScenario.Actor#getYSpeed YSpeed}
  • + *
  • {@link crossingScenario.Actor#getDist_near Dist near}
  • + *
  • {@link crossingScenario.Actor#getDist_med Dist med}
  • + *
  • {@link crossingScenario.Actor#getDist_far Dist far}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getActor() + * @model abstract="true" + * @generated + */ +public interface Actor extends EObject { + /** + * Returns the value of the 'XPos' attribute. + * + * + * @return the value of the 'XPos' attribute. + * @see #setXPos(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_XPos() + * @model required="true" + * @generated + */ + double getXPos(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getXPos XPos}' attribute. + * + * + * @param value the new value of the 'XPos' attribute. + * @see #getXPos() + * @generated + */ + void setXPos(double value); + + /** + * Returns the value of the 'YPos' attribute. + * + * + * @return the value of the 'YPos' attribute. + * @see #setYPos(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_YPos() + * @model required="true" + * @generated + */ + double getYPos(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getYPos YPos}' attribute. + * + * + * @param value the new value of the 'YPos' attribute. + * @see #getYPos() + * @generated + */ + void setYPos(double value); + + /** + * Returns the value of the 'Length' attribute. + * The default value is "0.0". + * + * + * @return the value of the 'Length' attribute. + * @see #setLength(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_Length() + * @model default="0.0" required="true" + * @generated + */ + double getLength(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getLength Length}' attribute. + * + * + * @param value the new value of the 'Length' attribute. + * @see #getLength() + * @generated + */ + void setLength(double value); + + /** + * Returns the value of the 'Width' attribute. + * + * + * @return the value of the 'Width' attribute. + * @see #setWidth(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_Width() + * @model required="true" + * @generated + */ + double getWidth(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getWidth Width}' attribute. + * + * + * @param value the new value of the 'Width' attribute. + * @see #getWidth() + * @generated + */ + void setWidth(double value); + + /** + * Returns the value of the 'XSpeed' attribute. + * The default value is "0.0". + * + * + * @return the value of the 'XSpeed' attribute. + * @see #setXSpeed(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_XSpeed() + * @model default="0.0" required="true" + * @generated + */ + double getXSpeed(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getXSpeed XSpeed}' attribute. + * + * + * @param value the new value of the 'XSpeed' attribute. + * @see #getXSpeed() + * @generated + */ + void setXSpeed(double value); + + /** + * Returns the value of the 'Placed On' reference. + * It is bidirectional and its opposite is '{@link crossingScenario.Lane#getActors Actors}'. + * + * + * @return the value of the 'Placed On' reference. + * @see #setPlacedOn(Lane) + * @see crossingScenario.CrossingScenarioPackage#getActor_PlacedOn() + * @see crossingScenario.Lane#getActors + * @model opposite="actors" required="true" + * @generated + */ + Lane getPlacedOn(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getPlacedOn Placed On}' reference. + * + * + * @param value the new value of the 'Placed On' reference. + * @see #getPlacedOn() + * @generated + */ + void setPlacedOn(Lane value); + + /** + * Returns the value of the 'YSpeed' attribute. + * + * + * @return the value of the 'YSpeed' attribute. + * @see #setYSpeed(double) + * @see crossingScenario.CrossingScenarioPackage#getActor_YSpeed() + * @model required="true" + * @generated + */ + double getYSpeed(); + + /** + * Sets the value of the '{@link crossingScenario.Actor#getYSpeed YSpeed}' attribute. + * + * + * @param value the new value of the 'YSpeed' attribute. + * @see #getYSpeed() + * @generated + */ + void setYSpeed(double value); + + /** + * Returns the value of the 'Dist near' reference list. + * The list contents are of type {@link crossingScenario.Actor}. + * + * + * @return the value of the 'Dist near' reference list. + * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_near() + * @model transient="true" volatile="true" derived="true" + * @generated + */ + EList getDist_near(); + + /** + * Returns the value of the 'Dist med' reference list. + * The list contents are of type {@link crossingScenario.Actor}. + * + * + * @return the value of the 'Dist med' reference list. + * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_med() + * @model transient="true" volatile="true" derived="true" + * @generated + */ + EList getDist_med(); + + /** + * Returns the value of the 'Dist far' reference list. + * The list contents are of type {@link crossingScenario.Actor}. + * + * + * @return the value of the 'Dist far' reference list. + * @see crossingScenario.CrossingScenarioPackage#getActor_Dist_far() + * @model transient="true" volatile="true" derived="true" + * @generated + */ + EList getDist_far(); + +} // Actor diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionDoesNotExist.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionDoesNotExist.java deleted file mode 100644 index 1347c478..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionDoesNotExist.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Collision Does Not Exist'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getCollisionDoesNotExist() - * @model - * @generated - */ -public interface CollisionDoesNotExist extends TemporalRelation { -} // CollisionDoesNotExist diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionExists.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionExists.java index 95e95217..940cc305 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionExists.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CollisionExists.java @@ -1,45 +1,45 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Collision Exists'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.CollisionExists#getCollisionTime Collision Time}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getCollisionExists() - * @model - * @generated - */ -public interface CollisionExists extends TemporalRelation { - /** - * Returns the value of the 'Collision Time' attribute. - * - * - * @return the value of the 'Collision Time' attribute. - * @see #setCollisionTime(double) - * @see crossingScenario.CrossingScenarioPackage#getCollisionExists_CollisionTime() - * @model required="true" - * @generated - */ - double getCollisionTime(); - - /** - * Sets the value of the '{@link crossingScenario.CollisionExists#getCollisionTime Collision Time}' attribute. - * - * - * @param value the new value of the 'Collision Time' attribute. - * @see #getCollisionTime() - * @generated - */ - void setCollisionTime(double value); - -} // CollisionExists +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Collision Exists'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.CollisionExists#getCollisionTime Collision Time}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getCollisionExists() + * @model + * @generated + */ +public interface CollisionExists extends TemporalRelation { + /** + * Returns the value of the 'Collision Time' attribute. + * + * + * @return the value of the 'Collision Time' attribute. + * @see #setCollisionTime(double) + * @see crossingScenario.CrossingScenarioPackage#getCollisionExists_CollisionTime() + * @model required="true" + * @generated + */ + double getCollisionTime(); + + /** + * Sets the value of the '{@link crossingScenario.CollisionExists#getCollisionTime Collision Time}' attribute. + * + * + * @param value the new value of the 'Collision Time' attribute. + * @see #getCollisionTime() + * @generated + */ + void setCollisionTime(double value); + +} // CollisionExists diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java index 0f8eb79b..aa59e20a 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenario.java @@ -1,181 +1,181 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Crossing Scenario'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.CrossingScenario#getXSize XSize}
  • - *
  • {@link crossingScenario.CrossingScenario#getYSize YSize}
  • - *
  • {@link crossingScenario.CrossingScenario#getActors Actors}
  • - *
  • {@link crossingScenario.CrossingScenario#getLanes Lanes}
  • - *
  • {@link crossingScenario.CrossingScenario#getMaxTime Max Time}
  • - *
  • {@link crossingScenario.CrossingScenario#getRelations Relations}
  • - *
  • {@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}
  • - *
  • {@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario() - * @model - * @generated - */ -public interface CrossingScenario extends EObject { - /** - * Returns the value of the 'XSize' attribute. - * - * - * @return the value of the 'XSize' attribute. - * @see #setXSize(double) - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_XSize() - * @model - * @generated - */ - double getXSize(); - - /** - * Sets the value of the '{@link crossingScenario.CrossingScenario#getXSize XSize}' attribute. - * - * - * @param value the new value of the 'XSize' attribute. - * @see #getXSize() - * @generated - */ - void setXSize(double value); - - /** - * Returns the value of the 'YSize' attribute. - * - * - * @return the value of the 'YSize' attribute. - * @see #setYSize(double) - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_YSize() - * @model - * @generated - */ - double getYSize(); - - /** - * Sets the value of the '{@link crossingScenario.CrossingScenario#getYSize YSize}' attribute. - * - * - * @param value the new value of the 'YSize' attribute. - * @see #getYSize() - * @generated - */ - void setYSize(double value); - - /** - * Returns the value of the 'Actors' containment reference list. - * The list contents are of type {@link crossingScenario.Actor}. - * - * - * @return the value of the 'Actors' containment reference list. - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Actors() - * @model containment="true" - * @generated - */ - EList getActors(); - - /** - * Returns the value of the 'Lanes' containment reference list. - * The list contents are of type {@link crossingScenario.Lane}. - * - * - * @return the value of the 'Lanes' containment reference list. - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Lanes() - * @model containment="true" - * @generated - */ - EList getLanes(); - - /** - * Returns the value of the 'Max Time' attribute. - * - * - * @return the value of the 'Max Time' attribute. - * @see #setMaxTime(double) - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxTime() - * @model - * @generated - */ - double getMaxTime(); - - /** - * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxTime Max Time}' attribute. - * - * - * @param value the new value of the 'Max Time' attribute. - * @see #getMaxTime() - * @generated - */ - void setMaxTime(double value); - - /** - * Returns the value of the 'Relations' containment reference list. - * The list contents are of type {@link crossingScenario.Relation}. - * - * - * @return the value of the 'Relations' containment reference list. - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Relations() - * @model containment="true" - * @generated - */ - EList getRelations(); - - /** - * Returns the value of the 'Max XSpeed' attribute. - * The default value is "0.0". - * - * - * @return the value of the 'Max XSpeed' attribute. - * @see #setMaxXSpeed(double) - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxXSpeed() - * @model default="0.0" - * @generated - */ - double getMaxXSpeed(); - - /** - * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}' attribute. - * - * - * @param value the new value of the 'Max XSpeed' attribute. - * @see #getMaxXSpeed() - * @generated - */ - void setMaxXSpeed(double value); - - /** - * Returns the value of the 'Max YSpeed' attribute. - * The default value is "0.0". - * - * - * @return the value of the 'Max YSpeed' attribute. - * @see #setMaxYSpeed(double) - * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxYSpeed() - * @model default="0.0" - * @generated - */ - double getMaxYSpeed(); - - /** - * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}' attribute. - * - * - * @param value the new value of the 'Max YSpeed' attribute. - * @see #getMaxYSpeed() - * @generated - */ - void setMaxYSpeed(double value); - -} // CrossingScenario +/** + */ +package crossingScenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Crossing Scenario'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.CrossingScenario#getXSize XSize}
  • + *
  • {@link crossingScenario.CrossingScenario#getYSize YSize}
  • + *
  • {@link crossingScenario.CrossingScenario#getActors Actors}
  • + *
  • {@link crossingScenario.CrossingScenario#getLanes Lanes}
  • + *
  • {@link crossingScenario.CrossingScenario#getMaxTime Max Time}
  • + *
  • {@link crossingScenario.CrossingScenario#getRelations Relations}
  • + *
  • {@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}
  • + *
  • {@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario() + * @model + * @generated + */ +public interface CrossingScenario extends EObject { + /** + * Returns the value of the 'XSize' attribute. + * + * + * @return the value of the 'XSize' attribute. + * @see #setXSize(double) + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_XSize() + * @model + * @generated + */ + double getXSize(); + + /** + * Sets the value of the '{@link crossingScenario.CrossingScenario#getXSize XSize}' attribute. + * + * + * @param value the new value of the 'XSize' attribute. + * @see #getXSize() + * @generated + */ + void setXSize(double value); + + /** + * Returns the value of the 'YSize' attribute. + * + * + * @return the value of the 'YSize' attribute. + * @see #setYSize(double) + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_YSize() + * @model + * @generated + */ + double getYSize(); + + /** + * Sets the value of the '{@link crossingScenario.CrossingScenario#getYSize YSize}' attribute. + * + * + * @param value the new value of the 'YSize' attribute. + * @see #getYSize() + * @generated + */ + void setYSize(double value); + + /** + * Returns the value of the 'Actors' containment reference list. + * The list contents are of type {@link crossingScenario.Actor}. + * + * + * @return the value of the 'Actors' containment reference list. + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Actors() + * @model containment="true" + * @generated + */ + EList getActors(); + + /** + * Returns the value of the 'Lanes' containment reference list. + * The list contents are of type {@link crossingScenario.Lane}. + * + * + * @return the value of the 'Lanes' containment reference list. + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Lanes() + * @model containment="true" + * @generated + */ + EList getLanes(); + + /** + * Returns the value of the 'Max Time' attribute. + * + * + * @return the value of the 'Max Time' attribute. + * @see #setMaxTime(double) + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxTime() + * @model + * @generated + */ + double getMaxTime(); + + /** + * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxTime Max Time}' attribute. + * + * + * @param value the new value of the 'Max Time' attribute. + * @see #getMaxTime() + * @generated + */ + void setMaxTime(double value); + + /** + * Returns the value of the 'Relations' containment reference list. + * The list contents are of type {@link crossingScenario.Relation}. + * + * + * @return the value of the 'Relations' containment reference list. + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_Relations() + * @model containment="true" + * @generated + */ + EList getRelations(); + + /** + * Returns the value of the 'Max XSpeed' attribute. + * The default value is "0.0". + * + * + * @return the value of the 'Max XSpeed' attribute. + * @see #setMaxXSpeed(double) + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxXSpeed() + * @model default="0.0" + * @generated + */ + double getMaxXSpeed(); + + /** + * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}' attribute. + * + * + * @param value the new value of the 'Max XSpeed' attribute. + * @see #getMaxXSpeed() + * @generated + */ + void setMaxXSpeed(double value); + + /** + * Returns the value of the 'Max YSpeed' attribute. + * The default value is "0.0". + * + * + * @return the value of the 'Max YSpeed' attribute. + * @see #setMaxYSpeed(double) + * @see crossingScenario.CrossingScenarioPackage#getCrossingScenario_MaxYSpeed() + * @model default="0.0" + * @generated + */ + double getMaxYSpeed(); + + /** + * Sets the value of the '{@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}' attribute. + * + * + * @param value the new value of the 'Max YSpeed' attribute. + * @see #getMaxYSpeed() + * @generated + */ + void setMaxYSpeed(double value); + +} // CrossingScenario diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioFactory.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioFactory.java index 8ac3df81..ccf54da7 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioFactory.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioFactory.java @@ -1,114 +1,96 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see crossingScenario.CrossingScenarioPackage - * @generated - */ -public interface CrossingScenarioFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - CrossingScenarioFactory eINSTANCE = crossingScenario.impl.CrossingScenarioFactoryImpl.init(); - - /** - * Returns a new object of class 'Crossing Scenario'. - * - * - * @return a new object of class 'Crossing Scenario'. - * @generated - */ - CrossingScenario createCrossingScenario(); - - /** - * Returns a new object of class 'Vision Blocked'. - * - * - * @return a new object of class 'Vision Blocked'. - * @generated - */ - VisionBlocked createVisionBlocked(); - - /** - * Returns a new object of class 'Separation Distance'. - * - * - * @return a new object of class 'Separation Distance'. - * @generated - */ - SeparationDistance createSeparationDistance(); - - /** - * Returns a new object of class 'Collision Exists'. - * - * - * @return a new object of class 'Collision Exists'. - * @generated - */ - CollisionExists createCollisionExists(); - - /** - * Returns a new object of class 'Collision Does Not Exist'. - * - * - * @return a new object of class 'Collision Does Not Exist'. - * @generated - */ - CollisionDoesNotExist createCollisionDoesNotExist(); - - /** - * Returns a new object of class 'Pedestrian'. - * - * - * @return a new object of class 'Pedestrian'. - * @generated - */ - Pedestrian createPedestrian(); - - /** - * Returns a new object of class 'Vehicle'. - * - * - * @return a new object of class 'Vehicle'. - * @generated - */ - Vehicle createVehicle(); - - /** - * Returns a new object of class 'Lane Horizontal'. - * - * - * @return a new object of class 'Lane Horizontal'. - * @generated - */ - Lane_Horizontal createLane_Horizontal(); - - /** - * Returns a new object of class 'Lane Vertical'. - * - * - * @return a new object of class 'Lane Vertical'. - * @generated - */ - Lane_Vertical createLane_Vertical(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - CrossingScenarioPackage getCrossingScenarioPackage(); - -} //CrossingScenarioFactory +/** + */ +package crossingScenario; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see crossingScenario.CrossingScenarioPackage + * @generated + */ +public interface CrossingScenarioFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CrossingScenarioFactory eINSTANCE = crossingScenario.impl.CrossingScenarioFactoryImpl.init(); + + /** + * Returns a new object of class 'Crossing Scenario'. + * + * + * @return a new object of class 'Crossing Scenario'. + * @generated + */ + CrossingScenario createCrossingScenario(); + + /** + * Returns a new object of class 'Vision Blocked'. + * + * + * @return a new object of class 'Vision Blocked'. + * @generated + */ + VisionBlocked createVisionBlocked(); + + /** + * Returns a new object of class 'Collision Exists'. + * + * + * @return a new object of class 'Collision Exists'. + * @generated + */ + CollisionExists createCollisionExists(); + + /** + * Returns a new object of class 'Pedestrian'. + * + * + * @return a new object of class 'Pedestrian'. + * @generated + */ + Pedestrian createPedestrian(); + + /** + * Returns a new object of class 'Vehicle'. + * + * + * @return a new object of class 'Vehicle'. + * @generated + */ + Vehicle createVehicle(); + + /** + * Returns a new object of class 'Lane Horizontal'. + * + * + * @return a new object of class 'Lane Horizontal'. + * @generated + */ + Lane_Horizontal createLane_Horizontal(); + + /** + * Returns a new object of class 'Lane Vertical'. + * + * + * @return a new object of class 'Lane Vertical'. + * @generated + */ + Lane_Vertical createLane_Vertical(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CrossingScenarioPackage getCrossingScenarioPackage(); + +} //CrossingScenarioFactory diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java index bafc5e69..bdc531f6 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/CrossingScenarioPackage.java @@ -1,1812 +1,1621 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see crossingScenario.CrossingScenarioFactory - * @model kind="package" - * @generated - */ -public interface CrossingScenarioPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "crossingScenario"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.example.com/crossingScenario"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "crossingScenario"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - CrossingScenarioPackage eINSTANCE = crossingScenario.impl.CrossingScenarioPackageImpl.init(); - - /** - * The meta object id for the '{@link crossingScenario.impl.CrossingScenarioImpl Crossing Scenario}' class. - * - * - * @see crossingScenario.impl.CrossingScenarioImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCrossingScenario() - * @generated - */ - int CROSSING_SCENARIO = 0; - - /** - * The feature id for the 'XSize' attribute. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__XSIZE = 0; - - /** - * The feature id for the 'YSize' attribute. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__YSIZE = 1; - - /** - * The feature id for the 'Actors' containment reference list. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__ACTORS = 2; - - /** - * The feature id for the 'Lanes' containment reference list. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__LANES = 3; - - /** - * The feature id for the 'Max Time' attribute. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__MAX_TIME = 4; - - /** - * The feature id for the 'Relations' containment reference list. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__RELATIONS = 5; - - /** - * The feature id for the 'Max XSpeed' attribute. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__MAX_XSPEED = 6; - - /** - * The feature id for the 'Max YSpeed' attribute. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO__MAX_YSPEED = 7; - - /** - * The number of structural features of the 'Crossing Scenario' class. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO_FEATURE_COUNT = 8; - - /** - * The number of operations of the 'Crossing Scenario' class. - * - * - * @generated - * @ordered - */ - int CROSSING_SCENARIO_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.LaneImpl Lane}' class. - * - * - * @see crossingScenario.impl.LaneImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane() - * @generated - */ - int LANE = 1; - - /** - * The feature id for the 'Reference Coord' attribute. - * - * - * @generated - * @ordered - */ - int LANE__REFERENCE_COORD = 0; - - /** - * The feature id for the 'Actors' reference list. - * - * - * @generated - * @ordered - */ - int LANE__ACTORS = 1; - - /** - * The number of structural features of the 'Lane' class. - * - * - * @generated - * @ordered - */ - int LANE_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Lane' class. - * - * - * @generated - * @ordered - */ - int LANE_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.ActorImpl Actor}' class. - * - * - * @see crossingScenario.impl.ActorImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getActor() - * @generated - */ - int ACTOR = 2; - - /** - * The feature id for the 'XPos' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__XPOS = 0; - - /** - * The feature id for the 'YPos' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__YPOS = 1; - - /** - * The feature id for the 'Length' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__LENGTH = 2; - - /** - * The feature id for the 'Width' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__WIDTH = 3; - - /** - * The feature id for the 'XSpeed' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__XSPEED = 4; - - /** - * The feature id for the 'Placed On' reference. - * - * - * @generated - * @ordered - */ - int ACTOR__PLACED_ON = 5; - - /** - * The feature id for the 'YSpeed' attribute. - * - * - * @generated - * @ordered - */ - int ACTOR__YSPEED = 6; - - /** - * The feature id for the 'Dist near' reference list. - * - * - * @generated - * @ordered - */ - int ACTOR__DIST_NEAR = 7; - - /** - * The feature id for the 'Dist med' reference list. - * - * - * @generated - * @ordered - */ - int ACTOR__DIST_MED = 8; - - /** - * The feature id for the 'Dist far' reference list. - * - * - * @generated - * @ordered - */ - int ACTOR__DIST_FAR = 9; - - /** - * The number of structural features of the 'Actor' class. - * - * - * @generated - * @ordered - */ - int ACTOR_FEATURE_COUNT = 10; - - /** - * The number of operations of the 'Actor' class. - * - * - * @generated - * @ordered - */ - int ACTOR_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.RelationImpl Relation}' class. - * - * - * @see crossingScenario.impl.RelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getRelation() - * @generated - */ - int RELATION = 3; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int RELATION__TARGET = 0; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int RELATION__SOURCE = 1; - - /** - * The number of structural features of the 'Relation' class. - * - * - * @generated - * @ordered - */ - int RELATION_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Relation' class. - * - * - * @generated - * @ordered - */ - int RELATION_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.SpatialRelationImpl Spatial Relation}' class. - * - * - * @see crossingScenario.impl.SpatialRelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSpatialRelation() - * @generated - */ - int SPATIAL_RELATION = 4; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int SPATIAL_RELATION__TARGET = RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int SPATIAL_RELATION__SOURCE = RELATION__SOURCE; - - /** - * The number of structural features of the 'Spatial Relation' class. - * - * - * @generated - * @ordered - */ - int SPATIAL_RELATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Spatial Relation' class. - * - * - * @generated - * @ordered - */ - int SPATIAL_RELATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.TemporalRelationImpl Temporal Relation}' class. - * - * - * @see crossingScenario.impl.TemporalRelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getTemporalRelation() - * @generated - */ - int TEMPORAL_RELATION = 5; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int TEMPORAL_RELATION__TARGET = RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int TEMPORAL_RELATION__SOURCE = RELATION__SOURCE; - - /** - * The number of structural features of the 'Temporal Relation' class. - * - * - * @generated - * @ordered - */ - int TEMPORAL_RELATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Temporal Relation' class. - * - * - * @generated - * @ordered - */ - int TEMPORAL_RELATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.VisionBlockedImpl Vision Blocked}' class. - * - * - * @see crossingScenario.impl.VisionBlockedImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVisionBlocked() - * @generated - */ - int VISION_BLOCKED = 6; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int VISION_BLOCKED__TARGET = SPATIAL_RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int VISION_BLOCKED__SOURCE = SPATIAL_RELATION__SOURCE; - - /** - * The feature id for the 'Blocked By' reference. - * - * - * @generated - * @ordered - */ - int VISION_BLOCKED__BLOCKED_BY = SPATIAL_RELATION_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Vision Blocked' class. - * - * - * @generated - * @ordered - */ - int VISION_BLOCKED_FEATURE_COUNT = SPATIAL_RELATION_FEATURE_COUNT + 1; - - /** - * The number of operations of the 'Vision Blocked' class. - * - * - * @generated - * @ordered - */ - int VISION_BLOCKED_OPERATION_COUNT = SPATIAL_RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.SeparationDistanceImpl Separation Distance}' class. - * - * - * @see crossingScenario.impl.SeparationDistanceImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSeparationDistance() - * @generated - */ - int SEPARATION_DISTANCE = 7; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int SEPARATION_DISTANCE__TARGET = SPATIAL_RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int SEPARATION_DISTANCE__SOURCE = SPATIAL_RELATION__SOURCE; - - /** - * The feature id for the 'Distance' attribute. - * - * - * @generated - * @ordered - */ - int SEPARATION_DISTANCE__DISTANCE = SPATIAL_RELATION_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Separation Distance' class. - * - * - * @generated - * @ordered - */ - int SEPARATION_DISTANCE_FEATURE_COUNT = SPATIAL_RELATION_FEATURE_COUNT + 1; - - /** - * The number of operations of the 'Separation Distance' class. - * - * - * @generated - * @ordered - */ - int SEPARATION_DISTANCE_OPERATION_COUNT = SPATIAL_RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.CollisionExistsImpl Collision Exists}' class. - * - * - * @see crossingScenario.impl.CollisionExistsImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionExists() - * @generated - */ - int COLLISION_EXISTS = 8; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int COLLISION_EXISTS__TARGET = TEMPORAL_RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int COLLISION_EXISTS__SOURCE = TEMPORAL_RELATION__SOURCE; - - /** - * The feature id for the 'Collision Time' attribute. - * - * - * @generated - * @ordered - */ - int COLLISION_EXISTS__COLLISION_TIME = TEMPORAL_RELATION_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Collision Exists' class. - * - * - * @generated - * @ordered - */ - int COLLISION_EXISTS_FEATURE_COUNT = TEMPORAL_RELATION_FEATURE_COUNT + 1; - - /** - * The number of operations of the 'Collision Exists' class. - * - * - * @generated - * @ordered - */ - int COLLISION_EXISTS_OPERATION_COUNT = TEMPORAL_RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.CollisionDoesNotExistImpl Collision Does Not Exist}' class. - * - * - * @see crossingScenario.impl.CollisionDoesNotExistImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionDoesNotExist() - * @generated - */ - int COLLISION_DOES_NOT_EXIST = 9; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int COLLISION_DOES_NOT_EXIST__TARGET = TEMPORAL_RELATION__TARGET; - - /** - * The feature id for the 'Source' reference. - * - * - * @generated - * @ordered - */ - int COLLISION_DOES_NOT_EXIST__SOURCE = TEMPORAL_RELATION__SOURCE; - - /** - * The number of structural features of the 'Collision Does Not Exist' class. - * - * - * @generated - * @ordered - */ - int COLLISION_DOES_NOT_EXIST_FEATURE_COUNT = TEMPORAL_RELATION_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Collision Does Not Exist' class. - * - * - * @generated - * @ordered - */ - int COLLISION_DOES_NOT_EXIST_OPERATION_COUNT = TEMPORAL_RELATION_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.PedestrianImpl Pedestrian}' class. - * - * - * @see crossingScenario.impl.PedestrianImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getPedestrian() - * @generated - */ - int PEDESTRIAN = 10; - - /** - * The feature id for the 'XPos' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__XPOS = ACTOR__XPOS; - - /** - * The feature id for the 'YPos' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__YPOS = ACTOR__YPOS; - - /** - * The feature id for the 'Length' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__LENGTH = ACTOR__LENGTH; - - /** - * The feature id for the 'Width' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__WIDTH = ACTOR__WIDTH; - - /** - * The feature id for the 'XSpeed' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__XSPEED = ACTOR__XSPEED; - - /** - * The feature id for the 'Placed On' reference. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__PLACED_ON = ACTOR__PLACED_ON; - - /** - * The feature id for the 'YSpeed' attribute. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__YSPEED = ACTOR__YSPEED; - - /** - * The feature id for the 'Dist near' reference list. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__DIST_NEAR = ACTOR__DIST_NEAR; - - /** - * The feature id for the 'Dist med' reference list. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__DIST_MED = ACTOR__DIST_MED; - - /** - * The feature id for the 'Dist far' reference list. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN__DIST_FAR = ACTOR__DIST_FAR; - - /** - * The number of structural features of the 'Pedestrian' class. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN_FEATURE_COUNT = ACTOR_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Pedestrian' class. - * - * - * @generated - * @ordered - */ - int PEDESTRIAN_OPERATION_COUNT = ACTOR_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.VehicleImpl Vehicle}' class. - * - * - * @see crossingScenario.impl.VehicleImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVehicle() - * @generated - */ - int VEHICLE = 11; - - /** - * The feature id for the 'XPos' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__XPOS = ACTOR__XPOS; - - /** - * The feature id for the 'YPos' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__YPOS = ACTOR__YPOS; - - /** - * The feature id for the 'Length' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__LENGTH = ACTOR__LENGTH; - - /** - * The feature id for the 'Width' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__WIDTH = ACTOR__WIDTH; - - /** - * The feature id for the 'XSpeed' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__XSPEED = ACTOR__XSPEED; - - /** - * The feature id for the 'Placed On' reference. - * - * - * @generated - * @ordered - */ - int VEHICLE__PLACED_ON = ACTOR__PLACED_ON; - - /** - * The feature id for the 'YSpeed' attribute. - * - * - * @generated - * @ordered - */ - int VEHICLE__YSPEED = ACTOR__YSPEED; - - /** - * The feature id for the 'Dist near' reference list. - * - * - * @generated - * @ordered - */ - int VEHICLE__DIST_NEAR = ACTOR__DIST_NEAR; - - /** - * The feature id for the 'Dist med' reference list. - * - * - * @generated - * @ordered - */ - int VEHICLE__DIST_MED = ACTOR__DIST_MED; - - /** - * The feature id for the 'Dist far' reference list. - * - * - * @generated - * @ordered - */ - int VEHICLE__DIST_FAR = ACTOR__DIST_FAR; - - /** - * The number of structural features of the 'Vehicle' class. - * - * - * @generated - * @ordered - */ - int VEHICLE_FEATURE_COUNT = ACTOR_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Vehicle' class. - * - * - * @generated - * @ordered - */ - int VEHICLE_OPERATION_COUNT = ACTOR_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.Lane_HorizontalImpl Lane Horizontal}' class. - * - * - * @see crossingScenario.impl.Lane_HorizontalImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Horizontal() - * @generated - */ - int LANE_HORIZONTAL = 12; - - /** - * The feature id for the 'Reference Coord' attribute. - * - * - * @generated - * @ordered - */ - int LANE_HORIZONTAL__REFERENCE_COORD = LANE__REFERENCE_COORD; - - /** - * The feature id for the 'Actors' reference list. - * - * - * @generated - * @ordered - */ - int LANE_HORIZONTAL__ACTORS = LANE__ACTORS; - - /** - * The number of structural features of the 'Lane Horizontal' class. - * - * - * @generated - * @ordered - */ - int LANE_HORIZONTAL_FEATURE_COUNT = LANE_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Lane Horizontal' class. - * - * - * @generated - * @ordered - */ - int LANE_HORIZONTAL_OPERATION_COUNT = LANE_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.impl.Lane_VerticalImpl Lane Vertical}' class. - * - * - * @see crossingScenario.impl.Lane_VerticalImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Vertical() - * @generated - */ - int LANE_VERTICAL = 13; - - /** - * The feature id for the 'Reference Coord' attribute. - * - * - * @generated - * @ordered - */ - int LANE_VERTICAL__REFERENCE_COORD = LANE__REFERENCE_COORD; - - /** - * The feature id for the 'Actors' reference list. - * - * - * @generated - * @ordered - */ - int LANE_VERTICAL__ACTORS = LANE__ACTORS; - - /** - * The number of structural features of the 'Lane Vertical' class. - * - * - * @generated - * @ordered - */ - int LANE_VERTICAL_FEATURE_COUNT = LANE_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Lane Vertical' class. - * - * - * @generated - * @ordered - */ - int LANE_VERTICAL_OPERATION_COUNT = LANE_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link crossingScenario.Distance Distance}' enum. - * - * - * @see crossingScenario.Distance - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getDistance() - * @generated - */ - int DISTANCE = 14; - - - /** - * Returns the meta object for class '{@link crossingScenario.CrossingScenario Crossing Scenario}'. - * - * - * @return the meta object for class 'Crossing Scenario'. - * @see crossingScenario.CrossingScenario - * @generated - */ - EClass getCrossingScenario(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getXSize XSize}'. - * - * - * @return the meta object for the attribute 'XSize'. - * @see crossingScenario.CrossingScenario#getXSize() - * @see #getCrossingScenario() - * @generated - */ - EAttribute getCrossingScenario_XSize(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getYSize YSize}'. - * - * - * @return the meta object for the attribute 'YSize'. - * @see crossingScenario.CrossingScenario#getYSize() - * @see #getCrossingScenario() - * @generated - */ - EAttribute getCrossingScenario_YSize(); - - /** - * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getActors Actors}'. - * - * - * @return the meta object for the containment reference list 'Actors'. - * @see crossingScenario.CrossingScenario#getActors() - * @see #getCrossingScenario() - * @generated - */ - EReference getCrossingScenario_Actors(); - - /** - * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getLanes Lanes}'. - * - * - * @return the meta object for the containment reference list 'Lanes'. - * @see crossingScenario.CrossingScenario#getLanes() - * @see #getCrossingScenario() - * @generated - */ - EReference getCrossingScenario_Lanes(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxTime Max Time}'. - * - * - * @return the meta object for the attribute 'Max Time'. - * @see crossingScenario.CrossingScenario#getMaxTime() - * @see #getCrossingScenario() - * @generated - */ - EAttribute getCrossingScenario_MaxTime(); - - /** - * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getRelations Relations}'. - * - * - * @return the meta object for the containment reference list 'Relations'. - * @see crossingScenario.CrossingScenario#getRelations() - * @see #getCrossingScenario() - * @generated - */ - EReference getCrossingScenario_Relations(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}'. - * - * - * @return the meta object for the attribute 'Max XSpeed'. - * @see crossingScenario.CrossingScenario#getMaxXSpeed() - * @see #getCrossingScenario() - * @generated - */ - EAttribute getCrossingScenario_MaxXSpeed(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}'. - * - * - * @return the meta object for the attribute 'Max YSpeed'. - * @see crossingScenario.CrossingScenario#getMaxYSpeed() - * @see #getCrossingScenario() - * @generated - */ - EAttribute getCrossingScenario_MaxYSpeed(); - - /** - * Returns the meta object for class '{@link crossingScenario.Lane Lane}'. - * - * - * @return the meta object for class 'Lane'. - * @see crossingScenario.Lane - * @generated - */ - EClass getLane(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Lane#getReferenceCoord Reference Coord}'. - * - * - * @return the meta object for the attribute 'Reference Coord'. - * @see crossingScenario.Lane#getReferenceCoord() - * @see #getLane() - * @generated - */ - EAttribute getLane_ReferenceCoord(); - - /** - * Returns the meta object for the reference list '{@link crossingScenario.Lane#getActors Actors}'. - * - * - * @return the meta object for the reference list 'Actors'. - * @see crossingScenario.Lane#getActors() - * @see #getLane() - * @generated - */ - EReference getLane_Actors(); - - /** - * Returns the meta object for class '{@link crossingScenario.Actor Actor}'. - * - * - * @return the meta object for class 'Actor'. - * @see crossingScenario.Actor - * @generated - */ - EClass getActor(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getXPos XPos}'. - * - * - * @return the meta object for the attribute 'XPos'. - * @see crossingScenario.Actor#getXPos() - * @see #getActor() - * @generated - */ - EAttribute getActor_XPos(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getYPos YPos}'. - * - * - * @return the meta object for the attribute 'YPos'. - * @see crossingScenario.Actor#getYPos() - * @see #getActor() - * @generated - */ - EAttribute getActor_YPos(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getLength Length}'. - * - * - * @return the meta object for the attribute 'Length'. - * @see crossingScenario.Actor#getLength() - * @see #getActor() - * @generated - */ - EAttribute getActor_Length(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getWidth Width}'. - * - * - * @return the meta object for the attribute 'Width'. - * @see crossingScenario.Actor#getWidth() - * @see #getActor() - * @generated - */ - EAttribute getActor_Width(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getXSpeed XSpeed}'. - * - * - * @return the meta object for the attribute 'XSpeed'. - * @see crossingScenario.Actor#getXSpeed() - * @see #getActor() - * @generated - */ - EAttribute getActor_XSpeed(); - - /** - * Returns the meta object for the reference '{@link crossingScenario.Actor#getPlacedOn Placed On}'. - * - * - * @return the meta object for the reference 'Placed On'. - * @see crossingScenario.Actor#getPlacedOn() - * @see #getActor() - * @generated - */ - EReference getActor_PlacedOn(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.Actor#getYSpeed YSpeed}'. - * - * - * @return the meta object for the attribute 'YSpeed'. - * @see crossingScenario.Actor#getYSpeed() - * @see #getActor() - * @generated - */ - EAttribute getActor_YSpeed(); - - /** - * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_near Dist near}'. - * - * - * @return the meta object for the reference list 'Dist near'. - * @see crossingScenario.Actor#getDist_near() - * @see #getActor() - * @generated - */ - EReference getActor_Dist_near(); - - /** - * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_med Dist med}'. - * - * - * @return the meta object for the reference list 'Dist med'. - * @see crossingScenario.Actor#getDist_med() - * @see #getActor() - * @generated - */ - EReference getActor_Dist_med(); - - /** - * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_far Dist far}'. - * - * - * @return the meta object for the reference list 'Dist far'. - * @see crossingScenario.Actor#getDist_far() - * @see #getActor() - * @generated - */ - EReference getActor_Dist_far(); - - /** - * Returns the meta object for class '{@link crossingScenario.Relation Relation}'. - * - * - * @return the meta object for class 'Relation'. - * @see crossingScenario.Relation - * @generated - */ - EClass getRelation(); - - /** - * Returns the meta object for the reference '{@link crossingScenario.Relation#getTarget Target}'. - * - * - * @return the meta object for the reference 'Target'. - * @see crossingScenario.Relation#getTarget() - * @see #getRelation() - * @generated - */ - EReference getRelation_Target(); - - /** - * Returns the meta object for the reference '{@link crossingScenario.Relation#getSource Source}'. - * - * - * @return the meta object for the reference 'Source'. - * @see crossingScenario.Relation#getSource() - * @see #getRelation() - * @generated - */ - EReference getRelation_Source(); - - /** - * Returns the meta object for class '{@link crossingScenario.SpatialRelation Spatial Relation}'. - * - * - * @return the meta object for class 'Spatial Relation'. - * @see crossingScenario.SpatialRelation - * @generated - */ - EClass getSpatialRelation(); - - /** - * Returns the meta object for class '{@link crossingScenario.TemporalRelation Temporal Relation}'. - * - * - * @return the meta object for class 'Temporal Relation'. - * @see crossingScenario.TemporalRelation - * @generated - */ - EClass getTemporalRelation(); - - /** - * Returns the meta object for class '{@link crossingScenario.VisionBlocked Vision Blocked}'. - * - * - * @return the meta object for class 'Vision Blocked'. - * @see crossingScenario.VisionBlocked - * @generated - */ - EClass getVisionBlocked(); - - /** - * Returns the meta object for the reference '{@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}'. - * - * - * @return the meta object for the reference 'Blocked By'. - * @see crossingScenario.VisionBlocked#getBlockedBy() - * @see #getVisionBlocked() - * @generated - */ - EReference getVisionBlocked_BlockedBy(); - - /** - * Returns the meta object for class '{@link crossingScenario.SeparationDistance Separation Distance}'. - * - * - * @return the meta object for class 'Separation Distance'. - * @see crossingScenario.SeparationDistance - * @generated - */ - EClass getSeparationDistance(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.SeparationDistance#getDistance Distance}'. - * - * - * @return the meta object for the attribute 'Distance'. - * @see crossingScenario.SeparationDistance#getDistance() - * @see #getSeparationDistance() - * @generated - */ - EAttribute getSeparationDistance_Distance(); - - /** - * Returns the meta object for class '{@link crossingScenario.CollisionExists Collision Exists}'. - * - * - * @return the meta object for class 'Collision Exists'. - * @see crossingScenario.CollisionExists - * @generated - */ - EClass getCollisionExists(); - - /** - * Returns the meta object for the attribute '{@link crossingScenario.CollisionExists#getCollisionTime Collision Time}'. - * - * - * @return the meta object for the attribute 'Collision Time'. - * @see crossingScenario.CollisionExists#getCollisionTime() - * @see #getCollisionExists() - * @generated - */ - EAttribute getCollisionExists_CollisionTime(); - - /** - * Returns the meta object for class '{@link crossingScenario.CollisionDoesNotExist Collision Does Not Exist}'. - * - * - * @return the meta object for class 'Collision Does Not Exist'. - * @see crossingScenario.CollisionDoesNotExist - * @generated - */ - EClass getCollisionDoesNotExist(); - - /** - * Returns the meta object for class '{@link crossingScenario.Pedestrian Pedestrian}'. - * - * - * @return the meta object for class 'Pedestrian'. - * @see crossingScenario.Pedestrian - * @generated - */ - EClass getPedestrian(); - - /** - * Returns the meta object for class '{@link crossingScenario.Vehicle Vehicle}'. - * - * - * @return the meta object for class 'Vehicle'. - * @see crossingScenario.Vehicle - * @generated - */ - EClass getVehicle(); - - /** - * Returns the meta object for class '{@link crossingScenario.Lane_Horizontal Lane Horizontal}'. - * - * - * @return the meta object for class 'Lane Horizontal'. - * @see crossingScenario.Lane_Horizontal - * @generated - */ - EClass getLane_Horizontal(); - - /** - * Returns the meta object for class '{@link crossingScenario.Lane_Vertical Lane Vertical}'. - * - * - * @return the meta object for class 'Lane Vertical'. - * @see crossingScenario.Lane_Vertical - * @generated - */ - EClass getLane_Vertical(); - - /** - * Returns the meta object for enum '{@link crossingScenario.Distance Distance}'. - * - * - * @return the meta object for enum 'Distance'. - * @see crossingScenario.Distance - * @generated - */ - EEnum getDistance(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - CrossingScenarioFactory getCrossingScenarioFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link crossingScenario.impl.CrossingScenarioImpl Crossing Scenario}' class. - * - * - * @see crossingScenario.impl.CrossingScenarioImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCrossingScenario() - * @generated - */ - EClass CROSSING_SCENARIO = eINSTANCE.getCrossingScenario(); - - /** - * The meta object literal for the 'XSize' attribute feature. - * - * - * @generated - */ - EAttribute CROSSING_SCENARIO__XSIZE = eINSTANCE.getCrossingScenario_XSize(); - - /** - * The meta object literal for the 'YSize' attribute feature. - * - * - * @generated - */ - EAttribute CROSSING_SCENARIO__YSIZE = eINSTANCE.getCrossingScenario_YSize(); - - /** - * The meta object literal for the 'Actors' containment reference list feature. - * - * - * @generated - */ - EReference CROSSING_SCENARIO__ACTORS = eINSTANCE.getCrossingScenario_Actors(); - - /** - * The meta object literal for the 'Lanes' containment reference list feature. - * - * - * @generated - */ - EReference CROSSING_SCENARIO__LANES = eINSTANCE.getCrossingScenario_Lanes(); - - /** - * The meta object literal for the 'Max Time' attribute feature. - * - * - * @generated - */ - EAttribute CROSSING_SCENARIO__MAX_TIME = eINSTANCE.getCrossingScenario_MaxTime(); - - /** - * The meta object literal for the 'Relations' containment reference list feature. - * - * - * @generated - */ - EReference CROSSING_SCENARIO__RELATIONS = eINSTANCE.getCrossingScenario_Relations(); - - /** - * The meta object literal for the 'Max XSpeed' attribute feature. - * - * - * @generated - */ - EAttribute CROSSING_SCENARIO__MAX_XSPEED = eINSTANCE.getCrossingScenario_MaxXSpeed(); - - /** - * The meta object literal for the 'Max YSpeed' attribute feature. - * - * - * @generated - */ - EAttribute CROSSING_SCENARIO__MAX_YSPEED = eINSTANCE.getCrossingScenario_MaxYSpeed(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.LaneImpl Lane}' class. - * - * - * @see crossingScenario.impl.LaneImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane() - * @generated - */ - EClass LANE = eINSTANCE.getLane(); - - /** - * The meta object literal for the 'Reference Coord' attribute feature. - * - * - * @generated - */ - EAttribute LANE__REFERENCE_COORD = eINSTANCE.getLane_ReferenceCoord(); - - /** - * The meta object literal for the 'Actors' reference list feature. - * - * - * @generated - */ - EReference LANE__ACTORS = eINSTANCE.getLane_Actors(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.ActorImpl Actor}' class. - * - * - * @see crossingScenario.impl.ActorImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getActor() - * @generated - */ - EClass ACTOR = eINSTANCE.getActor(); - - /** - * The meta object literal for the 'XPos' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__XPOS = eINSTANCE.getActor_XPos(); - - /** - * The meta object literal for the 'YPos' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__YPOS = eINSTANCE.getActor_YPos(); - - /** - * The meta object literal for the 'Length' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__LENGTH = eINSTANCE.getActor_Length(); - - /** - * The meta object literal for the 'Width' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__WIDTH = eINSTANCE.getActor_Width(); - - /** - * The meta object literal for the 'XSpeed' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__XSPEED = eINSTANCE.getActor_XSpeed(); - - /** - * The meta object literal for the 'Placed On' reference feature. - * - * - * @generated - */ - EReference ACTOR__PLACED_ON = eINSTANCE.getActor_PlacedOn(); - - /** - * The meta object literal for the 'YSpeed' attribute feature. - * - * - * @generated - */ - EAttribute ACTOR__YSPEED = eINSTANCE.getActor_YSpeed(); - - /** - * The meta object literal for the 'Dist near' reference list feature. - * - * - * @generated - */ - EReference ACTOR__DIST_NEAR = eINSTANCE.getActor_Dist_near(); - - /** - * The meta object literal for the 'Dist med' reference list feature. - * - * - * @generated - */ - EReference ACTOR__DIST_MED = eINSTANCE.getActor_Dist_med(); - - /** - * The meta object literal for the 'Dist far' reference list feature. - * - * - * @generated - */ - EReference ACTOR__DIST_FAR = eINSTANCE.getActor_Dist_far(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.RelationImpl Relation}' class. - * - * - * @see crossingScenario.impl.RelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getRelation() - * @generated - */ - EClass RELATION = eINSTANCE.getRelation(); - - /** - * The meta object literal for the 'Target' reference feature. - * - * - * @generated - */ - EReference RELATION__TARGET = eINSTANCE.getRelation_Target(); - - /** - * The meta object literal for the 'Source' reference feature. - * - * - * @generated - */ - EReference RELATION__SOURCE = eINSTANCE.getRelation_Source(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.SpatialRelationImpl Spatial Relation}' class. - * - * - * @see crossingScenario.impl.SpatialRelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSpatialRelation() - * @generated - */ - EClass SPATIAL_RELATION = eINSTANCE.getSpatialRelation(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.TemporalRelationImpl Temporal Relation}' class. - * - * - * @see crossingScenario.impl.TemporalRelationImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getTemporalRelation() - * @generated - */ - EClass TEMPORAL_RELATION = eINSTANCE.getTemporalRelation(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.VisionBlockedImpl Vision Blocked}' class. - * - * - * @see crossingScenario.impl.VisionBlockedImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVisionBlocked() - * @generated - */ - EClass VISION_BLOCKED = eINSTANCE.getVisionBlocked(); - - /** - * The meta object literal for the 'Blocked By' reference feature. - * - * - * @generated - */ - EReference VISION_BLOCKED__BLOCKED_BY = eINSTANCE.getVisionBlocked_BlockedBy(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.SeparationDistanceImpl Separation Distance}' class. - * - * - * @see crossingScenario.impl.SeparationDistanceImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSeparationDistance() - * @generated - */ - EClass SEPARATION_DISTANCE = eINSTANCE.getSeparationDistance(); - - /** - * The meta object literal for the 'Distance' attribute feature. - * - * - * @generated - */ - EAttribute SEPARATION_DISTANCE__DISTANCE = eINSTANCE.getSeparationDistance_Distance(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.CollisionExistsImpl Collision Exists}' class. - * - * - * @see crossingScenario.impl.CollisionExistsImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionExists() - * @generated - */ - EClass COLLISION_EXISTS = eINSTANCE.getCollisionExists(); - - /** - * The meta object literal for the 'Collision Time' attribute feature. - * - * - * @generated - */ - EAttribute COLLISION_EXISTS__COLLISION_TIME = eINSTANCE.getCollisionExists_CollisionTime(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.CollisionDoesNotExistImpl Collision Does Not Exist}' class. - * - * - * @see crossingScenario.impl.CollisionDoesNotExistImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionDoesNotExist() - * @generated - */ - EClass COLLISION_DOES_NOT_EXIST = eINSTANCE.getCollisionDoesNotExist(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.PedestrianImpl Pedestrian}' class. - * - * - * @see crossingScenario.impl.PedestrianImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getPedestrian() - * @generated - */ - EClass PEDESTRIAN = eINSTANCE.getPedestrian(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.VehicleImpl Vehicle}' class. - * - * - * @see crossingScenario.impl.VehicleImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVehicle() - * @generated - */ - EClass VEHICLE = eINSTANCE.getVehicle(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.Lane_HorizontalImpl Lane Horizontal}' class. - * - * - * @see crossingScenario.impl.Lane_HorizontalImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Horizontal() - * @generated - */ - EClass LANE_HORIZONTAL = eINSTANCE.getLane_Horizontal(); - - /** - * The meta object literal for the '{@link crossingScenario.impl.Lane_VerticalImpl Lane Vertical}' class. - * - * - * @see crossingScenario.impl.Lane_VerticalImpl - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Vertical() - * @generated - */ - EClass LANE_VERTICAL = eINSTANCE.getLane_Vertical(); - - /** - * The meta object literal for the '{@link crossingScenario.Distance Distance}' enum. - * - * - * @see crossingScenario.Distance - * @see crossingScenario.impl.CrossingScenarioPackageImpl#getDistance() - * @generated - */ - EEnum DISTANCE = eINSTANCE.getDistance(); - - } - -} //CrossingScenarioPackage +/** + */ +package crossingScenario; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see crossingScenario.CrossingScenarioFactory + * @model kind="package" + * @generated + */ +public interface CrossingScenarioPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "crossingScenario"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.example.com/crossingScenario"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "crossingScenario"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CrossingScenarioPackage eINSTANCE = crossingScenario.impl.CrossingScenarioPackageImpl.init(); + + /** + * The meta object id for the '{@link crossingScenario.impl.CrossingScenarioImpl Crossing Scenario}' class. + * + * + * @see crossingScenario.impl.CrossingScenarioImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCrossingScenario() + * @generated + */ + int CROSSING_SCENARIO = 0; + + /** + * The feature id for the 'XSize' attribute. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__XSIZE = 0; + + /** + * The feature id for the 'YSize' attribute. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__YSIZE = 1; + + /** + * The feature id for the 'Actors' containment reference list. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__ACTORS = 2; + + /** + * The feature id for the 'Lanes' containment reference list. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__LANES = 3; + + /** + * The feature id for the 'Max Time' attribute. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__MAX_TIME = 4; + + /** + * The feature id for the 'Relations' containment reference list. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__RELATIONS = 5; + + /** + * The feature id for the 'Max XSpeed' attribute. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__MAX_XSPEED = 6; + + /** + * The feature id for the 'Max YSpeed' attribute. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO__MAX_YSPEED = 7; + + /** + * The number of structural features of the 'Crossing Scenario' class. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO_FEATURE_COUNT = 8; + + /** + * The number of operations of the 'Crossing Scenario' class. + * + * + * @generated + * @ordered + */ + int CROSSING_SCENARIO_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.LaneImpl Lane}' class. + * + * + * @see crossingScenario.impl.LaneImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane() + * @generated + */ + int LANE = 1; + + /** + * The feature id for the 'Reference Coord' attribute. + * + * + * @generated + * @ordered + */ + int LANE__REFERENCE_COORD = 0; + + /** + * The feature id for the 'Actors' reference list. + * + * + * @generated + * @ordered + */ + int LANE__ACTORS = 1; + + /** + * The number of structural features of the 'Lane' class. + * + * + * @generated + * @ordered + */ + int LANE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Lane' class. + * + * + * @generated + * @ordered + */ + int LANE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.ActorImpl Actor}' class. + * + * + * @see crossingScenario.impl.ActorImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getActor() + * @generated + */ + int ACTOR = 2; + + /** + * The feature id for the 'XPos' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__XPOS = 0; + + /** + * The feature id for the 'YPos' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__YPOS = 1; + + /** + * The feature id for the 'Length' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__LENGTH = 2; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__WIDTH = 3; + + /** + * The feature id for the 'XSpeed' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__XSPEED = 4; + + /** + * The feature id for the 'Placed On' reference. + * + * + * @generated + * @ordered + */ + int ACTOR__PLACED_ON = 5; + + /** + * The feature id for the 'YSpeed' attribute. + * + * + * @generated + * @ordered + */ + int ACTOR__YSPEED = 6; + + /** + * The feature id for the 'Dist near' reference list. + * + * + * @generated + * @ordered + */ + int ACTOR__DIST_NEAR = 7; + + /** + * The feature id for the 'Dist med' reference list. + * + * + * @generated + * @ordered + */ + int ACTOR__DIST_MED = 8; + + /** + * The feature id for the 'Dist far' reference list. + * + * + * @generated + * @ordered + */ + int ACTOR__DIST_FAR = 9; + + /** + * The number of structural features of the 'Actor' class. + * + * + * @generated + * @ordered + */ + int ACTOR_FEATURE_COUNT = 10; + + /** + * The number of operations of the 'Actor' class. + * + * + * @generated + * @ordered + */ + int ACTOR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.RelationImpl Relation}' class. + * + * + * @see crossingScenario.impl.RelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getRelation() + * @generated + */ + int RELATION = 3; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int RELATION__TARGET = 0; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int RELATION__SOURCE = 1; + + /** + * The number of structural features of the 'Relation' class. + * + * + * @generated + * @ordered + */ + int RELATION_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Relation' class. + * + * + * @generated + * @ordered + */ + int RELATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.SpatialRelationImpl Spatial Relation}' class. + * + * + * @see crossingScenario.impl.SpatialRelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSpatialRelation() + * @generated + */ + int SPATIAL_RELATION = 4; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int SPATIAL_RELATION__TARGET = RELATION__TARGET; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int SPATIAL_RELATION__SOURCE = RELATION__SOURCE; + + /** + * The number of structural features of the 'Spatial Relation' class. + * + * + * @generated + * @ordered + */ + int SPATIAL_RELATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Spatial Relation' class. + * + * + * @generated + * @ordered + */ + int SPATIAL_RELATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.TemporalRelationImpl Temporal Relation}' class. + * + * + * @see crossingScenario.impl.TemporalRelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getTemporalRelation() + * @generated + */ + int TEMPORAL_RELATION = 5; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int TEMPORAL_RELATION__TARGET = RELATION__TARGET; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int TEMPORAL_RELATION__SOURCE = RELATION__SOURCE; + + /** + * The number of structural features of the 'Temporal Relation' class. + * + * + * @generated + * @ordered + */ + int TEMPORAL_RELATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Temporal Relation' class. + * + * + * @generated + * @ordered + */ + int TEMPORAL_RELATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.VisionBlockedImpl Vision Blocked}' class. + * + * + * @see crossingScenario.impl.VisionBlockedImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVisionBlocked() + * @generated + */ + int VISION_BLOCKED = 6; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int VISION_BLOCKED__TARGET = SPATIAL_RELATION__TARGET; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int VISION_BLOCKED__SOURCE = SPATIAL_RELATION__SOURCE; + + /** + * The feature id for the 'Blocked By' reference. + * + * + * @generated + * @ordered + */ + int VISION_BLOCKED__BLOCKED_BY = SPATIAL_RELATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Vision Blocked' class. + * + * + * @generated + * @ordered + */ + int VISION_BLOCKED_FEATURE_COUNT = SPATIAL_RELATION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Vision Blocked' class. + * + * + * @generated + * @ordered + */ + int VISION_BLOCKED_OPERATION_COUNT = SPATIAL_RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.CollisionExistsImpl Collision Exists}' class. + * + * + * @see crossingScenario.impl.CollisionExistsImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionExists() + * @generated + */ + int COLLISION_EXISTS = 7; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int COLLISION_EXISTS__TARGET = TEMPORAL_RELATION__TARGET; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int COLLISION_EXISTS__SOURCE = TEMPORAL_RELATION__SOURCE; + + /** + * The feature id for the 'Collision Time' attribute. + * + * + * @generated + * @ordered + */ + int COLLISION_EXISTS__COLLISION_TIME = TEMPORAL_RELATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Collision Exists' class. + * + * + * @generated + * @ordered + */ + int COLLISION_EXISTS_FEATURE_COUNT = TEMPORAL_RELATION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Collision Exists' class. + * + * + * @generated + * @ordered + */ + int COLLISION_EXISTS_OPERATION_COUNT = TEMPORAL_RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.PedestrianImpl Pedestrian}' class. + * + * + * @see crossingScenario.impl.PedestrianImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getPedestrian() + * @generated + */ + int PEDESTRIAN = 8; + + /** + * The feature id for the 'XPos' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__XPOS = ACTOR__XPOS; + + /** + * The feature id for the 'YPos' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__YPOS = ACTOR__YPOS; + + /** + * The feature id for the 'Length' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__LENGTH = ACTOR__LENGTH; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__WIDTH = ACTOR__WIDTH; + + /** + * The feature id for the 'XSpeed' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__XSPEED = ACTOR__XSPEED; + + /** + * The feature id for the 'Placed On' reference. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__PLACED_ON = ACTOR__PLACED_ON; + + /** + * The feature id for the 'YSpeed' attribute. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__YSPEED = ACTOR__YSPEED; + + /** + * The feature id for the 'Dist near' reference list. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__DIST_NEAR = ACTOR__DIST_NEAR; + + /** + * The feature id for the 'Dist med' reference list. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__DIST_MED = ACTOR__DIST_MED; + + /** + * The feature id for the 'Dist far' reference list. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN__DIST_FAR = ACTOR__DIST_FAR; + + /** + * The number of structural features of the 'Pedestrian' class. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN_FEATURE_COUNT = ACTOR_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Pedestrian' class. + * + * + * @generated + * @ordered + */ + int PEDESTRIAN_OPERATION_COUNT = ACTOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.VehicleImpl Vehicle}' class. + * + * + * @see crossingScenario.impl.VehicleImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVehicle() + * @generated + */ + int VEHICLE = 9; + + /** + * The feature id for the 'XPos' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__XPOS = ACTOR__XPOS; + + /** + * The feature id for the 'YPos' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__YPOS = ACTOR__YPOS; + + /** + * The feature id for the 'Length' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__LENGTH = ACTOR__LENGTH; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__WIDTH = ACTOR__WIDTH; + + /** + * The feature id for the 'XSpeed' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__XSPEED = ACTOR__XSPEED; + + /** + * The feature id for the 'Placed On' reference. + * + * + * @generated + * @ordered + */ + int VEHICLE__PLACED_ON = ACTOR__PLACED_ON; + + /** + * The feature id for the 'YSpeed' attribute. + * + * + * @generated + * @ordered + */ + int VEHICLE__YSPEED = ACTOR__YSPEED; + + /** + * The feature id for the 'Dist near' reference list. + * + * + * @generated + * @ordered + */ + int VEHICLE__DIST_NEAR = ACTOR__DIST_NEAR; + + /** + * The feature id for the 'Dist med' reference list. + * + * + * @generated + * @ordered + */ + int VEHICLE__DIST_MED = ACTOR__DIST_MED; + + /** + * The feature id for the 'Dist far' reference list. + * + * + * @generated + * @ordered + */ + int VEHICLE__DIST_FAR = ACTOR__DIST_FAR; + + /** + * The number of structural features of the 'Vehicle' class. + * + * + * @generated + * @ordered + */ + int VEHICLE_FEATURE_COUNT = ACTOR_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Vehicle' class. + * + * + * @generated + * @ordered + */ + int VEHICLE_OPERATION_COUNT = ACTOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.Lane_HorizontalImpl Lane Horizontal}' class. + * + * + * @see crossingScenario.impl.Lane_HorizontalImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Horizontal() + * @generated + */ + int LANE_HORIZONTAL = 10; + + /** + * The feature id for the 'Reference Coord' attribute. + * + * + * @generated + * @ordered + */ + int LANE_HORIZONTAL__REFERENCE_COORD = LANE__REFERENCE_COORD; + + /** + * The feature id for the 'Actors' reference list. + * + * + * @generated + * @ordered + */ + int LANE_HORIZONTAL__ACTORS = LANE__ACTORS; + + /** + * The number of structural features of the 'Lane Horizontal' class. + * + * + * @generated + * @ordered + */ + int LANE_HORIZONTAL_FEATURE_COUNT = LANE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Lane Horizontal' class. + * + * + * @generated + * @ordered + */ + int LANE_HORIZONTAL_OPERATION_COUNT = LANE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link crossingScenario.impl.Lane_VerticalImpl Lane Vertical}' class. + * + * + * @see crossingScenario.impl.Lane_VerticalImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Vertical() + * @generated + */ + int LANE_VERTICAL = 11; + + /** + * The feature id for the 'Reference Coord' attribute. + * + * + * @generated + * @ordered + */ + int LANE_VERTICAL__REFERENCE_COORD = LANE__REFERENCE_COORD; + + /** + * The feature id for the 'Actors' reference list. + * + * + * @generated + * @ordered + */ + int LANE_VERTICAL__ACTORS = LANE__ACTORS; + + /** + * The number of structural features of the 'Lane Vertical' class. + * + * + * @generated + * @ordered + */ + int LANE_VERTICAL_FEATURE_COUNT = LANE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Lane Vertical' class. + * + * + * @generated + * @ordered + */ + int LANE_VERTICAL_OPERATION_COUNT = LANE_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link crossingScenario.CrossingScenario Crossing Scenario}'. + * + * + * @return the meta object for class 'Crossing Scenario'. + * @see crossingScenario.CrossingScenario + * @generated + */ + EClass getCrossingScenario(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getXSize XSize}'. + * + * + * @return the meta object for the attribute 'XSize'. + * @see crossingScenario.CrossingScenario#getXSize() + * @see #getCrossingScenario() + * @generated + */ + EAttribute getCrossingScenario_XSize(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getYSize YSize}'. + * + * + * @return the meta object for the attribute 'YSize'. + * @see crossingScenario.CrossingScenario#getYSize() + * @see #getCrossingScenario() + * @generated + */ + EAttribute getCrossingScenario_YSize(); + + /** + * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getActors Actors}'. + * + * + * @return the meta object for the containment reference list 'Actors'. + * @see crossingScenario.CrossingScenario#getActors() + * @see #getCrossingScenario() + * @generated + */ + EReference getCrossingScenario_Actors(); + + /** + * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getLanes Lanes}'. + * + * + * @return the meta object for the containment reference list 'Lanes'. + * @see crossingScenario.CrossingScenario#getLanes() + * @see #getCrossingScenario() + * @generated + */ + EReference getCrossingScenario_Lanes(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxTime Max Time}'. + * + * + * @return the meta object for the attribute 'Max Time'. + * @see crossingScenario.CrossingScenario#getMaxTime() + * @see #getCrossingScenario() + * @generated + */ + EAttribute getCrossingScenario_MaxTime(); + + /** + * Returns the meta object for the containment reference list '{@link crossingScenario.CrossingScenario#getRelations Relations}'. + * + * + * @return the meta object for the containment reference list 'Relations'. + * @see crossingScenario.CrossingScenario#getRelations() + * @see #getCrossingScenario() + * @generated + */ + EReference getCrossingScenario_Relations(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxXSpeed Max XSpeed}'. + * + * + * @return the meta object for the attribute 'Max XSpeed'. + * @see crossingScenario.CrossingScenario#getMaxXSpeed() + * @see #getCrossingScenario() + * @generated + */ + EAttribute getCrossingScenario_MaxXSpeed(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CrossingScenario#getMaxYSpeed Max YSpeed}'. + * + * + * @return the meta object for the attribute 'Max YSpeed'. + * @see crossingScenario.CrossingScenario#getMaxYSpeed() + * @see #getCrossingScenario() + * @generated + */ + EAttribute getCrossingScenario_MaxYSpeed(); + + /** + * Returns the meta object for class '{@link crossingScenario.Lane Lane}'. + * + * + * @return the meta object for class 'Lane'. + * @see crossingScenario.Lane + * @generated + */ + EClass getLane(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Lane#getReferenceCoord Reference Coord}'. + * + * + * @return the meta object for the attribute 'Reference Coord'. + * @see crossingScenario.Lane#getReferenceCoord() + * @see #getLane() + * @generated + */ + EAttribute getLane_ReferenceCoord(); + + /** + * Returns the meta object for the reference list '{@link crossingScenario.Lane#getActors Actors}'. + * + * + * @return the meta object for the reference list 'Actors'. + * @see crossingScenario.Lane#getActors() + * @see #getLane() + * @generated + */ + EReference getLane_Actors(); + + /** + * Returns the meta object for class '{@link crossingScenario.Actor Actor}'. + * + * + * @return the meta object for class 'Actor'. + * @see crossingScenario.Actor + * @generated + */ + EClass getActor(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getXPos XPos}'. + * + * + * @return the meta object for the attribute 'XPos'. + * @see crossingScenario.Actor#getXPos() + * @see #getActor() + * @generated + */ + EAttribute getActor_XPos(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getYPos YPos}'. + * + * + * @return the meta object for the attribute 'YPos'. + * @see crossingScenario.Actor#getYPos() + * @see #getActor() + * @generated + */ + EAttribute getActor_YPos(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getLength Length}'. + * + * + * @return the meta object for the attribute 'Length'. + * @see crossingScenario.Actor#getLength() + * @see #getActor() + * @generated + */ + EAttribute getActor_Length(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getWidth Width}'. + * + * + * @return the meta object for the attribute 'Width'. + * @see crossingScenario.Actor#getWidth() + * @see #getActor() + * @generated + */ + EAttribute getActor_Width(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getXSpeed XSpeed}'. + * + * + * @return the meta object for the attribute 'XSpeed'. + * @see crossingScenario.Actor#getXSpeed() + * @see #getActor() + * @generated + */ + EAttribute getActor_XSpeed(); + + /** + * Returns the meta object for the reference '{@link crossingScenario.Actor#getPlacedOn Placed On}'. + * + * + * @return the meta object for the reference 'Placed On'. + * @see crossingScenario.Actor#getPlacedOn() + * @see #getActor() + * @generated + */ + EReference getActor_PlacedOn(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.Actor#getYSpeed YSpeed}'. + * + * + * @return the meta object for the attribute 'YSpeed'. + * @see crossingScenario.Actor#getYSpeed() + * @see #getActor() + * @generated + */ + EAttribute getActor_YSpeed(); + + /** + * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_near Dist near}'. + * + * + * @return the meta object for the reference list 'Dist near'. + * @see crossingScenario.Actor#getDist_near() + * @see #getActor() + * @generated + */ + EReference getActor_Dist_near(); + + /** + * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_med Dist med}'. + * + * + * @return the meta object for the reference list 'Dist med'. + * @see crossingScenario.Actor#getDist_med() + * @see #getActor() + * @generated + */ + EReference getActor_Dist_med(); + + /** + * Returns the meta object for the reference list '{@link crossingScenario.Actor#getDist_far Dist far}'. + * + * + * @return the meta object for the reference list 'Dist far'. + * @see crossingScenario.Actor#getDist_far() + * @see #getActor() + * @generated + */ + EReference getActor_Dist_far(); + + /** + * Returns the meta object for class '{@link crossingScenario.Relation Relation}'. + * + * + * @return the meta object for class 'Relation'. + * @see crossingScenario.Relation + * @generated + */ + EClass getRelation(); + + /** + * Returns the meta object for the reference '{@link crossingScenario.Relation#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see crossingScenario.Relation#getTarget() + * @see #getRelation() + * @generated + */ + EReference getRelation_Target(); + + /** + * Returns the meta object for the reference '{@link crossingScenario.Relation#getSource Source}'. + * + * + * @return the meta object for the reference 'Source'. + * @see crossingScenario.Relation#getSource() + * @see #getRelation() + * @generated + */ + EReference getRelation_Source(); + + /** + * Returns the meta object for class '{@link crossingScenario.SpatialRelation Spatial Relation}'. + * + * + * @return the meta object for class 'Spatial Relation'. + * @see crossingScenario.SpatialRelation + * @generated + */ + EClass getSpatialRelation(); + + /** + * Returns the meta object for class '{@link crossingScenario.TemporalRelation Temporal Relation}'. + * + * + * @return the meta object for class 'Temporal Relation'. + * @see crossingScenario.TemporalRelation + * @generated + */ + EClass getTemporalRelation(); + + /** + * Returns the meta object for class '{@link crossingScenario.VisionBlocked Vision Blocked}'. + * + * + * @return the meta object for class 'Vision Blocked'. + * @see crossingScenario.VisionBlocked + * @generated + */ + EClass getVisionBlocked(); + + /** + * Returns the meta object for the reference '{@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}'. + * + * + * @return the meta object for the reference 'Blocked By'. + * @see crossingScenario.VisionBlocked#getBlockedBy() + * @see #getVisionBlocked() + * @generated + */ + EReference getVisionBlocked_BlockedBy(); + + /** + * Returns the meta object for class '{@link crossingScenario.CollisionExists Collision Exists}'. + * + * + * @return the meta object for class 'Collision Exists'. + * @see crossingScenario.CollisionExists + * @generated + */ + EClass getCollisionExists(); + + /** + * Returns the meta object for the attribute '{@link crossingScenario.CollisionExists#getCollisionTime Collision Time}'. + * + * + * @return the meta object for the attribute 'Collision Time'. + * @see crossingScenario.CollisionExists#getCollisionTime() + * @see #getCollisionExists() + * @generated + */ + EAttribute getCollisionExists_CollisionTime(); + + /** + * Returns the meta object for class '{@link crossingScenario.Pedestrian Pedestrian}'. + * + * + * @return the meta object for class 'Pedestrian'. + * @see crossingScenario.Pedestrian + * @generated + */ + EClass getPedestrian(); + + /** + * Returns the meta object for class '{@link crossingScenario.Vehicle Vehicle}'. + * + * + * @return the meta object for class 'Vehicle'. + * @see crossingScenario.Vehicle + * @generated + */ + EClass getVehicle(); + + /** + * Returns the meta object for class '{@link crossingScenario.Lane_Horizontal Lane Horizontal}'. + * + * + * @return the meta object for class 'Lane Horizontal'. + * @see crossingScenario.Lane_Horizontal + * @generated + */ + EClass getLane_Horizontal(); + + /** + * Returns the meta object for class '{@link crossingScenario.Lane_Vertical Lane Vertical}'. + * + * + * @return the meta object for class 'Lane Vertical'. + * @see crossingScenario.Lane_Vertical + * @generated + */ + EClass getLane_Vertical(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CrossingScenarioFactory getCrossingScenarioFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link crossingScenario.impl.CrossingScenarioImpl Crossing Scenario}' class. + * + * + * @see crossingScenario.impl.CrossingScenarioImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCrossingScenario() + * @generated + */ + EClass CROSSING_SCENARIO = eINSTANCE.getCrossingScenario(); + + /** + * The meta object literal for the 'XSize' attribute feature. + * + * + * @generated + */ + EAttribute CROSSING_SCENARIO__XSIZE = eINSTANCE.getCrossingScenario_XSize(); + + /** + * The meta object literal for the 'YSize' attribute feature. + * + * + * @generated + */ + EAttribute CROSSING_SCENARIO__YSIZE = eINSTANCE.getCrossingScenario_YSize(); + + /** + * The meta object literal for the 'Actors' containment reference list feature. + * + * + * @generated + */ + EReference CROSSING_SCENARIO__ACTORS = eINSTANCE.getCrossingScenario_Actors(); + + /** + * The meta object literal for the 'Lanes' containment reference list feature. + * + * + * @generated + */ + EReference CROSSING_SCENARIO__LANES = eINSTANCE.getCrossingScenario_Lanes(); + + /** + * The meta object literal for the 'Max Time' attribute feature. + * + * + * @generated + */ + EAttribute CROSSING_SCENARIO__MAX_TIME = eINSTANCE.getCrossingScenario_MaxTime(); + + /** + * The meta object literal for the 'Relations' containment reference list feature. + * + * + * @generated + */ + EReference CROSSING_SCENARIO__RELATIONS = eINSTANCE.getCrossingScenario_Relations(); + + /** + * The meta object literal for the 'Max XSpeed' attribute feature. + * + * + * @generated + */ + EAttribute CROSSING_SCENARIO__MAX_XSPEED = eINSTANCE.getCrossingScenario_MaxXSpeed(); + + /** + * The meta object literal for the 'Max YSpeed' attribute feature. + * + * + * @generated + */ + EAttribute CROSSING_SCENARIO__MAX_YSPEED = eINSTANCE.getCrossingScenario_MaxYSpeed(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.LaneImpl Lane}' class. + * + * + * @see crossingScenario.impl.LaneImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane() + * @generated + */ + EClass LANE = eINSTANCE.getLane(); + + /** + * The meta object literal for the 'Reference Coord' attribute feature. + * + * + * @generated + */ + EAttribute LANE__REFERENCE_COORD = eINSTANCE.getLane_ReferenceCoord(); + + /** + * The meta object literal for the 'Actors' reference list feature. + * + * + * @generated + */ + EReference LANE__ACTORS = eINSTANCE.getLane_Actors(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.ActorImpl Actor}' class. + * + * + * @see crossingScenario.impl.ActorImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getActor() + * @generated + */ + EClass ACTOR = eINSTANCE.getActor(); + + /** + * The meta object literal for the 'XPos' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__XPOS = eINSTANCE.getActor_XPos(); + + /** + * The meta object literal for the 'YPos' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__YPOS = eINSTANCE.getActor_YPos(); + + /** + * The meta object literal for the 'Length' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__LENGTH = eINSTANCE.getActor_Length(); + + /** + * The meta object literal for the 'Width' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__WIDTH = eINSTANCE.getActor_Width(); + + /** + * The meta object literal for the 'XSpeed' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__XSPEED = eINSTANCE.getActor_XSpeed(); + + /** + * The meta object literal for the 'Placed On' reference feature. + * + * + * @generated + */ + EReference ACTOR__PLACED_ON = eINSTANCE.getActor_PlacedOn(); + + /** + * The meta object literal for the 'YSpeed' attribute feature. + * + * + * @generated + */ + EAttribute ACTOR__YSPEED = eINSTANCE.getActor_YSpeed(); + + /** + * The meta object literal for the 'Dist near' reference list feature. + * + * + * @generated + */ + EReference ACTOR__DIST_NEAR = eINSTANCE.getActor_Dist_near(); + + /** + * The meta object literal for the 'Dist med' reference list feature. + * + * + * @generated + */ + EReference ACTOR__DIST_MED = eINSTANCE.getActor_Dist_med(); + + /** + * The meta object literal for the 'Dist far' reference list feature. + * + * + * @generated + */ + EReference ACTOR__DIST_FAR = eINSTANCE.getActor_Dist_far(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.RelationImpl Relation}' class. + * + * + * @see crossingScenario.impl.RelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getRelation() + * @generated + */ + EClass RELATION = eINSTANCE.getRelation(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference RELATION__TARGET = eINSTANCE.getRelation_Target(); + + /** + * The meta object literal for the 'Source' reference feature. + * + * + * @generated + */ + EReference RELATION__SOURCE = eINSTANCE.getRelation_Source(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.SpatialRelationImpl Spatial Relation}' class. + * + * + * @see crossingScenario.impl.SpatialRelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getSpatialRelation() + * @generated + */ + EClass SPATIAL_RELATION = eINSTANCE.getSpatialRelation(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.TemporalRelationImpl Temporal Relation}' class. + * + * + * @see crossingScenario.impl.TemporalRelationImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getTemporalRelation() + * @generated + */ + EClass TEMPORAL_RELATION = eINSTANCE.getTemporalRelation(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.VisionBlockedImpl Vision Blocked}' class. + * + * + * @see crossingScenario.impl.VisionBlockedImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVisionBlocked() + * @generated + */ + EClass VISION_BLOCKED = eINSTANCE.getVisionBlocked(); + + /** + * The meta object literal for the 'Blocked By' reference feature. + * + * + * @generated + */ + EReference VISION_BLOCKED__BLOCKED_BY = eINSTANCE.getVisionBlocked_BlockedBy(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.CollisionExistsImpl Collision Exists}' class. + * + * + * @see crossingScenario.impl.CollisionExistsImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getCollisionExists() + * @generated + */ + EClass COLLISION_EXISTS = eINSTANCE.getCollisionExists(); + + /** + * The meta object literal for the 'Collision Time' attribute feature. + * + * + * @generated + */ + EAttribute COLLISION_EXISTS__COLLISION_TIME = eINSTANCE.getCollisionExists_CollisionTime(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.PedestrianImpl Pedestrian}' class. + * + * + * @see crossingScenario.impl.PedestrianImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getPedestrian() + * @generated + */ + EClass PEDESTRIAN = eINSTANCE.getPedestrian(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.VehicleImpl Vehicle}' class. + * + * + * @see crossingScenario.impl.VehicleImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getVehicle() + * @generated + */ + EClass VEHICLE = eINSTANCE.getVehicle(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.Lane_HorizontalImpl Lane Horizontal}' class. + * + * + * @see crossingScenario.impl.Lane_HorizontalImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Horizontal() + * @generated + */ + EClass LANE_HORIZONTAL = eINSTANCE.getLane_Horizontal(); + + /** + * The meta object literal for the '{@link crossingScenario.impl.Lane_VerticalImpl Lane Vertical}' class. + * + * + * @see crossingScenario.impl.Lane_VerticalImpl + * @see crossingScenario.impl.CrossingScenarioPackageImpl#getLane_Vertical() + * @generated + */ + EClass LANE_VERTICAL = eINSTANCE.getLane_Vertical(); + + } + +} //CrossingScenarioPackage diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Distance.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Distance.java deleted file mode 100644 index 80731e1f..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Distance.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - */ -package crossingScenario; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * - * A representation of the literals of the enumeration 'Distance', - * and utility methods for working with them. - * - * @see crossingScenario.CrossingScenarioPackage#getDistance() - * @model - * @generated - */ -public enum Distance implements Enumerator { - /** - * The 'DNear' literal object. - * - * - * @see #DNEAR_VALUE - * @generated - * @ordered - */ - DNEAR(0, "D_Near", "D_Near"), /** - * The 'DMed' literal object. - * - * - * @see #DMED_VALUE - * @generated - * @ordered - */ - DMED(1, "D_Med", "D_Med"), /** - * The 'DFar' literal object. - * - * - * @see #DFAR_VALUE - * @generated - * @ordered - */ - DFAR(2, "D_Far", "D_Far"); - - /** - * The 'DNear' literal value. - * - * - * @see #DNEAR - * @model name="D_Near" - * @generated - * @ordered - */ - public static final int DNEAR_VALUE = 0; - - /** - * The 'DMed' literal value. - * - * - * @see #DMED - * @model name="D_Med" - * @generated - * @ordered - */ - public static final int DMED_VALUE = 1; - - /** - * The 'DFar' literal value. - * - * - * @see #DFAR - * @model name="D_Far" - * @generated - * @ordered - */ - public static final int DFAR_VALUE = 2; - - /** - * An array of all the 'Distance' enumerators. - * - * - * @generated - */ - private static final Distance[] VALUES_ARRAY = - new Distance[] { - DNEAR, - DMED, - DFAR, - }; - - /** - * A public read-only list of all the 'Distance' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Distance' literal with the specified literal value. - * - * - * @param literal the literal. - * @return the matching enumerator or null. - * @generated - */ - public static Distance get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Distance result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Distance' literal with the specified name. - * - * - * @param name the name. - * @return the matching enumerator or null. - * @generated - */ - public static Distance getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Distance result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Distance' literal with the specified integer value. - * - * - * @param value the integer value. - * @return the matching enumerator or null. - * @generated - */ - public static Distance get(int value) { - switch (value) { - case DNEAR_VALUE: return DNEAR; - case DMED_VALUE: return DMED; - case DFAR_VALUE: return DFAR; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * - * @generated - */ - private Distance(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - @Override - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - @Override - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - @Override - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //Distance diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane.java index ef45e1b9..fc746ed6 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane.java @@ -1,63 +1,63 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Lane'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.Lane#getReferenceCoord Reference Coord}
  • - *
  • {@link crossingScenario.Lane#getActors Actors}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getLane() - * @model abstract="true" - * @generated - */ -public interface Lane extends EObject { - /** - * Returns the value of the 'Reference Coord' attribute. - * - * - * @return the value of the 'Reference Coord' attribute. - * @see #setReferenceCoord(double) - * @see crossingScenario.CrossingScenarioPackage#getLane_ReferenceCoord() - * @model required="true" - * @generated - */ - double getReferenceCoord(); - - /** - * Sets the value of the '{@link crossingScenario.Lane#getReferenceCoord Reference Coord}' attribute. - * - * - * @param value the new value of the 'Reference Coord' attribute. - * @see #getReferenceCoord() - * @generated - */ - void setReferenceCoord(double value); - - /** - * Returns the value of the 'Actors' reference list. - * The list contents are of type {@link crossingScenario.Actor}. - * It is bidirectional and its opposite is '{@link crossingScenario.Actor#getPlacedOn Placed On}'. - * - * - * @return the value of the 'Actors' reference list. - * @see crossingScenario.CrossingScenarioPackage#getLane_Actors() - * @see crossingScenario.Actor#getPlacedOn - * @model opposite="placedOn" - * @generated - */ - EList getActors(); - -} // Lane +/** + */ +package crossingScenario; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Lane'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.Lane#getReferenceCoord Reference Coord}
  • + *
  • {@link crossingScenario.Lane#getActors Actors}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getLane() + * @model abstract="true" + * @generated + */ +public interface Lane extends EObject { + /** + * Returns the value of the 'Reference Coord' attribute. + * + * + * @return the value of the 'Reference Coord' attribute. + * @see #setReferenceCoord(double) + * @see crossingScenario.CrossingScenarioPackage#getLane_ReferenceCoord() + * @model required="true" + * @generated + */ + double getReferenceCoord(); + + /** + * Sets the value of the '{@link crossingScenario.Lane#getReferenceCoord Reference Coord}' attribute. + * + * + * @param value the new value of the 'Reference Coord' attribute. + * @see #getReferenceCoord() + * @generated + */ + void setReferenceCoord(double value); + + /** + * Returns the value of the 'Actors' reference list. + * The list contents are of type {@link crossingScenario.Actor}. + * It is bidirectional and its opposite is '{@link crossingScenario.Actor#getPlacedOn Placed On}'. + * + * + * @return the value of the 'Actors' reference list. + * @see crossingScenario.CrossingScenarioPackage#getLane_Actors() + * @see crossingScenario.Actor#getPlacedOn + * @model opposite="placedOn" + * @generated + */ + EList getActors(); + +} // Lane diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Horizontal.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Horizontal.java index aec6413e..1ff45415 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Horizontal.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Horizontal.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Lane Horizontal'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getLane_Horizontal() - * @model - * @generated - */ -public interface Lane_Horizontal extends Lane { -} // Lane_Horizontal +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Lane Horizontal'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getLane_Horizontal() + * @model + * @generated + */ +public interface Lane_Horizontal extends Lane { +} // Lane_Horizontal diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Vertical.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Vertical.java index cf818bc2..1be0dc2b 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Vertical.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Lane_Vertical.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Lane Vertical'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getLane_Vertical() - * @model - * @generated - */ -public interface Lane_Vertical extends Lane { -} // Lane_Vertical +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Lane Vertical'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getLane_Vertical() + * @model + * @generated + */ +public interface Lane_Vertical extends Lane { +} // Lane_Vertical diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Orientation.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Orientation.java deleted file mode 100644 index a295e683..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Orientation.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - */ -package crossingScenario; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * - * A representation of the literals of the enumeration 'Orientation', - * and utility methods for working with them. - * - * @see crossingScenario.CrossingScenarioPackage#getOrientation() - * @model - * @generated - */ -public enum Orientation implements Enumerator { - /** - * The 'Vertical' literal object. - * - * - * @see #VERTICAL_VALUE - * @generated - * @ordered - */ - VERTICAL(0, "Vertical", "Vertical"), - - /** - * The 'Horizontal' literal object. - * - * - * @see #HORIZONTAL_VALUE - * @generated - * @ordered - */ - HORIZONTAL(1, "Horizontal", "Horizontal"); - - /** - * The 'Vertical' literal value. - * - * - * @see #VERTICAL - * @model name="Vertical" - * @generated - * @ordered - */ - public static final int VERTICAL_VALUE = 0; - - /** - * The 'Horizontal' literal value. - * - * - * @see #HORIZONTAL - * @model name="Horizontal" - * @generated - * @ordered - */ - public static final int HORIZONTAL_VALUE = 1; - - /** - * An array of all the 'Orientation' enumerators. - * - * - * @generated - */ - private static final Orientation[] VALUES_ARRAY = - new Orientation[] { - VERTICAL, - HORIZONTAL, - }; - - /** - * A public read-only list of all the 'Orientation' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Orientation' literal with the specified literal value. - * - * - * @param literal the literal. - * @return the matching enumerator or null. - * @generated - */ - public static Orientation get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Orientation result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Orientation' literal with the specified name. - * - * - * @param name the name. - * @return the matching enumerator or null. - * @generated - */ - public static Orientation getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Orientation result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Orientation' literal with the specified integer value. - * - * - * @param value the integer value. - * @return the matching enumerator or null. - * @generated - */ - public static Orientation get(int value) { - switch (value) { - case VERTICAL_VALUE: return VERTICAL; - case HORIZONTAL_VALUE: return HORIZONTAL; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * - * @generated - */ - private Orientation(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - @Override - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - @Override - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - @Override - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //Orientation diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Pedestrian.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Pedestrian.java index faedd6c4..a08bac5e 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Pedestrian.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Pedestrian.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Pedestrian'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getPedestrian() - * @model - * @generated - */ -public interface Pedestrian extends Actor { -} // Pedestrian +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Pedestrian'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getPedestrian() + * @model + * @generated + */ +public interface Pedestrian extends Actor { +} // Pedestrian diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Relation.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Relation.java index 75a3f58f..f5b7c16e 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Relation.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Relation.java @@ -1,69 +1,69 @@ -/** - */ -package crossingScenario; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Relation'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.Relation#getTarget Target}
  • - *
  • {@link crossingScenario.Relation#getSource Source}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getRelation() - * @model abstract="true" - * @generated - */ -public interface Relation extends EObject { - /** - * Returns the value of the 'Target' reference. - * - * - * @return the value of the 'Target' reference. - * @see #setTarget(Actor) - * @see crossingScenario.CrossingScenarioPackage#getRelation_Target() - * @model required="true" - * @generated - */ - Actor getTarget(); - - /** - * Sets the value of the '{@link crossingScenario.Relation#getTarget Target}' reference. - * - * - * @param value the new value of the 'Target' reference. - * @see #getTarget() - * @generated - */ - void setTarget(Actor value); - - /** - * Returns the value of the 'Source' reference. - * - * - * @return the value of the 'Source' reference. - * @see #setSource(Actor) - * @see crossingScenario.CrossingScenarioPackage#getRelation_Source() - * @model required="true" - * @generated - */ - Actor getSource(); - - /** - * Sets the value of the '{@link crossingScenario.Relation#getSource Source}' reference. - * - * - * @param value the new value of the 'Source' reference. - * @see #getSource() - * @generated - */ - void setSource(Actor value); - -} // Relation +/** + */ +package crossingScenario; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Relation'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.Relation#getTarget Target}
  • + *
  • {@link crossingScenario.Relation#getSource Source}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getRelation() + * @model abstract="true" + * @generated + */ +public interface Relation extends EObject { + /** + * Returns the value of the 'Target' reference. + * + * + * @return the value of the 'Target' reference. + * @see #setTarget(Actor) + * @see crossingScenario.CrossingScenarioPackage#getRelation_Target() + * @model required="true" + * @generated + */ + Actor getTarget(); + + /** + * Sets the value of the '{@link crossingScenario.Relation#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(Actor value); + + /** + * Returns the value of the 'Source' reference. + * + * + * @return the value of the 'Source' reference. + * @see #setSource(Actor) + * @see crossingScenario.CrossingScenarioPackage#getRelation_Source() + * @model required="true" + * @generated + */ + Actor getSource(); + + /** + * Sets the value of the '{@link crossingScenario.Relation#getSource Source}' reference. + * + * + * @param value the new value of the 'Source' reference. + * @see #getSource() + * @generated + */ + void setSource(Actor value); + +} // Relation diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/SeparationDistance.java b/Domains/crossingScenario/ecore-gen/crossingScenario/SeparationDistance.java deleted file mode 100644 index 37e31607..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/SeparationDistance.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Separation Distance'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.SeparationDistance#getDistance Distance}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getSeparationDistance() - * @model - * @generated - */ -public interface SeparationDistance extends SpatialRelation { - /** - * Returns the value of the 'Distance' attribute. - * The literals are from the enumeration {@link crossingScenario.Distance}. - * - * - * @return the value of the 'Distance' attribute. - * @see crossingScenario.Distance - * @see #setDistance(Distance) - * @see crossingScenario.CrossingScenarioPackage#getSeparationDistance_Distance() - * @model required="true" - * @generated - */ - Distance getDistance(); - - /** - * Sets the value of the '{@link crossingScenario.SeparationDistance#getDistance Distance}' attribute. - * - * - * @param value the new value of the 'Distance' attribute. - * @see crossingScenario.Distance - * @see #getDistance() - * @generated - */ - void setDistance(Distance value); - -} // SeparationDistance diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Size.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Size.java deleted file mode 100644 index 1465201c..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Size.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - */ -package crossingScenario; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * - * A representation of the literals of the enumeration 'Size', - * and utility methods for working with them. - * - * @see crossingScenario.CrossingScenarioPackage#getSize() - * @model - * @generated - */ -public enum Size implements Enumerator { - /** - * The 'SSmall' literal object. - * - * - * @see #SSMALL_VALUE - * @generated - * @ordered - */ - SSMALL(0, "S_Small", "S_Small"), /** - * The 'SMed' literal object. - * - * - * @see #SMED_VALUE - * @generated - * @ordered - */ - SMED(1, "S_Med", "S_Med"), /** - * The 'SLarge' literal object. - * - * - * @see #SLARGE_VALUE - * @generated - * @ordered - */ - SLARGE(2, "S_Large", "S_Large"); - - /** - * The 'SSmall' literal value. - * - * - * @see #SSMALL - * @model name="S_Small" - * @generated - * @ordered - */ - public static final int SSMALL_VALUE = 0; - - /** - * The 'SMed' literal value. - * - * - * @see #SMED - * @model name="S_Med" - * @generated - * @ordered - */ - public static final int SMED_VALUE = 1; - - /** - * The 'SLarge' literal value. - * - * - * @see #SLARGE - * @model name="S_Large" - * @generated - * @ordered - */ - public static final int SLARGE_VALUE = 2; - - /** - * An array of all the 'Size' enumerators. - * - * - * @generated - */ - private static final Size[] VALUES_ARRAY = - new Size[] { - SSMALL, - SMED, - SLARGE, - }; - - /** - * A public read-only list of all the 'Size' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Size' literal with the specified literal value. - * - * - * @param literal the literal. - * @return the matching enumerator or null. - * @generated - */ - public static Size get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Size result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Size' literal with the specified name. - * - * - * @param name the name. - * @return the matching enumerator or null. - * @generated - */ - public static Size getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Size result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Size' literal with the specified integer value. - * - * - * @param value the integer value. - * @return the matching enumerator or null. - * @generated - */ - public static Size get(int value) { - switch (value) { - case SSMALL_VALUE: return SSMALL; - case SMED_VALUE: return SMED; - case SLARGE_VALUE: return SLARGE; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * - * @generated - */ - private Size(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - @Override - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - @Override - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - @Override - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //Size diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/SpatialRelation.java b/Domains/crossingScenario/ecore-gen/crossingScenario/SpatialRelation.java index 495ac20c..fa13137d 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/SpatialRelation.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/SpatialRelation.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Spatial Relation'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getSpatialRelation() - * @model abstract="true" - * @generated - */ -public interface SpatialRelation extends Relation { -} // SpatialRelation +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Spatial Relation'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getSpatialRelation() + * @model abstract="true" + * @generated + */ +public interface SpatialRelation extends Relation { +} // SpatialRelation diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/TemporalRelation.java b/Domains/crossingScenario/ecore-gen/crossingScenario/TemporalRelation.java index 2f688d4a..3a537975 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/TemporalRelation.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/TemporalRelation.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Temporal Relation'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getTemporalRelation() - * @model abstract="true" - * @generated - */ -public interface TemporalRelation extends Relation { -} // TemporalRelation +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Temporal Relation'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getTemporalRelation() + * @model abstract="true" + * @generated + */ +public interface TemporalRelation extends Relation { +} // TemporalRelation diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/Vehicle.java b/Domains/crossingScenario/ecore-gen/crossingScenario/Vehicle.java index 7be9e3ba..fd2e78fa 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/Vehicle.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/Vehicle.java @@ -1,17 +1,17 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Vehicle'. - * - * - * - * @see crossingScenario.CrossingScenarioPackage#getVehicle() - * @model - * @generated - */ -public interface Vehicle extends Actor { -} // Vehicle +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Vehicle'. + * + * + * + * @see crossingScenario.CrossingScenarioPackage#getVehicle() + * @model + * @generated + */ +public interface Vehicle extends Actor { +} // Vehicle diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/VisionBlocked.java b/Domains/crossingScenario/ecore-gen/crossingScenario/VisionBlocked.java index 91e075ef..bacbf77f 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/VisionBlocked.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/VisionBlocked.java @@ -1,45 +1,45 @@ -/** - */ -package crossingScenario; - - -/** - * - * A representation of the model object 'Vision Blocked'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}
  • - *
- * - * @see crossingScenario.CrossingScenarioPackage#getVisionBlocked() - * @model - * @generated - */ -public interface VisionBlocked extends SpatialRelation { - /** - * Returns the value of the 'Blocked By' reference. - * - * - * @return the value of the 'Blocked By' reference. - * @see #setBlockedBy(Actor) - * @see crossingScenario.CrossingScenarioPackage#getVisionBlocked_BlockedBy() - * @model required="true" - * @generated - */ - Actor getBlockedBy(); - - /** - * Sets the value of the '{@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}' reference. - * - * - * @param value the new value of the 'Blocked By' reference. - * @see #getBlockedBy() - * @generated - */ - void setBlockedBy(Actor value); - -} // VisionBlocked +/** + */ +package crossingScenario; + + +/** + * + * A representation of the model object 'Vision Blocked'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}
  • + *
+ * + * @see crossingScenario.CrossingScenarioPackage#getVisionBlocked() + * @model + * @generated + */ +public interface VisionBlocked extends SpatialRelation { + /** + * Returns the value of the 'Blocked By' reference. + * + * + * @return the value of the 'Blocked By' reference. + * @see #setBlockedBy(Actor) + * @see crossingScenario.CrossingScenarioPackage#getVisionBlocked_BlockedBy() + * @model required="true" + * @generated + */ + Actor getBlockedBy(); + + /** + * Sets the value of the '{@link crossingScenario.VisionBlocked#getBlockedBy Blocked By}' reference. + * + * + * @param value the new value of the 'Blocked By' reference. + * @see #getBlockedBy() + * @generated + */ + void setBlockedBy(Actor value); + +} // VisionBlocked diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java index a308360b..52d251e0 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/ActorImpl.java @@ -1,644 +1,645 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Lane; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -/** - * - * An implementation of the model object 'Actor'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.ActorImpl#getXPos XPos}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getYPos YPos}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getLength Length}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getWidth Width}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getXSpeed XSpeed}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getPlacedOn Placed On}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getYSpeed YSpeed}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getDist_near Dist near}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getDist_med Dist med}
  • - *
  • {@link crossingScenario.impl.ActorImpl#getDist_far Dist far}
  • - *
- * - * @generated - */ -public abstract class ActorImpl extends MinimalEObjectImpl.Container implements Actor { - /** - * The default value of the '{@link #getXPos() XPos}' attribute. - * - * - * @see #getXPos() - * @generated - * @ordered - */ - protected static final double XPOS_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getXPos() XPos}' attribute. - * - * - * @see #getXPos() - * @generated - * @ordered - */ - protected double xPos = XPOS_EDEFAULT; - - /** - * The default value of the '{@link #getYPos() YPos}' attribute. - * - * - * @see #getYPos() - * @generated - * @ordered - */ - protected static final double YPOS_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getYPos() YPos}' attribute. - * - * - * @see #getYPos() - * @generated - * @ordered - */ - protected double yPos = YPOS_EDEFAULT; - - /** - * The default value of the '{@link #getLength() Length}' attribute. - * - * - * @see #getLength() - * @generated - * @ordered - */ - protected static final double LENGTH_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getLength() Length}' attribute. - * - * - * @see #getLength() - * @generated - * @ordered - */ - protected double length = LENGTH_EDEFAULT; - - /** - * The default value of the '{@link #getWidth() Width}' attribute. - * - * - * @see #getWidth() - * @generated - * @ordered - */ - protected static final double WIDTH_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getWidth() Width}' attribute. - * - * - * @see #getWidth() - * @generated - * @ordered - */ - protected double width = WIDTH_EDEFAULT; - - /** - * The default value of the '{@link #getXSpeed() XSpeed}' attribute. - * - * - * @see #getXSpeed() - * @generated - * @ordered - */ - protected static final double XSPEED_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getXSpeed() XSpeed}' attribute. - * - * - * @see #getXSpeed() - * @generated - * @ordered - */ - protected double xSpeed = XSPEED_EDEFAULT; - - /** - * The cached value of the '{@link #getPlacedOn() Placed On}' reference. - * - * - * @see #getPlacedOn() - * @generated - * @ordered - */ - protected Lane placedOn; - - /** - * The default value of the '{@link #getYSpeed() YSpeed}' attribute. - * - * - * @see #getYSpeed() - * @generated - * @ordered - */ - protected static final double YSPEED_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getYSpeed() YSpeed}' attribute. - * - * - * @see #getYSpeed() - * @generated - * @ordered - */ - protected double ySpeed = YSPEED_EDEFAULT; - - /** - * - * - * @generated - */ - protected ActorImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.ACTOR; - } - - /** - * - * - * @generated - */ - @Override - public double getXPos() { - return xPos; - } - - /** - * - * - * @generated - */ - @Override - public void setXPos(double newXPos) { - double oldXPos = xPos; - xPos = newXPos; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__XPOS, oldXPos, xPos)); - } - - /** - * - * - * @generated - */ - @Override - public double getYPos() { - return yPos; - } - - /** - * - * - * @generated - */ - @Override - public void setYPos(double newYPos) { - double oldYPos = yPos; - yPos = newYPos; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__YPOS, oldYPos, yPos)); - } - - /** - * - * - * @generated - */ - @Override - public double getLength() { - return length; - } - - /** - * - * - * @generated - */ - @Override - public void setLength(double newLength) { - double oldLength = length; - length = newLength; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__LENGTH, oldLength, length)); - } - - /** - * - * - * @generated - */ - @Override - public double getWidth() { - return width; - } - - /** - * - * - * @generated - */ - @Override - public void setWidth(double newWidth) { - double oldWidth = width; - width = newWidth; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__WIDTH, oldWidth, width)); - } - - /** - * - * - * @generated - */ - @Override - public double getXSpeed() { - return xSpeed; - } - - /** - * - * - * @generated - */ - @Override - public void setXSpeed(double newXSpeed) { - double oldXSpeed = xSpeed; - xSpeed = newXSpeed; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__XSPEED, oldXSpeed, xSpeed)); - } - - /** - * - * - * @generated - */ - @Override - public Lane getPlacedOn() { - if (placedOn != null && placedOn.eIsProxy()) { - InternalEObject oldPlacedOn = (InternalEObject)placedOn; - placedOn = (Lane)eResolveProxy(oldPlacedOn); - if (placedOn != oldPlacedOn) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, placedOn)); - } - } - return placedOn; - } - - /** - * - * - * @generated - */ - public Lane basicGetPlacedOn() { - return placedOn; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetPlacedOn(Lane newPlacedOn, NotificationChain msgs) { - Lane oldPlacedOn = placedOn; - placedOn = newPlacedOn; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, newPlacedOn); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - @Override - public void setPlacedOn(Lane newPlacedOn) { - if (newPlacedOn != placedOn) { - NotificationChain msgs = null; - if (placedOn != null) - msgs = ((InternalEObject)placedOn).eInverseRemove(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); - if (newPlacedOn != null) - msgs = ((InternalEObject)newPlacedOn).eInverseAdd(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); - msgs = basicSetPlacedOn(newPlacedOn, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__PLACED_ON, newPlacedOn, newPlacedOn)); - } - - /** - * - * - * @generated - */ - @Override - public double getYSpeed() { - return ySpeed; - } - - /** - * - * - * @generated - */ - @Override - public void setYSpeed(double newYSpeed) { - double oldYSpeed = ySpeed; - ySpeed = newYSpeed; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__YSPEED, oldYSpeed, ySpeed)); - } - - /** - * - * - * @generated - */ - @Override - public EList getDist_near() { - // TODO: implement this method to return the 'Dist near' reference list - // Ensure that you remove @generated or mark it @generated NOT - // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting - // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - @Override - public EList getDist_med() { - // TODO: implement this method to return the 'Dist med' reference list - // Ensure that you remove @generated or mark it @generated NOT - // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting - // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - @Override - public EList getDist_far() { - // TODO: implement this method to return the 'Dist far' reference list - // Ensure that you remove @generated or mark it @generated NOT - // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting - // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__PLACED_ON: - if (placedOn != null) - msgs = ((InternalEObject)placedOn).eInverseRemove(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); - return basicSetPlacedOn((Lane)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__PLACED_ON: - return basicSetPlacedOn(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__XPOS: - return getXPos(); - case CrossingScenarioPackage.ACTOR__YPOS: - return getYPos(); - case CrossingScenarioPackage.ACTOR__LENGTH: - return getLength(); - case CrossingScenarioPackage.ACTOR__WIDTH: - return getWidth(); - case CrossingScenarioPackage.ACTOR__XSPEED: - return getXSpeed(); - case CrossingScenarioPackage.ACTOR__PLACED_ON: - if (resolve) return getPlacedOn(); - return basicGetPlacedOn(); - case CrossingScenarioPackage.ACTOR__YSPEED: - return getYSpeed(); - case CrossingScenarioPackage.ACTOR__DIST_NEAR: - return getDist_near(); - case CrossingScenarioPackage.ACTOR__DIST_MED: - return getDist_med(); - case CrossingScenarioPackage.ACTOR__DIST_FAR: - return getDist_far(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__XPOS: - setXPos((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__YPOS: - setYPos((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__LENGTH: - setLength((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__WIDTH: - setWidth((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__XSPEED: - setXSpeed((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__PLACED_ON: - setPlacedOn((Lane)newValue); - return; - case CrossingScenarioPackage.ACTOR__YSPEED: - setYSpeed((Double)newValue); - return; - case CrossingScenarioPackage.ACTOR__DIST_NEAR: - getDist_near().clear(); - getDist_near().addAll((Collection)newValue); - return; - case CrossingScenarioPackage.ACTOR__DIST_MED: - getDist_med().clear(); - getDist_med().addAll((Collection)newValue); - return; - case CrossingScenarioPackage.ACTOR__DIST_FAR: - getDist_far().clear(); - getDist_far().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__XPOS: - setXPos(XPOS_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__YPOS: - setYPos(YPOS_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__LENGTH: - setLength(LENGTH_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__WIDTH: - setWidth(WIDTH_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__XSPEED: - setXSpeed(XSPEED_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__PLACED_ON: - setPlacedOn((Lane)null); - return; - case CrossingScenarioPackage.ACTOR__YSPEED: - setYSpeed(YSPEED_EDEFAULT); - return; - case CrossingScenarioPackage.ACTOR__DIST_NEAR: - getDist_near().clear(); - return; - case CrossingScenarioPackage.ACTOR__DIST_MED: - getDist_med().clear(); - return; - case CrossingScenarioPackage.ACTOR__DIST_FAR: - getDist_far().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.ACTOR__XPOS: - return xPos != XPOS_EDEFAULT; - case CrossingScenarioPackage.ACTOR__YPOS: - return yPos != YPOS_EDEFAULT; - case CrossingScenarioPackage.ACTOR__LENGTH: - return length != LENGTH_EDEFAULT; - case CrossingScenarioPackage.ACTOR__WIDTH: - return width != WIDTH_EDEFAULT; - case CrossingScenarioPackage.ACTOR__XSPEED: - return xSpeed != XSPEED_EDEFAULT; - case CrossingScenarioPackage.ACTOR__PLACED_ON: - return placedOn != null; - case CrossingScenarioPackage.ACTOR__YSPEED: - return ySpeed != YSPEED_EDEFAULT; - case CrossingScenarioPackage.ACTOR__DIST_NEAR: - return !getDist_near().isEmpty(); - case CrossingScenarioPackage.ACTOR__DIST_MED: - return !getDist_med().isEmpty(); - case CrossingScenarioPackage.ACTOR__DIST_FAR: - return !getDist_far().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (xPos: "); - result.append(xPos); - result.append(", yPos: "); - result.append(yPos); - result.append(", length: "); - result.append(length); - result.append(", width: "); - result.append(width); - result.append(", xSpeed: "); - result.append(xSpeed); - result.append(", ySpeed: "); - result.append(ySpeed); - result.append(')'); - return result.toString(); - } - -} //ActorImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Actor'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.ActorImpl#getXPos XPos}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getYPos YPos}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getLength Length}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getWidth Width}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getXSpeed XSpeed}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getPlacedOn Placed On}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getYSpeed YSpeed}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getDist_near Dist near}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getDist_med Dist med}
  • + *
  • {@link crossingScenario.impl.ActorImpl#getDist_far Dist far}
  • + *
+ * + * @generated + */ +public abstract class ActorImpl extends MinimalEObjectImpl.Container implements Actor { + /** + * The default value of the '{@link #getXPos() XPos}' attribute. + * + * + * @see #getXPos() + * @generated + * @ordered + */ + protected static final double XPOS_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getXPos() XPos}' attribute. + * + * + * @see #getXPos() + * @generated + * @ordered + */ + protected double xPos = XPOS_EDEFAULT; + + /** + * The default value of the '{@link #getYPos() YPos}' attribute. + * + * + * @see #getYPos() + * @generated + * @ordered + */ + protected static final double YPOS_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getYPos() YPos}' attribute. + * + * + * @see #getYPos() + * @generated + * @ordered + */ + protected double yPos = YPOS_EDEFAULT; + + /** + * The default value of the '{@link #getLength() Length}' attribute. + * + * + * @see #getLength() + * @generated + * @ordered + */ + protected static final double LENGTH_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getLength() Length}' attribute. + * + * + * @see #getLength() + * @generated + * @ordered + */ + protected double length = LENGTH_EDEFAULT; + + /** + * The default value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected static final double WIDTH_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected double width = WIDTH_EDEFAULT; + + /** + * The default value of the '{@link #getXSpeed() XSpeed}' attribute. + * + * + * @see #getXSpeed() + * @generated + * @ordered + */ + protected static final double XSPEED_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getXSpeed() XSpeed}' attribute. + * + * + * @see #getXSpeed() + * @generated + * @ordered + */ + protected double xSpeed = XSPEED_EDEFAULT; + + /** + * The cached value of the '{@link #getPlacedOn() Placed On}' reference. + * + * + * @see #getPlacedOn() + * @generated + * @ordered + */ + protected Lane placedOn; + + /** + * The default value of the '{@link #getYSpeed() YSpeed}' attribute. + * + * + * @see #getYSpeed() + * @generated + * @ordered + */ + protected static final double YSPEED_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getYSpeed() YSpeed}' attribute. + * + * + * @see #getYSpeed() + * @generated + * @ordered + */ + protected double ySpeed = YSPEED_EDEFAULT; + + /** + * + * + * @generated + */ + protected ActorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.ACTOR; + } + + /** + * + * + * @generated + */ + @Override + public double getXPos() { + return xPos; + } + + /** + * + * + * @generated + */ + @Override + public void setXPos(double newXPos) { + double oldXPos = xPos; + xPos = newXPos; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__XPOS, oldXPos, xPos)); + } + + /** + * + * + * @generated + */ + @Override + public double getYPos() { + return yPos; + } + + /** + * + * + * @generated + */ + @Override + public void setYPos(double newYPos) { + double oldYPos = yPos; + yPos = newYPos; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__YPOS, oldYPos, yPos)); + } + + /** + * + * + * @generated + */ + @Override + public double getLength() { + return length; + } + + /** + * + * + * @generated + */ + @Override + public void setLength(double newLength) { + double oldLength = length; + length = newLength; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__LENGTH, oldLength, length)); + } + + /** + * + * + * @generated + */ + @Override + public double getWidth() { + return width; + } + + /** + * + * + * @generated + */ + @Override + public void setWidth(double newWidth) { + double oldWidth = width; + width = newWidth; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__WIDTH, oldWidth, width)); + } + + /** + * + * + * @generated + */ + @Override + public double getXSpeed() { + return xSpeed; + } + + /** + * + * + * @generated + */ + @Override + public void setXSpeed(double newXSpeed) { + double oldXSpeed = xSpeed; + xSpeed = newXSpeed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__XSPEED, oldXSpeed, xSpeed)); + } + + /** + * + * + * @generated + */ + @Override + public Lane getPlacedOn() { + if (placedOn != null && placedOn.eIsProxy()) { + InternalEObject oldPlacedOn = (InternalEObject)placedOn; + placedOn = (Lane)eResolveProxy(oldPlacedOn); + if (placedOn != oldPlacedOn) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, placedOn)); + } + } + return placedOn; + } + + /** + * + * + * @generated + */ + public Lane basicGetPlacedOn() { + return placedOn; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetPlacedOn(Lane newPlacedOn, NotificationChain msgs) { + Lane oldPlacedOn = placedOn; + placedOn = newPlacedOn; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, newPlacedOn); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setPlacedOn(Lane newPlacedOn) { + if (newPlacedOn != placedOn) { + NotificationChain msgs = null; + if (placedOn != null) + msgs = ((InternalEObject)placedOn).eInverseRemove(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); + if (newPlacedOn != null) + msgs = ((InternalEObject)newPlacedOn).eInverseAdd(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); + msgs = basicSetPlacedOn(newPlacedOn, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__PLACED_ON, newPlacedOn, newPlacedOn)); + } + + /** + * + * + * @generated + */ + @Override + public double getYSpeed() { + return ySpeed; + } + + /** + * + * + * @generated + */ + @Override + public void setYSpeed(double newYSpeed) { + double oldYSpeed = ySpeed; + ySpeed = newYSpeed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.ACTOR__YSPEED, oldYSpeed, ySpeed)); + } + + /** + * + * + * @generated + */ + @Override + public EList getDist_near() { + // TODO: implement this method to return the 'Dist near' reference list + // Ensure that you remove @generated or mark it @generated NOT + // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting + // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public EList getDist_med() { + // TODO: implement this method to return the 'Dist med' reference list + // Ensure that you remove @generated or mark it @generated NOT + // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting + // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public EList getDist_far() { + // TODO: implement this method to return the 'Dist far' reference list + // Ensure that you remove @generated or mark it @generated NOT + // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting + // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__PLACED_ON: + if (placedOn != null) + msgs = ((InternalEObject)placedOn).eInverseRemove(this, CrossingScenarioPackage.LANE__ACTORS, Lane.class, msgs); + return basicSetPlacedOn((Lane)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__PLACED_ON: + return basicSetPlacedOn(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__XPOS: + return getXPos(); + case CrossingScenarioPackage.ACTOR__YPOS: + return getYPos(); + case CrossingScenarioPackage.ACTOR__LENGTH: + return getLength(); + case CrossingScenarioPackage.ACTOR__WIDTH: + return getWidth(); + case CrossingScenarioPackage.ACTOR__XSPEED: + return getXSpeed(); + case CrossingScenarioPackage.ACTOR__PLACED_ON: + if (resolve) return getPlacedOn(); + return basicGetPlacedOn(); + case CrossingScenarioPackage.ACTOR__YSPEED: + return getYSpeed(); + case CrossingScenarioPackage.ACTOR__DIST_NEAR: + return getDist_near(); + case CrossingScenarioPackage.ACTOR__DIST_MED: + return getDist_med(); + case CrossingScenarioPackage.ACTOR__DIST_FAR: + return getDist_far(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__XPOS: + setXPos((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__YPOS: + setYPos((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__LENGTH: + setLength((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__WIDTH: + setWidth((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__XSPEED: + setXSpeed((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__PLACED_ON: + setPlacedOn((Lane)newValue); + return; + case CrossingScenarioPackage.ACTOR__YSPEED: + setYSpeed((Double)newValue); + return; + case CrossingScenarioPackage.ACTOR__DIST_NEAR: + getDist_near().clear(); + getDist_near().addAll((Collection)newValue); + return; + case CrossingScenarioPackage.ACTOR__DIST_MED: + getDist_med().clear(); + getDist_med().addAll((Collection)newValue); + return; + case CrossingScenarioPackage.ACTOR__DIST_FAR: + getDist_far().clear(); + getDist_far().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__XPOS: + setXPos(XPOS_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__YPOS: + setYPos(YPOS_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__LENGTH: + setLength(LENGTH_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__WIDTH: + setWidth(WIDTH_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__XSPEED: + setXSpeed(XSPEED_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__PLACED_ON: + setPlacedOn((Lane)null); + return; + case CrossingScenarioPackage.ACTOR__YSPEED: + setYSpeed(YSPEED_EDEFAULT); + return; + case CrossingScenarioPackage.ACTOR__DIST_NEAR: + getDist_near().clear(); + return; + case CrossingScenarioPackage.ACTOR__DIST_MED: + getDist_med().clear(); + return; + case CrossingScenarioPackage.ACTOR__DIST_FAR: + getDist_far().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.ACTOR__XPOS: + return xPos != XPOS_EDEFAULT; + case CrossingScenarioPackage.ACTOR__YPOS: + return yPos != YPOS_EDEFAULT; + case CrossingScenarioPackage.ACTOR__LENGTH: + return length != LENGTH_EDEFAULT; + case CrossingScenarioPackage.ACTOR__WIDTH: + return width != WIDTH_EDEFAULT; + case CrossingScenarioPackage.ACTOR__XSPEED: + return xSpeed != XSPEED_EDEFAULT; + case CrossingScenarioPackage.ACTOR__PLACED_ON: + return placedOn != null; + case CrossingScenarioPackage.ACTOR__YSPEED: + return ySpeed != YSPEED_EDEFAULT; + case CrossingScenarioPackage.ACTOR__DIST_NEAR: + return !getDist_near().isEmpty(); + case CrossingScenarioPackage.ACTOR__DIST_MED: + return !getDist_med().isEmpty(); + case CrossingScenarioPackage.ACTOR__DIST_FAR: + return !getDist_far().isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (xPos: "); + result.append(xPos); + result.append(", yPos: "); + result.append(yPos); + result.append(", length: "); + result.append(length); + result.append(", width: "); + result.append(width); + result.append(", xSpeed: "); + result.append(xSpeed); + result.append(", ySpeed: "); + result.append(ySpeed); + result.append(')'); + return result.toString(); + } + +} //ActorImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionDoesNotExistImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionDoesNotExistImpl.java deleted file mode 100644 index 7cdcb6ac..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionDoesNotExistImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CollisionDoesNotExist; -import crossingScenario.CrossingScenarioPackage; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Collision Does Not Exist'. - * - * - * @generated - */ -public class CollisionDoesNotExistImpl extends TemporalRelationImpl implements CollisionDoesNotExist { - /** - * - * - * @generated - */ - protected CollisionDoesNotExistImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.COLLISION_DOES_NOT_EXIST; - } - -} //CollisionDoesNotExistImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionExistsImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionExistsImpl.java index 9fd2c2a9..a643f25f 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionExistsImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CollisionExistsImpl.java @@ -1,164 +1,164 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CollisionExists; -import crossingScenario.CrossingScenarioPackage; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Collision Exists'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.CollisionExistsImpl#getCollisionTime Collision Time}
  • - *
- * - * @generated - */ -public class CollisionExistsImpl extends TemporalRelationImpl implements CollisionExists { - /** - * The default value of the '{@link #getCollisionTime() Collision Time}' attribute. - * - * - * @see #getCollisionTime() - * @generated - * @ordered - */ - protected static final double COLLISION_TIME_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getCollisionTime() Collision Time}' attribute. - * - * - * @see #getCollisionTime() - * @generated - * @ordered - */ - protected double collisionTime = COLLISION_TIME_EDEFAULT; - - /** - * - * - * @generated - */ - protected CollisionExistsImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.COLLISION_EXISTS; - } - - /** - * - * - * @generated - */ - @Override - public double getCollisionTime() { - return collisionTime; - } - - /** - * - * - * @generated - */ - @Override - public void setCollisionTime(double newCollisionTime) { - double oldCollisionTime = collisionTime; - collisionTime = newCollisionTime; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME, oldCollisionTime, collisionTime)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: - return getCollisionTime(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: - setCollisionTime((Double)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: - setCollisionTime(COLLISION_TIME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: - return collisionTime != COLLISION_TIME_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (collisionTime: "); - result.append(collisionTime); - result.append(')'); - return result.toString(); - } - -} //CollisionExistsImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CollisionExists; +import crossingScenario.CrossingScenarioPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Collision Exists'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.CollisionExistsImpl#getCollisionTime Collision Time}
  • + *
+ * + * @generated + */ +public class CollisionExistsImpl extends TemporalRelationImpl implements CollisionExists { + /** + * The default value of the '{@link #getCollisionTime() Collision Time}' attribute. + * + * + * @see #getCollisionTime() + * @generated + * @ordered + */ + protected static final double COLLISION_TIME_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getCollisionTime() Collision Time}' attribute. + * + * + * @see #getCollisionTime() + * @generated + * @ordered + */ + protected double collisionTime = COLLISION_TIME_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollisionExistsImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.COLLISION_EXISTS; + } + + /** + * + * + * @generated + */ + @Override + public double getCollisionTime() { + return collisionTime; + } + + /** + * + * + * @generated + */ + @Override + public void setCollisionTime(double newCollisionTime) { + double oldCollisionTime = collisionTime; + collisionTime = newCollisionTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME, oldCollisionTime, collisionTime)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: + return getCollisionTime(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: + setCollisionTime((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: + setCollisionTime(COLLISION_TIME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: + return collisionTime != COLLISION_TIME_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (collisionTime: "); + result.append(collisionTime); + result.append(')'); + return result.toString(); + } + +} //CollisionExistsImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioFactoryImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioFactoryImpl.java index b6362cc2..8054a12a 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioFactoryImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioFactoryImpl.java @@ -1,244 +1,169 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.*; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class CrossingScenarioFactoryImpl extends EFactoryImpl implements CrossingScenarioFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static CrossingScenarioFactory init() { - try { - CrossingScenarioFactory theCrossingScenarioFactory = (CrossingScenarioFactory)EPackage.Registry.INSTANCE.getEFactory(CrossingScenarioPackage.eNS_URI); - if (theCrossingScenarioFactory != null) { - return theCrossingScenarioFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new CrossingScenarioFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public CrossingScenarioFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case CrossingScenarioPackage.CROSSING_SCENARIO: return createCrossingScenario(); - case CrossingScenarioPackage.VISION_BLOCKED: return createVisionBlocked(); - case CrossingScenarioPackage.SEPARATION_DISTANCE: return createSeparationDistance(); - case CrossingScenarioPackage.COLLISION_EXISTS: return createCollisionExists(); - case CrossingScenarioPackage.COLLISION_DOES_NOT_EXIST: return createCollisionDoesNotExist(); - case CrossingScenarioPackage.PEDESTRIAN: return createPedestrian(); - case CrossingScenarioPackage.VEHICLE: return createVehicle(); - case CrossingScenarioPackage.LANE_HORIZONTAL: return createLane_Horizontal(); - case CrossingScenarioPackage.LANE_VERTICAL: return createLane_Vertical(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case CrossingScenarioPackage.DISTANCE: - return createDistanceFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case CrossingScenarioPackage.DISTANCE: - return convertDistanceToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public CrossingScenario createCrossingScenario() { - CrossingScenarioImpl crossingScenario = new CrossingScenarioImpl(); - return crossingScenario; - } - - /** - * - * - * @generated - */ - @Override - public VisionBlocked createVisionBlocked() { - VisionBlockedImpl visionBlocked = new VisionBlockedImpl(); - return visionBlocked; - } - - /** - * - * - * @generated - */ - @Override - public SeparationDistance createSeparationDistance() { - SeparationDistanceImpl separationDistance = new SeparationDistanceImpl(); - return separationDistance; - } - - /** - * - * - * @generated - */ - @Override - public CollisionExists createCollisionExists() { - CollisionExistsImpl collisionExists = new CollisionExistsImpl(); - return collisionExists; - } - - /** - * - * - * @generated - */ - @Override - public CollisionDoesNotExist createCollisionDoesNotExist() { - CollisionDoesNotExistImpl collisionDoesNotExist = new CollisionDoesNotExistImpl(); - return collisionDoesNotExist; - } - - /** - * - * - * @generated - */ - @Override - public Pedestrian createPedestrian() { - PedestrianImpl pedestrian = new PedestrianImpl(); - return pedestrian; - } - - /** - * - * - * @generated - */ - @Override - public Vehicle createVehicle() { - VehicleImpl vehicle = new VehicleImpl(); - return vehicle; - } - - /** - * - * - * @generated - */ - @Override - public Lane_Horizontal createLane_Horizontal() { - Lane_HorizontalImpl lane_Horizontal = new Lane_HorizontalImpl(); - return lane_Horizontal; - } - - /** - * - * - * @generated - */ - @Override - public Lane_Vertical createLane_Vertical() { - Lane_VerticalImpl lane_Vertical = new Lane_VerticalImpl(); - return lane_Vertical; - } - - /** - * - * - * @generated - */ - public Distance createDistanceFromString(EDataType eDataType, String initialValue) { - Distance result = Distance.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } - - /** - * - * - * @generated - */ - public String convertDistanceToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - @Override - public CrossingScenarioPackage getCrossingScenarioPackage() { - return (CrossingScenarioPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static CrossingScenarioPackage getPackage() { - return CrossingScenarioPackage.eINSTANCE; - } - -} //CrossingScenarioFactoryImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CrossingScenarioFactoryImpl extends EFactoryImpl implements CrossingScenarioFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CrossingScenarioFactory init() { + try { + CrossingScenarioFactory theCrossingScenarioFactory = (CrossingScenarioFactory)EPackage.Registry.INSTANCE.getEFactory(CrossingScenarioPackage.eNS_URI); + if (theCrossingScenarioFactory != null) { + return theCrossingScenarioFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CrossingScenarioFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CrossingScenarioFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CrossingScenarioPackage.CROSSING_SCENARIO: return createCrossingScenario(); + case CrossingScenarioPackage.VISION_BLOCKED: return createVisionBlocked(); + case CrossingScenarioPackage.COLLISION_EXISTS: return createCollisionExists(); + case CrossingScenarioPackage.PEDESTRIAN: return createPedestrian(); + case CrossingScenarioPackage.VEHICLE: return createVehicle(); + case CrossingScenarioPackage.LANE_HORIZONTAL: return createLane_Horizontal(); + case CrossingScenarioPackage.LANE_VERTICAL: return createLane_Vertical(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public CrossingScenario createCrossingScenario() { + CrossingScenarioImpl crossingScenario = new CrossingScenarioImpl(); + return crossingScenario; + } + + /** + * + * + * @generated + */ + @Override + public VisionBlocked createVisionBlocked() { + VisionBlockedImpl visionBlocked = new VisionBlockedImpl(); + return visionBlocked; + } + + /** + * + * + * @generated + */ + @Override + public CollisionExists createCollisionExists() { + CollisionExistsImpl collisionExists = new CollisionExistsImpl(); + return collisionExists; + } + + /** + * + * + * @generated + */ + @Override + public Pedestrian createPedestrian() { + PedestrianImpl pedestrian = new PedestrianImpl(); + return pedestrian; + } + + /** + * + * + * @generated + */ + @Override + public Vehicle createVehicle() { + VehicleImpl vehicle = new VehicleImpl(); + return vehicle; + } + + /** + * + * + * @generated + */ + @Override + public Lane_Horizontal createLane_Horizontal() { + Lane_HorizontalImpl lane_Horizontal = new Lane_HorizontalImpl(); + return lane_Horizontal; + } + + /** + * + * + * @generated + */ + @Override + public Lane_Vertical createLane_Vertical() { + Lane_VerticalImpl lane_Vertical = new Lane_VerticalImpl(); + return lane_Vertical; + } + + /** + * + * + * @generated + */ + @Override + public CrossingScenarioPackage getCrossingScenarioPackage() { + return (CrossingScenarioPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CrossingScenarioPackage getPackage() { + return CrossingScenarioPackage.eINSTANCE; + } + +} //CrossingScenarioFactoryImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java index 28667b0c..50c11e69 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioImpl.java @@ -1,524 +1,525 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CrossingScenario; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Lane; -import crossingScenario.Relation; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Crossing Scenario'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getXSize XSize}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getYSize YSize}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getActors Actors}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getLanes Lanes}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxTime Max Time}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getRelations Relations}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxXSpeed Max XSpeed}
  • - *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxYSpeed Max YSpeed}
  • - *
- * - * @generated - */ -public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implements CrossingScenario { - /** - * The default value of the '{@link #getXSize() XSize}' attribute. - * - * - * @see #getXSize() - * @generated - * @ordered - */ - protected static final double XSIZE_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getXSize() XSize}' attribute. - * - * - * @see #getXSize() - * @generated - * @ordered - */ - protected double xSize = XSIZE_EDEFAULT; - - /** - * The default value of the '{@link #getYSize() YSize}' attribute. - * - * - * @see #getYSize() - * @generated - * @ordered - */ - protected static final double YSIZE_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getYSize() YSize}' attribute. - * - * - * @see #getYSize() - * @generated - * @ordered - */ - protected double ySize = YSIZE_EDEFAULT; - - /** - * The cached value of the '{@link #getActors() Actors}' containment reference list. - * - * - * @see #getActors() - * @generated - * @ordered - */ - protected EList actors; - - /** - * The cached value of the '{@link #getLanes() Lanes}' containment reference list. - * - * - * @see #getLanes() - * @generated - * @ordered - */ - protected EList lanes; - - /** - * The default value of the '{@link #getMaxTime() Max Time}' attribute. - * - * - * @see #getMaxTime() - * @generated - * @ordered - */ - protected static final double MAX_TIME_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getMaxTime() Max Time}' attribute. - * - * - * @see #getMaxTime() - * @generated - * @ordered - */ - protected double maxTime = MAX_TIME_EDEFAULT; - - /** - * The cached value of the '{@link #getRelations() Relations}' containment reference list. - * - * - * @see #getRelations() - * @generated - * @ordered - */ - protected EList relations; - - /** - * The default value of the '{@link #getMaxXSpeed() Max XSpeed}' attribute. - * - * - * @see #getMaxXSpeed() - * @generated - * @ordered - */ - protected static final double MAX_XSPEED_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getMaxXSpeed() Max XSpeed}' attribute. - * - * - * @see #getMaxXSpeed() - * @generated - * @ordered - */ - protected double maxXSpeed = MAX_XSPEED_EDEFAULT; - - /** - * The default value of the '{@link #getMaxYSpeed() Max YSpeed}' attribute. - * - * - * @see #getMaxYSpeed() - * @generated - * @ordered - */ - protected static final double MAX_YSPEED_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getMaxYSpeed() Max YSpeed}' attribute. - * - * - * @see #getMaxYSpeed() - * @generated - * @ordered - */ - protected double maxYSpeed = MAX_YSPEED_EDEFAULT; - - /** - * - * - * @generated - */ - protected CrossingScenarioImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.CROSSING_SCENARIO; - } - - /** - * - * - * @generated - */ - @Override - public double getXSize() { - return xSize; - } - - /** - * - * - * @generated - */ - @Override - public void setXSize(double newXSize) { - double oldXSize = xSize; - xSize = newXSize; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE, oldXSize, xSize)); - } - - /** - * - * - * @generated - */ - @Override - public double getYSize() { - return ySize; - } - - /** - * - * - * @generated - */ - @Override - public void setYSize(double newYSize) { - double oldYSize = ySize; - ySize = newYSize; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE, oldYSize, ySize)); - } - - /** - * - * - * @generated - */ - @Override - public EList getActors() { - if (actors == null) { - actors = new EObjectContainmentEList(Actor.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS); - } - return actors; - } - - /** - * - * - * @generated - */ - @Override - public EList getLanes() { - if (lanes == null) { - lanes = new EObjectContainmentEList(Lane.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__LANES); - } - return lanes; - } - - /** - * - * - * @generated - */ - @Override - public double getMaxTime() { - return maxTime; - } - - /** - * - * - * @generated - */ - @Override - public void setMaxTime(double newMaxTime) { - double oldMaxTime = maxTime; - maxTime = newMaxTime; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME, oldMaxTime, maxTime)); - } - - /** - * - * - * @generated - */ - @Override - public EList getRelations() { - if (relations == null) { - relations = new EObjectContainmentEList(Relation.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS); - } - return relations; - } - - /** - * - * - * @generated - */ - @Override - public double getMaxXSpeed() { - return maxXSpeed; - } - - /** - * - * - * @generated - */ - @Override - public void setMaxXSpeed(double newMaxXSpeed) { - double oldMaxXSpeed = maxXSpeed; - maxXSpeed = newMaxXSpeed; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED, oldMaxXSpeed, maxXSpeed)); - } - - /** - * - * - * @generated - */ - @Override - public double getMaxYSpeed() { - return maxYSpeed; - } - - /** - * - * - * @generated - */ - @Override - public void setMaxYSpeed(double newMaxYSpeed) { - double oldMaxYSpeed = maxYSpeed; - maxYSpeed = newMaxYSpeed; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED, oldMaxYSpeed, maxYSpeed)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: - return ((InternalEList)getActors()).basicRemove(otherEnd, msgs); - case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: - return ((InternalEList)getLanes()).basicRemove(otherEnd, msgs); - case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: - return ((InternalEList)getRelations()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: - return getXSize(); - case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: - return getYSize(); - case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: - return getActors(); - case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: - return getLanes(); - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: - return getMaxTime(); - case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: - return getRelations(); - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: - return getMaxXSpeed(); - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: - return getMaxYSpeed(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: - setXSize((Double)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: - setYSize((Double)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: - getActors().clear(); - getActors().addAll((Collection)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: - getLanes().clear(); - getLanes().addAll((Collection)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: - setMaxTime((Double)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: - getRelations().clear(); - getRelations().addAll((Collection)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: - setMaxXSpeed((Double)newValue); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: - setMaxYSpeed((Double)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: - setXSize(XSIZE_EDEFAULT); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: - setYSize(YSIZE_EDEFAULT); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: - getActors().clear(); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: - getLanes().clear(); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: - setMaxTime(MAX_TIME_EDEFAULT); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: - getRelations().clear(); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: - setMaxXSpeed(MAX_XSPEED_EDEFAULT); - return; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: - setMaxYSpeed(MAX_YSPEED_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: - return xSize != XSIZE_EDEFAULT; - case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: - return ySize != YSIZE_EDEFAULT; - case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: - return actors != null && !actors.isEmpty(); - case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: - return lanes != null && !lanes.isEmpty(); - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: - return maxTime != MAX_TIME_EDEFAULT; - case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: - return relations != null && !relations.isEmpty(); - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: - return maxXSpeed != MAX_XSPEED_EDEFAULT; - case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: - return maxYSpeed != MAX_YSPEED_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (xSize: "); - result.append(xSize); - result.append(", ySize: "); - result.append(ySize); - result.append(", maxTime: "); - result.append(maxTime); - result.append(", maxXSpeed: "); - result.append(maxXSpeed); - result.append(", maxYSpeed: "); - result.append(maxYSpeed); - result.append(')'); - return result.toString(); - } - -} //CrossingScenarioImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CrossingScenario; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane; +import crossingScenario.Relation; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Crossing Scenario'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getXSize XSize}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getYSize YSize}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getActors Actors}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getLanes Lanes}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxTime Max Time}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getRelations Relations}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxXSpeed Max XSpeed}
  • + *
  • {@link crossingScenario.impl.CrossingScenarioImpl#getMaxYSpeed Max YSpeed}
  • + *
+ * + * @generated + */ +public class CrossingScenarioImpl extends MinimalEObjectImpl.Container implements CrossingScenario { + /** + * The default value of the '{@link #getXSize() XSize}' attribute. + * + * + * @see #getXSize() + * @generated + * @ordered + */ + protected static final double XSIZE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getXSize() XSize}' attribute. + * + * + * @see #getXSize() + * @generated + * @ordered + */ + protected double xSize = XSIZE_EDEFAULT; + + /** + * The default value of the '{@link #getYSize() YSize}' attribute. + * + * + * @see #getYSize() + * @generated + * @ordered + */ + protected static final double YSIZE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getYSize() YSize}' attribute. + * + * + * @see #getYSize() + * @generated + * @ordered + */ + protected double ySize = YSIZE_EDEFAULT; + + /** + * The cached value of the '{@link #getActors() Actors}' containment reference list. + * + * + * @see #getActors() + * @generated + * @ordered + */ + protected EList actors; + + /** + * The cached value of the '{@link #getLanes() Lanes}' containment reference list. + * + * + * @see #getLanes() + * @generated + * @ordered + */ + protected EList lanes; + + /** + * The default value of the '{@link #getMaxTime() Max Time}' attribute. + * + * + * @see #getMaxTime() + * @generated + * @ordered + */ + protected static final double MAX_TIME_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getMaxTime() Max Time}' attribute. + * + * + * @see #getMaxTime() + * @generated + * @ordered + */ + protected double maxTime = MAX_TIME_EDEFAULT; + + /** + * The cached value of the '{@link #getRelations() Relations}' containment reference list. + * + * + * @see #getRelations() + * @generated + * @ordered + */ + protected EList relations; + + /** + * The default value of the '{@link #getMaxXSpeed() Max XSpeed}' attribute. + * + * + * @see #getMaxXSpeed() + * @generated + * @ordered + */ + protected static final double MAX_XSPEED_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getMaxXSpeed() Max XSpeed}' attribute. + * + * + * @see #getMaxXSpeed() + * @generated + * @ordered + */ + protected double maxXSpeed = MAX_XSPEED_EDEFAULT; + + /** + * The default value of the '{@link #getMaxYSpeed() Max YSpeed}' attribute. + * + * + * @see #getMaxYSpeed() + * @generated + * @ordered + */ + protected static final double MAX_YSPEED_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getMaxYSpeed() Max YSpeed}' attribute. + * + * + * @see #getMaxYSpeed() + * @generated + * @ordered + */ + protected double maxYSpeed = MAX_YSPEED_EDEFAULT; + + /** + * + * + * @generated + */ + protected CrossingScenarioImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.CROSSING_SCENARIO; + } + + /** + * + * + * @generated + */ + @Override + public double getXSize() { + return xSize; + } + + /** + * + * + * @generated + */ + @Override + public void setXSize(double newXSize) { + double oldXSize = xSize; + xSize = newXSize; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE, oldXSize, xSize)); + } + + /** + * + * + * @generated + */ + @Override + public double getYSize() { + return ySize; + } + + /** + * + * + * @generated + */ + @Override + public void setYSize(double newYSize) { + double oldYSize = ySize; + ySize = newYSize; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE, oldYSize, ySize)); + } + + /** + * + * + * @generated + */ + @Override + public EList getActors() { + if (actors == null) { + actors = new EObjectContainmentEList(Actor.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS); + } + return actors; + } + + /** + * + * + * @generated + */ + @Override + public EList getLanes() { + if (lanes == null) { + lanes = new EObjectContainmentEList(Lane.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__LANES); + } + return lanes; + } + + /** + * + * + * @generated + */ + @Override + public double getMaxTime() { + return maxTime; + } + + /** + * + * + * @generated + */ + @Override + public void setMaxTime(double newMaxTime) { + double oldMaxTime = maxTime; + maxTime = newMaxTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME, oldMaxTime, maxTime)); + } + + /** + * + * + * @generated + */ + @Override + public EList getRelations() { + if (relations == null) { + relations = new EObjectContainmentEList(Relation.class, this, CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS); + } + return relations; + } + + /** + * + * + * @generated + */ + @Override + public double getMaxXSpeed() { + return maxXSpeed; + } + + /** + * + * + * @generated + */ + @Override + public void setMaxXSpeed(double newMaxXSpeed) { + double oldMaxXSpeed = maxXSpeed; + maxXSpeed = newMaxXSpeed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED, oldMaxXSpeed, maxXSpeed)); + } + + /** + * + * + * @generated + */ + @Override + public double getMaxYSpeed() { + return maxYSpeed; + } + + /** + * + * + * @generated + */ + @Override + public void setMaxYSpeed(double newMaxYSpeed) { + double oldMaxYSpeed = maxYSpeed; + maxYSpeed = newMaxYSpeed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED, oldMaxYSpeed, maxYSpeed)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: + return ((InternalEList)getActors()).basicRemove(otherEnd, msgs); + case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: + return ((InternalEList)getLanes()).basicRemove(otherEnd, msgs); + case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: + return ((InternalEList)getRelations()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: + return getXSize(); + case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: + return getYSize(); + case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: + return getActors(); + case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: + return getLanes(); + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: + return getMaxTime(); + case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: + return getRelations(); + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: + return getMaxXSpeed(); + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: + return getMaxYSpeed(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: + setXSize((Double)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: + setYSize((Double)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: + getActors().clear(); + getActors().addAll((Collection)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: + getLanes().clear(); + getLanes().addAll((Collection)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: + setMaxTime((Double)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: + getRelations().clear(); + getRelations().addAll((Collection)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: + setMaxXSpeed((Double)newValue); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: + setMaxYSpeed((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: + setXSize(XSIZE_EDEFAULT); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: + setYSize(YSIZE_EDEFAULT); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: + getActors().clear(); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: + getLanes().clear(); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: + setMaxTime(MAX_TIME_EDEFAULT); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: + getRelations().clear(); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: + setMaxXSpeed(MAX_XSPEED_EDEFAULT); + return; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: + setMaxYSpeed(MAX_YSPEED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.CROSSING_SCENARIO__XSIZE: + return xSize != XSIZE_EDEFAULT; + case CrossingScenarioPackage.CROSSING_SCENARIO__YSIZE: + return ySize != YSIZE_EDEFAULT; + case CrossingScenarioPackage.CROSSING_SCENARIO__ACTORS: + return actors != null && !actors.isEmpty(); + case CrossingScenarioPackage.CROSSING_SCENARIO__LANES: + return lanes != null && !lanes.isEmpty(); + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_TIME: + return maxTime != MAX_TIME_EDEFAULT; + case CrossingScenarioPackage.CROSSING_SCENARIO__RELATIONS: + return relations != null && !relations.isEmpty(); + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_XSPEED: + return maxXSpeed != MAX_XSPEED_EDEFAULT; + case CrossingScenarioPackage.CROSSING_SCENARIO__MAX_YSPEED: + return maxYSpeed != MAX_YSPEED_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (xSize: "); + result.append(xSize); + result.append(", ySize: "); + result.append(ySize); + result.append(", maxTime: "); + result.append(maxTime); + result.append(", maxXSpeed: "); + result.append(maxXSpeed); + result.append(", maxYSpeed: "); + result.append(maxYSpeed); + result.append(')'); + return result.toString(); + } + +} //CrossingScenarioImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java index 292fcb9c..24dfa5ef 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/CrossingScenarioPackageImpl.java @@ -1,793 +1,707 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CollisionDoesNotExist; -import crossingScenario.CollisionExists; -import crossingScenario.CrossingScenario; -import crossingScenario.CrossingScenarioFactory; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Distance; -import crossingScenario.Lane; -import crossingScenario.Lane_Horizontal; -import crossingScenario.Lane_Vertical; -import crossingScenario.Pedestrian; -import crossingScenario.Relation; -import crossingScenario.SeparationDistance; -import crossingScenario.SpatialRelation; -import crossingScenario.TemporalRelation; -import crossingScenario.Vehicle; -import crossingScenario.VisionBlocked; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class CrossingScenarioPackageImpl extends EPackageImpl implements CrossingScenarioPackage { - /** - * - * - * @generated - */ - private EClass crossingScenarioEClass = null; - - /** - * - * - * @generated - */ - private EClass laneEClass = null; - - /** - * - * - * @generated - */ - private EClass actorEClass = null; - - /** - * - * - * @generated - */ - private EClass relationEClass = null; - - /** - * - * - * @generated - */ - private EClass spatialRelationEClass = null; - - /** - * - * - * @generated - */ - private EClass temporalRelationEClass = null; - - /** - * - * - * @generated - */ - private EClass visionBlockedEClass = null; - - /** - * - * - * @generated - */ - private EClass separationDistanceEClass = null; - - /** - * - * - * @generated - */ - private EClass collisionExistsEClass = null; - - /** - * - * - * @generated - */ - private EClass collisionDoesNotExistEClass = null; - - /** - * - * - * @generated - */ - private EClass pedestrianEClass = null; - - /** - * - * - * @generated - */ - private EClass vehicleEClass = null; - - /** - * - * - * @generated - */ - private EClass lane_HorizontalEClass = null; - - /** - * - * - * @generated - */ - private EClass lane_VerticalEClass = null; - - /** - * - * - * @generated - */ - private EEnum distanceEEnum = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see crossingScenario.CrossingScenarioPackage#eNS_URI - * @see #init() - * @generated - */ - private CrossingScenarioPackageImpl() { - super(eNS_URI, CrossingScenarioFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link CrossingScenarioPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static CrossingScenarioPackage init() { - if (isInited) return (CrossingScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(CrossingScenarioPackage.eNS_URI); - - // Obtain or create and register package - Object registeredCrossingScenarioPackage = EPackage.Registry.INSTANCE.get(eNS_URI); - CrossingScenarioPackageImpl theCrossingScenarioPackage = registeredCrossingScenarioPackage instanceof CrossingScenarioPackageImpl ? (CrossingScenarioPackageImpl)registeredCrossingScenarioPackage : new CrossingScenarioPackageImpl(); - - isInited = true; - - // Create package meta-data objects - theCrossingScenarioPackage.createPackageContents(); - - // Initialize created meta-data - theCrossingScenarioPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theCrossingScenarioPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, theCrossingScenarioPackage); - return theCrossingScenarioPackage; - } - - /** - * - * - * @generated - */ - @Override - public EClass getCrossingScenario() { - return crossingScenarioEClass; - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCrossingScenario_XSize() { - return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCrossingScenario_YSize() { - return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - @Override - public EReference getCrossingScenario_Actors() { - return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - @Override - public EReference getCrossingScenario_Lanes() { - return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCrossingScenario_MaxTime() { - return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - @Override - public EReference getCrossingScenario_Relations() { - return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCrossingScenario_MaxXSpeed() { - return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCrossingScenario_MaxYSpeed() { - return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - @Override - public EClass getLane() { - return laneEClass; - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getLane_ReferenceCoord() { - return (EAttribute)laneEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EReference getLane_Actors() { - return (EReference)laneEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - @Override - public EClass getActor() { - return actorEClass; - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_XPos() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_YPos() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_Length() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_Width() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_XSpeed() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - @Override - public EReference getActor_PlacedOn() { - return (EReference)actorEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getActor_YSpeed() { - return (EAttribute)actorEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - @Override - public EReference getActor_Dist_near() { - return (EReference)actorEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - @Override - public EReference getActor_Dist_med() { - return (EReference)actorEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - @Override - public EReference getActor_Dist_far() { - return (EReference)actorEClass.getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated - */ - @Override - public EClass getRelation() { - return relationEClass; - } - - /** - * - * - * @generated - */ - @Override - public EReference getRelation_Target() { - return (EReference)relationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EReference getRelation_Source() { - return (EReference)relationEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - @Override - public EClass getSpatialRelation() { - return spatialRelationEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getTemporalRelation() { - return temporalRelationEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getVisionBlocked() { - return visionBlockedEClass; - } - - /** - * - * - * @generated - */ - @Override - public EReference getVisionBlocked_BlockedBy() { - return (EReference)visionBlockedEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EClass getSeparationDistance() { - return separationDistanceEClass; - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getSeparationDistance_Distance() { - return (EAttribute)separationDistanceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EClass getCollisionExists() { - return collisionExistsEClass; - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getCollisionExists_CollisionTime() { - return (EAttribute)collisionExistsEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - @Override - public EClass getCollisionDoesNotExist() { - return collisionDoesNotExistEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getPedestrian() { - return pedestrianEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getVehicle() { - return vehicleEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getLane_Horizontal() { - return lane_HorizontalEClass; - } - - /** - * - * - * @generated - */ - @Override - public EClass getLane_Vertical() { - return lane_VerticalEClass; - } - - /** - * - * - * @generated - */ - @Override - public EEnum getDistance() { - return distanceEEnum; - } - - /** - * - * - * @generated - */ - @Override - public CrossingScenarioFactory getCrossingScenarioFactory() { - return (CrossingScenarioFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - crossingScenarioEClass = createEClass(CROSSING_SCENARIO); - createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__XSIZE); - createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__YSIZE); - createEReference(crossingScenarioEClass, CROSSING_SCENARIO__ACTORS); - createEReference(crossingScenarioEClass, CROSSING_SCENARIO__LANES); - createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_TIME); - createEReference(crossingScenarioEClass, CROSSING_SCENARIO__RELATIONS); - createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_XSPEED); - createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_YSPEED); - - laneEClass = createEClass(LANE); - createEAttribute(laneEClass, LANE__REFERENCE_COORD); - createEReference(laneEClass, LANE__ACTORS); - - actorEClass = createEClass(ACTOR); - createEAttribute(actorEClass, ACTOR__XPOS); - createEAttribute(actorEClass, ACTOR__YPOS); - createEAttribute(actorEClass, ACTOR__LENGTH); - createEAttribute(actorEClass, ACTOR__WIDTH); - createEAttribute(actorEClass, ACTOR__XSPEED); - createEReference(actorEClass, ACTOR__PLACED_ON); - createEAttribute(actorEClass, ACTOR__YSPEED); - createEReference(actorEClass, ACTOR__DIST_NEAR); - createEReference(actorEClass, ACTOR__DIST_MED); - createEReference(actorEClass, ACTOR__DIST_FAR); - - relationEClass = createEClass(RELATION); - createEReference(relationEClass, RELATION__TARGET); - createEReference(relationEClass, RELATION__SOURCE); - - spatialRelationEClass = createEClass(SPATIAL_RELATION); - - temporalRelationEClass = createEClass(TEMPORAL_RELATION); - - visionBlockedEClass = createEClass(VISION_BLOCKED); - createEReference(visionBlockedEClass, VISION_BLOCKED__BLOCKED_BY); - - separationDistanceEClass = createEClass(SEPARATION_DISTANCE); - createEAttribute(separationDistanceEClass, SEPARATION_DISTANCE__DISTANCE); - - collisionExistsEClass = createEClass(COLLISION_EXISTS); - createEAttribute(collisionExistsEClass, COLLISION_EXISTS__COLLISION_TIME); - - collisionDoesNotExistEClass = createEClass(COLLISION_DOES_NOT_EXIST); - - pedestrianEClass = createEClass(PEDESTRIAN); - - vehicleEClass = createEClass(VEHICLE); - - lane_HorizontalEClass = createEClass(LANE_HORIZONTAL); - - lane_VerticalEClass = createEClass(LANE_VERTICAL); - - // Create enums - distanceEEnum = createEEnum(DISTANCE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - spatialRelationEClass.getESuperTypes().add(this.getRelation()); - temporalRelationEClass.getESuperTypes().add(this.getRelation()); - visionBlockedEClass.getESuperTypes().add(this.getSpatialRelation()); - separationDistanceEClass.getESuperTypes().add(this.getSpatialRelation()); - collisionExistsEClass.getESuperTypes().add(this.getTemporalRelation()); - collisionDoesNotExistEClass.getESuperTypes().add(this.getTemporalRelation()); - pedestrianEClass.getESuperTypes().add(this.getActor()); - vehicleEClass.getESuperTypes().add(this.getActor()); - lane_HorizontalEClass.getESuperTypes().add(this.getLane()); - lane_VerticalEClass.getESuperTypes().add(this.getLane()); - - // Initialize classes, features, and operations; add parameters - initEClass(crossingScenarioEClass, CrossingScenario.class, "CrossingScenario", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getCrossingScenario_XSize(), ecorePackage.getEDouble(), "xSize", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getCrossingScenario_YSize(), ecorePackage.getEDouble(), "ySize", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCrossingScenario_Actors(), this.getActor(), null, "actors", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - 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); - 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); - 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); - 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); - 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); - - initEClass(laneEClass, Lane.class, "Lane", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - 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); - initEReference(getLane_Actors(), this.getActor(), this.getActor_PlacedOn(), "actors", null, 0, -1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(actorEClass, Actor.class, "Actor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getActor_XPos(), ecorePackage.getEDouble(), "xPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_YPos(), ecorePackage.getEDouble(), "yPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_Length(), ecorePackage.getEDouble(), "length", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_Width(), ecorePackage.getEDouble(), "width", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActor_XSpeed(), ecorePackage.getEDouble(), "xSpeed", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getActor_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); - 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); - 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); - 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); - 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); - - initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - 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); - initEReference(getRelation_Source(), this.getActor(), null, "source", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(spatialRelationEClass, SpatialRelation.class, "SpatialRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(temporalRelationEClass, TemporalRelation.class, "TemporalRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(visionBlockedEClass, VisionBlocked.class, "VisionBlocked", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getVisionBlocked_BlockedBy(), this.getActor(), null, "blockedBy", null, 1, 1, VisionBlocked.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(separationDistanceEClass, SeparationDistance.class, "SeparationDistance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSeparationDistance_Distance(), this.getDistance(), "distance", null, 1, 1, SeparationDistance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(collisionExistsEClass, CollisionExists.class, "CollisionExists", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getCollisionExists_CollisionTime(), ecorePackage.getEDouble(), "collisionTime", null, 1, 1, CollisionExists.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(collisionDoesNotExistEClass, CollisionDoesNotExist.class, "CollisionDoesNotExist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(pedestrianEClass, Pedestrian.class, "Pedestrian", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(vehicleEClass, Vehicle.class, "Vehicle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(lane_HorizontalEClass, Lane_Horizontal.class, "Lane_Horizontal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(lane_VerticalEClass, Lane_Vertical.class, "Lane_Vertical", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - // Initialize enums and add enum literals - initEEnum(distanceEEnum, Distance.class, "Distance"); - addEEnumLiteral(distanceEEnum, Distance.DNEAR); - addEEnumLiteral(distanceEEnum, Distance.DMED); - addEEnumLiteral(distanceEEnum, Distance.DFAR); - - // Create resource - createResource(eNS_URI); - } - -} //CrossingScenarioPackageImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CollisionExists; +import crossingScenario.CrossingScenario; +import crossingScenario.CrossingScenarioFactory; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane; +import crossingScenario.Lane_Horizontal; +import crossingScenario.Lane_Vertical; +import crossingScenario.Pedestrian; +import crossingScenario.Relation; +import crossingScenario.SpatialRelation; +import crossingScenario.TemporalRelation; +import crossingScenario.Vehicle; +import crossingScenario.VisionBlocked; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CrossingScenarioPackageImpl extends EPackageImpl implements CrossingScenarioPackage { + /** + * + * + * @generated + */ + private EClass crossingScenarioEClass = null; + + /** + * + * + * @generated + */ + private EClass laneEClass = null; + + /** + * + * + * @generated + */ + private EClass actorEClass = null; + + /** + * + * + * @generated + */ + private EClass relationEClass = null; + + /** + * + * + * @generated + */ + private EClass spatialRelationEClass = null; + + /** + * + * + * @generated + */ + private EClass temporalRelationEClass = null; + + /** + * + * + * @generated + */ + private EClass visionBlockedEClass = null; + + /** + * + * + * @generated + */ + private EClass collisionExistsEClass = null; + + /** + * + * + * @generated + */ + private EClass pedestrianEClass = null; + + /** + * + * + * @generated + */ + private EClass vehicleEClass = null; + + /** + * + * + * @generated + */ + private EClass lane_HorizontalEClass = null; + + /** + * + * + * @generated + */ + private EClass lane_VerticalEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see crossingScenario.CrossingScenarioPackage#eNS_URI + * @see #init() + * @generated + */ + private CrossingScenarioPackageImpl() { + super(eNS_URI, CrossingScenarioFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CrossingScenarioPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CrossingScenarioPackage init() { + if (isInited) return (CrossingScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(CrossingScenarioPackage.eNS_URI); + + // Obtain or create and register package + Object registeredCrossingScenarioPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + CrossingScenarioPackageImpl theCrossingScenarioPackage = registeredCrossingScenarioPackage instanceof CrossingScenarioPackageImpl ? (CrossingScenarioPackageImpl)registeredCrossingScenarioPackage : new CrossingScenarioPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theCrossingScenarioPackage.createPackageContents(); + + // Initialize created meta-data + theCrossingScenarioPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCrossingScenarioPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, theCrossingScenarioPackage); + return theCrossingScenarioPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getCrossingScenario() { + return crossingScenarioEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCrossingScenario_XSize() { + return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCrossingScenario_YSize() { + return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCrossingScenario_Actors() { + return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCrossingScenario_Lanes() { + return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCrossingScenario_MaxTime() { + return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCrossingScenario_Relations() { + return (EReference)crossingScenarioEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCrossingScenario_MaxXSpeed() { + return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCrossingScenario_MaxYSpeed() { + return (EAttribute)crossingScenarioEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + @Override + public EClass getLane() { + return laneEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getLane_ReferenceCoord() { + return (EAttribute)laneEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getLane_Actors() { + return (EReference)laneEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getActor() { + return actorEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_XPos() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_YPos() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_Length() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_Width() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_XSpeed() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + @Override + public EReference getActor_PlacedOn() { + return (EReference)actorEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getActor_YSpeed() { + return (EAttribute)actorEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + @Override + public EReference getActor_Dist_near() { + return (EReference)actorEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + @Override + public EReference getActor_Dist_med() { + return (EReference)actorEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + @Override + public EReference getActor_Dist_far() { + return (EReference)actorEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + @Override + public EClass getRelation() { + return relationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getRelation_Target() { + return (EReference)relationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getRelation_Source() { + return (EReference)relationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSpatialRelation() { + return spatialRelationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getTemporalRelation() { + return temporalRelationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getVisionBlocked() { + return visionBlockedEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getVisionBlocked_BlockedBy() { + return (EReference)visionBlockedEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getCollisionExists() { + return collisionExistsEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCollisionExists_CollisionTime() { + return (EAttribute)collisionExistsEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getPedestrian() { + return pedestrianEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getVehicle() { + return vehicleEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getLane_Horizontal() { + return lane_HorizontalEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getLane_Vertical() { + return lane_VerticalEClass; + } + + /** + * + * + * @generated + */ + @Override + public CrossingScenarioFactory getCrossingScenarioFactory() { + return (CrossingScenarioFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + crossingScenarioEClass = createEClass(CROSSING_SCENARIO); + createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__XSIZE); + createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__YSIZE); + createEReference(crossingScenarioEClass, CROSSING_SCENARIO__ACTORS); + createEReference(crossingScenarioEClass, CROSSING_SCENARIO__LANES); + createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_TIME); + createEReference(crossingScenarioEClass, CROSSING_SCENARIO__RELATIONS); + createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_XSPEED); + createEAttribute(crossingScenarioEClass, CROSSING_SCENARIO__MAX_YSPEED); + + laneEClass = createEClass(LANE); + createEAttribute(laneEClass, LANE__REFERENCE_COORD); + createEReference(laneEClass, LANE__ACTORS); + + actorEClass = createEClass(ACTOR); + createEAttribute(actorEClass, ACTOR__XPOS); + createEAttribute(actorEClass, ACTOR__YPOS); + createEAttribute(actorEClass, ACTOR__LENGTH); + createEAttribute(actorEClass, ACTOR__WIDTH); + createEAttribute(actorEClass, ACTOR__XSPEED); + createEReference(actorEClass, ACTOR__PLACED_ON); + createEAttribute(actorEClass, ACTOR__YSPEED); + createEReference(actorEClass, ACTOR__DIST_NEAR); + createEReference(actorEClass, ACTOR__DIST_MED); + createEReference(actorEClass, ACTOR__DIST_FAR); + + relationEClass = createEClass(RELATION); + createEReference(relationEClass, RELATION__TARGET); + createEReference(relationEClass, RELATION__SOURCE); + + spatialRelationEClass = createEClass(SPATIAL_RELATION); + + temporalRelationEClass = createEClass(TEMPORAL_RELATION); + + visionBlockedEClass = createEClass(VISION_BLOCKED); + createEReference(visionBlockedEClass, VISION_BLOCKED__BLOCKED_BY); + + collisionExistsEClass = createEClass(COLLISION_EXISTS); + createEAttribute(collisionExistsEClass, COLLISION_EXISTS__COLLISION_TIME); + + pedestrianEClass = createEClass(PEDESTRIAN); + + vehicleEClass = createEClass(VEHICLE); + + lane_HorizontalEClass = createEClass(LANE_HORIZONTAL); + + lane_VerticalEClass = createEClass(LANE_VERTICAL); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + spatialRelationEClass.getESuperTypes().add(this.getRelation()); + temporalRelationEClass.getESuperTypes().add(this.getRelation()); + visionBlockedEClass.getESuperTypes().add(this.getSpatialRelation()); + collisionExistsEClass.getESuperTypes().add(this.getTemporalRelation()); + pedestrianEClass.getESuperTypes().add(this.getActor()); + vehicleEClass.getESuperTypes().add(this.getActor()); + lane_HorizontalEClass.getESuperTypes().add(this.getLane()); + lane_VerticalEClass.getESuperTypes().add(this.getLane()); + + // Initialize classes, features, and operations; add parameters + initEClass(crossingScenarioEClass, CrossingScenario.class, "CrossingScenario", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCrossingScenario_XSize(), ecorePackage.getEDouble(), "xSize", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCrossingScenario_YSize(), ecorePackage.getEDouble(), "ySize", null, 0, 1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCrossingScenario_Actors(), this.getActor(), null, "actors", null, 0, -1, CrossingScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + 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); + 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); + 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); + 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); + 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); + + initEClass(laneEClass, Lane.class, "Lane", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + 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); + initEReference(getLane_Actors(), this.getActor(), this.getActor_PlacedOn(), "actors", null, 0, -1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(actorEClass, Actor.class, "Actor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getActor_XPos(), ecorePackage.getEDouble(), "xPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_YPos(), ecorePackage.getEDouble(), "yPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_Length(), ecorePackage.getEDouble(), "length", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_Width(), ecorePackage.getEDouble(), "width", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getActor_XSpeed(), ecorePackage.getEDouble(), "xSpeed", "0.0", 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getActor_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); + 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); + 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); + 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); + 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); + + initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + 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); + initEReference(getRelation_Source(), this.getActor(), null, "source", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(spatialRelationEClass, SpatialRelation.class, "SpatialRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(temporalRelationEClass, TemporalRelation.class, "TemporalRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(visionBlockedEClass, VisionBlocked.class, "VisionBlocked", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVisionBlocked_BlockedBy(), this.getActor(), null, "blockedBy", null, 1, 1, VisionBlocked.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collisionExistsEClass, CollisionExists.class, "CollisionExists", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollisionExists_CollisionTime(), ecorePackage.getEDouble(), "collisionTime", null, 1, 1, CollisionExists.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(pedestrianEClass, Pedestrian.class, "Pedestrian", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(vehicleEClass, Vehicle.class, "Vehicle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(lane_HorizontalEClass, Lane_Horizontal.class, "Lane_Horizontal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(lane_VerticalEClass, Lane_Vertical.class, "Lane_Vertical", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //CrossingScenarioPackageImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/LaneImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/LaneImpl.java index be316759..c08d8257 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/LaneImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/LaneImpl.java @@ -1,239 +1,240 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Lane; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Lane'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.LaneImpl#getReferenceCoord Reference Coord}
  • - *
  • {@link crossingScenario.impl.LaneImpl#getActors Actors}
  • - *
- * - * @generated - */ -public abstract class LaneImpl extends MinimalEObjectImpl.Container implements Lane { - /** - * The default value of the '{@link #getReferenceCoord() Reference Coord}' attribute. - * - * - * @see #getReferenceCoord() - * @generated - * @ordered - */ - protected static final double REFERENCE_COORD_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getReferenceCoord() Reference Coord}' attribute. - * - * - * @see #getReferenceCoord() - * @generated - * @ordered - */ - protected double referenceCoord = REFERENCE_COORD_EDEFAULT; - - /** - * The cached value of the '{@link #getActors() Actors}' reference list. - * - * - * @see #getActors() - * @generated - * @ordered - */ - protected EList actors; - - /** - * - * - * @generated - */ - protected LaneImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.LANE; - } - - /** - * - * - * @generated - */ - @Override - public double getReferenceCoord() { - return referenceCoord; - } - - /** - * - * - * @generated - */ - @Override - public void setReferenceCoord(double newReferenceCoord) { - double oldReferenceCoord = referenceCoord; - referenceCoord = newReferenceCoord; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.LANE__REFERENCE_COORD, oldReferenceCoord, referenceCoord)); - } - - /** - * - * - * @generated - */ - @Override - public EList getActors() { - if (actors == null) { - actors = new EObjectWithInverseResolvingEList(Actor.class, this, CrossingScenarioPackage.LANE__ACTORS, CrossingScenarioPackage.ACTOR__PLACED_ON); - } - return actors; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case CrossingScenarioPackage.LANE__ACTORS: - return ((InternalEList)(InternalEList)getActors()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case CrossingScenarioPackage.LANE__ACTORS: - return ((InternalEList)getActors()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.LANE__REFERENCE_COORD: - return getReferenceCoord(); - case CrossingScenarioPackage.LANE__ACTORS: - return getActors(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.LANE__REFERENCE_COORD: - setReferenceCoord((Double)newValue); - return; - case CrossingScenarioPackage.LANE__ACTORS: - getActors().clear(); - getActors().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.LANE__REFERENCE_COORD: - setReferenceCoord(REFERENCE_COORD_EDEFAULT); - return; - case CrossingScenarioPackage.LANE__ACTORS: - getActors().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.LANE__REFERENCE_COORD: - return referenceCoord != REFERENCE_COORD_EDEFAULT; - case CrossingScenarioPackage.LANE__ACTORS: - return actors != null && !actors.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (referenceCoord: "); - result.append(referenceCoord); - result.append(')'); - return result.toString(); - } - -} //LaneImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Lane'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.LaneImpl#getReferenceCoord Reference Coord}
  • + *
  • {@link crossingScenario.impl.LaneImpl#getActors Actors}
  • + *
+ * + * @generated + */ +public abstract class LaneImpl extends MinimalEObjectImpl.Container implements Lane { + /** + * The default value of the '{@link #getReferenceCoord() Reference Coord}' attribute. + * + * + * @see #getReferenceCoord() + * @generated + * @ordered + */ + protected static final double REFERENCE_COORD_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getReferenceCoord() Reference Coord}' attribute. + * + * + * @see #getReferenceCoord() + * @generated + * @ordered + */ + protected double referenceCoord = REFERENCE_COORD_EDEFAULT; + + /** + * The cached value of the '{@link #getActors() Actors}' reference list. + * + * + * @see #getActors() + * @generated + * @ordered + */ + protected EList actors; + + /** + * + * + * @generated + */ + protected LaneImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.LANE; + } + + /** + * + * + * @generated + */ + @Override + public double getReferenceCoord() { + return referenceCoord; + } + + /** + * + * + * @generated + */ + @Override + public void setReferenceCoord(double newReferenceCoord) { + double oldReferenceCoord = referenceCoord; + referenceCoord = newReferenceCoord; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.LANE__REFERENCE_COORD, oldReferenceCoord, referenceCoord)); + } + + /** + * + * + * @generated + */ + @Override + public EList getActors() { + if (actors == null) { + actors = new EObjectWithInverseResolvingEList(Actor.class, this, CrossingScenarioPackage.LANE__ACTORS, CrossingScenarioPackage.ACTOR__PLACED_ON); + } + return actors; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CrossingScenarioPackage.LANE__ACTORS: + return ((InternalEList)(InternalEList)getActors()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CrossingScenarioPackage.LANE__ACTORS: + return ((InternalEList)getActors()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.LANE__REFERENCE_COORD: + return getReferenceCoord(); + case CrossingScenarioPackage.LANE__ACTORS: + return getActors(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.LANE__REFERENCE_COORD: + setReferenceCoord((Double)newValue); + return; + case CrossingScenarioPackage.LANE__ACTORS: + getActors().clear(); + getActors().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.LANE__REFERENCE_COORD: + setReferenceCoord(REFERENCE_COORD_EDEFAULT); + return; + case CrossingScenarioPackage.LANE__ACTORS: + getActors().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.LANE__REFERENCE_COORD: + return referenceCoord != REFERENCE_COORD_EDEFAULT; + case CrossingScenarioPackage.LANE__ACTORS: + return actors != null && !actors.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (referenceCoord: "); + result.append(referenceCoord); + result.append(')'); + return result.toString(); + } + +} //LaneImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_HorizontalImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_HorizontalImpl.java index adf06602..95899432 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_HorizontalImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_HorizontalImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Lane_Horizontal; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Lane Horizontal'. - * - * - * @generated - */ -public class Lane_HorizontalImpl extends LaneImpl implements Lane_Horizontal { - /** - * - * - * @generated - */ - protected Lane_HorizontalImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.LANE_HORIZONTAL; - } - -} //Lane_HorizontalImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane_Horizontal; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Lane Horizontal'. + * + * + * @generated + */ +public class Lane_HorizontalImpl extends LaneImpl implements Lane_Horizontal { + /** + * + * + * @generated + */ + protected Lane_HorizontalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.LANE_HORIZONTAL; + } + +} //Lane_HorizontalImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_VerticalImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_VerticalImpl.java index cc1265e8..7b615d82 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_VerticalImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/Lane_VerticalImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Lane_Vertical; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Lane Vertical'. - * - * - * @generated - */ -public class Lane_VerticalImpl extends LaneImpl implements Lane_Vertical { - /** - * - * - * @generated - */ - protected Lane_VerticalImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.LANE_VERTICAL; - } - -} //Lane_VerticalImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Lane_Vertical; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Lane Vertical'. + * + * + * @generated + */ +public class Lane_VerticalImpl extends LaneImpl implements Lane_Vertical { + /** + * + * + * @generated + */ + protected Lane_VerticalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.LANE_VERTICAL; + } + +} //Lane_VerticalImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/PedestrianImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/PedestrianImpl.java index b7bf48f0..bdf71eea 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/PedestrianImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/PedestrianImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Pedestrian; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Pedestrian'. - * - * - * @generated - */ -public class PedestrianImpl extends ActorImpl implements Pedestrian { - /** - * - * - * @generated - */ - protected PedestrianImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.PEDESTRIAN; - } - -} //PedestrianImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Pedestrian; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Pedestrian'. + * + * + * @generated + */ +public class PedestrianImpl extends ActorImpl implements Pedestrian { + /** + * + * + * @generated + */ + protected PedestrianImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.PEDESTRIAN; + } + +} //PedestrianImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/RelationImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/RelationImpl.java index 97131c99..d0924f73 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/RelationImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/RelationImpl.java @@ -1,221 +1,221 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Relation; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -/** - * - * An implementation of the model object 'Relation'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.RelationImpl#getTarget Target}
  • - *
  • {@link crossingScenario.impl.RelationImpl#getSource Source}
  • - *
- * - * @generated - */ -public abstract class RelationImpl extends MinimalEObjectImpl.Container implements Relation { - /** - * The cached value of the '{@link #getTarget() Target}' reference. - * - * - * @see #getTarget() - * @generated - * @ordered - */ - protected Actor target; - - /** - * The cached value of the '{@link #getSource() Source}' reference. - * - * - * @see #getSource() - * @generated - * @ordered - */ - protected Actor source; - - /** - * - * - * @generated - */ - protected RelationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.RELATION; - } - - /** - * - * - * @generated - */ - @Override - public Actor getTarget() { - if (target != null && target.eIsProxy()) { - InternalEObject oldTarget = (InternalEObject)target; - target = (Actor)eResolveProxy(oldTarget); - if (target != oldTarget) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); - } - } - return target; - } - - /** - * - * - * @generated - */ - public Actor basicGetTarget() { - return target; - } - - /** - * - * - * @generated - */ - @Override - public void setTarget(Actor newTarget) { - Actor oldTarget = target; - target = newTarget; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); - } - - /** - * - * - * @generated - */ - @Override - public Actor getSource() { - if (source != null && source.eIsProxy()) { - InternalEObject oldSource = (InternalEObject)source; - source = (Actor)eResolveProxy(oldSource); - if (source != oldSource) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); - } - } - return source; - } - - /** - * - * - * @generated - */ - public Actor basicGetSource() { - return source; - } - - /** - * - * - * @generated - */ - @Override - public void setSource(Actor newSource) { - Actor oldSource = source; - source = newSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.RELATION__TARGET: - if (resolve) return getTarget(); - return basicGetTarget(); - case CrossingScenarioPackage.RELATION__SOURCE: - if (resolve) return getSource(); - return basicGetSource(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.RELATION__TARGET: - setTarget((Actor)newValue); - return; - case CrossingScenarioPackage.RELATION__SOURCE: - setSource((Actor)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.RELATION__TARGET: - setTarget((Actor)null); - return; - case CrossingScenarioPackage.RELATION__SOURCE: - setSource((Actor)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.RELATION__TARGET: - return target != null; - case CrossingScenarioPackage.RELATION__SOURCE: - return source != null; - } - return super.eIsSet(featureID); - } - -} //RelationImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Relation; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Relation'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.RelationImpl#getTarget Target}
  • + *
  • {@link crossingScenario.impl.RelationImpl#getSource Source}
  • + *
+ * + * @generated + */ +public abstract class RelationImpl extends MinimalEObjectImpl.Container implements Relation { + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected Actor target; + + /** + * The cached value of the '{@link #getSource() Source}' reference. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected Actor source; + + /** + * + * + * @generated + */ + protected RelationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.RELATION; + } + + /** + * + * + * @generated + */ + @Override + public Actor getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (Actor)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public Actor basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + @Override + public void setTarget(Actor newTarget) { + Actor oldTarget = target; + target = newTarget; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); + } + + /** + * + * + * @generated + */ + @Override + public Actor getSource() { + if (source != null && source.eIsProxy()) { + InternalEObject oldSource = (InternalEObject)source; + source = (Actor)eResolveProxy(oldSource); + if (source != oldSource) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); + } + } + return source; + } + + /** + * + * + * @generated + */ + public Actor basicGetSource() { + return source; + } + + /** + * + * + * @generated + */ + @Override + public void setSource(Actor newSource) { + Actor oldSource = source; + source = newSource; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.RELATION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case CrossingScenarioPackage.RELATION__SOURCE: + if (resolve) return getSource(); + return basicGetSource(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.RELATION__TARGET: + setTarget((Actor)newValue); + return; + case CrossingScenarioPackage.RELATION__SOURCE: + setSource((Actor)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.RELATION__TARGET: + setTarget((Actor)null); + return; + case CrossingScenarioPackage.RELATION__SOURCE: + setSource((Actor)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.RELATION__TARGET: + return target != null; + case CrossingScenarioPackage.RELATION__SOURCE: + return source != null; + } + return super.eIsSet(featureID); + } + +} //RelationImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SeparationDistanceImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SeparationDistanceImpl.java deleted file mode 100644 index 298a2121..00000000 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SeparationDistanceImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Distance; -import crossingScenario.SeparationDistance; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Separation Distance'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.SeparationDistanceImpl#getDistance Distance}
  • - *
- * - * @generated - */ -public class SeparationDistanceImpl extends SpatialRelationImpl implements SeparationDistance { - /** - * The default value of the '{@link #getDistance() Distance}' attribute. - * - * - * @see #getDistance() - * @generated - * @ordered - */ - protected static final Distance DISTANCE_EDEFAULT = Distance.DNEAR; - - /** - * The cached value of the '{@link #getDistance() Distance}' attribute. - * - * - * @see #getDistance() - * @generated - * @ordered - */ - protected Distance distance = DISTANCE_EDEFAULT; - - /** - * - * - * @generated - */ - protected SeparationDistanceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.SEPARATION_DISTANCE; - } - - /** - * - * - * @generated - */ - @Override - public Distance getDistance() { - return distance; - } - - /** - * - * - * @generated - */ - @Override - public void setDistance(Distance newDistance) { - Distance oldDistance = distance; - distance = newDistance == null ? DISTANCE_EDEFAULT : newDistance; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.SEPARATION_DISTANCE__DISTANCE, oldDistance, distance)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.SEPARATION_DISTANCE__DISTANCE: - return getDistance(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.SEPARATION_DISTANCE__DISTANCE: - setDistance((Distance)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.SEPARATION_DISTANCE__DISTANCE: - setDistance(DISTANCE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.SEPARATION_DISTANCE__DISTANCE: - return distance != DISTANCE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (distance: "); - result.append(distance); - result.append(')'); - return result.toString(); - } - -} //SeparationDistanceImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SpatialRelationImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SpatialRelationImpl.java index 29dcf9f8..b1cb271d 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SpatialRelationImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/SpatialRelationImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.SpatialRelation; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Spatial Relation'. - * - * - * @generated - */ -public abstract class SpatialRelationImpl extends RelationImpl implements SpatialRelation { - /** - * - * - * @generated - */ - protected SpatialRelationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.SPATIAL_RELATION; - } - -} //SpatialRelationImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.SpatialRelation; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Spatial Relation'. + * + * + * @generated + */ +public abstract class SpatialRelationImpl extends RelationImpl implements SpatialRelation { + /** + * + * + * @generated + */ + protected SpatialRelationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.SPATIAL_RELATION; + } + +} //SpatialRelationImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/TemporalRelationImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/TemporalRelationImpl.java index 7fc113b7..c4366543 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/TemporalRelationImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/TemporalRelationImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.TemporalRelation; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Temporal Relation'. - * - * - * @generated - */ -public abstract class TemporalRelationImpl extends RelationImpl implements TemporalRelation { - /** - * - * - * @generated - */ - protected TemporalRelationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.TEMPORAL_RELATION; - } - -} //TemporalRelationImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.TemporalRelation; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Temporal Relation'. + * + * + * @generated + */ +public abstract class TemporalRelationImpl extends RelationImpl implements TemporalRelation { + /** + * + * + * @generated + */ + protected TemporalRelationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.TEMPORAL_RELATION; + } + +} //TemporalRelationImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VehicleImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VehicleImpl.java index 15f25fd5..b82de9be 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VehicleImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VehicleImpl.java @@ -1,37 +1,37 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.Vehicle; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Vehicle'. - * - * - * @generated - */ -public class VehicleImpl extends ActorImpl implements Vehicle { - /** - * - * - * @generated - */ - protected VehicleImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.VEHICLE; - } - -} //VehicleImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.Vehicle; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Vehicle'. + * + * + * @generated + */ +public class VehicleImpl extends ActorImpl implements Vehicle { + /** + * + * + * @generated + */ + protected VehicleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.VEHICLE; + } + +} //VehicleImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VisionBlockedImpl.java b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VisionBlockedImpl.java index 169cd57c..e5cb4004 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VisionBlockedImpl.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/impl/VisionBlockedImpl.java @@ -1,158 +1,158 @@ -/** - */ -package crossingScenario.impl; - -import crossingScenario.Actor; -import crossingScenario.CrossingScenarioPackage; -import crossingScenario.VisionBlocked; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Vision Blocked'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link crossingScenario.impl.VisionBlockedImpl#getBlockedBy Blocked By}
  • - *
- * - * @generated - */ -public class VisionBlockedImpl extends SpatialRelationImpl implements VisionBlocked { - /** - * The cached value of the '{@link #getBlockedBy() Blocked By}' reference. - * - * - * @see #getBlockedBy() - * @generated - * @ordered - */ - protected Actor blockedBy; - - /** - * - * - * @generated - */ - protected VisionBlockedImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CrossingScenarioPackage.Literals.VISION_BLOCKED; - } - - /** - * - * - * @generated - */ - @Override - public Actor getBlockedBy() { - if (blockedBy != null && blockedBy.eIsProxy()) { - InternalEObject oldBlockedBy = (InternalEObject)blockedBy; - blockedBy = (Actor)eResolveProxy(oldBlockedBy); - if (blockedBy != oldBlockedBy) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); - } - } - return blockedBy; - } - - /** - * - * - * @generated - */ - public Actor basicGetBlockedBy() { - return blockedBy; - } - - /** - * - * - * @generated - */ - @Override - public void setBlockedBy(Actor newBlockedBy) { - Actor oldBlockedBy = blockedBy; - blockedBy = newBlockedBy; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: - if (resolve) return getBlockedBy(); - return basicGetBlockedBy(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: - setBlockedBy((Actor)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: - setBlockedBy((Actor)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: - return blockedBy != null; - } - return super.eIsSet(featureID); - } - -} //VisionBlockedImpl +/** + */ +package crossingScenario.impl; + +import crossingScenario.Actor; +import crossingScenario.CrossingScenarioPackage; +import crossingScenario.VisionBlocked; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Vision Blocked'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link crossingScenario.impl.VisionBlockedImpl#getBlockedBy Blocked By}
  • + *
+ * + * @generated + */ +public class VisionBlockedImpl extends SpatialRelationImpl implements VisionBlocked { + /** + * The cached value of the '{@link #getBlockedBy() Blocked By}' reference. + * + * + * @see #getBlockedBy() + * @generated + * @ordered + */ + protected Actor blockedBy; + + /** + * + * + * @generated + */ + protected VisionBlockedImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CrossingScenarioPackage.Literals.VISION_BLOCKED; + } + + /** + * + * + * @generated + */ + @Override + public Actor getBlockedBy() { + if (blockedBy != null && blockedBy.eIsProxy()) { + InternalEObject oldBlockedBy = (InternalEObject)blockedBy; + blockedBy = (Actor)eResolveProxy(oldBlockedBy); + if (blockedBy != oldBlockedBy) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); + } + } + return blockedBy; + } + + /** + * + * + * @generated + */ + public Actor basicGetBlockedBy() { + return blockedBy; + } + + /** + * + * + * @generated + */ + @Override + public void setBlockedBy(Actor newBlockedBy) { + Actor oldBlockedBy = blockedBy; + blockedBy = newBlockedBy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: + if (resolve) return getBlockedBy(); + return basicGetBlockedBy(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: + setBlockedBy((Actor)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: + setBlockedBy((Actor)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: + return blockedBy != null; + } + return super.eIsSet(featureID); + } + +} //VisionBlockedImpl diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioAdapterFactory.java b/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioAdapterFactory.java index 129432db..b46b9e98 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioAdapterFactory.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioAdapterFactory.java @@ -1,354 +1,318 @@ -/** - */ -package crossingScenario.util; - -import crossingScenario.*; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see crossingScenario.CrossingScenarioPackage - * @generated - */ -public class CrossingScenarioAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static CrossingScenarioPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public CrossingScenarioAdapterFactory() { - if (modelPackage == null) { - modelPackage = CrossingScenarioPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ - protected CrossingScenarioSwitch modelSwitch = - new CrossingScenarioSwitch() { - @Override - public Adapter caseCrossingScenario(CrossingScenario object) { - return createCrossingScenarioAdapter(); - } - @Override - public Adapter caseLane(Lane object) { - return createLaneAdapter(); - } - @Override - public Adapter caseActor(Actor object) { - return createActorAdapter(); - } - @Override - public Adapter caseRelation(Relation object) { - return createRelationAdapter(); - } - @Override - public Adapter caseSpatialRelation(SpatialRelation object) { - return createSpatialRelationAdapter(); - } - @Override - public Adapter caseTemporalRelation(TemporalRelation object) { - return createTemporalRelationAdapter(); - } - @Override - public Adapter caseVisionBlocked(VisionBlocked object) { - return createVisionBlockedAdapter(); - } - @Override - public Adapter caseSeparationDistance(SeparationDistance object) { - return createSeparationDistanceAdapter(); - } - @Override - public Adapter caseCollisionExists(CollisionExists object) { - return createCollisionExistsAdapter(); - } - @Override - public Adapter caseCollisionDoesNotExist(CollisionDoesNotExist object) { - return createCollisionDoesNotExistAdapter(); - } - @Override - public Adapter casePedestrian(Pedestrian object) { - return createPedestrianAdapter(); - } - @Override - public Adapter caseVehicle(Vehicle object) { - return createVehicleAdapter(); - } - @Override - public Adapter caseLane_Horizontal(Lane_Horizontal object) { - return createLane_HorizontalAdapter(); - } - @Override - public Adapter caseLane_Vertical(Lane_Vertical object) { - return createLane_VerticalAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.CrossingScenario Crossing Scenario}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.CrossingScenario - * @generated - */ - public Adapter createCrossingScenarioAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Lane Lane}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Lane - * @generated - */ - public Adapter createLaneAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Actor Actor}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Actor - * @generated - */ - public Adapter createActorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Relation Relation}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Relation - * @generated - */ - public Adapter createRelationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.SpatialRelation Spatial Relation}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.SpatialRelation - * @generated - */ - public Adapter createSpatialRelationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.TemporalRelation Temporal Relation}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.TemporalRelation - * @generated - */ - public Adapter createTemporalRelationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.VisionBlocked Vision Blocked}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.VisionBlocked - * @generated - */ - public Adapter createVisionBlockedAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.SeparationDistance Separation Distance}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.SeparationDistance - * @generated - */ - public Adapter createSeparationDistanceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.CollisionExists Collision Exists}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.CollisionExists - * @generated - */ - public Adapter createCollisionExistsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.CollisionDoesNotExist Collision Does Not Exist}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.CollisionDoesNotExist - * @generated - */ - public Adapter createCollisionDoesNotExistAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Pedestrian Pedestrian}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Pedestrian - * @generated - */ - public Adapter createPedestrianAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Vehicle Vehicle}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Vehicle - * @generated - */ - public Adapter createVehicleAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Lane_Horizontal Lane Horizontal}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Lane_Horizontal - * @generated - */ - public Adapter createLane_HorizontalAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link crossingScenario.Lane_Vertical Lane Vertical}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see crossingScenario.Lane_Vertical - * @generated - */ - public Adapter createLane_VerticalAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //CrossingScenarioAdapterFactory +/** + */ +package crossingScenario.util; + +import crossingScenario.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see crossingScenario.CrossingScenarioPackage + * @generated + */ +public class CrossingScenarioAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CrossingScenarioPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CrossingScenarioAdapterFactory() { + if (modelPackage == null) { + modelPackage = CrossingScenarioPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CrossingScenarioSwitch modelSwitch = + new CrossingScenarioSwitch() { + @Override + public Adapter caseCrossingScenario(CrossingScenario object) { + return createCrossingScenarioAdapter(); + } + @Override + public Adapter caseLane(Lane object) { + return createLaneAdapter(); + } + @Override + public Adapter caseActor(Actor object) { + return createActorAdapter(); + } + @Override + public Adapter caseRelation(Relation object) { + return createRelationAdapter(); + } + @Override + public Adapter caseSpatialRelation(SpatialRelation object) { + return createSpatialRelationAdapter(); + } + @Override + public Adapter caseTemporalRelation(TemporalRelation object) { + return createTemporalRelationAdapter(); + } + @Override + public Adapter caseVisionBlocked(VisionBlocked object) { + return createVisionBlockedAdapter(); + } + @Override + public Adapter caseCollisionExists(CollisionExists object) { + return createCollisionExistsAdapter(); + } + @Override + public Adapter casePedestrian(Pedestrian object) { + return createPedestrianAdapter(); + } + @Override + public Adapter caseVehicle(Vehicle object) { + return createVehicleAdapter(); + } + @Override + public Adapter caseLane_Horizontal(Lane_Horizontal object) { + return createLane_HorizontalAdapter(); + } + @Override + public Adapter caseLane_Vertical(Lane_Vertical object) { + return createLane_VerticalAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.CrossingScenario Crossing Scenario}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.CrossingScenario + * @generated + */ + public Adapter createCrossingScenarioAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Lane Lane}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Lane + * @generated + */ + public Adapter createLaneAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Actor Actor}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Actor + * @generated + */ + public Adapter createActorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Relation Relation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Relation + * @generated + */ + public Adapter createRelationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.SpatialRelation Spatial Relation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.SpatialRelation + * @generated + */ + public Adapter createSpatialRelationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.TemporalRelation Temporal Relation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.TemporalRelation + * @generated + */ + public Adapter createTemporalRelationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.VisionBlocked Vision Blocked}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.VisionBlocked + * @generated + */ + public Adapter createVisionBlockedAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.CollisionExists Collision Exists}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.CollisionExists + * @generated + */ + public Adapter createCollisionExistsAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Pedestrian Pedestrian}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Pedestrian + * @generated + */ + public Adapter createPedestrianAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Vehicle Vehicle}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Vehicle + * @generated + */ + public Adapter createVehicleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Lane_Horizontal Lane Horizontal}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Lane_Horizontal + * @generated + */ + public Adapter createLane_HorizontalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link crossingScenario.Lane_Vertical Lane Vertical}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see crossingScenario.Lane_Vertical + * @generated + */ + public Adapter createLane_VerticalAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CrossingScenarioAdapterFactory diff --git a/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioSwitch.java b/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioSwitch.java index e07b7693..3340d7b1 100644 --- a/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioSwitch.java +++ b/Domains/crossingScenario/ecore-gen/crossingScenario/util/CrossingScenarioSwitch.java @@ -1,397 +1,351 @@ -/** - */ -package crossingScenario.util; - -import crossingScenario.*; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see crossingScenario.CrossingScenarioPackage - * @generated - */ -public class CrossingScenarioSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static CrossingScenarioPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public CrossingScenarioSwitch() { - if (modelPackage == null) { - modelPackage = CrossingScenarioPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * - * @param ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case CrossingScenarioPackage.CROSSING_SCENARIO: { - CrossingScenario crossingScenario = (CrossingScenario)theEObject; - T result = caseCrossingScenario(crossingScenario); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.LANE: { - Lane lane = (Lane)theEObject; - T result = caseLane(lane); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.ACTOR: { - Actor actor = (Actor)theEObject; - T result = caseActor(actor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.RELATION: { - Relation relation = (Relation)theEObject; - T result = caseRelation(relation); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.SPATIAL_RELATION: { - SpatialRelation spatialRelation = (SpatialRelation)theEObject; - T result = caseSpatialRelation(spatialRelation); - if (result == null) result = caseRelation(spatialRelation); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.TEMPORAL_RELATION: { - TemporalRelation temporalRelation = (TemporalRelation)theEObject; - T result = caseTemporalRelation(temporalRelation); - if (result == null) result = caseRelation(temporalRelation); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.VISION_BLOCKED: { - VisionBlocked visionBlocked = (VisionBlocked)theEObject; - T result = caseVisionBlocked(visionBlocked); - if (result == null) result = caseSpatialRelation(visionBlocked); - if (result == null) result = caseRelation(visionBlocked); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.SEPARATION_DISTANCE: { - SeparationDistance separationDistance = (SeparationDistance)theEObject; - T result = caseSeparationDistance(separationDistance); - if (result == null) result = caseSpatialRelation(separationDistance); - if (result == null) result = caseRelation(separationDistance); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.COLLISION_EXISTS: { - CollisionExists collisionExists = (CollisionExists)theEObject; - T result = caseCollisionExists(collisionExists); - if (result == null) result = caseTemporalRelation(collisionExists); - if (result == null) result = caseRelation(collisionExists); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.COLLISION_DOES_NOT_EXIST: { - CollisionDoesNotExist collisionDoesNotExist = (CollisionDoesNotExist)theEObject; - T result = caseCollisionDoesNotExist(collisionDoesNotExist); - if (result == null) result = caseTemporalRelation(collisionDoesNotExist); - if (result == null) result = caseRelation(collisionDoesNotExist); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.PEDESTRIAN: { - Pedestrian pedestrian = (Pedestrian)theEObject; - T result = casePedestrian(pedestrian); - if (result == null) result = caseActor(pedestrian); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.VEHICLE: { - Vehicle vehicle = (Vehicle)theEObject; - T result = caseVehicle(vehicle); - if (result == null) result = caseActor(vehicle); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.LANE_HORIZONTAL: { - Lane_Horizontal lane_Horizontal = (Lane_Horizontal)theEObject; - T result = caseLane_Horizontal(lane_Horizontal); - if (result == null) result = caseLane(lane_Horizontal); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CrossingScenarioPackage.LANE_VERTICAL: { - Lane_Vertical lane_Vertical = (Lane_Vertical)theEObject; - T result = caseLane_Vertical(lane_Vertical); - if (result == null) result = caseLane(lane_Vertical); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Crossing Scenario'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Crossing Scenario'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCrossingScenario(CrossingScenario object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Lane'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Lane'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLane(Lane object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Actor'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Actor'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseActor(Actor object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Relation'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Relation'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseRelation(Relation object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Spatial Relation'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Spatial Relation'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSpatialRelation(SpatialRelation object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Temporal Relation'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Temporal Relation'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTemporalRelation(TemporalRelation object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Vision Blocked'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Vision Blocked'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseVisionBlocked(VisionBlocked object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Separation Distance'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Separation Distance'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSeparationDistance(SeparationDistance object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Collision Exists'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Collision Exists'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCollisionExists(CollisionExists object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Collision Does Not Exist'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Collision Does Not Exist'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCollisionDoesNotExist(CollisionDoesNotExist object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Pedestrian'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Pedestrian'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePedestrian(Pedestrian object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Vehicle'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Vehicle'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseVehicle(Vehicle object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Lane Horizontal'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Lane Horizontal'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLane_Horizontal(Lane_Horizontal object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Lane Vertical'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Lane Vertical'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLane_Vertical(Lane_Vertical object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //CrossingScenarioSwitch +/** + */ +package crossingScenario.util; + +import crossingScenario.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see crossingScenario.CrossingScenarioPackage + * @generated + */ +public class CrossingScenarioSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CrossingScenarioPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CrossingScenarioSwitch() { + if (modelPackage == null) { + modelPackage = CrossingScenarioPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CrossingScenarioPackage.CROSSING_SCENARIO: { + CrossingScenario crossingScenario = (CrossingScenario)theEObject; + T result = caseCrossingScenario(crossingScenario); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.LANE: { + Lane lane = (Lane)theEObject; + T result = caseLane(lane); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.ACTOR: { + Actor actor = (Actor)theEObject; + T result = caseActor(actor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.RELATION: { + Relation relation = (Relation)theEObject; + T result = caseRelation(relation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.SPATIAL_RELATION: { + SpatialRelation spatialRelation = (SpatialRelation)theEObject; + T result = caseSpatialRelation(spatialRelation); + if (result == null) result = caseRelation(spatialRelation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.TEMPORAL_RELATION: { + TemporalRelation temporalRelation = (TemporalRelation)theEObject; + T result = caseTemporalRelation(temporalRelation); + if (result == null) result = caseRelation(temporalRelation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.VISION_BLOCKED: { + VisionBlocked visionBlocked = (VisionBlocked)theEObject; + T result = caseVisionBlocked(visionBlocked); + if (result == null) result = caseSpatialRelation(visionBlocked); + if (result == null) result = caseRelation(visionBlocked); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.COLLISION_EXISTS: { + CollisionExists collisionExists = (CollisionExists)theEObject; + T result = caseCollisionExists(collisionExists); + if (result == null) result = caseTemporalRelation(collisionExists); + if (result == null) result = caseRelation(collisionExists); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.PEDESTRIAN: { + Pedestrian pedestrian = (Pedestrian)theEObject; + T result = casePedestrian(pedestrian); + if (result == null) result = caseActor(pedestrian); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.VEHICLE: { + Vehicle vehicle = (Vehicle)theEObject; + T result = caseVehicle(vehicle); + if (result == null) result = caseActor(vehicle); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.LANE_HORIZONTAL: { + Lane_Horizontal lane_Horizontal = (Lane_Horizontal)theEObject; + T result = caseLane_Horizontal(lane_Horizontal); + if (result == null) result = caseLane(lane_Horizontal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CrossingScenarioPackage.LANE_VERTICAL: { + Lane_Vertical lane_Vertical = (Lane_Vertical)theEObject; + T result = caseLane_Vertical(lane_Vertical); + if (result == null) result = caseLane(lane_Vertical); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Crossing Scenario'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Crossing Scenario'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCrossingScenario(CrossingScenario object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Lane'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Lane'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLane(Lane object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Actor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Actor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseActor(Actor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Relation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Relation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRelation(Relation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Spatial Relation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Spatial Relation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSpatialRelation(SpatialRelation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Temporal Relation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Temporal Relation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTemporalRelation(TemporalRelation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Vision Blocked'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Vision Blocked'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVisionBlocked(VisionBlocked object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Collision Exists'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Collision Exists'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollisionExists(CollisionExists object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Pedestrian'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Pedestrian'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePedestrian(Pedestrian object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Vehicle'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Vehicle'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVehicle(Vehicle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Lane Horizontal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Lane Horizontal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLane_Horizontal(Lane_Horizontal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Lane Vertical'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Lane Vertical'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLane_Vertical(Lane_Vertical object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CrossingScenarioSwitch diff --git a/Domains/crossingScenario/inputs/cSinit4x4.xmi b/Domains/crossingScenario/inputs/cSinit4x4.xmi index 24c29774..d0dc5705 100644 --- a/Domains/crossingScenario/inputs/cSinit4x4.xmi +++ b/Domains/crossingScenario/inputs/cSinit4x4.xmi @@ -10,6 +10,8 @@ maxTime="60.0" maxXSpeed="100.0" maxYSpeed="100.0"> + + @@ -24,9 +26,13 @@ referenceCoord="10.0"/> - + diff --git a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig index 1d47952d..7d329d18 100644 --- a/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig +++ b/Domains/crossingScenario/inputs/crossingScenarioGen.vsconfig @@ -8,7 +8,7 @@ generate { partial-model = { "inputs/cSinit4x4.xmi"} solver = ViatraSolver scope = { - #node += 2..* + #node += 0..* ,# += 0 //,# = 25..* ,# += 0 @@ -23,7 +23,20 @@ generate { log-level = none, "numeric-solver" = "dreal-local", "dreal-local-path" = "/home/models/dreal4/bazel-bin/dreal/dreal", - "ignored-attributes" = "CollisionExists.collisionTime=*", + "ignored-attributes" = " + Pedestrian.xPos=*, + Pedestrian.yPos=*, + Pedestrian.length=*, + Pedestrian.width=*, + Pedestrian.xSpeed=*, + Pedestrian.ySpeed=*, + Vehicle.xPos=*, + Vehicle.yPos=*, + Vehicle.length=*, + Vehicle.width=*, + Vehicle.xSpeed=*, + Vehicle.ySpeed=*, + CollisionExists.collisionTime=*", "scopePropagator" = "polyhedral"} runs = 1 diff --git a/Domains/crossingScenario/model/crossingScenario.aird b/Domains/crossingScenario/model/crossingScenario.aird index d4aa8c13..9e8a8708 100644 --- a/Domains/crossingScenario/model/crossingScenario.aird +++ b/Domains/crossingScenario/model/crossingScenario.aird @@ -5,7 +5,7 @@ crossingScenario.genmodel - + @@ -172,19 +172,6 @@ - - - - - - - - - - - - - @@ -198,36 +185,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -321,21 +278,6 @@ - - -
- - - - - - - - - - - - @@ -399,6 +341,51 @@ + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + @@ -512,22 +499,6 @@ - - - - - - - - - - - - - - - - @@ -544,22 +515,6 @@ - - - - - - - - - - - - - - - - @@ -648,14 +603,6 @@ - - - - - - - - @@ -792,6 +739,22 @@ + + + + + + + + + + + + + + + + @@ -937,7 +900,7 @@ - + KEEP_LOCATION @@ -949,7 +912,7 @@ - + KEEP_LOCATION @@ -972,25 +935,6 @@ - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - @@ -1010,52 +954,6 @@ - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1168,18 +1066,6 @@ - - - - - - - italic - - - - - @@ -1192,18 +1078,6 @@ - - - - - - - italic - - - - - diff --git a/Domains/crossingScenario/model/crossingScenario.ecore b/Domains/crossingScenario/model/crossingScenario.ecore index 05dba008..22a9714b 100644 --- a/Domains/crossingScenario/model/crossingScenario.ecore +++ b/Domains/crossingScenario/model/crossingScenario.ecore @@ -54,20 +54,10 @@ - - - - - - - - - diff --git a/Domains/crossingScenario/model/crossingScenario.genmodel b/Domains/crossingScenario/model/crossingScenario.genmodel index 51923418..e216652d 100644 --- a/Domains/crossingScenario/model/crossingScenario.genmodel +++ b/Domains/crossingScenario/model/crossingScenario.genmodel @@ -6,11 +6,6 @@ operationReflection="true" importOrganizing="true"> crossingScenario.ecore - - - - - @@ -46,13 +41,9 @@ - - - - diff --git a/Domains/crossingScenario/queries/crossingScenarioQueries.vql b/Domains/crossingScenario/queries/crossingScenarioQueries.vql index c009e031..a26782ae 100644 --- a/Domains/crossingScenario/queries/crossingScenarioQueries.vql +++ b/Domains/crossingScenario/queries/crossingScenarioQueries.vql @@ -3,180 +3,6 @@ package queries import "http://www.example.com/crossingScenario" import "http://www.eclipse.org/emf/2002/Ecore" -//////Minimal Failing Example -//@Constraint(severity = "error", key = {l}, message = "this defines the placedOn relation") -//pattern patterThatOnlyWorksWithInt(l : Lane) { -// Lane.referenceCoord(l, w); -// check(w <= 0-10.0); -//} - -////////////// -//CrossingScenario -///////////// - -/* -//TODO Hard-code xSize? -//TODO Hard-code ySize? - -//TODO Hard-code maxTime? -@Constraint(severity="error", key={l}, message="3 CrossingScenari") -pattern define_cs_maxTime(cs:CrossingScenario) { - CrossingScenario.maxTime(cs, mt); - check(mt != 60.0); -} -*/ - -///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -//Lane -///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -/* - -////<<<>>> -////Width: Different Lanes -//@Constraint(severity="error", key={l}, message="1 Lane") -//pattern define_numWidth_small(l : Lane) { -// Lane.width(l, Size::S_Small); -// Lane.numWidth(l, nw); -// check(nw <= 5.0); -//} or { -// Lane.width(l, Size::S_Small); -// Lane.numWidth(l, nw); -// check(nw >= 10.0); -//} -// -//@Constraint(severity="error", key={l}, message="2 Lane") -//pattern define_numWidth_medium(l : Lane) { -// Lane.width(l, ::S_Med); -// Lane.numWidth(l, nw); -// check(nw <= 10.0); -//} -//or { -// Lane.width(l, Size::S_Med); -// Lane.numWidth(l, nw); -// check(nw >= 15.0); -//} -// -//@Constraint(severity="error", key={l}, message="3 Lane") -//pattern define_numWidth_large(l : Lane) { -// Lane.width(l, Size::S_Large); -// Lane.numWidth(l, nw); -// check(nw <= 15.0); -//} -//or { -// Lane.width(l, Size::S_Large); -// Lane.numWidth(l, nw); -// check(nw >= 20.0); -//} - -//<<<>>> -//Width is FIXED: always 5 - -/////////////Prevlane - -////<<<>>> -////Generating 2 linkedlists (1 for horizontal, 1 for vertical lanes) -//////////head lanes do not have prevLane -//@Constraint(severity="error", key={l}, message="6.1 Lane") -//pattern define_prevLane_headVertLaneDoesNotHavePrevLane(cs:CrossingScenario, l:Lane_Vertical) { -// CrossingScenario.vertical_head(cs, l); -// Lane.prevLane(l, _); -//} -// -//@Constraint(severity="error", key={l}, message="6.2 Lane") -//pattern define_prevLane_headHoriLaneDoesNotHavePrevLane(cs:CrossingScenario, l:Lane_Horizontal) { -// CrossingScenario.horizontal_head(cs, l); -// Lane.prevLane(l, _); -//} -// -//////////Non-head lanes must have prevLane -//@Constraint(severity="error", key={l}, message="6.1 Lane") -//pattern define_prevLane_nonheadVertLaneHasPrevLane(l:Lane_Vertical) { -// neg find find_headVertLane(l); -// neg find find_laneWithPrevLane(l); -//} -// -//@Constraint(severity="error", key={l}, message="6.1 Lane") -//pattern define_prevLane_nonheadHoriLaneHasPrevLane(l:Lane_Horizontal) { -// neg find find_headHoriLane(l); -// neg find find_laneWithPrevLane(l); -//} -// -//private pattern find_headVertLane(l:Lane_Vertical) { -// CrossingScenario.vertical_head(_, l); -//} -//private pattern find_headHoriLane(l:Lane_Horizontal) { -// CrossingScenario.horizontal_head(_, l); -//} -//private pattern find_laneWithPrevLane(l:Lane) { -// Lane.prevLane(l, _); -//} -// -///////////Lane cannot be its own recursive prevLane -//@Constraint(severity="error", key={l}, message="6.1 Lane") -//pattern define_prevLane_lanecannotBeItsOwnPrevLane(l:Lane) { -// Lane.prevLane(l, l); -//} -// -//@Constraint(severity="error", key={l}, message="6.2 Lane") -//pattern define_prevLane_lanecannotBeItsOwnRecursivePrevLane(l:Lane) { -// find find_prevLane+(l, l); -//} -//private pattern find_prevLane(l1:Lane, l2:Lane) { -// Lane.prevLane(l1, l2); -//} -// -////////Lane cannot be prevLane of >1 other lane -//@Constraint(severity="error", key={l1, l2}, message="7 Lane") -//pattern define_prevLane_lanecannotbeprevLaneof2lanes(l1:Lane, l2:Lane) { -// Lane.prevLane(l1, l); -// Lane.prevLane(l2, l); -// l1 != l2; -//} -// -////////consecutive lanes must have same orientation -//@Constraint(severity="error", key={l1, l2}, message="8 Lane") -//pattern define_prevLane_consecutiveLanesMustHaveSameOrientation1(l1:Lane_Horizontal, l2:Lane_Vertical) { -// Lane.prevLane(l1, l2); -//} -// -//@Constraint(severity="error", key={l1, l2}, message="8 Lane") -//pattern define_prevLane_consecutiveLanesMustHaveSameOrientation2(l1:Lane_Vertical, l2:Lane_Horizontal) { -// Lane.prevLane(l1, l2); -//} -// -///////////////ReferenceCoord -// -///////refCoord of head lanes must be 0 -//@Constraint(severity="error", key={l}, message="6.2 Lane") -//pattern define_prevLane_headHoriLaneHas0RefCoord(cs:CrossingScenario, l:Lane_Horizontal) { -// CrossingScenario.horizontal_head(cs, l); -// Lane.referenceCoord(l, rc); -// check(rc != 0.0); -//} -// -//@Constraint(severity="error", key={l}, message="6.2 Lane") -//pattern define_prevLane_headVertLaneHas0RefCoord(cs:CrossingScenario, l:Lane_Vertical) { -// CrossingScenario.vertical_head(cs, l); -// Lane.referenceCoord(l, rc); -// check(rc != 0.0); -//} -// -////////refCoord of a lane is prevLane.rc + curLane.numWidth -// -//@Constraint(severity="error", key={l}, message="6.2 Lane") -//pattern define_referenceCoord_laneWithPrevHasCorrectRefCoord(l:Lane) { -// Lane.prevLane(l, prev); -// Lane.referenceCoord(l, rcCur); -// -// Lane.numWidth(prev, wPrev); -// Lane.referenceCoord(prev, rcPrev); -// check(rcCur != rcPrev + wPrev); -//} - -//<<<>>> -//Lanes are all predefind -*/ - ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// //Lane+Actor ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// @@ -430,12 +256,12 @@ private pattern helper_actorsAreFar(a1: Actor, a2: Actor) { //Relation ///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -@Constraint(severity="error", key={a1, a2}, message="1 Relation") -pattern define_relation_noSelfRelation(a1:Actor, a2:Actor) { - Relation.source(r, a1); - Relation.target(r, a2); - a1 == a2; -} +//@Constraint(severity="error", key={a1, a2}, message="1 Relation") +//pattern define_relation_noSelfRelation(a1:Actor, a2:Actor) { +// Relation.source(r, a1); +// Relation.target(r, a2); +// a1 == a2; +//} //TODO do above but transitively?/ //////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// @@ -462,7 +288,7 @@ pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { Lane_Horizontal(hl2); } -//<> +//<> //// //VS VisionBlocked @@ -470,6 +296,36 @@ pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { //TODO Very prone to corner cases /* @Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlockedX1(a1:Actor) { + VisionBlocked.blockedBy(_, a1); + CollisionExists.target(_, a1); +} +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlockedX2(a1:Actor) { + VisionBlocked.blockedBy(_, a1); + CollisionExists.source(_, a1); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlocked1(a1:Actor) { + VisionBlocked.source(_, a1); + neg find helper_source(a1); +} +private pattern helper_source(a1:Actor) { + CollisionExists.source(_, a1); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlocked2(a1:Actor) { + VisionBlocked.target(_, a1); + neg find helper_target(a1); +} +private pattern helper_target(a1:Actor) { + CollisionExists.target(_, a1); +} +*/ +/* +@Constraint(severity="error", key={a1}, message="x") pattern collisionExists_vsVisionBlocked(a1:Actor) { VisionBlocked.source(vb, a1); VisionBlocked.target(vb, a2); @@ -610,7 +466,7 @@ pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor) { //<> -@Constraint(severity="error", key={a1, a2}, message="x") +@Constraint(severity="error", key={a1, a2}, message="on 3 different lanes") pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { VisionBlocked.source(vb, a1); VisionBlocked.target(vb, a2); @@ -628,7 +484,7 @@ pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { Actor.placedOn(a2, l); } -@Constraint(severity="error", key={a1, a2}, message="x") +@Constraint(severity="error", key={a1, a2}, message="on lanes with different orientation") pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) { VisionBlocked.source(ce, a1); VisionBlocked.target(ce, a2); @@ -734,6 +590,7 @@ pattern visionBlocked_xdistBSlargerThanxdistTS(a1:Actor, a2:Actor, vb:VisionBloc //check(slope of a1-to-BlockerBottom > slope of a1-to-a2) //TODO implement ABSOLUTE VALUE or MULTI-CHECK + //TODO do pythagoras check((x1-xBlocker)*(x1-xBlocker) > (x1-x2)*(x1-x2)); } @@ -752,110 +609,10 @@ pattern visionBlocked_xdistBTlargerThanxdistST(a1:Actor, a2:Actor, vb:VisionBloc //check(slope of a1-to-BlockerBottom > slope of a1-to-a2) //TODO implement ABSOLUTE VALUE or MULTI-CHECK + //TODO do pythagoras check((x1-xBlocker)*(x1-xBlocker) > (x1-x2)*(x1-x2)); } //TODO same as above for Y??? //TODO same as above for Y ???? -/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -//SeparationDistance -/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -/* -private pattern helper_getSeperateActorsCoords(a1:Actor, - a2: Actor, sd:SeparationDistance, - x1:java Double, x2:java Double, y1:java Double, y2:java Double) { - SeperationDistance.source(sd, a1); - SeparationDistance.target(sd, a2); - - find helper_getCoords(a1, a2, x1, x2, y1, y2); -} - -@Constraint(severity="error", key={a1, sd}, message="x") -pattern SeparationDistance_near_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); - SeparationDistance.distance(sd, Distance::D_Near); - - //check(dx^2 + dy^2 < 5^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 5*5); -} - -@Constraint(severity="error", key={a1, sd}, message="x") -pattern SeparationDistance_near_ub(a1:Actor, a2:Actor, sd:SeparationDistance) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); - SeparationDistance.distance(sd, Distance::D_Near); - - //check(dx^2 + dy^2 > 10^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 10*10); -} - -@Constraint(severity="error", key={a1, sd}, message="x") -pattern SeparationDistance_medium_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); - SeparationDistance.distance(sd, Distance::D_Med); - - //check(dx^2 + dy^2 < 10^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 10*10); -} - -@Constraint(severity="error", key={a1, sd}, message="x") -pattern SeparationDistance_medium_ub(a1:Actor, a2:Actor, sd:SeparationDistance) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); - SeparationDistance.distance(sd, Distance::D_Med); - - //check(dx^2 + dy^2 > 1^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 15*15); -} - -@Constraint(severity="error", key={a1, sd}, message="x") -pattern SeparationDistance_far_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); - SeparationDistance.distance(sd, Distance::D_Far); - - //check(dx^2 + dy^2 < 15^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); -} -*/ - -/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -//CollisionDoesNotExist -/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// -/* -//TODO -@Constraint(severity="error", key={a1, cdne}, message="x") -pattern collisionDoesNotExist(a1:Actor, a2:Actor, ss:CrossingScenario, cdne:CollisionDoesNotExist) { - //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 - - CrossingScenario.actors(ss, a1); - CrossingScenario.actors(ss, a2); - Actor.relations(a1, cdne); - CollisionDoesNotExist.target(cdne, a2); - CrossingScenario.maxTime(ss, maxTime); - - Actor.width(a1, w1); - Actor.length(a1, l1); - Actor.xPos(a1, xPos1); - Actor.yPos(a1, yPos1); - Actor.xSpeed(a1, xSpeed1); - Actor.ySpeed(a1, ySpeed1); - - Actor.width(a2, w2); - Actor.length(a2, l2); - Actor.xPos(a2, xPos2); - Actor.yPos(a2, yPos2); - Actor.xSpeed(a2, xSpeed2); - Actor.ySpeed(a2, ySpeed2); - //check(dx^2 + dy^2 < 15^2) - check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); -} -*/ \ No newline at end of file diff --git a/Domains/crossingScenario/queries/moreCompleteQueries2._v_q_l b/Domains/crossingScenario/queries/moreCompleteQueries2._v_q_l new file mode 100644 index 00000000..51e1bf00 --- /dev/null +++ b/Domains/crossingScenario/queries/moreCompleteQueries2._v_q_l @@ -0,0 +1,891 @@ +package queries + +import "http://www.example.com/crossingScenario" +import "http://www.eclipse.org/emf/2002/Ecore" + +//////Minimal Failing Example +//@Constraint(severity = "error", key = {l}, message = "this defines the placedOn relation") +//pattern patterThatOnlyWorksWithInt(l : Lane) { +// Lane.referenceCoord(l, w); +// check(w <= 0-10.0); +//} + +////////////// +//CrossingScenario +///////////// + +/* +//TODO Hard-code xSize? +//TODO Hard-code ySize? + +//TODO Hard-code maxTime? +@Constraint(severity="error", key={l}, message="3 CrossingScenari") +pattern define_cs_maxTime(cs:CrossingScenario) { + CrossingScenario.maxTime(cs, mt); + check(mt != 60.0); +} +*/ + +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//Lane +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +/* + +////<<<>>> +////Width: Different Lanes +//@Constraint(severity="error", key={l}, message="1 Lane") +//pattern define_numWidth_small(l : Lane) { +// Lane.width(l, Size::S_Small); +// Lane.numWidth(l, nw); +// check(nw <= 5.0); +//} or { +// Lane.width(l, Size::S_Small); +// Lane.numWidth(l, nw); +// check(nw >= 10.0); +//} +// +//@Constraint(severity="error", key={l}, message="2 Lane") +//pattern define_numWidth_medium(l : Lane) { +// Lane.width(l, ::S_Med); +// Lane.numWidth(l, nw); +// check(nw <= 10.0); +//} +//or { +// Lane.width(l, Size::S_Med); +// Lane.numWidth(l, nw); +// check(nw >= 15.0); +//} +// +//@Constraint(severity="error", key={l}, message="3 Lane") +//pattern define_numWidth_large(l : Lane) { +// Lane.width(l, Size::S_Large); +// Lane.numWidth(l, nw); +// check(nw <= 15.0); +//} +//or { +// Lane.width(l, Size::S_Large); +// Lane.numWidth(l, nw); +// check(nw >= 20.0); +//} + +//<<<>>> +//Width is FIXED: always 5 + +/////////////Prevlane + +////<<<>>> +////Generating 2 linkedlists (1 for horizontal, 1 for vertical lanes) +//////////head lanes do not have prevLane +//@Constraint(severity="error", key={l}, message="6.1 Lane") +//pattern define_prevLane_headVertLaneDoesNotHavePrevLane(cs:CrossingScenario, l:Lane_Vertical) { +// CrossingScenario.vertical_head(cs, l); +// Lane.prevLane(l, _); +//} +// +//@Constraint(severity="error", key={l}, message="6.2 Lane") +//pattern define_prevLane_headHoriLaneDoesNotHavePrevLane(cs:CrossingScenario, l:Lane_Horizontal) { +// CrossingScenario.horizontal_head(cs, l); +// Lane.prevLane(l, _); +//} +// +//////////Non-head lanes must have prevLane +//@Constraint(severity="error", key={l}, message="6.1 Lane") +//pattern define_prevLane_nonheadVertLaneHasPrevLane(l:Lane_Vertical) { +// neg find find_headVertLane(l); +// neg find find_laneWithPrevLane(l); +//} +// +//@Constraint(severity="error", key={l}, message="6.1 Lane") +//pattern define_prevLane_nonheadHoriLaneHasPrevLane(l:Lane_Horizontal) { +// neg find find_headHoriLane(l); +// neg find find_laneWithPrevLane(l); +//} +// +//private pattern find_headVertLane(l:Lane_Vertical) { +// CrossingScenario.vertical_head(_, l); +//} +//private pattern find_headHoriLane(l:Lane_Horizontal) { +// CrossingScenario.horizontal_head(_, l); +//} +//private pattern find_laneWithPrevLane(l:Lane) { +// Lane.prevLane(l, _); +//} +// +///////////Lane cannot be its own recursive prevLane +//@Constraint(severity="error", key={l}, message="6.1 Lane") +//pattern define_prevLane_lanecannotBeItsOwnPrevLane(l:Lane) { +// Lane.prevLane(l, l); +//} +// +//@Constraint(severity="error", key={l}, message="6.2 Lane") +//pattern define_prevLane_lanecannotBeItsOwnRecursivePrevLane(l:Lane) { +// find find_prevLane+(l, l); +//} +//private pattern find_prevLane(l1:Lane, l2:Lane) { +// Lane.prevLane(l1, l2); +//} +// +////////Lane cannot be prevLane of >1 other lane +//@Constraint(severity="error", key={l1, l2}, message="7 Lane") +//pattern define_prevLane_lanecannotbeprevLaneof2lanes(l1:Lane, l2:Lane) { +// Lane.prevLane(l1, l); +// Lane.prevLane(l2, l); +// l1 != l2; +//} +// +////////consecutive lanes must have same orientation +//@Constraint(severity="error", key={l1, l2}, message="8 Lane") +//pattern define_prevLane_consecutiveLanesMustHaveSameOrientation1(l1:Lane_Horizontal, l2:Lane_Vertical) { +// Lane.prevLane(l1, l2); +//} +// +//@Constraint(severity="error", key={l1, l2}, message="8 Lane") +//pattern define_prevLane_consecutiveLanesMustHaveSameOrientation2(l1:Lane_Vertical, l2:Lane_Horizontal) { +// Lane.prevLane(l1, l2); +//} +// +///////////////ReferenceCoord +// +///////refCoord of head lanes must be 0 +//@Constraint(severity="error", key={l}, message="6.2 Lane") +//pattern define_prevLane_headHoriLaneHas0RefCoord(cs:CrossingScenario, l:Lane_Horizontal) { +// CrossingScenario.horizontal_head(cs, l); +// Lane.referenceCoord(l, rc); +// check(rc != 0.0); +//} +// +//@Constraint(severity="error", key={l}, message="6.2 Lane") +//pattern define_prevLane_headVertLaneHas0RefCoord(cs:CrossingScenario, l:Lane_Vertical) { +// CrossingScenario.vertical_head(cs, l); +// Lane.referenceCoord(l, rc); +// check(rc != 0.0); +//} +// +////////refCoord of a lane is prevLane.rc + curLane.numWidth +// +//@Constraint(severity="error", key={l}, message="6.2 Lane") +//pattern define_referenceCoord_laneWithPrevHasCorrectRefCoord(l:Lane) { +// Lane.prevLane(l, prev); +// Lane.referenceCoord(l, rcCur); +// +// Lane.numWidth(prev, wPrev); +// Lane.referenceCoord(prev, rcPrev); +// check(rcCur != rcPrev + wPrev); +//} + +//<<<>>> +//Lanes are all predefind +*/ + +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//Lane+Actor +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// + +/////////Actor (a) on vertical lane (l) must have a.xPos=[l.rc, l.rc + l.nw] +@Constraint(severity = "error", key = {a}, message = "this defines the placedOn relation for vertical lanes") +pattern define_placedOn_actorOnVerticalLane(a : Actor, vl:Lane_Vertical) { + Actor.placedOn(a, vl); + Actor.xPos(a, x); + Lane.referenceCoord(vl, r); + check(x <= r); +} or { + Actor.placedOn(a, vl); + Actor.xPos(a, x); + Lane.referenceCoord(vl, r); +// //<<<>>> +// Lane.numWidth(vl, w); +// check(x >= (r + w)); + + //<<<>>>: lanes all have width=5 + check(x >= (r + 5.0)); +} + +@Constraint(severity = "error", key = {a}, message = "this defines the placedOn relation for vertical lanes") +pattern define_placedOn_actorOnHorizLane(a : Actor, hl:Lane_Horizontal) { + Actor.placedOn(a, hl); + Actor.yPos(a, y); + Lane.referenceCoord(hl, r); + check(y <= r); +} or { + Actor.placedOn(a, hl); + Actor.yPos(a, y); + Lane.referenceCoord(hl, r); +// //<> +// Lane.numWidth(hl, w); +// check(y >= (r + w)); + + //<> + check(y >= (r + 5.0)); + +} + +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//Actor +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// + +/////---------------- +//Xpos and Ypos Bounds +/////---------------- + +private pattern helper_horiz_getXAndBounds(cs:CrossingScenario, a:Actor, + xMax:java Double, xP:java Double) { + Actor.placedOn(a, hl); + Lane_Horizontal(hl); + CrossingScenario.actors(cs, a); + CrossingScenario.xSize(cs, xMax); + Actor.xPos(a, xP); +} + +private pattern helper_vert_getYAndBounds(cs:CrossingScenario, a:Actor, + yMax:java Double, yP:java Double) { + Actor.placedOn(a, vl); + Lane_Vertical(vl); + CrossingScenario.actors(cs, a); + CrossingScenario.ySize(cs, yMax); + Actor.yPos(a, yP); +} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_maxXp(cs:CrossingScenario, a:Actor) { + find helper_horiz_getXAndBounds(cs, a, xMax, xP); + check(xP >= xMax);} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_minXp(cs:CrossingScenario, a:Actor) { + find helper_horiz_getXAndBounds(cs, a, xMax, xP); + check(xP <= 0-xMax);} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_maxYp(cs:CrossingScenario, a:Actor) { + find helper_vert_getYAndBounds(cs, a, yMax, yP); + check(yP >= yMax);} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_minYp(cs:CrossingScenario, a:Actor) { + find helper_vert_getYAndBounds(cs, a, yMax, yP); + check(yP <= 0-yMax);} + +/////---------------- +//Xspeed and Yspeed bounds +/////---------------- + +//TODO THIS IS HARD_CODED + +/////////VERTICAL LANE +@Constraint(severity="error", key={a}, message="7 Actor") +pattern define_actor_actorOnVertLaneHasxSpeed0(a:Actor) { + Actor.placedOn(a, vl); + Lane_Vertical(vl); + Actor.xSpeed(a, xSpeed); + check(xSpeed != 0); +} + +private pattern helper_vert_getYSpeedAndBounds(cs:CrossingScenario, a:Actor, + ySpeedMax:java Double, ySpeed:java Double) { + Actor.placedOn(a, vl); + Lane_Vertical(vl); + CrossingScenario.actors(cs, a); + CrossingScenario.maxYSpeed(cs, ySpeedMax); + Actor.ySpeed(a, ySpeed); +} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_actorOnVertLaneMinYs(cs:CrossingScenario, a:Actor) { + find helper_vert_getYSpeedAndBounds(cs, a, ySMax, yS); + check(yS <= 0-ySMax); +} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_actorOnVertLaneMaxYs(cs:CrossingScenario, a:Actor) { + find helper_vert_getYSpeedAndBounds(cs, a, ySMax, yS); + check(yS >= ySMax); +} + +/////////HORIZONTAL LANE +@Constraint(severity="error", key={a}, message="7 Actor") +pattern define_actor_actorOnHorizLaneHasySpeed0(a:Actor) { + Actor.placedOn(a, hl); + Lane_Horizontal(hl); + Actor.ySpeed(a, ySpeed); + check(ySpeed != 0); +} + +private pattern helper_horiz_getXSpeedAndBounds(cs:CrossingScenario, a:Actor, + xSpeedMax:java Double, xSpeed:java Double) { + Actor.placedOn(a, hl); + Lane_Horizontal(hl); + CrossingScenario.actors(cs, a); + CrossingScenario.maxXSpeed(cs, xSpeedMax); + Actor.xSpeed(a, xSpeed); +} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_actorOnHorizLaneMinXs(cs:CrossingScenario, a:Actor) { + find helper_horiz_getXSpeedAndBounds(cs, a, xSMax, xS); + check(xS <= 0-xSMax); +} + +@Constraint(severity="error", key={cs}, message="x") +pattern define_actor_actorOnHorizLaneMaxXs(cs:CrossingScenario, a:Actor) { + find helper_horiz_getXSpeedAndBounds(cs, a, xSMax, xS); + check(xS >= xSMax); +} + +/////---------------- +/////WIDTH and LENGTH +/////---------------- + +///////pedestrian-width (3) +@Constraint(severity="error", key={p}, message="3 Actor") +pattern define_actor_pedestrianWidth(p:Pedestrian) { + Pedestrian.width(p, w); + check(w != 1.0); +} + +/////////pedestrian-width (4) +@Constraint(severity="error", key={p}, message="4 Actor") +pattern define_actor_pedestrianLength(p:Pedestrian) { + Pedestrian.length(p, l); + check(l != 1.0); +} + +/////////actor-width (5) +@Constraint(severity="error", key={v}, message="5 Actor") +pattern define_actor_vehicleWidth(v:Vehicle) { + Vehicle.placedOn(v, lane); + Lane_Vertical(lane); + Vehicle.width(v, w); + check(w != 1.0); +} or { + Vehicle.placedOn(v, lane); + Lane_Horizontal(lane); + Vehicle.width(v, w); + check(w != 3.0); +} + +/////////actor-width (6) +@Constraint(severity="error", key={v}, message="6 Actor") +pattern define_actor_vehicleLength(v:Vehicle) { + Vehicle.placedOn(v, lane); + Lane_Vertical(lane); + Vehicle.length(v, l); + check(l != 3.0); +} or { + Vehicle.placedOn(v, lane); + Lane_Horizontal(lane); + Vehicle.length(v, l); + check(l != 1.0); +} + +/////---------------- +/////DERIVED FEATURES +/////---------------- + +private pattern helper_getCoords(a1:Actor, + a2: Actor, x1:java Double, x2:java Double, y1:java Double, y2:java Double) { + Actor.xPos(a1, x1); + Actor.yPos(a1, y1); + Actor.xPos(a2, x2); + Actor.yPos(a2, y2); +} + +@QueryBasedFeature +pattern dist_near(a1: Actor, a2: Actor) { + find helper_actorsAreNear(a1, a2); + Actor.dist_near(a1, a2); +} + +private pattern helper_actorsAreNear(a1: Actor, a2: Actor) { + find helper_getCoords(a1, a2, x1, x2, y1, y2); + //check(dx^2 + dy^2 < 10^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 10*10); +} + +@QueryBasedFeature +pattern dist_med(a1: Actor, a2: Actor) { + find helper_actorsAreMed(a1, a2); + Actor.dist_med(a1, a2); +} + +private pattern helper_actorsAreMed(a1: Actor, a2: Actor) { + find helper_getCoords(a1, a2, x1, x2, y1, y2); + //check(10^2 < dx^2 + dy^2 < 15^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 10*10); + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); +} + +@QueryBasedFeature +pattern dist_far(a1: Actor, a2: Actor) { + find helper_actorsAreFar(a1, a2); + Actor.dist_far(a1, a2); +} + +private pattern helper_actorsAreFar(a1: Actor, a2: Actor) { + find helper_getCoords(a1, a2, x1, x2, y1, y2); + //check(dx^2 + dy^2 > 20^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 20*20); +} + +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//Relation +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// + +@Constraint(severity="error", key={a1, a2}, message="1 Relation") +pattern define_relation_noSelfRelation(a1:Actor, a2:Actor) { + Relation.source(r, a1); + Relation.target(r, a2); + a1 == a2; +} + +//TODO do above but transitively?/ +//////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//CollisionExists +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// + + +//<> + +@Constraint(severity="error", key={a1, a2}, message="x") +pattern collisionExists_qualAbstr(a1:Actor, a2:Actor) { + CollisionExists.source(ce, a1); + CollisionExists.target(ce, a2); + Actor.placedOn(a1, vl1); + Lane_Vertical(vl1); + Actor.placedOn(a2, vl2); + Lane_Vertical(vl2); +} or { + CollisionExists.source(ce, a1); + CollisionExists.target(ce, a2); + Actor.placedOn(a1, hl1); + Lane_Horizontal(hl1); + Actor.placedOn(a2, hl2); + Lane_Horizontal(hl2); +} + +//<> + +//// +//VS VisionBlocked +//// +//TODO Very prone to corner cases +/* +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlockedX1(a1:Actor) { + VisionBlocked.blockedBy(_, a1); + CollisionExists.target(_, a1); +} +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlockedX2(a1:Actor) { + VisionBlocked.blockedBy(_, a1); + CollisionExists.source(_, a1); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlocked1(a1:Actor) { + VisionBlocked.source(_, a1); + neg find helper_source(a1); +} +private pattern helper_source(a1:Actor) { + CollisionExists.source(_, a1); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlocked2(a1:Actor) { + VisionBlocked.target(_, a1); + neg find helper_target(a1); +} +private pattern helper_target(a1:Actor) { + CollisionExists.target(_, a1); +} +*/ +/* +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_vsVisionBlocked(a1:Actor) { + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + CollisionExists.source(ce, a1); + CollisionExists.target(ce, a3); + a2 != a3; +} or { + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + CollisionExists.source(ce, a3); + CollisionExists.target(ce, a1); + a2 != a3; +} or { + VisionBlocked.source(vb, a2); + VisionBlocked.target(vb, a1); + CollisionExists.source(ce, a3); + CollisionExists.target(ce, a1); + a2 != a3; +} or { + VisionBlocked.source(vb, a2); + VisionBlocked.target(vb, a1); + CollisionExists.source(ce, a1); + CollisionExists.target(ce, a3); + a2 != a3; +} +*/ +//<> + +//// +//CollisionExists - Time +//// + + +@Constraint(severity="error", key={c}, message="x") +pattern collisionExists_timeWithinBound(ss:CrossingScenario, c:CollisionExists) { + CrossingScenario.relations(ss, c); + CrossingScenario.maxTime(ss, maxTime); + CollisionExists.collisionTime(c, cTime); + check(cTime >= maxTime);} + +@Constraint(severity="error", key={c}, message="x") +pattern collisionExists_timeNotNegative(c:CollisionExists) { + CollisionExists. collisionTime(c, cTime); + check(cTime <= 0.0);} + +//// +//CollisionExists - Physical Positioniung +//// + +private pattern helper_getCollExistsTime(a1:Actor, a2: Actor, cTime:java Double) { + CollisionExists.source(c, a1); + CollisionExists.target(c, a2); + CollisionExists. collisionTime(c, cTime); +} + +private pattern helper_getYCoords(a:Actor, l:java Double, + yPos:java Double, ySpeed:java Double) { + + Actor.length(a, l); + Actor.yPos(a, yPos); + Actor.ySpeed(a, ySpeed); +} + +private pattern helper_getAllYCoords(a1:Actor, a2: Actor, + l1:java Double, l2:java Double, yPos1:java Double, yPos2:java Double, + ySpeed1:java Double, ySpeed2:java Double) { + + CollisionExists.source(c, a1); + CollisionExists.target(c, a2); + find helper_getYCoords(a1, l1, yPos1, ySpeed1); + find helper_getYCoords(a2, l2, yPos2, ySpeed2); +} + +private pattern helper_getXCoords(a:Actor, l:java Double, + xPos:java Double, xSpeed:java Double) { + + Actor.length(a, l); + Actor.xPos(a, xPos); + Actor.xSpeed(a, xSpeed); +} + +private pattern helper_getAllXCoords(a1:Actor, a2: Actor, + w1:java Double, w2:java Double, xPos1:java Double, xPos2:java Double, + xSpeed1:java Double, xSpeed2:java Double) { + + CollisionExists.source(c, a1); + CollisionExists.target(c, a2); + find helper_getXCoords(a1, w1, xPos1, xSpeed1); + find helper_getXCoords(a2, w2, xPos2, xSpeed2); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_defineCollision_y1(a1:Actor, a2:Actor) { + + find helper_getCollExistsTime(a1, a2, cTime); + find helper_getAllYCoords(a1, a2, l1, l2, yPos1, yPos2, ySpeed1, ySpeed2); + + //check(y_1_bottom > y_2_top + check((yPos1 + (ySpeed1 * cTime)) - (l1/2) > (yPos2 + (ySpeed2 * cTime)) + (l2/2)); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_defineCollision_y2(a1:Actor, a2:Actor) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getCollExistsTime(a1, a2, cTime); + find helper_getAllYCoords(a1, a2, l1, l2, yPos1, yPos2, ySpeed1, ySpeed2); + + //check(y_1_top < y_2_bottom) + check((yPos1 + (ySpeed1 * cTime)) + (l1/2) < (yPos2 + (ySpeed2 * cTime)) - (l2/2)); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_defineCollision_x1(a1:Actor, a2:Actor) { + + find helper_getCollExistsTime(a1, a2, cTime); + find helper_getAllXCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2); + + //check(x_1_left > x_2_right) + check((xPos1 + (xSpeed1 * cTime)) - (w1/2) > (xPos2 + (xSpeed2 * cTime)) + (w2/2)); +} + +@Constraint(severity="error", key={a1}, message="x") +pattern collisionExists_defineCollision_x2(a1:Actor, a2:Actor) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getCollExistsTime(a1, a2, cTime); + find helper_getAllXCoords(a1, a2, w1, w2, xPos1, xPos2, xSpeed1, xSpeed2); + + //check(x_1_right < x_2_left) + check((xPos1 + (xSpeed1 * cTime)) + (w1/2) < (xPos2 + (xSpeed2 * cTime)) - (w2/2)); +} + + +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//VisionBlocked +///////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// + +//<> + +@Constraint(severity="error", key={a1, a2}, message="x") +pattern visionBlocked_qualAbstr(a1:Actor, a2:Actor) { + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + Actor.placedOn(a1, l); + Actor.placedOn(a2, l); +} or { + VisionBlocked.source(vb, a1); + VisionBlocked.blockedBy(vb, a2); + Actor.placedOn(a1, l); + Actor.placedOn(a2, l); +} or { + VisionBlocked.blockedBy(vb, a1); + VisionBlocked.target(vb, a2); + Actor.placedOn(a1, l); + Actor.placedOn(a2, l); +} + +@Constraint(severity="error", key={a1, a2}, message="x") +pattern visionBlocked_qualAbstr2(a1:Actor, a2:Actor) { + VisionBlocked.source(ce, a1); + VisionBlocked.target(ce, a2); + Actor.placedOn(a1, vl1); + Lane_Vertical(vl1); + Actor.placedOn(a2, vl2); + Lane_Vertical(vl2); +} or { + VisionBlocked.source(ce, a1); + VisionBlocked.target(ce, a2); + Actor.placedOn(a1, hl1); + Lane_Horizontal(hl1); + Actor.placedOn(a2, hl2); + Lane_Horizontal(hl2); +} + +//<> + +@Constraint(severity="error", key={a1, a2}, message="x") +pattern visionBlocked_invalidBlocker(a1:Actor, a2:Actor) { + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + VisionBlocked.blockedBy(vb, a2); +} or { + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + VisionBlocked.blockedBy(vb, a1); +} + +@Constraint(severity="error", key={a1, vb}, message="x") +pattern visionBlocked_ites_notOnSameVertLine(a1:Actor, a2:Actor, vb:VisionBlocked) { + //REQUIRED to avoid division by 0 in next 2 queries + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + + Actor.xPos(a1, x1); + Actor.xPos(a2, x2); + + //check(slope of a1-to-BlockerTop < slope of a1-to-a2) + check(x1 == x2); +} + +//TODO refactor? +@Constraint(severity="error", key={a1, vb}, message="x") +pattern visionBlocked_ites_top(a1:Actor, a2:Actor, vb:VisionBlocked) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + VisionBlocked.blockedBy(vb, aBlocker); + + Actor.xPos(a1, x1); + Actor.yPos(a1, y1); + Actor.xPos(a2, x2); + Actor.yPos(a2, y2); + Actor.xPos(aBlocker, xBlocker); + Actor.yPos(aBlocker, yBlocker); + Actor.length(aBlocker, lenBlocker); + Actor.width(aBlocker, widBlocker); + + //check(slope of a1-to-BlockerTop < slope of a1-to-a2) + check( + ( yBlocker - y1 + (if(xBlocker > x1){lenBlocker/2}else{0-lenBlocker/2})) / + ( xBlocker - x1 + (if(yBlocker > y1){0-widBlocker/2}else{widBlocker/2})) + < ((y1-y2)/(x1-x2))); +} + +//TODO refactor? +@Constraint(severity="error", key={a1, vb}, message="x") +pattern visionBlocked_ites_bottom(a1:Actor, a2:Actor, vb:VisionBlocked) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + VisionBlocked.blockedBy(vb, aBlocker); + + Actor.xPos(a1, x1); + Actor.yPos(a1, y1); + Actor.xPos(a2, x2); + Actor.yPos(a2, y2); + Actor.xPos(aBlocker, xBlocker); + Actor.yPos(aBlocker, yBlocker); + Actor.length(aBlocker, lenBlocker); + Actor.width(aBlocker, widBlocker); + + //check(slope of a1-to-BlockerBottom > slope of a1-to-a2) + check( + ( yBlocker - y1 + (if(xBlocker > x1){0-lenBlocker/2}else{lenBlocker/2})) / + ( xBlocker - x1 + (if(yBlocker > y1){widBlocker/2}else{0-widBlocker/2})) + > ((y1-y2)/(x1-x2))); +} + +//TODO refactor? +//TODO CORNER CASES +@Constraint(severity="error", key={a1, vb}, message="x") +pattern visionBlocked_xdistBSlargerThanxdistTS(a1:Actor, a2:Actor, vb:VisionBlocked) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + VisionBlocked.source(vb, a1); + VisionBlocked.target(vb, a2); + VisionBlocked.blockedBy(vb, aBlocker); + + Actor.xPos(a1, x1); + Actor.xPos(a2, x2); + Actor.xPos(aBlocker, xBlocker); + + //check(slope of a1-to-BlockerBottom > slope of a1-to-a2) + //TODO implement ABSOLUTE VALUE or MULTI-CHECK + check((x1-xBlocker)*(x1-xBlocker) > (x1-x2)*(x1-x2)); +} + +//TODO refactor? +//TODO CORNER CASES +@Constraint(severity="error", key={a1, vb}, message="x") +pattern visionBlocked_xdistBTlargerThanxdistST(a1:Actor, a2:Actor, vb:VisionBlocked) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + VisionBlocked.source(vb, a2); + VisionBlocked.target(vb, a1); + VisionBlocked.blockedBy(vb, aBlocker); + + Actor.xPos(a1, x1); + Actor.xPos(a2, x2); + Actor.xPos(aBlocker, xBlocker); + + //check(slope of a1-to-BlockerBottom > slope of a1-to-a2) + //TODO implement ABSOLUTE VALUE or MULTI-CHECK + check((x1-xBlocker)*(x1-xBlocker) > (x1-x2)*(x1-x2)); +} + +//TODO same as above for Y??? +//TODO same as above for Y ???? + +/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//SeparationDistance +/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +/* +private pattern helper_getSeperateActorsCoords(a1:Actor, + a2: Actor, sd:SeparationDistance, + x1:java Double, x2:java Double, y1:java Double, y2:java Double) { + SeperationDistance.source(sd, a1); + SeparationDistance.target(sd, a2); + + find helper_getCoords(a1, a2, x1, x2, y1, y2); +} + +@Constraint(severity="error", key={a1, sd}, message="x") +pattern SeparationDistance_near_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); + SeparationDistance.distance(sd, Distance::D_Near); + + //check(dx^2 + dy^2 < 5^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 5*5); +} + +@Constraint(severity="error", key={a1, sd}, message="x") +pattern SeparationDistance_near_ub(a1:Actor, a2:Actor, sd:SeparationDistance) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); + SeparationDistance.distance(sd, Distance::D_Near); + + //check(dx^2 + dy^2 > 10^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 10*10); +} + +@Constraint(severity="error", key={a1, sd}, message="x") +pattern SeparationDistance_medium_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); + SeparationDistance.distance(sd, Distance::D_Med); + + //check(dx^2 + dy^2 < 10^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 10*10); +} + +@Constraint(severity="error", key={a1, sd}, message="x") +pattern SeparationDistance_medium_ub(a1:Actor, a2:Actor, sd:SeparationDistance) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); + SeparationDistance.distance(sd, Distance::D_Med); + + //check(dx^2 + dy^2 > 1^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) > 15*15); +} + +@Constraint(severity="error", key={a1, sd}, message="x") +pattern SeparationDistance_far_lb(a1:Actor, a2:Actor, sd:SeparationDistance) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + find helper_getSeparateActorsCoords(a1, a2, sd, x1, x2, y1, y2); + SeparationDistance.distance(sd, Distance::D_Far); + + //check(dx^2 + dy^2 < 15^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); +} +*/ + +/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +//CollisionDoesNotExist +/////*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*-_-*////// +/* +//TODO +@Constraint(severity="error", key={a1, cdne}, message="x") +pattern collisionDoesNotExist(a1:Actor, a2:Actor, ss:CrossingScenario, cdne:CollisionDoesNotExist) { + //This second one is required because we do not want to enforce both a1->c->a2 and a2->c->a1 + + CrossingScenario.actors(ss, a1); + CrossingScenario.actors(ss, a2); + Actor.relations(a1, cdne); + CollisionDoesNotExist.target(cdne, a2); + CrossingScenario.maxTime(ss, maxTime); + + Actor.width(a1, w1); + Actor.length(a1, l1); + Actor.xPos(a1, xPos1); + Actor.yPos(a1, yPos1); + Actor.xSpeed(a1, xSpeed1); + Actor.ySpeed(a1, ySpeed1); + + Actor.width(a2, w2); + Actor.length(a2, l2); + Actor.xPos(a2, xPos2); + Actor.yPos(a2, yPos2); + Actor.xSpeed(a2, xSpeed2); + Actor.ySpeed(a2, ySpeed2); + //check(dx^2 + dy^2 < 15^2) + check((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) < 15*15); +} +*/ \ No newline at end of file diff --git a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java index 9d0860ec..ed227f7a 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java +++ b/Domains/crossingScenario/src/crossingScenario/run/CrossingScenarioMain.java @@ -31,19 +31,18 @@ public class CrossingScenarioMain { Path pathStats = Paths.get("outputs/statistics.csv"); String pathXmi = "outputs/models/1.xmi"; + String savePath = "outputs/drawnModel1.png"; // Path target = Paths.get("../..//Tests/MODELS2020-CaseStudies/case.study.pledge.run/measurements1/stats.csv"); // Files.copy(path, target, StandardCopyOption.REPLACE_EXISTING); printStats(pathStats); - DrawScenario.drawScenario(pathXmi); + DrawScenario.drawScenario(pathXmi, savePath); // String p1 = "outputs/models/1.xmi"; // String p2 = "outputs/simplePrevLane.tgf"; // QueryDebug.checkPrevLanes(p1, p2); // Desktop.getDesktop().open(new File(p2)); System.gc(); - System.gc(); - System.gc(); } public static void printStats(Path pathToStats) throws IOException { diff --git a/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java b/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java index 7f90beb2..572fea68 100644 --- a/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java +++ b/Domains/crossingScenario/src/crossingScenario/run/DrawScenario.java @@ -31,10 +31,13 @@ public class DrawScenario { public static final int SIZE = 1000; public static void main(String[] args) throws IOException { - drawScenario("outputs/models/4.xmi"); + for (int i = 1; i <= 10; i++) { + drawScenario("outputs/models/"+i+".xmi", "outputs/drawnModel"+i+".png"); + System.out.println("DONE " + i); + } } - public static File drawScenario(String pathToXmi) throws IOException { + public static File drawScenario(String pathToXmi, String saveToPath) throws IOException { Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()); EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE); @@ -134,7 +137,7 @@ public class DrawScenario { } g.dispose(); - File f = new File("outputs/drawnModel.png"); + File f = new File(saveToPath); try { ImageIO.write(image, "png", f); } catch (IOException e) { @@ -142,7 +145,6 @@ public class DrawScenario { } // Desktop.getDesktop().open(f); - System.out.println("finished!"); return f; } } diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java index e3bb2cbe..0105d985 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java @@ -377,7 +377,7 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ //DEBUG - Print things if (outputProcess == null) { System.err.println("TIMEOUT"); - printOutput(numProbContent); +// printOutput(numProbContent); } // printOutput(numProbContent); -- cgit v1.2.3-70-g09d2