diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..932601ae --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,126 @@ +# Changelog # + + + + +## PAXelerate - Version Alpha 0.7 / 2016-07-01 ## + +This release focused on stability and performance issues, especially in terms of batch simulation capabilities. Improvements on the thread handling allows to run multiple iterations with the SDK version. + +**Fixed bugs** +- #140 Error in CreatePassengers +- #119 Passenger sorting options do not work +- #141 Walking speed correcting + +**UI improvements** +- #80 UI viewmodel descriptions and repositioning +- #49 Enforce threading for UI & pathfinding calculations +- #124 When refreshing the cabin, the delays for the passengers are not recalculated +- #69 Detect overlap of objects +- #122 Implement Load Factor as Double Value + +**Model improvements** +- #87 Merge different TravelClasses and Doors into on single Class +- #77 Simultaneous door entry with multiple doors +- #5 Refine potential generation around obstacle +- #48 Pathfinding with more than one aisle +- #72 Merge Obstacle Map and AreaMap +- #86 Evaluate agent behaviour and tasks +- #120 Remove Static Potential Gradient in Aisle and Door Area to support multiple aisles and unconventional cabin layouts +- #123 When making way for a passenger boarding from the rear entrance, the blocking line blocks the passenger itself +- #125 Calculate agent waiting time +- #127 Way making procedure for more then one passenger sitting +- #132 checkPassengerAssignments: recalculate the delay +- Agent behaviour for foldable seats (SDK version) + +**Misc improvements** +- #26 Create JavaDoc +- #28 Ensure compatibility with MacOS +- #1 Terminate threads after simulation to reduce CPU load +- #142 Implementation of data export functionalities +- Batch simulation capabilities (SDK version) +- Result data mining during simulation +- Introduces developer mode with enhanced functions and output + + +We are happy to receive your feedback. If you discover any bugs, please attach the log file stored in `workspace/.metadata/` to your [bug report](https://github.com/BauhausLuftfahrt/PAXelerate/issues/new). + +--- + + +## PAXelerate - Version Alpha 0.6 / 2016-03-31 ## + +This release focused on additional functionalities as well as more stability. The passenger generation and simulation views are now unsynced from the main GUI which prohibits the GUI from freezing during calculations. Enhancements can be found in the UI and workflow. + +**Fixed bugs** + +- #105 GeneratePassengers without door causes error +- #101 Scaling of lavatory and galley icon +- #84 Right Click menu with "generate pax" & "simulate" is shown on every element and folder +- #83 On first startup, model elements are not listed +- #82 Exception is thrown when launching PAXelerate for the first time +- #75 Simulation: pathfinding cannot be initiated +- #71 Performance Issues During Simulation +- #23 Check monument dimensions != 0 +- #21 Simulation view and cabin view are mirror-inverted +- #17 Scale aircraft image according to view width +- #16 Fixed diagonal walking of agents +- #8 Switch all x and y assignments for the vector class + +**UI improvements** +- #104 Provide more information in dialog CloneObject +- #81 Added menu to add views +- #78 Prohibit selection of top level meta model elements in model explorer +- #64 Change description and output of ConsoleView +- #47 Harmonize icons design +- #36 Reorganize simulation properties +- #32 WelcomePage: Additional Info to Get Started +- #15 Reorder parameter for re-positioning +- #14 Row cloning function +- #12 Create keyboard shortcuts for context menus +- #7 Show Units for each variable in the Model Explorer + +**Model improvements** +- #103 GeneratePassengers class dramatically improved & shortened +- #102 Passenger sorting: decouple from cabin view refresh and enhance input window +- #76 Define aircraft load factor as parameter +- #24 Redefine seat pitch as distance between seat back rests +- #20 Variation of luggage stowing row +- #19 Differentiation between stowing tasks +- #3 Check time of seat interference task + +**Misc improvements** + +- #97 Generate Cabin loops unnecessarily over redraw (instead of once at the end) +- #93 Refresh Passenger Properties after agents are created +- #89 Clean up descriptions in plugin.properties +- #74 Store cabin model during runtime +- #65 Performance of cabin view re-sizing function +- #25 Rename MoveRow to MoveObject +- #6 Compatibility with Eclipse Mars.2 (4.5.2) + +--- + +## PAXelerate - Version Alpha 0.5 / 2016-02-15 ## + +The version Alpha 0.5 marks the half way to the Beta status and focused on re-structuring of the packages and bug-fixing. + +**Bugs** + +- Restore OpenCDT Menu +- Right Click Commands are no longer visible +- Clicking import child in paxelerate.product causes NullPointerException +- Array out of bound in ObstacleMap.getValueAtPoint + +**Improvement** + +- Move AStar classes to separate plug-in +- Restructuring of packages +- Switch x and y coordinates +- Cut decimal places with point instead of comma (English convention) +- Preselect PAXelerate models under Project > Right click > New Model element +- Auto-show Cabin Layout View (when starting PAX 1st time) +- Define required plug-ins in paxelerate.product +- Change naming of predefined cabin layouts to regional, narrow-body and wide-body + + diff --git a/LICENSE.md b/LICENSE.md index 50328437..2d602161 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,15 +1,16 @@ -Eclipse Public License - v 1.0 +# Eclipse Public License - v 1.0 # THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -1. DEFINITIONS +## 1. DEFINITIONS ## "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; @@ -34,12 +35,14 @@ Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. -2. GRANT OF RIGHTS +## 2. GRANT OF RIGHTS ## + a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise @@ -50,6 +53,7 @@ including all Contributors. combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other @@ -62,18 +66,20 @@ including all Contributors. third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS +## 3. REQUIREMENTS ## A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties + i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; @@ -89,6 +95,7 @@ its own license agreement, provided that: When the Program is made available in source code form: a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. @@ -98,7 +105,7 @@ if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. -4. COMMERCIAL DISTRIBUTION +## 4. COMMERCIAL DISTRIBUTION ## Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is @@ -131,7 +138,7 @@ Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. -5. NO WARRANTY +## 5. NO WARRANTY ## EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR @@ -144,7 +151,7 @@ risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -6. DISCLAIMER OF LIABILITY +## 6. DISCLAIMER OF LIABILITY ## EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -155,7 +162,7 @@ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -7. GENERAL +## 7. GENERAL ## If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the @@ -200,4 +207,4 @@ This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. \ No newline at end of file +any resulting litigation. diff --git a/README.md b/README.md index 79c41ff1..7dc5765a 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# README # +# README # Welcome to the repository of [PAXelerate](http://www.paxelerate.com) - an open source passenger flow simulation framework for advanced aircraft cabin layouts! -* Currently version *Alpha 0.7* is under developement and scheduled for 05/25/2016 +* Currently version *Alpha 0.8* is under developement and scheduled for 2016-09-01 * The implementation began in November 2014 ### Quick Guide ### -**User Version** +**Client Version** -1. Download and unpack the latest client version [Alpha 0.6](https://github.com/BauhausLuftfahrt/PAXelerate/releases/tag/alpha-0.6) +1. Download and unpack the latest client version [Alpha 0.7] (https://github.com/BauhausLuftfahrt/PAXelerate/releases/tag/alpha-0.7) (2016-07-01) 2. Start `PAXelerate.exe` -**Developer Version** +**Software Developer Kit** 1. Install [Eclipse Mars.2 - Modelling Tools](http://www.eclipse.org/downloads/) and [Java JDK Version 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) 2. Upgrade the [EMF Client Platform](http://www.eclipse.org/ecp/download.html) to version 1.7.x @@ -36,7 +36,7 @@ Welcome to the repository of [PAXelerate](http://www.paxelerate.com) - an open s * Michael Schmidt ***(active)*** * Michael Shamiyeh ***(active)*** * Martin Glas -* Tobias Brügge-Zobel +* Tobias BrĂĽgge-Zobel * Stefan Weber * Pedro Martinez * Philipp Osterrieder diff --git a/documentation/images/about.png b/documentation/images/about.png index 7dfa8171..f12ccb43 100644 Binary files a/documentation/images/about.png and b/documentation/images/about.png differ diff --git a/documentation/images/splash.bmp b/documentation/images/splash.bmp index f21a4608..814f19f9 100644 Binary files a/documentation/images/splash.bmp and b/documentation/images/splash.bmp differ diff --git a/documentation/images/splash.psd b/documentation/images/splash.psd index 9b6044e1..79d68dcd 100644 Binary files a/documentation/images/splash.psd and b/documentation/images/splash.psd differ diff --git a/documentation/wiki/developer.md b/documentation/wiki/developer.md index 270625a4..fd6b4290 100644 --- a/documentation/wiki/developer.md +++ b/documentation/wiki/developer.md @@ -1,310 +1,310 @@ -# Developer Guide # - -Based on PAXelerate release: Alpha 0.6 (04/01/2016) - -First, get started with the [Git repository and issues handling](#git-workflow) - -Use the code snippets to get the implementation of a desired aspect started. - -* [Aircraft cabin generation using the construction library](#how-to-use-the-construction-library-class-for-cabin-generation-purposes) -* [Using the Gaussian Distribution](#gaussian-distribution) -* [Exception handling](#exception-handling-procedures) - -## Eclipse and OpenCDT related ## -* [Creating a user input dialog](#how-to-create-a-new-input-dialog) -* [Creating a new popup window](#how-to-create-a-new-help-window-popup) -* [How to add a new right click command to OpenCDT](#how-to-add-a-new-right-click-command-to-opencdt) -* [Usage of EMF Forms and customisation](#usage-of-emf-forms) -* [Eclipse product and application deployment](http://www.vogella.com/tutorials/EclipseProductDeployment/article.html#deployment_deltapack) - -For further information regarding OpenCDT please refer to the [wiki](http://bitbucket.org/opencdt/opencdt/wiki/Home) or to these [useful links](useful-links.md) - -## Troubleshooting -* [Framework errors during launch](#framework-errors-during-launch) - ---- - -# Git Workflow - -* **Commit**: versionises the changes files and saves all changes on your local hard drive -* **Push**: uploading of changes to the bitbucket Git repository - -## Processing issues with commit messages -* Fix #10 - -The following keywords will close an issue via commit message: -* close -* closes -* closed -* fix -* fixes -* fixed -* resolve -* resolves -* resolved - -refer to [documentation](https://help.github.com/articles/closing-issues-via-commit-messages/) for more info - ---- - -# How to use the construction library class for cabin generation purposes - -## 1. Create the object -Create and initialize a object: -```java -Cabin cabin = CabinFactory.eINSTANCE.createCabin(); -ConstructionLibrary constructor = new ConstructionLibrary(cabin); -``` -The cabin element is a pre-exsiting cabin that is pushed over to the constructor. -If you wish, you can clear the cabin by using the following command: -```java -constructor.clearCabin(); -``` -## 2. Create cabin elements -* Emergency Exits must be generated at first. -* Only create one main door. -* Create all other objects in the order they appear within the cabin (from front to rear). - -### Create a passenger class -```java -constructor.createClass(passengerClass); -``` -The *passengerClass* can be one of the following: -```java -FirstClass.class, BusinessClass.class, PremiumEconomyClass.class, EconomyClass.class -``` -### Create a door -```java -boolean onBothSides = true; -int id = 0; -int yDimension = 0; -constructor.createDoor(doorType, onBothSides, id, yDimension); -``` -The *doorType* element is one of the following: -```java -MainDoor.class, StandardDoor.class, EmergencyExit.class -``` -### Create a galley / lavatory -```java -int yDimension = 0; -constructor.createGalley(yDimension); -``` - -## 3. Return the modified cabin element -```java -cabin = constructor.getCabin(); -``` ---- - -# Gaussian Distribution - -In order to use the gaussian distribution, simply call the following method: - - -```java -FuncLib.gaussianRandom(double average, GaussOptions option, double deviation); -``` -The average value is the peak value of the gaussian distribution. - -The option is one of the following values: - -* 50% -* 90% -* 95% -* 99% - -Choosing one of this options will calculate the sigma correctly. - -The deviation is the range in which e.g. 95% of the generated numbers will be. - -So let's say you want to generate a value out of the normal distribution with the peak at 100. -Then you would define that 95% of the values should be within the range of +/- 10, so within 90 and 110. - -Then your function would look like this: - -```java -FuncLib.gaussianRandom(100, GaussOptions.PERCENT_95, 10); -``` - ---- - -# Exception Handling Procedures - -Exeptions are handled within PAXelerate by preventing any exeptions from happening. Source code containing a possible exception is surrounded by a try / catch phrase and the error is then printed inside the console without interfering with the source code execution. - -Within the catch phrase, a possible solution for the occured error must be implemented in order for the code to run even without the faulty parts. - -```java - -Object object; // create the object beforehand - -try { - -object = SomeHelper.retrieveObject(); // try to get the information - -} catch(Exception e) { - -object = new Object("emptyPlaceHolder"); /* if it does not work, initialize it anyway in order for the source code to work properly. */ - -System.out.println("Exeption e! Please change object."); - -} - -object.continueDoingSomeCoolStuff(); - -``` - ---- - -# How to create a new input dialog -## 1. Create and initialize a new instance: -Using the following code fragment, you can create and initialize a new input dialog: -```java -GetInput newInput= new GetInput(windowType, descriptionString, descriptionType); -``` -The *descriptionString* is a String containing more information about the value you want the user to input. -The *windowType* is defined as follows. You can choose on of the defined values in order to get different input dialog layouts. -```java -public enum WindowType { - INFORMATION, GET_STRING, GET_INTEGER, GET_VECTOR, WARNING, OPTIONS - } -``` -The thrid parameter *descriptionType* is the type of the description you want to use. This alters the image shown next to the description label. -```java -public enum IMessageProvider{ - NONE, INFORMATION, WARNING, ERROR - } -``` -## 2. Retrieve information -After having initialized the input dialog, the dialog will open and close automatically. The entered values are stored within the *GetInput* object. To retrieve the stored information, use one of the following commands. -```java -int integerValue = newInput.getIntegerValue(); -Vector integerValue = newInput.getVectorValue(); -String stringValue = newInput.getString(); -``` - ---- - -# How to create a new help window popup -## 1. Create and initialize View -At first, the view needs to be created and initialized. This is done in the class that should launch the new window. -```java -private static JFrame frame; -javax.swing.SwingUtilities.invokeLater(new Runnable() { - public void run() { - frame = new JFrame("New Window"); - frame.setContentPane(new HelpView()); - frame.pack(); - frame.setVisible(true); - } - }); -``` -Do not forget to import the required files. -```java -import javax.swing.JFrame; -``` -## 2. The HelpView -Create a new class that represents a view. In here, you can modify the view as you wish. -```java -package net.bhl.cdt.paxelerate.ui; -import javax.swing.*; - -public class HelpView extends JPanel { - public HelpView() { - this.setPreferredSize(new Dimension(800,600)); - Thread newThread = new Thread() { - public void run() { - while (true) { - try { - //Do anything in here. - repaint(); - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - }; - gameThread.start(); - } - - @Override - public void paintComponent(Graphics g) { - super.paintComponent(g); - //Modify the user interface in here. - g.drawString("Hello World!",0,0); - } - } -} -``` - ---- - -# How to add a new right click command to openCDT - -## 1. Create a new *newCommand.java* in *net.bhl.cdt.paxelerate.model.commands* -* Best practice: copy an existing command. -* Be sure to not modify the constructor, *this.cabin = cabin* should stay intact - -## 2. Create a new *newCommandHandler.java* in *net.bhl.cdt.paxelerate.model.handlers* -* Best practice: copy an existing handler file. -* Tip: Do not modify this file, only check for correct naming - -## 3. Open *plugin.xml* and go to *org.eclipse.ui.commands* -* Create a new command by right-clicking. -* Fill in the id, name and default handler. (Caution: case sensitive!) - -## 4. Go to *org.eclipse.ui.menus* in *plugin.xml* -* Expand the *popup:org.eclipse.(...)* entry -* Add a new command by right-clicking -* Fill in the correct commandID and your desired label name -* Add a new parameter by right-clicking -* Set the parameter to *false (visible when)* -* Add a parameter within called *iterate* -* Add a parameter within called *instanceOf* and choose *cabin* - ---- - -# Usage of EMF Forms - -PAXelerate is build upon the latest version of the EMF platform 1.7.x - -* Create new view with *New --> EMF Model --> View Model* and select *Browse Workspace*, from the package *net.bhl.cdt.paxelerate.model* use the *cabin.ecore* in the *model* folder and select the desired *EClass* -* All views can be found under *net.bhl.cdt.paxelerate.model.viewmodel* - -Further information can be obtained on the [EMF Forms Website](http://www.eclipse.org/ecp/emfforms/) - - ---- - -# Framework errors during launch - -1. Check if all required plug-ins are added in the run configurations with validate plug-ins -2. Add each plug-in creating an framework error manually in the run configurations -3. Clean the project -4. Delete the folder .cdt under C:\user\username\ - -The following plug-ins are required: - -``` -net.bhl.cdt.client -net.bhl.cdt.model -net.bhl.cdt.model.edit -net.bhl.cdt.ui -net.bhl.cdt.paxelerate.core -net.bhl.cdt.paxelerate.model -net.bhl.cdt.paxelerate.model.edit -net.bhl.cdt.paxelerate.model.viewmodel -net.bhl.cdt.paxelerate.ui -net.bhl.cdt.paxelerate.util -``` - - - - - - - - - - +# Developer Guide # + +Based on PAXelerate release: Alpha 0.7 (07/01/2016) + +First, get started with the [Git repository and issues handling](#git-workflow) + +Use the code snippets to get the implementation of a desired aspect started. + +* [Aircraft cabin generation using the construction library](#how-to-use-the-construction-library-class-for-cabin-generation-purposes) +* [Using the Gaussian Distribution](#gaussian-distribution) +* [Exception handling](#exception-handling-procedures) + +## Eclipse and OpenCDT related ## +* [Creating a user input dialog](#how-to-create-a-new-input-dialog) +* [Creating a new popup window](#how-to-create-a-new-help-window-popup) +* [How to add a new right click command to OpenCDT](#how-to-add-a-new-right-click-command-to-opencdt) +* [Usage of EMF Forms and customisation](#usage-of-emf-forms) +* [Eclipse product and application deployment](http://www.vogella.com/tutorials/EclipseProductDeployment/article.html#deployment_deltapack) + +For further information regarding OpenCDT please refer to the [wiki](http://bitbucket.org/opencdt/opencdt/wiki/Home) or to these [useful links](useful-links.md) + +## Troubleshooting +* [Framework errors during launch](#framework-errors-during-launch) + +--- + +# Git Workflow + +* **Commit**: versionises the changes files and saves all changes on your local hard drive +* **Push**: uploading of changes to the bitbucket Git repository + +## Processing issues with commit messages +* Fix #10 + +The following keywords will close an issue via commit message: +* close +* closes +* closed +* fix +* fixes +* fixed +* resolve +* resolves +* resolved + +refer to [documentation](https://help.github.com/articles/closing-issues-via-commit-messages/) for more info + +--- + +# How to use the construction library class for cabin generation purposes + +## 1. Create the object +Create and initialize a object: +```java +Cabin cabin = CabinFactory.eINSTANCE.createCabin(); +ConstructionLibrary constructor = new ConstructionLibrary(cabin); +``` +The cabin element is a pre-exsiting cabin that is pushed over to the constructor. +If you wish, you can clear the cabin by using the following command: +```java +constructor.clearCabin(); +``` +## 2. Create cabin elements +* Emergency Exits must be generated at first. +* Only create one main door. +* Create all other objects in the order they appear within the cabin (from front to rear). + +### Create a passenger class +```java +constructor.createClass(passengerClass); +``` +The *passengerClass* can be one of the following: +```java +FirstClass.class, BusinessClass.class, PremiumEconomyClass.class, EconomyClass.class +``` +### Create a door +```java +boolean onBothSides = true; +int id = 0; +int yDimension = 0; +constructor.createDoor(doorType, onBothSides, id, yDimension); +``` +The *doorType* element is one of the following: +```java +MainDoor.class, StandardDoor.class, EmergencyExit.class +``` +### Create a galley / lavatory +```java +int yDimension = 0; +constructor.createGalley(yDimension); +``` + +## 3. Return the modified cabin element +```java +cabin = constructor.getCabin(); +``` +--- + +# Gaussian Distribution + +In order to use the gaussian distribution, simply call the following method: + + +```java +FuncLib.gaussianRandom(double average, GaussOptions option, double deviation); +``` +The average value is the peak value of the gaussian distribution. + +The option is one of the following values: + +* 50% +* 90% +* 95% +* 99% + +Choosing one of this options will calculate the sigma correctly. + +The deviation is the range in which e.g. 95% of the generated numbers will be. + +So let's say you want to generate a value out of the normal distribution with the peak at 100. +Then you would define that 95% of the values should be within the range of +/- 10, so within 90 and 110. + +Then your function would look like this: + +```java +FuncLib.gaussianRandom(100, GaussOptions.PERCENT_95, 10); +``` + +--- + +# Exception Handling Procedures + +Exeptions are handled within PAXelerate by preventing any exeptions from happening. Source code containing a possible exception is surrounded by a try / catch phrase and the error is then printed inside the console without interfering with the source code execution. + +Within the catch phrase, a possible solution for the occured error must be implemented in order for the code to run even without the faulty parts. + +```java + +Object object; // create the object beforehand + +try { + +object = SomeHelper.retrieveObject(); // try to get the information + +} catch(Exception e) { + +object = new Object("emptyPlaceHolder"); /* if it does not work, initialize it anyway in order for the source code to work properly. */ + +System.out.println("Exeption e! Please change object."); + +} + +object.continueDoingSomeCoolStuff(); + +``` + +--- + +# How to create a new input dialog +## 1. Create and initialize a new instance: +Using the following code fragment, you can create and initialize a new input dialog: +```java +GetInput newInput= new GetInput(windowType, descriptionString, descriptionType); +``` +The *descriptionString* is a String containing more information about the value you want the user to input. +The *windowType* is defined as follows. You can choose on of the defined values in order to get different input dialog layouts. +```java +public enum WindowType { + INFORMATION, GET_STRING, GET_INTEGER, GET_VECTOR, WARNING, OPTIONS + } +``` +The thrid parameter *descriptionType* is the type of the description you want to use. This alters the image shown next to the description label. +```java +public enum IMessageProvider{ + NONE, INFORMATION, WARNING, ERROR + } +``` +## 2. Retrieve information +After having initialized the input dialog, the dialog will open and close automatically. The entered values are stored within the *GetInput* object. To retrieve the stored information, use one of the following commands. +```java +int integerValue = newInput.getIntegerValue(); +Vector integerValue = newInput.getVectorValue(); +String stringValue = newInput.getString(); +``` + +--- + +# How to create a new help window popup +## 1. Create and initialize View +At first, the view needs to be created and initialized. This is done in the class that should launch the new window. +```java +private static JFrame frame; +javax.swing.SwingUtilities.invokeLater(new Runnable() { + public void run() { + frame = new JFrame("New Window"); + frame.setContentPane(new HelpView()); + frame.pack(); + frame.setVisible(true); + } + }); +``` +Do not forget to import the required files. +```java +import javax.swing.JFrame; +``` +## 2. The HelpView +Create a new class that represents a view. In here, you can modify the view as you wish. +```java +package net.bhl.cdt.paxelerate.ui; +import javax.swing.*; + +public class HelpView extends JPanel { + public HelpView() { + this.setPreferredSize(new Dimension(800,600)); + Thread newThread = new Thread() { + public void run() { + while (true) { + try { + //Do anything in here. + repaint(); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + }; + gameThread.start(); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + //Modify the user interface in here. + g.drawString("Hello World!",0,0); + } + } +} +``` + +--- + +# How to add a new right click command to openCDT + +## 1. Create a new *newCommand.java* in *net.bhl.cdt.paxelerate.model.commands* +* Best practice: copy an existing command. +* Be sure to not modify the constructor, *this.cabin = cabin* should stay intact + +## 2. Create a new *newCommandHandler.java* in *net.bhl.cdt.paxelerate.model.handlers* +* Best practice: copy an existing handler file. +* Tip: Do not modify this file, only check for correct naming + +## 3. Open *plugin.xml* and go to *org.eclipse.ui.commands* +* Create a new command by right-clicking. +* Fill in the id, name and default handler. (Caution: case sensitive!) + +## 4. Go to *org.eclipse.ui.menus* in *plugin.xml* +* Expand the *popup:org.eclipse.(...)* entry +* Add a new command by right-clicking +* Fill in the correct commandID and your desired label name +* Add a new parameter by right-clicking +* Set the parameter to *false (visible when)* +* Add a parameter within called *iterate* +* Add a parameter within called *instanceOf* and choose *cabin* + +--- + +# Usage of EMF Forms + +PAXelerate is build upon the latest version of the EMF platform 1.7.x + +* Create new view with *New --> EMF Model --> View Model* and select *Browse Workspace*, from the package *net.bhl.cdt.paxelerate.model* use the *cabin.ecore* in the *model* folder and select the desired *EClass* +* All views can be found under *net.bhl.cdt.paxelerate.model.viewmodel* + +Further information can be obtained on the [EMF Forms Website](http://www.eclipse.org/ecp/emfforms/) + + +--- + +# Framework errors during launch + +1. Check if all required plug-ins are added in the run configurations with validate plug-ins +2. Add each plug-in creating an framework error manually in the run configurations +3. Clean the project +4. Delete the folder .cdt under C:\user\username\ + +The following plug-ins are required: + +``` +net.bhl.cdt.client +net.bhl.cdt.model +net.bhl.cdt.model.edit +net.bhl.cdt.ui +net.bhl.cdt.paxelerate.core +net.bhl.cdt.paxelerate.model +net.bhl.cdt.paxelerate.model.edit +net.bhl.cdt.paxelerate.model.viewmodel +net.bhl.cdt.paxelerate.ui +net.bhl.cdt.paxelerate.util +``` + + + + + + + + + + diff --git a/documentation/wiki/home.md b/documentation/wiki/home.md index 8fc220e3..56e2461b 100644 --- a/documentation/wiki/home.md +++ b/documentation/wiki/home.md @@ -9,7 +9,7 @@ **User Version** -1. Download and unpack the latest client version [Alpha 0.6](https://github.com/BauhausLuftfahrt/PAXelerate/releases/tag/alpha-0.6) +1. Download and unpack the latest client version [Alpha 0.7](https://github.com/BauhausLuftfahrt/PAXelerate/releases/tag/alpha-0.7) 2. Start `PAXelerate.exe` **Developer Version** diff --git a/documentation/wiki/installation.md b/documentation/wiki/installation.md index c3dc58a3..5b55d7c8 100644 --- a/documentation/wiki/installation.md +++ b/documentation/wiki/installation.md @@ -1,85 +1,88 @@ -# SDK Installation # - -Based on PAXelerate release: Alpha 0.6 (04/01/2016) - -To use PAXelerate you require to install [Eclipse](http://www.eclipse.org) and [OpenCDT](https://bitbucket.org/opencdt/opencdt) beforehand. PAXelerate is compatible with latest Eclipse Version Mars.2 and we highly recommend to use it. - -* **[1. Setup](#1-setup)** -* **[2. Install OpenCDT core plug-ins](#2-install-opencdt-core-plug-ins)** -* **[3. Install PAXelerate](#3-install-paxelerate)** -* **[4. Launch PAXelerate](#4-launch-paxelerate)** - ---- - -## 1. Setup ## - -* Download the [Eclipse Mars Installer](http://www.eclipse.org/downloads/) and select Eclipse Modelling Tools for Mars.2 - -![eclipse-installer.png](images/eclipse-installer.png) - -* Upgrade the [EMF Client Platform](http://www.eclipse.org/ecp/download.html) to version 1.7.x -* [JAVA JDK Version 8 (Java SE Development Kit 8)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) - -### Windows ### -* Probably [Git for Windows](http://msysgit.github.io/) is required -* Optional: a Git client, such as [Tortoise Git](https://code.google.com/p/tortoisegit/) - -### Mac and Linux ### -* Currently not supported - -## 2. Install OpenCDT core plug-ins ## - -Once you have started Eclipse, its time to download OpenCDT from the code repository on [Bitbucket](http://bitbucket.org/opencdt/opencdt). - -**Is it not possible to connect to the repository?** -* Try the following: -* Go to *Window -> Preferences -> Team -> Git -> Configuration* and then to *User Settings*. Click *Add Entry*, then enter **http.sslVerify** for the Key and **false** for the value. Then try again to connect to the Git Repository. -* At first, go to *File -> import -> Git -> Projects from Git -> Clone URI* and paste in the following link: -``` -https://bitbucket.org/opencdt/opencdt.git -``` -* Select the *Master* branch -* *Import* the following plugins -``` -net.bhl.cdt.client -net.bhl.cdt.model -net.bhl.cdt.model.edit -net.bhl.cdt.ui -``` - -## 3. Install PAXelerate ## -* Go to *File -> import -> Git -> Projects from Git -> Clone URI* and paste in the following link: -``` -https://github.com/BauhausLuftfahrt/PAXelerate.git -``` -* Select the *Master* branch -* *Import* the following plugins -``` -net.bhl.cdt.paxelerate.core -net.bhl.cdt.paxelerate.model -net.bhl.cdt.paxelerate.model.edit -net.bhl.cdt.paxelerate.model.viewmodel -net.bhl.cdt.paxelerate.test -net.bhl.cdt.paxelerate.ui -net.bhl.cdt.paxelerate.util -``` - -## 4. Launch PAXelerate ## - -You can finally start PAXelerate now: - -* Expand `net.bhl.cdt.paxelerate.core` from the package explorer tree view -* Right-click `paxelerate.product` -* Select Run as/Eclipse Application - -An error message occurs? Perhaps not all required plugins are added to working set. -* Select *Run Configurations... -> Plugins* -* In this view, *Add Required Plug-ins* and subsequently *Validate Plug-ins* - ---- - - -**Do you have any troubles? Create an [issue](https://github.com/BauhausLuftfahrt/PAXelerate/issues/new) and we give our best to solve it.** - - - +# SDK Installation # + +Based on PAXelerate release: Alpha 0.7 (07/01/2016) + +To use PAXelerate you require to install [Eclipse](http://www.eclipse.org) and [OpenCDT](https://bitbucket.org/opencdt/opencdt) beforehand. PAXelerate is compatible with latest Eclipse Version Mars.2 and we highly recommend to use it. + +* **[1. Setup](#1-setup)** +* **[2. Install OpenCDT core plug-ins](#2-install-opencdt-core-plug-ins)** +* **[3. Install PAXelerate](#3-install-paxelerate)** +* **[4. Launch PAXelerate](#4-launch-paxelerate)** + +--- + +## 1. Setup ## + +* Download the [Eclipse Mars Installer](http://www.eclipse.org/downloads/) and select Eclipse Modelling Tools for Mars.2 + +![eclipse-installer.png](images/eclipse-installer.png) + +* Upgrade the [EMF Client Platform](http://www.eclipse.org/ecp/download.html) to version 1.7.x +* [JAVA JDK Version 8 (Java SE Development Kit 8)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) + +### Windows ### +* Probably [Git for Windows](http://msysgit.github.io/) is required +* Optional: a Git client, such as [Tortoise Git](https://code.google.com/p/tortoisegit/) + +### Mac ### +* Optional: a Git client + +### Linux ### +* Currently not supported + +## 2. Install OpenCDT core plug-ins ## + +Once you have started Eclipse, its time to download OpenCDT from the code repository on [Github](https://github.com/BauhausLuftfahrt/OpenCDT). + +**Is it not possible to connect to the repository?** +* Try the following: +* Go to *Window -> Preferences -> Team -> Git -> Configuration* and then to *User Settings*. Click *Add Entry*, then enter **http.sslVerify** for the Key and **false** for the value. Then try again to connect to the Git Repository. +* At first, go to *File -> import -> Git -> Projects from Git -> Clone URI* and paste in the following link: +``` +https://github.com/BauhausLuftfahrt/OpenCDT.git +``` +* Select the *Master* branch +* *Import* the following plugins +``` +net.bhl.cdt.client +net.bhl.cdt.model +net.bhl.cdt.model.edit +net.bhl.cdt.ui +``` + +## 3. Install PAXelerate ## +* Go to *File -> import -> Git -> Projects from Git -> Clone URI* and paste in the following link: +``` +https://github.com/BauhausLuftfahrt/PAXelerate.git +``` +* Select the *Master* branch +* *Import* the following plugins +``` +net.bhl.cdt.paxelerate.core +net.bhl.cdt.paxelerate.model +net.bhl.cdt.paxelerate.model.edit +net.bhl.cdt.paxelerate.model.viewmodel +net.bhl.cdt.paxelerate.test +net.bhl.cdt.paxelerate.ui +net.bhl.cdt.paxelerate.util +``` + +## 4. Launch PAXelerate ## + +You can finally start PAXelerate now: + +* Expand `net.bhl.cdt.paxelerate.core` from the package explorer tree view +* Right-click `paxelerate.product` +* Select Run as/Eclipse Application + +An error message occurs? Perhaps not all required plugins are added to working set. +* Select *Run Configurations... -> Plugins* +* In this view, *Add Required Plug-ins* and subsequently *Validate Plug-ins* + +--- + + +**Do you have any troubles? Create an [issue](https://github.com/BauhausLuftfahrt/PAXelerate/issues/new) and we give our best to solve it.** + + + diff --git a/documentation/wiki/known-bugs.md b/documentation/wiki/known-bugs.md new file mode 100644 index 00000000..05262a82 --- /dev/null +++ b/documentation/wiki/known-bugs.md @@ -0,0 +1,24 @@ +# Known Bugs # + +Based on PAXelerate release: Alpha 0.6 (04/01/2016) + +The current releases of PAXelerate are still pre-releases and can contain bugs. If you face any further difficulties, please attach the log file stored in `workspace/.metadata/` to your bug report. + +## Project import and export in Model Explorer ## + +Based on issue #96 + +**Bug** + +Since the release Alpha 0.5 some major modifications to the Ecore meta model structure occurred. That means, current `*.xmi` templates are not compatible with earlier versions. The project and child import/export function of the Eclipse workbench is currently still defined as _experimental_. Temporary project data is saved in `.cdt`; however, the import does not work so far (#67). Unfortunately, we won't focus on the enhancement, since these functionalities are provided by the EMF framework. + +**Workaround** + +Adding or saving a child is the current option to store generated cabins if the Ecore version is equivalent. With the release Alpha-0.6 by the end of this week, the `.xmi` templates will be migrated to the updated Ecore version as well. + +**Outlook** + +We are currently working on an integrated migration of Ecore meta models (#9) and a further integration of the EMFstore (#94 and #50) will enable to put them under version control. + + + diff --git a/documentation/wiki/overview.md b/documentation/wiki/overview.md index ec0629aa..ac2c27b9 100644 --- a/documentation/wiki/overview.md +++ b/documentation/wiki/overview.md @@ -1,73 +1,73 @@ -# A Functional Overview - -Based on PAXelerate release: Alpha 0.6 (04/01/2016) - -PAXelerate is based on a microscopic approach applying agent-based modelling techniques. Each passenger is represented as an agent with individual properties such as body dimensions, walking speed, target seat or type of carry-on luggage. - -## PAXelerate - A Functional Overview - -* **[Development Platform Fundamentals](#development-platform-fundamentals)** -* **[Cabin Layout Generator](#1-cabin-layout-definition)** -* **[Agent Builder](#2-agent-builder)** -* **[Agent Based Simulation](#3-agent-based-simulation)** -* **[Post-Processing](#4-data-analysis-and-post-processing)** - -## Development Platform Fundamentals - -The framework development is based on the [Eclipse Modelling Framework (EMF)](http://www.eclipse.org/ecp/) which is a modelling framework and code generation facility for building tools and other applications based on a structured data model. The core EMF framework includes a meta meta model (ECore) for describing meta models and runtime support for the models. The passenger flow framework builds upon the [OpenCDT framework](https://bitbucket.org/opencdt/opencdt) which uses the EMF framework and provides a graphical user interface (GUI) with adaptable views. OpenCDT is an open source framework for conceptual aircraft design which vision is to enables the integration of design data and functionality from existing software tools, that supports the collaboration between discipline teams and that is flexible enough to be adapted for designing unconventional aircraft concepts. - -As you can see simplified in the UML diagram below, the connection between OpenCDT and PAXelerate is enabled using the services *GenerateModel*, *ShowView* and *SimulateModel*. The structure of the cabin and passenger data is generated with the corresponding generator and follows the predefined ECore meta model. The visualisation of the *CabinView* and the post processing results are currently displayed using [Java Standard Widget Toolkit (SWT) framework](https://www.eclipse.org/swt). SWT is an open source widget toolkit designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented. The *SimulateModel* service triggers the start of the simulation core comprising the path-finding algorithm. - -![opencdt-connection.png](images/opencdt-connection.png) - -## 1. Cabin Layout Definition ## - -The cabin layout generator requires the definition of top-level characteristics, such as the overall cabin length and width and the number of decks. A selection of a predefined aircraft configuration: regional, narrow-body or wide-body aircraft enables the usage of implemented design algorithms which are based on current cabin architectures taking into account rules and regulations. An overview of the graphical user interface you can see below. The model explorer allows to select a cabin monument which properties can be edited in the central view. A rendering of the cabin layout provides a continuously feedback loop. - -![gui-cabin.png](images/gui-cabin.png) - -The cabin consists of seating classes with assigned rows and seats, doors and emergency exist, and all other cabin monuments. This structure is specified in the ECore meta model and can be flexibly adjusted according the requirements of novel architectures. Key characteristics, such as the seat dimensions and pitch, the seat abreast and the number of seats can be defined in the *Seating Class* object. The subordinated objects *Row* and *Seat* inherit the corresponding properties. *Doors* and *Emergency Exits* possess a specific position and width, although the *Lavatories*, *Galleys* and *Curtains* are defined by dimensions in x and y direction. In the case of a multi-deck design, each deck is handled as a separated cabin with ports for passenger exchange, which are represented as stairs or elevators. - -![cabin-class.png](images/cabin-class.png) - -A simultaneous update of the graphical visualisation of the cabin layout and executed command in the console view enables short feedback loops during the layout definition. Using the import and export capability, the created architectures can be stored in a repository and shared within the community. An exemplary visualisation of a narrow-body cabin with single-class layout is illustrated below where circles represent occupied seats by agents. - -![render-cabin.png](images/render-cabin.png) - -## 2. Agent Builder ## - -After the number of passengers is assigned to each cabin class during the cabin layout definition, agent features are set according to the characteristics listed below. The anthropometric properties of waist width, body depth and walking speed are determined using a [Gaussian normal distribution](developer.md/#gaussian-distribution) between minimum and maximum values. The range can be adapted to represent passengers from different regions worldwide. Especially the waist width has a large impact on egress times beside the walking speed. Based on the passengers age, the appropriate walking speed is derived. - - -| Anthropometrics | Behaviour | -|:---:|:---:| -| Waist width | Mood: passive/aggressive | -| Depth | Hand luggage: small, medium, large | -| Walking speed | Jacket/coat | -| | Entry door | -| | Seat | - -The behaviour properties mainly influence the simulation process. If an agent is assigned an aggressive mood, he tries to overtake other passengers blocking the way in the aisle when there is enough space. In contrast, a passive agent pauses for the blocking passenger to move out of the way, then keeps walking on the calculated path. This enables to model dynamic reactions based on the mood and environment. Thus, agents can be programmed to become impatient when forced to wait for too long and change their mood from passive to aggressive. The entry door marks the starting point and the assigned seat the target. - -Optional carried hand luggage has an impact on the walking speed and requires the additional stowing task to be performed before seating. This causes the aisle to be blocked and thus impacts all active agents. Besides the differentiation of whether a passenger carries luggage or not, the type of luggage, namely: small, medium and large items, influences the required stowing times. With these implemented characteristics it becomes feasible to define various passenger's patterns, such as business or leisure travellers. - -## 3. Agent-Based Simulation ## - -In general, the system behaviour in agent-based simulations is modelled as a collection of autonomous decision-making agents although each agent individually assesses its situation and makes decisions on the basis of a set of rules. The resulting interactions are heterogeneous and can generate network effects. The two dimensional agent-based simulation module is the core of PAXelerate. Agents representing the passengers searching for the shortest and most cost efficient path to their assigned seat using an [A-Star path-finding algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). Applying parallel thread processing techniques causes the simulation to be non-deterministic as every agent can react independently enabling a realistic agent interaction. Below, the main packages and classes of the agent-based simulation are shown. - -![simulation-uml.png](images/simulation-uml.png) - -The simulation foundation is based on a grid of nodes which is discretised with a default size of 0.1m x 0.1m (3.94in x 3.94in) enabling the agent to move in eight directions. Each node possesses properties such as location, neighbours and occupation status as well as distance and cost which are important during the path finding. The mapping of all nodes is called *Area Map* representing the cabin monuments and agents as obstacles although each node describes the potential of an obstacle. Around the obstacles, a gradient-based potential is defined permitting the agents to walk directly next to the obstacles. A *Cost Map* combines the data of the Area Map with the distance to the target and acts as the walking environment of the Agent. The A-Star path-finding algorithm uses the data of the *Area Map* and the *Cost Map* to find the shortest and most cost efficient *Path* from a starting point to a target. Therefore, the area around the starting point is flooded to determine the cost of each *Node* until the final target is reached. From the target, the path back to the staring point is reconstructed and handed over to the *Agent*. - -The *Agent* follows the calculated path and reacts to obstacles occurring on the way to the assigned seat. He/she is able to turn his/her two-dimensional body in 45-degree steps allowing also to step sideways. The *Agent* sends the data of the specific blocked area and the potential around him/her continuously to the *Area Map*, and thus, defines it as obstacles for other agents. For aggressive agents, a new path finding is initiated if a collision on the way to the target occurs. These behaviour patterns are flexible extendable to other situations. - -## 4. Data Analysis and Post-Processing ## - -During the simulation, the generated data, such as the walking path of each individual passenger or the number waiting passengers in specific area, is recorded. These results are accessible through the meta model structure embedded in the GUI. Below an example depicts the walking paths of ten agents with the cabin Area Map in the background. To allow a further analysis with external software packages like Matlab©, IBM SPSS© or Microsoft Excel©, a data export function is available. - -![agent-paths.png](images/agent-paths.png) - - - -###### Source: Schmidt, M., Engelmann, M., BrĂĽgge-Zobel, T., Hornung, M., Glas, M., PAXelerate – An Open Source Passenger Flow Simulation Framework for Advanced Aircraft Cabin Layouts, AIAA SciTech 2016, San Diego, CA, USA - +# A Functional Overview + +Based on PAXelerate release: Alpha 0.7 (07/01/2016) + +PAXelerate is based on a microscopic approach applying agent-based modelling techniques. Each passenger is represented as an agent with individual properties such as body dimensions, walking speed, target seat or type of carry-on luggage. + +## PAXelerate - A Functional Overview + +* **[Development Platform Fundamentals](#development-platform-fundamentals)** +* **[Cabin Layout Generator](#1-cabin-layout-definition)** +* **[Agent Builder](#2-agent-builder)** +* **[Agent Based Simulation](#3-agent-based-simulation)** +* **[Post-Processing](#4-data-analysis-and-post-processing)** + +## Development Platform Fundamentals + +The framework development is based on the [Eclipse Modelling Framework (EMF)](http://www.eclipse.org/ecp/) which is a modelling framework and code generation facility for building tools and other applications based on a structured data model. The core EMF framework includes a meta meta model (ECore) for describing meta models and runtime support for the models. The passenger flow framework builds upon the [OpenCDT framework](https://bitbucket.org/opencdt/opencdt) which uses the EMF framework and provides a graphical user interface (GUI) with adaptable views. OpenCDT is an open source framework for conceptual aircraft design which vision is to enables the integration of design data and functionality from existing software tools, that supports the collaboration between discipline teams and that is flexible enough to be adapted for designing unconventional aircraft concepts. + +As you can see simplified in the UML diagram below, the connection between OpenCDT and PAXelerate is enabled using the services *GenerateModel*, *ShowView* and *SimulateModel*. The structure of the cabin and passenger data is generated with the corresponding generator and follows the predefined ECore meta model. The visualisation of the *CabinView* and the post processing results are currently displayed using [Java Standard Widget Toolkit (SWT) framework](https://www.eclipse.org/swt). SWT is an open source widget toolkit designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented. The *SimulateModel* service triggers the start of the simulation core comprising the path-finding algorithm. + +![opencdt-connection.png](images/opencdt-connection.png) + +## 1. Cabin Layout Definition ## + +The cabin layout generator requires the definition of top-level characteristics, such as the overall cabin length and width and the number of decks. A selection of a predefined aircraft configuration: regional, narrow-body or wide-body aircraft enables the usage of implemented design algorithms which are based on current cabin architectures taking into account rules and regulations. An overview of the graphical user interface you can see below. The model explorer allows to select a cabin monument which properties can be edited in the central view. A rendering of the cabin layout provides a continuously feedback loop. + +![gui-cabin.png](images/gui-cabin.png) + +The cabin consists of seating classes with assigned rows and seats, doors and emergency exist, and all other cabin monuments. This structure is specified in the ECore meta model and can be flexibly adjusted according the requirements of novel architectures. Key characteristics, such as the seat dimensions and pitch, the seat abreast and the number of seats can be defined in the *Seating Class* object. The subordinated objects *Row* and *Seat* inherit the corresponding properties. *Doors* and *Emergency Exits* possess a specific position and width, although the *Lavatories*, *Galleys* and *Curtains* are defined by dimensions in x and y direction. In the case of a multi-deck design, each deck is handled as a separated cabin with ports for passenger exchange, which are represented as stairs or elevators. + +![cabin-class.png](images/cabin-class.png) + +A simultaneous update of the graphical visualisation of the cabin layout and executed command in the console view enables short feedback loops during the layout definition. Using the import and export capability, the created architectures can be stored in a repository and shared within the community. An exemplary visualisation of a narrow-body cabin with single-class layout is illustrated below where circles represent occupied seats by agents. + +![render-cabin.png](images/render-cabin.png) + +## 2. Agent Builder ## + +After the number of passengers is assigned to each cabin class during the cabin layout definition, agent features are set according to the characteristics listed below. The anthropometric properties of waist width, body depth and walking speed are determined using a [Gaussian normal distribution](developer.md/#gaussian-distribution) between minimum and maximum values. The range can be adapted to represent passengers from different regions worldwide. Especially the waist width has a large impact on egress times beside the walking speed. Based on the passengers age, the appropriate walking speed is derived. + + +| Anthropometrics | Behaviour | +|:---:|:---:| +| Waist width | Mood: passive/aggressive | +| Depth | Hand luggage: small, medium, large | +| Walking speed | Jacket/coat | +| | Entry door | +| | Seat | + +The behaviour properties mainly influence the simulation process. If an agent is assigned an aggressive mood, he tries to overtake other passengers blocking the way in the aisle when there is enough space. In contrast, a passive agent pauses for the blocking passenger to move out of the way, then keeps walking on the calculated path. This enables to model dynamic reactions based on the mood and environment. Thus, agents can be programmed to become impatient when forced to wait for too long and change their mood from passive to aggressive. The entry door marks the starting point and the assigned seat the target. + +Optional carried hand luggage has an impact on the walking speed and requires the additional stowing task to be performed before seating. This causes the aisle to be blocked and thus impacts all active agents. Besides the differentiation of whether a passenger carries luggage or not, the type of luggage, namely: small, medium and large items, influences the required stowing times. With these implemented characteristics it becomes feasible to define various passenger's patterns, such as business or leisure travellers. + +## 3. Agent-Based Simulation ## + +In general, the system behaviour in agent-based simulations is modelled as a collection of autonomous decision-making agents although each agent individually assesses its situation and makes decisions on the basis of a set of rules. The resulting interactions are heterogeneous and can generate network effects. The two dimensional agent-based simulation module is the core of PAXelerate. Agents representing the passengers searching for the shortest and most cost efficient path to their assigned seat using an [A-Star path-finding algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). Applying parallel thread processing techniques causes the simulation to be non-deterministic as every agent can react independently enabling a realistic agent interaction. Below, the main packages and classes of the agent-based simulation are shown. + +![simulation-uml.png](images/simulation-uml.png) + +The simulation foundation is based on a grid of nodes which is discretised with a default size of 0.1m x 0.1m (3.94in x 3.94in) enabling the agent to move in eight directions. Each node possesses properties such as location, neighbours and occupation status as well as distance and cost which are important during the path finding. The mapping of all nodes is called *Area Map* representing the cabin monuments and agents as obstacles although each node describes the potential of an obstacle. Around the obstacles, a gradient-based potential is defined permitting the agents to walk directly next to the obstacles. A *Cost Map* combines the data of the Area Map with the distance to the target and acts as the walking environment of the Agent. The A-Star path-finding algorithm uses the data of the *Area Map* and the *Cost Map* to find the shortest and most cost efficient *Path* from a starting point to a target. Therefore, the area around the starting point is flooded to determine the cost of each *Node* until the final target is reached. From the target, the path back to the staring point is reconstructed and handed over to the *Agent*. + +The *Agent* follows the calculated path and reacts to obstacles occurring on the way to the assigned seat. He/she is able to turn his/her two-dimensional body in 45-degree steps allowing also to step sideways. The *Agent* sends the data of the specific blocked area and the potential around him/her continuously to the *Area Map*, and thus, defines it as obstacles for other agents. For aggressive agents, a new path finding is initiated if a collision on the way to the target occurs. These behaviour patterns are flexible extendable to other situations. + +## 4. Data Analysis and Post-Processing ## + +During the simulation, the generated data, such as the walking path of each individual passenger or the number waiting passengers in specific area, is recorded. These results are accessible through the meta model structure embedded in the GUI. Below an example depicts the walking paths of ten agents with the cabin Area Map in the background. To allow a further analysis with external software packages like Matlab©, IBM SPSS© or Microsoft Excel©, a data export function is available. + +![agent-paths.png](images/agent-paths.png) + + + +###### Source: Schmidt, M., Engelmann, M., BrĂĽgge-Zobel, T., Hornung, M., Glas, M., PAXelerate – An Open Source Passenger Flow Simulation Framework for Advanced Aircraft Cabin Layouts, AIAA SciTech 2016, San Diego, CA, USA + diff --git a/documentation/wiki/plugins.md b/documentation/wiki/plugins.md index 24c5b80e..5897462a 100644 --- a/documentation/wiki/plugins.md +++ b/documentation/wiki/plugins.md @@ -1,6 +1,6 @@ # PAXelerate Plug-ins -Based on PAXelerate release: Alpha 0.6 (04/01/2016) +Based on PAXelerate release: Alpha 0.7 (07/01/2016) `net.bhl.cdt.paxelerate.core` This plug-in contains the product file and bit by bit core functionalities will be transferred. diff --git a/documentation/wiki/release.md b/documentation/wiki/release.md index 96952c6b..142f0df2 100644 --- a/documentation/wiki/release.md +++ b/documentation/wiki/release.md @@ -21,7 +21,7 @@ A release candidate branch `release-0.X` will be produced for testing and bug fi * Eclipse workbench * Project generation (import, export --> not working so far) * Child: export, import - * EMFStore (from 0.7 on) + * EMFStore * PAXelerate * Cabin models * Automatic cabin generation @@ -46,6 +46,7 @@ A release candidate branch `release-0.X` will be produced for testing and bug fi * Simulation * Different settings * Compatibility: A320 model + * Batch simulation Basic information about the operating environment should be noted @@ -81,6 +82,7 @@ After a successful test of the release candidate, updates of the code, repositor * Mark milestone as released * Website * Blog post: change log and main features + * Update JavaDoc * Links to current release diff --git a/net.bhl.cdt.paxelerate.core/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.core/META-INF/MANIFEST.MF index 1dc75246..377ca168 100644 --- a/net.bhl.cdt.paxelerate.core/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.core/META-INF/MANIFEST.MF @@ -10,4 +10,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.ui;bundle-version="3.107.0", org.eclipse.core.runtime;bundle-version="3.11.1", - net.bhl.cdt.paxelerate.model;bundle-version="0.6.0" + net.bhl.cdt.paxelerate.model;bundle-version="0.7.0" diff --git a/net.bhl.cdt.paxelerate.core/splash.bmp b/net.bhl.cdt.paxelerate.core/splash.bmp index f21a4608..814f19f9 100644 Binary files a/net.bhl.cdt.paxelerate.core/splash.bmp and b/net.bhl.cdt.paxelerate.core/splash.bmp differ diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/Activator.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/Activator.java index 36e8164d..d8215614 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/Activator.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/Activator.java @@ -4,25 +4,32 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - package net.bhl.cdt.paxelerate.core; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** - * The activator class controls the plug-in life cycle + * The activator class controls the plug-in life cycle. + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * */ public class Activator extends AbstractUIPlugin { + + + /** The Constant PLUGIN_ID. */ // The plug-in ID - public static final String PLUGIN_ID = "net.bhl.cdt.paxelerate.agent"; //$NON-NLS-1$ + public static final String PLUGIN_ID = "net.bhl.cdt.paxelerate.core"; //$NON-NLS-1$ + /** The plugin. */ // The shared instance private static Activator plugin; /** - * The constructor + * The constructor. */ public Activator() { } @@ -50,7 +57,7 @@ public void stop(BundleContext context) throws Exception { } /** - * Returns the shared instance + * Returns the shared instance. * * @return the shared instance */ @@ -58,4 +65,6 @@ public static Activator getDefault() { return plugin; } + + } diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/agent/Agent.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/agent/Agent.java index 2abc3df4..5cbf9357 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/agent/Agent.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/agent/Agent.java @@ -6,9 +6,11 @@ package net.bhl.cdt.paxelerate.core.agent; /** - * - * @author raoul.rothfeld + * The Class Agent. * + * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public class Agent { diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/AgentNode.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/AgentNode.java index 127b0363..36847f20 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/AgentNode.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/AgentNode.java @@ -3,14 +3,23 @@ * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - - package net.bhl.cdt.paxelerate.core.node; +/** + * The Class AgentNode. + * + * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 + * + */ public class AgentNode extends Node { + /** + * Instantiates a new agent node. + */ public AgentNode() { - // TODO Auto-generated constructor stub + // Auto-generated constructor stub } } diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/Node.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/Node.java index 4ebfbc71..7037e99a 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/Node.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/Node.java @@ -3,15 +3,23 @@ * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - - package net.bhl.cdt.paxelerate.core.node; +/** + * The Class Node. + * + * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 + */ public class Node implements Comparable { + /* (non-Javadoc) + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ @Override public int compareTo(Node arg0) { - // TODO Auto-generated method stub + // Auto-generated method stub return 0; } diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/NodeMap.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/NodeMap.java index cbb7e335..a578066b 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/NodeMap.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/NodeMap.java @@ -3,10 +3,15 @@ * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - - package net.bhl.cdt.paxelerate.core.node; +/** + * The Class NodeMap. + * + * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 + */ public class NodeMap { // size (standard 10cm oder 1cm) von Cabin -> scale smallest unit diff --git a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/ObstacleNode.java b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/ObstacleNode.java index e35e7b3e..76e4eb20 100644 --- a/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/ObstacleNode.java +++ b/net.bhl.cdt.paxelerate.core/src/net/bhl/cdt/paxelerate/core/node/ObstacleNode.java @@ -3,14 +3,22 @@ * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - - package net.bhl.cdt.paxelerate.core.node; +/** + * The Class ObstacleNode. + * + * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 + */ public class ObstacleNode extends Node { + /** + * Instantiates a new obstacle node. + */ public ObstacleNode() { - // TODO Auto-generated constructor stub + // Auto-generated constructor stub } } diff --git a/net.bhl.cdt.paxelerate.model.edit/.settings/org.eclipse.core.resources.prefs b/net.bhl.cdt.paxelerate.model.edit/.settings/org.eclipse.core.resources.prefs index c39789b2..fbbb1ab4 100644 --- a/net.bhl.cdt.paxelerate.model.edit/.settings/org.eclipse.core.resources.prefs +++ b/net.bhl.cdt.paxelerate.model.edit/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,2 @@ eclipse.preferences.version=1 -encoding//src/net/bhl/cdt/paxelerate/model/provider/MainDoorItemProvider.java=UTF-8 -encoding//src/net/bhl/cdt/paxelerate/model/provider/StandardDoorItemProvider.java=UTF-8 +encoding//src/net/bhl/cdt/paxelerate/model/provider/DoorItemProvider.java=UTF-8 diff --git a/net.bhl.cdt.paxelerate.model.edit/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.model.edit/META-INF/MANIFEST.MF index 599dc898..79b0fd7d 100644 --- a/net.bhl.cdt.paxelerate.model.edit/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.model.edit/META-INF/MANIFEST.MF @@ -1,11 +1,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: PAXelerate - Model Edit +Bundle-Name: %pluginName Bundle-SymbolicName: net.bhl.cdt.paxelerate.model.edit;singleton:=true -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Bundle-ClassPath: . Bundle-Activator: net.bhl.cdt.paxelerate.model.provider.CabinEditPlugin$Implementation -Bundle-Vendor: http://www.paxelerate.com/ +Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: net.bhl.cdt.paxelerate.model.provider @@ -13,5 +13,7 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.edit;visibility:=reexport, net.bhl.cdt.model;visibility:=reexport, net.bhl.cdt.model.edit;visibility:=reexport, - net.bhl.cdt.paxelerate.model;bundle-version="0.6.0";visibility:=reexport + net.bhl.cdt.paxelerate.model;bundle-version="0.7.0";visibility:=reexport Bundle-ActivationPolicy: lazy +Import-Package: net.bhl.cdt.paxelerate.util.string + diff --git a/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_classes_TravelClass.gif b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_classes_TravelClass.gif index 8ed45549..68c6d0c2 100644 Binary files a/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_classes_TravelClass.gif and b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_classes_TravelClass.gif differ diff --git a/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationResults_SimulationResult.gif b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationResults_SimulationResult.gif new file mode 100644 index 00000000..96534e62 Binary files /dev/null and b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationResults_SimulationResult.gif differ diff --git a/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationSettings_SimulationProperties.gif b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationSettings_SimulationProperties.gif new file mode 100644 index 00000000..def961dd Binary files /dev/null and b/net.bhl.cdt.paxelerate.model.edit/icons/full/ctool16/CreateCabin_simulationSettings_SimulationProperties.gif differ diff --git a/net.bhl.cdt.paxelerate.model.edit/icons/full/obj16/TravelClass.gif b/net.bhl.cdt.paxelerate.model.edit/icons/full/obj16/TravelClass.gif index 35ef84e2..68c6d0c2 100644 Binary files a/net.bhl.cdt.paxelerate.model.edit/icons/full/obj16/TravelClass.gif and b/net.bhl.cdt.paxelerate.model.edit/icons/full/obj16/TravelClass.gif differ diff --git a/net.bhl.cdt.paxelerate.model.edit/plugin.properties b/net.bhl.cdt.paxelerate.model.edit/plugin.properties index f04e2c18..e810ecc7 100644 --- a/net.bhl.cdt.paxelerate.model.edit/plugin.properties +++ b/net.bhl.cdt.paxelerate.model.edit/plugin.properties @@ -1,274 +1,88 @@ # -pluginName = PAXelerate Cabin Edit Support -providerName = www.paxelerate.com +pluginName = Paxelerate Edit Support +providerName = www.example.org -# not sure if necessary _UI_CreateChild_text = {0} _UI_CreateChild_text2 = {1} {0} _UI_CreateChild_text3 = {1} _UI_CreateChild_tooltip = Create New {0} Under {1} Feature _UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. _UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + _UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_Cabin_type = Cabin +_UI_Row_type = Row +_UI_TravelClass_type = Travel Class +_UI_Seat_type = Seat +_UI_Passenger_type = Passenger +_UI_CrewMember_type = Crew Member +_UI_PhysicalObject_type = Physical Object +_UI_Lavatory_type = Lavatory +_UI_Galley_type = Galley +_UI_Stairway_type = Stairway +_UI_Curtain_type = Curtain +_UI_Stowage_type = Stowage +_UI_Door_type = Door +_UI_SimulationProperties_type = Simulation Properties +_UI_LuggageProperties_type = Luggage Properties +_UI_SimulationResult_type = Simulation Result +_UI_PassengerProperties_type = Passenger Properties _UI_Unknown_type = Object + _UI_Unknown_datatype= Value -_UI_Unknown_feature = Unspecified -############################ -# Cabin -_UI_Cabin_type = Cabin -_UI_Cabin_length_feature = Length -_UI_Cabin_boardingTime_feature = Boarding Time [s] -_UI_Cabin_cabinLength_feature = Cabin Length [cm] -_UI_Cabin_cabinWidth_feature = Cabin Width [cm] -_UI_Cabin_numbSeats_feature = Numb Seats -_UI_Cabin_FCperc_feature = FCperc -_UI_Cabin_BCperc_feature = BCperc -_UI_Cabin_toilets_feature = Toilets -_UI_Cabin_galleys_feature = Galleys -_UI_Cabin_PECperc_feature = PE Cperc -_UI_Cabin_BlockedSeatsInBC_feature = Blocked Seats In BC -_UI_Cabin_width_feature = Width -_UI_Cabin_capacity_feature = Capacity +_UI_Cabin_xDimension_feature = Dimension X [cm] +_UI_Cabin_yDimension_feature = Dimension Y [cm] +_UI_Cabin_rowNonexistent_feature = Row Nonexistent +_UI_Cabin_aisleWidth_feature = Aisle Width [cm] +_UI_Cabin_numberOfDecks_feature = Number Of Decks [-] +_UI_Cabin_aircraftType_feature = Aircraft Type +_UI_Cabin_simulationSettings_feature = Simulation Settings _UI_Cabin_classes_feature = Classes _UI_Cabin_doors_feature = Doors -_UI_Cabin_numbAisles_feature = Numb Aisles -_UI_Cabin_documentInWikipedia_feature = Document In Wikipedia -_UI_Cabin_totalPassengers_feature = Total Passengers -_UI_Cabin_FCpassengers_feature = FCpassengers -_UI_Cabin_BCpassengers_feature = BCpassengers -_UI_Cabin_PECpassengers_feature = PE Cpassengers -_UI_Cabin_stairs_feature = Stairs -_UI_Cabin_seatWidthInFirst_feature = Seat Width In First [cm] -_UI_Cabin_seatWidthInBusiness_feature = Seat Width In Business [cm] -_UI_Cabin_seatWidthInPremiumEconomy_feature = Seat Width In Premium Economy [cm] -_UI_Cabin_seatWidthInEconomy_feature = Seat Width In Economy [cm] -_UI_Cabin_seatPitch_feature = Seat Pitch [cm] -_UI_Cabin_seatLengthInFirst_feature = Seat Length In First [cm] -_UI_Cabin_seatLengthInBusiness_feature = Seat Length In Business [cm] -_UI_Cabin_seatLengthInPremiumEconomy_feature = Seat Length In Premium Economy [cm] -_UI_Cabin_seatLengthInEconomy_feature = Seat Length In Economy [cm] -_UI_Cabin_graphicSettings_feature = Graphic Settings -_UI_Cabin_seatsPerRowInEconomyClass_feature = Seats Per Row In Economy Class [-] -_UI_Cabin_seatsPerRowInBusinessClass_feature = Seats Per Row In Business Class [-] -_UI_Cabin_seatsPerRowInFirstClass_feature = Seats Per Row In First Class [-] -_UI_Cabin_seatsPerRowInPremiumEconomyClass_feature = Seats Per Row In Premium Economy Class [-] -_UI_Cabin_firstClassPassengers_feature = First Class Passengers [-] -_UI_Cabin_businessClassPassengers_feature = Business Class Passengers [-] -_UI_Cabin_premiumEconomyClassPassengers_feature = Premium Economy Class Passengers [-] -_UI_Cabin_economyClassPassengers_feature = Economy Class Passengers [-] -_UI_Cabin_seatsInEconomyClass_feature = Seats In Economy Class [-] -_UI_Cabin_seatsInPremiumEconomyClass_feature = Seats In Premium Economy Class [-] -_UI_Cabin_seatsInBusinessClass_feature = Seats In Business Class [-] -_UI_Cabin_seatsInFirstClass_feature = Seats In First Class [-] +_UI_Cabin_lavatories_feature = Lavatories +_UI_Cabin_galleys_feature = Galleys _UI_Cabin_stairways_feature = Stairways _UI_Cabin_curtains_feature = Curtains _UI_Cabin_stowages_feature = Stowages -_UI_Cabin_EconomyClassPassengers_feature = Economy Class Passengers [-] -_UI_Cabin_aisleWidth_feature = Aisle Width [cm] -_UI_Cabin_numberOfDecks_feature = Number Of Decks [-] -_UI_Cabin_seatsPerRow_feature = Seats Per Row [-] -_UI_Cabin_curtain_feature = Curtain -_UI_Cabin_FirstClassPassengers_feature = First Class Passengers [-] -_UI_Cabin_BusinessClassPassengers_feature = Business Class Passengers [-] -_UI_Cabin_PremiumEconomyClassPassengers_feature = Premium Economy Class Passengers [-] -_UI_Cabin_lavatories_feature = Lavatories -_UI_Cabin_xDimension_feature = XDimension [cm] -_UI_Cabin_yDimension_feature = YDimension [cm] -_UI_Cabin_SeatsInEconomyClass_feature = Seats In Economy Class [-] -_UI_Cabin_SeatsInPremiumEconomyClass_feature = Seats In Premium Economy Class [-] -_UI_Cabin_SeatsInBusinessClass_feature = Seats In Business Class [-] -_UI_Cabin_SeatsInFirstClass_feature = Seats In First Class [-] -_UI_Cabin_exits_feature = Exits -_UI_Cabin_stowage_feature = Stowage -_UI_Cabin_rowNonexistent_feature = Row Nonexistent [-] -_UI_Cabin_partition_feature = Partition -_UI_Cabin_scale_feature = Scale -_UI_Cabin_cabinLength_description = The length of the cabin test 123 Martins toller commentar _UI_Cabin_passengers_feature = Passengers -_UI_Cabin_seatPitchInFirst_feature = Seat Pitch In First [cm] -_UI_Cabin_seatPitchInBusiness_feature = Seat Pitch In Business [cm] -_UI_Cabin_seatPitchInPremiumEco_feature = Seat Pitch In Premium Eco [cm] -_UI_Cabin_seatPitchInEconomy_feature = Seat Pitch In Economy [cm] -_UI_Cabin_framesPerSecond_feature = Frames [s] -_UI_Cabin_firstClasses_feature = First Classes -_UI_Cabin_businessClasses_feature = Business Classes -_UI_Cabin_economyClasses_feature = Economy Classes -_UI_Cabin_premiumEconomyClasses_feature = Premium Economy Classes -_UI_Cabin_usePresetSettings_feature = Use Preset Settings -_UI_Cabin_speedFactor_feature = Speed Factor -_UI_Cabin_passengersBoardingPerMinute_feature = Passengers Boarding Per Minute -_UI_Cabin_realTime_feature = Real Time [s] -_UI_Cabin_SimulationTime_feature = Simulation Time [s] -_UI_Cabin_realElapsedTime_feature = Real Elapsed Time [s] -_UI_Cabin_EstimatedSimulationTime_feature = Estimated Simulation Time [s] -_UI_Cabin_simulationSettings_feature = Simulation Settings -_UI_Cabin_aircraftType_feature = Aircraft Type -_UI_AircraftType_regional_literal = regional -_UI_AircraftType_narrowbody_literal = narrowbody -_UI_AircraftType_widebody_literal = widebody -############################ -# Monuments -_UI_PhysicalObject_name_feature = Name -_UI_PhysicalObject_id_feature = Id -_UI_PhysicalObject_type = Physical Object -_UI_PhysicalObject_xPosition_feature = XPosition [cm] -_UI_PhysicalObject_yPosition_feature = YPosition [cm] -_UI_PhysicalObject_xDimension_feature = XDimension [cm] -_UI_PhysicalObject_yDimension_feature = YDimension [cm] -_UI_PhysicalObject_yNowXPosition_feature = YNow XPosition -_UI_PhysicalObject_yNowXDimension_feature = YNow XDimension -_UI_ObjectOption_Seat_literal = Seat -_UI_ObjectOption_Galley_literal = Galley -_UI_ObjectOption_Lavatory_literal = Lavatory -_UI_ObjectOption_Stairway_literal = Stairway -_UI_ObjectOption_Curtain_literal = Curtain -_UI_ObjectOption_Stowage_literal = Stowage - -# Lavatories -_UI_Lavatory_type = Lavatory -_UI_Lavatory_xPosition_feature = XPosition [cm] -_UI_Lavatory_yPosition_feature = YPosition [cm] -_UI_Lavatory_xDimension_feature = XDimension [cm] -_UI_Lavatory_yDimension_feature = YDimension -_UI_LavatoryPorperties_xDimension_literal = xDimension [cm] -_UI_LavatoryPorperties_yDimension_literal = yDimension [cm] - -# Galley -_UI_Galley_type = Galley -_UI_Galley_GalleyAfterRow_feature = Galley After Row -_UI_Galley_xPosition_feature = XPosition [cm] -_UI_Galley_yPosition_feature = YPosition [cm] -_UI_Galley_xDimension_feature = XDimension [cm] -_UI_Galley_yDimension_feature = YDimension [cm] - -# Stairway -_UI_Stairway_type = Stairway -_UI_Stairway_xDimension_feature = XDimension [cm] -_UI_Stairway_yDimension_feature = YDimension [cm] -_UI_Stairway_xPosition_feature = XPosition [cm] -_UI_Stairway_yPosition_feature = YPosition [cm] -_UI_Stairway_direction_feature = Direction -_UI_StairwayDirection_up_literal = up -_UI_StairwayDirection_down_literal = down - -# Curtain -_UI_Curtain_type = Curtain -_UI_Curtain_postitionAfterRow_feature = Postition After Row -_UI_Curtain_curtainOpen_feature = Curtain Open -_UI_Curtain_xPosition_feature = XPosition [cm] -_UI_Curtain_yPosition_feature = YPosition [cm] -_UI_Curtain_xDimension_feature = XDimension [cm] -_UI_Curtain_yDimension_feature = YDimension [cm] -_UI_Curtain_name_feature = Name - -# Stowage -_UI_Stowage_type = Stowage -_UI_Stowage_xPosition_feature = XPosition [cm] -_UI_Stowage_yPosition_feature = YPosition [cm] -_UI_Stowage_xDimension_feature = XDimension [cm] -_UI_Stowage_yDimension_feature = YDimension [cm] - -############################ -# Rows -_UI_Row_type = Row _UI_Row_seats_feature = Seats _UI_Row_rowNumber_feature = Row Number -_UI_Row_rowExistance_feature = Row Existance -_UI_Row_offsetInRow_feature = Offset In Row -_UI_Row_additionalLegroom_feature = Additional Legroom -_UI_Row_seatPitch_feature = Seat Pitch [cm] -############################ -# Seats +_UI_TravelClass_rows_feature = Rows +_UI_TravelClass_sequence_feature = Sequence +_UI_TravelClass_passengers_feature = Passengers [-] +_UI_TravelClass_availableSeats_feature = Available Seats [-] +_UI_TravelClass_seatPitch_feature = Seat Pitch [cm] +_UI_TravelClass_xDimensionOfSeats_feature = Seat Dimension X [cm] +_UI_TravelClass_yDimensionOfSeats_feature = Seat Dimension Y [cm] +_UI_TravelClass_name_feature = Name +_UI_TravelClass_rowStructure_feature = Row Structure +_UI_TravelClass_loadFactor_feature = Load Factor [%] +_UI_TravelClass_travelOption_feature = Travel Option -_UI_CrewSeat_type = Crew Seat -_UI_CrewSeat_SeatNumber_feature = Seat Number -_UI_Seat_type = Seat _UI_Seat_seatBlocked_feature = Seat Blocked _UI_Seat_crewSeat_feature = Crew Seat -_UI_Seat_seatNumber_feature = Seat Number -_UI_Seat_seatType_feature = Seat Type -_UI_SeatsPerRow_Business_literal = Business -_UI_SeatsPerRow_First_literal = -_UI_Seat_seatId_feature = Seat Id -_UI_SeatLetter_A_literal = A -_UI_SeatLetter_B_literal = B -_UI_SeatLetter_C_literal = C -_UI_SeatLetter_D_literal = D -_UI_SeatLetter_E_literal = E -_UI_SeatLetter_F_literal = F -_UI_SeatProperties_width_literal = width [cm] -_UI_SeatProperties_length_literal = length [cm] -_UI_Seat_xPosition_feature = XPosition [cm] -_UI_Seat_yPosition_feature = YPosition [cm] -_UI_Seat_passenger_feature = Passenger -_UI_Seat_width_feature = Width [cm] -_UI_Seat_length_feature = Length [cm] -_UI_SeatsPerRow_Economy_literal = Economy _UI_Seat_letter_feature = Letter _UI_Seat_travelClass_feature = Travel Class -_UI_Seat_name_feature = Name _UI_Seat_row_feature = Row -_UI_Seat_isOccupied_feature = Is Occupied _UI_Seat_occupied_feature = Occupied +_UI_Seat_passenger_feature = Passenger _UI_Seat_currentlyFolded_feature = Currently Folded -############################ -# Doors -_UI_Door_type = Door -_UI_Door_yPosition_feature = YPosition -_UI_Door_onBothSides_feature = On Both Sides -_UI_Door_width_feature = Width [cm] -_UI_Door_id_feature = Id -_UI_Door_doorType_feature = Door Type -_UI_Door_widthOfMainDoor_feature = Width Of Main Door [cm] -_UI_Door_widthOfEmergencyExit_feature = Width Of Emergency Exit [cm] -_UI_Door_yNowXPosition_feature = YNow XPosition -_UI_Door_xPosition_feature = XPosition [cm] -_UI_DoorType_standardDoor_literal = -_UI_DoorType_mainDoor_literal = mainDoor -_UI_DoorType_emergencyExit_literal = emergencyExit -_UI_Door_numberOfSimultaneousPassengers_feature = Number Of Simultaneous Passengers [-] -_UI_Door_isActive_feature = Is Active -_UI_Door_waitingPassengers_feature = Waiting Passengers - -_UI_EmergencyExits_type = Emergency Exits -_UI_EmergencyExits_ExitInRow_feature = Exit In Row -_UI_EmergencyExit_type = Emergency Exit -_UI_EmergencyExit_ExitInRow_feature = Exit In Row -_UI_EmergencyExit_type_feature = Type -_UI_EmergencyExit_yPosition_feature = YPosition [cm] -_UI_ExitType_onWing_literal = onWing -_UI_ExitType_beforeRow_literal = beforeRow -_UI_ExitType_inRow_literal = inRow -_UI_ExitType_betweenClasses_literal = betweenClasses - -_UI_StandardDoor_type = Standard Door -_UI_MainDoor_type = Main Door - -############################ -# Passenger -_UI_CrewMember_type = Crew Member -_UI_CrewMember_id_feature = Id -_UI_CrewMember_seat_feature = Seat - -_UI_Passenger_Name_feature = Name -_UI_Passenger_type = Passenger _UI_Passenger_id_feature = Id _UI_Passenger_sex_feature = Sex -_UI_Passenger_seat_feature = Seat -_UI_Sex_male_literal = male -_UI_Sex_female_literal = female _UI_Passenger_height_feature = Height [cm] -_UI_Passenger_age_feature = Age +_UI_Passenger_age_feature = Age [y] _UI_Passenger_weight_feature = Weight [kg] -_UI_Passenger_class_feature = Class _UI_Passenger_door_feature = Door +_UI_Passenger_seatID_feature = Seat ID +_UI_Passenger_Name_feature = Name _UI_Passenger_boardingTime_feature = Boarding Time [s] -_UI_Passenger_seatRef_feature = Seat Ref +_UI_Passenger_seat_feature = Seat _UI_Passenger_width_feature = Width [cm] _UI_Passenger_depth_feature = Depth [cm] _UI_Passenger_orientationInDegree_feature = Orientation [°] @@ -277,116 +91,58 @@ _UI_Passenger_positionY_feature = Position Y [cm] _UI_Passenger_isSeated_feature = Is Seated _UI_Passenger_walkingSpeed_feature = Walking Speed [m/s] _UI_Passenger_startBoardingAfterDelay_feature = Start Boarding After Delay [s] -_UI_Passenger_numberOfWaits_feature = Number Of Waits -_UI_Passenger_hasLuggage_feature = Has Luggage +_UI_Passenger_numberOfWaits_feature = Number Of Waits [-] _UI_Passenger_luggageStowTime_feature = Luggage Stow Time [s] +_UI_Passenger_luggageStowDistance_feature = Luggage Stow Distance [cm] _UI_Passenger_travelClass_feature = Travel Class _UI_Passenger_passengerMood_feature = Passenger Mood -_UI_PassengerMood_agressive_literal = agressive -_UI_PassengerMood_passive_literal = passive -_UI_Passenger_makeWayOperations_feature = Make Way Operations -_UI_Passenger_numberOfMakeWayOperations_feature = Number Of Make Way Operations -_UI_Passenger_luggageStowingDistance_feature = Luggage Stowing Distance [cm] +_UI_Passenger_numberOfMakeWayOperations_feature = Number Of Make Way Operations [-] _UI_Passenger_luggage_feature = Luggage -_UI_LuggageSize_small_literal = small -_UI_LuggageSize_medium_literal = medium -_UI_LuggageSize_big_literal = big -_UI_LuggageSize_none_literal = none - -############################ -# TravelClass -_UI_TravelClass_type = Travel Class -_UI_TravelClass_xDimensionOfSeats_feature = XDimension Of Seats [cm] -_UI_TravelClass_yDimensionOfSeats_feature = YDimension Of Seats [cm] -_UI_TravelClass_rows_feature = Rows -_UI_TravelClass_sequence_feature = Sequence -_UI_TravelClass_passengers_feature = Passengers -_UI_TravelClass_availableSeats_feature = Available Seats [-] -_UI_TravelClass_seatPitch_feature = Seat Pitch [cm] -_UI_TravelClass_seatsPerRow_feature = Seats Per Row -_UI_TravelClass_seatLength_feature = Seat Length [cm] -_UI_TravelClass_seatWidth_feature = Seat Width [cm] -_UI_TravelClass_loadFactor_feature = Load Factor [%] -_UI_TravelClass_name_feature = Name -_UI_TravelClass_seatsPerRowString_feature = Seats Per Row String [-] -_UI_TravelClass_rowStructure_feature = Row Structure -_UI_TravelOption_FirstClass_literal = FirstClass -_UI_TravelOption_BusinessClass_literal = BusinessClass -_UI_TravelOption_PremiumEconomyClass_literal = PremiumEconomyClass -_UI_TravelOption_EconomyClass_literal = EconomyClass - -_UI_PassengerClass_type = Passenger Class -_UI_PassengerClass_type_feature = Type -_UI_PassengerClass_EReference0_feature = EReference0 -_UI_PassengerClass_rows_feature = Rows -_UI_PassengerClass_EReference1_feature = EReference1 -_UI_PassengerClass_availableSeats_feature = Available Seats [-] -_UI_PassengerClass_sequence_feature = Sequence -_UI_PassengerClass_seatDimensionY_feature = Seat Dimension Y [cm] -_UI_PassengerClass_seatDimensionX_feature = Seat Dimension X [cm] -_UI_PassengerClass_seatPitch_feature = Seat Pitch [cm] - - -_UI_ClassType_First_literal = First -_UI_ClassType_Business_literal = Business -_UI_ClassType_Economy_literal = Economy -_UI_ClassType_PremiumEconomy_literal = -_UI_ClassType_PremiumEco_literal = PremiumEconomy -_UI_BusinessClass_type = Business Class -_UI_FirstClass_type = First Class -_UI_EconomyClass_type = Economy Class -_UI_PremiumEconomyClass_type = Premium Economy Class +_UI_CrewMember_id_feature = Id +_UI_CrewMember_seat_feature = Seat -_UI_BCwithBlockedSeat_no_literal = no -_UI_BCwithBlockedSeat_yes_literal = yes +_UI_PhysicalObject_yPosition_feature = Position Y [cm] +_UI_PhysicalObject_xPosition_feature = Position X [cm] +_UI_PhysicalObject_yDimension_feature = Dimension Y [cm] +_UI_PhysicalObject_xDimension_feature = Dimension X [cm] +_UI_PhysicalObject_name_feature = Name +_UI_PhysicalObject_id_feature = Id +_UI_Stairway_direction_feature = Direction +_UI_Curtain_postitionAfterRow_feature = Postition After Row +_UI_Curtain_curtainOpen_feature = Curtain Open -############################ -# Cabin view setings (hidden) -_UI_CabinViewSettings_type = View Settings -_UI_CabinViewSettings_showSeatlabels_feature = Show Seatlabels -_UI_CabinViewSettings_showRowLabels_feature = Show Row Labels -_UI_CabinViewSettings_showGalleyAndLavatoryLabels_feature = Show Galley And Lavatory Labels -_UI_CabinViewSettings_showCurtains_feature = Show Curtains -_UI_CabinViewSettings_showSeats_feature = Show Seats -_UI_CabinViewSettings_showGalleys_feature = Show Galleys -_UI_CabinViewSettings_showLavatories_feature = Show Lavatories -_UI_CabinViewSettings_showDoors_feature = Show Doors -_UI_CabinViewSettings_showOccupiedSeats_feature = Show Occupied Seats -_UI_CabinViewSettings_sizeOfPassengerCircle_feature = Size Of Passenger Circle -_UI_CabinViewSettings_doorOffSetInPixels_feature = Door Off Set In Pixels -_UI_CabinViewSettings_xZeroInPixels_feature = XZero In Pixels -_UI_CabinViewSettings_yZeroInPixels_feature = YZero In Pixels -_UI_CabinViewSettings_cabinWidthInPixels_feature = Cabin Width In Pixels +_UI_Door_xPosition_feature = Position X [cm] +_UI_Door_onBothSides_feature = On Both Sides +_UI_Door_width_feature = Width [cm] +_UI_Door_id_feature = Id +_UI_Door_numberOfSimultaneousPassengers_feature = Number Of Simultaneous Passengers [-] +_UI_Door_isActive_feature = Is Active +_UI_Door_waitingPassengers_feature = Waiting Passengers [-] +_UI_Door_doorOption_feature = Door Option -############################ -# Properties -_UI_SimulationProperties_type = Simulation Properties -_UI_SimulationProperties_luggage_feature = Luggage -_UI_SimulationProperties_passenger_feature = Passenger -_UI_SimulationProperties_luggageProperties_feature = Luggage Properties -_UI_SimulationProperties_passengerProperties_feature = Passenger Properties -_UI_SimulationProperties_seatInterferenceStandingUpPassengerWaitingTime_feature = Seat Interference Standing Up Passenger Waiting Time [s] -_UI_SimulationProperties_seatInterferenceProcessTime_feature = Seat Interference Process Time [s] -_UI_SimulationProperties_threadSleepTimeDefault_feature = Thread Sleep Time Default [ms] +_UI_SimulationProperties_scale_feature = Scale +_UI_SimulationProperties_framesPerSecond_feature = Frames [1/s] +_UI_SimulationProperties_usePresetSettings_feature = Use Preset Settings +_UI_SimulationProperties_simulateWithoutUI_feature = Simulate Without UI +_UI_SimulationProperties_numberOfSimulationLoops_feature = Number Of Simulation Loops [-] +_UI_SimulationProperties_randomSortBetweenLoops_feature = Random Sort Between Loops _UI_SimulationProperties_useFoldableSeats_feature = Use Foldable Seats _UI_SimulationProperties_bringYourOwnSeat_feature = Bring Your Own Seat +_UI_SimulationProperties_results_feature = Results _UI_SimulationProperties_sorting_feature = Sorting -_UI_SortingStyle_Random_literal = Random -_UI_SortingStyle_WindowToAisle_literal = WindowToAisle -_UI_SortingStyle_RearToFront_literal = RearToFront +_UI_SimulationProperties_simulationSpeedFactor_feature = Simulation Speed Factor [-] +_UI_SimulationProperties_seatInterferenceStandingUpPassengerWaitingTime_feature = Seat Interference Standing Up Passenger Waiting Time [s] +_UI_SimulationProperties_seatInterferenceProcessTime_feature = Seat Interference Process Time [s] +_UI_SimulationProperties_threadSleepTimeDefault_feature = Thread Sleep Time Default [s] _UI_SimulationProperties_developerMode_feature = Developer Mode -_UI_SimulationProperties_simulationSpeedFactor_feature = Simulation Speed Factor -_UI_SimulationProperties_simulateWithoutUI_feature = Simulate Without UI -_UI_SimulationProperties_numberOfSimulationLoops_feature = Number Of Simulation Loops -_UI_SimulationProperties_randomSortBetweenLoops_feature = Random Sort Between Loops -_UI_SimulationProperties_results_feature = Results -_UI_SimulationProperties_passengersBoardingPerMinute_feature Passenger boarding [PAX/min] +_UI_SimulationProperties_luggageProperties_feature = Luggage Properties +_UI_SimulationProperties_passengerProperties_feature = Passenger Properties +_UI_SimulationProperties_passengersBoardingPerMinute_feature = Passengers Boarding Per Minute [PAX/min] -_UI_LuggageProperties_type = Luggage -_UI_LuggageProperties_luggageStowingDistanceFromSeatMean_feature = Distance - mean [cm] -_UI_LuggageProperties_luggageStowingDistanceFromSeatDeviation_feature = Distance - deviation [cm] +_UI_LuggageProperties_luggageStowDistanceFromSeatMean_feature = Distance - mean [cm] +_UI_LuggageProperties_luggageStowDistanceFromSeatDeviation_feature = Distance - deviation [cm] _UI_LuggageProperties_percentageOfPassengersWithNoLuggage_feature = No luggage [%] _UI_LuggageProperties_percentageOfPassengersWithSmallLuggage_feature = Small luggage [%] _UI_LuggageProperties_percentageOfPassengersWithMediumLuggage_feature = Medium luggage [%] @@ -398,8 +154,13 @@ _UI_LuggageProperties_passengerMediumLuggageStowTimeDeviation_feature = Medium - _UI_LuggageProperties_passengerBigLuggageStowTimeMean_feature = Big - mean [s] _UI_LuggageProperties_passengerBigLuggageStowTimeDeviation_feature = Big - deviation [s] -_UI_PassengerProperties_type = Passenger -_UI_PassengerProperties_passengersBoardingPerMinute_feature = Passengers Boarding Per Minute [-] +_UI_SimulationResult_boardingTime_feature = Boarding Time [s] +_UI_SimulationResult_passengers_feature = Passengers +_UI_SimulationResult_name_feature = Name +_UI_SimulationResult_id_feature = Id +_UI_SimulationResult_date_feature = Date +_UI_SimulationResult_boardingTimeString_feature = Boarding Time String + _UI_PassengerProperties_passengerWidthMeanMale_feature = Width - mean [cm] _UI_PassengerProperties_passengerWidthDeviationMale_feature = Width - deviation [cm] _UI_PassengerProperties_passengerWeightMeanMale_feature = Weight - mean [kg] @@ -418,26 +179,83 @@ _UI_PassengerProperties_passengerHeightDeviationFemale_feature = Height - deviat _UI_PassengerProperties_passengerDepthMeanFemale_feature = Depth - mean [cm] _UI_PassengerProperties_passengerDepthDeviationFemale_feature = Depth - deviation [cm] -############################ -# Results -_UI_SimulationResult_type = Simulation Result -_UI_SimulationResult_BoardingTime_feature = Boarding Time [s] -_UI_SimulationResult_Passengers_feature = Passengers -_UI_SimulationResult_name_feature = Name -_UI_SimulationResult_id_feature = Id -_UI_SimulationResult_date_feature = Date -_UI_SimulationResult_testObject_feature = Test Object -_UI_SimulationResult_testObject2_feature = Test Object2 -_UI_SimulationResult_boardingTime_feature = Boarding Time [s] -_UI_SimulationResult_passengers_feature = Passengers -_UI_SimulationResult_boardingTimeString_feature = Boarding Time String [s] - -_UI_Result_type = Result -_UI_Result_BoardingTime_feature = Boarding Time [s] -_UI_Result_Passengers_feature = Passengers -_UI_Result_name_feature = Name -_UI_Result_id_feature = Id - - - +_UI_Unknown_feature = Unspecified +_UI_Sex_male_literal = male +_UI_Sex_female_literal = female +_UI_StairwayDirection_up_literal = up +_UI_StairwayDirection_down_literal = down +_UI_AircraftType_regional_literal = regional +_UI_AircraftType_narrowbody_literal = narrowbody +_UI_AircraftType_widebody_literal = widebody +_UI_PassengerMood_agressive_literal = aggressive +_UI_PassengerMood_passive_literal = passive +_UI_LuggageSize_small_literal = small +_UI_LuggageSize_medium_literal = medium +_UI_LuggageSize_big_literal = big +_UI_LuggageSize_none_literal = none +_UI_SortingStyle_Random_literal = Random +_UI_SortingStyle_WindowToAisle_literal = Window to Aisle +_UI_SortingStyle_RearToFront_literal = Rear to Front +_UI_TravelOption_FirstClass_literal = First Class +_UI_TravelOption_BusinessClass_literal = Business Class +_UI_TravelOption_PremiumEconomyClass_literal = Premium Economy Class +_UI_TravelOption_EconomyClass_literal = Economy Class +_UI_ObjectOption_Seat_literal = Seat +_UI_ObjectOption_Galley_literal = Galley +_UI_ObjectOption_Lavatory_literal = Lavatory +_UI_ObjectOption_Stairway_literal = Stairway +_UI_ObjectOption_Curtain_literal = Curtain +_UI_ObjectOption_Stowage_literal = Stowage +_UI_DoorOption_MainDoor_literal = Main Door +_UI_DoorOption_StandardDoor_literal = Standard Door +_UI_DoorOption_EmergencyExit_literal = Emergency Exit + + +_UI_Passenger_distanceWalked_feature = Distance Walked +_UI_SimulationResult_waymakingSkipped_feature = Waymaking Skipped +_UI_SimulationResult_waymakingCompleted_feature = Waymaking Completed +_UI_SimulationProperties_dataExport_feature = Data Export +_UI_SimulationProperties_displayMap_feature = Display Map +_UI_Cabin_simulationResults_feature = Simulation Results +_UI_Seat_foldedAway_feature = Folded Away +_UI_Seat_foldedUpwards_feature = Folded Upwards +_UI_SimulationProperties_useSidewaysFoldableSeats_feature = Use Sideways Foldable Seats +_UI_SimulationProperties_useLiftingSeatPanSeats_feature = Use Lifting Seat Pan Seats +_UI_SimulationProperties_sidewaysFoldabeSeatDefoldingTime_feature = Sideways Foldabe Seat Defolding Time +_UI_SimulationProperties_liftingSeatPanDefoldingTime_feature = Lifting Seat Pan Defolding Time +_UI_SimulationProperties_sidewaysFoldabeSeatPopupTime_feature = Sideways Foldabe Seat Popup Time +_UI_SimulationProperties_liftingSeatPanPopupTime_feature = Lifting Seat Pan Popup Time +_UI_PassengerProperties_passengerAgressiveMoodShare_feature = Passenger Agressive Mood Share +_UI_PassengerProperties_passengerAggressiveMoodShare_feature = Passenger Aggressive Mood Share +_UI_PassengerMood_aggressive_literal = aggressive +_UI_Seat_seatType_feature = Seat Type +_UI_SeatType_Default_literal = Default +_UI_SeatType_FoldedAway_literal = FoldedAway +_UI_SeatType_FoldedUpwards_literal = +_UI_SimulationProperties_layoutConcept_feature = Layout Concept +_UI_LayoutConcept_Default_literal = Default +_UI_LayoutConcept_SidwaysFoldableSeat_literal = SidwaysFoldableSeat +_UI_LayoutConcept_LiftingSeatPanSeats_literal = LiftingSeatPanSeats +_UI_LayoutConcept_bringYourOwnSeat_literal = bringYourOwnSeat +_UI_SeatType_BringYourOwn_literal = BringYourOwn +_UI_Seat_layoutConcept_feature = Layout Concept +_UI_SimulationProperties_seatInterferenceProcessTimeFoldingSeat_feature = Seat Interference Process Time Folding Seat +_UI_SimulationResult_layoutConceptType_feature = Layout Concept Type +_UI_Passenger_costOfPath_feature = Cost Of Path +_UI_SimulationProperties_sortPassengerBetweenLoops_feature = Sort Passenger Between Loops +_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeDeviation_feature = Sideways Foldabe Seat Popup Time Deviation +_UI_SimulationProperties_liftingSeatPanPopupTimeDeviation_feature = Lifting Seat Pan Popup Time Deviation +_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeMean_feature = Sideways Foldabe Seat Popup Time Mean +_UI_SimulationProperties_liftingSeatPanPopupTimeMean_feature = Lifting Seat Pan Popup Time Mean +_UI_SimulationProperties_seatInterferenceProcessTimeMean_feature = Seat Interference Process Time Mean +_UI_SimulationProperties_seatInterferenceProcessTimeDeviation_feature = Seat Interference Process Time Deviation +_UI_SimulationProperties_seatInterferenceProcessTimeFoldingSeatMean_feature = Seat Interference Process Time Folding Seat Mean +_UI_SimulationProperties_seatInterferenceProcessTimeFoldingSeatDeviation_feature = Seat Interference Process Time Folding Seat Deviation +_UI_Passenger_totalTimeWaited_feature = Total Time Waited +_UI_PassengerProperties_seatInterferenceStandingUpPassengerWaitingTime_feature = Seat Interference Standing Up Passenger Waiting Time +_UI_PassengerProperties_seatInterferenceProcessTimeMean_feature = Seat Interference Process Time Mean +_UI_PassengerProperties_seatInterferenceProcessTimeDeviation_feature = Seat Interference Process Time Deviation +_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatMean_feature = Seat Interference Process Time Folding Seat Mean +_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatDeviation_feature = Seat Interference Process Time Folding Seat Deviation +_UI_PassengerProperties_passivePassengerWaitingTimeAfterCollision_feature = Passive Passenger Waiting Time After Collision diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/BusinessClassItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/BusinessClassItemProvider.java deleted file mode 100644 index 381b9008..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/BusinessClassItemProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.BusinessClass; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.BusinessClass} object. - * - * - * @generated - */ -public class BusinessClassItemProvider extends TravelClassItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public BusinessClassItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns BusinessClass.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/BusinessClass")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((BusinessClass)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_BusinessClass_type") : - getString("_UI_BusinessClass_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProvider.java index 430f2143..0ba0de31 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProvider.java @@ -25,11 +25,13 @@ * @generated */ public class CabinItemProvider extends NamedElementItemProvider { + /** * This constructs an instance from a factory and a notifier. - * - * @generated + * + * @param adapterFactory the adapter factory + * @generated */ public CabinItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); @@ -38,8 +40,10 @@ public CabinItemProvider(AdapterFactory adapterFactory) { /** * This returns the property descriptors for the adapted class. - * - * @generated + * + * @param object the object + * @return the property descriptors + * @generated */ @Override public List getPropertyDescriptors(Object object) { @@ -50,13 +54,10 @@ public List getPropertyDescriptors(Object object) { addYDimensionPropertyDescriptor(object); addRowNonexistentPropertyDescriptor(object); addAisleWidthPropertyDescriptor(object); - addFramesPerSecondPropertyDescriptor(object); addNumberOfDecksPropertyDescriptor(object); - addSimulationSettingsPropertyDescriptor(object); - addScalePropertyDescriptor(object); addAircraftTypePropertyDescriptor(object); - addUsePresetSettingsPropertyDescriptor(object); - addSpeedFactorPropertyDescriptor(object); + addSimulationSettingsPropertyDescriptor(object); + addSimulationResultsPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -105,55 +106,12 @@ protected void addYDimensionPropertyDescriptor(Object object) { null)); } - /** - * This adds a property descriptor for the Scale feature. - * - * @generated - */ - protected void addScalePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Cabin_scale_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Cabin_scale_feature", "_UI_Cabin_type"), - CabinPackage.Literals.CABIN__SCALE, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Frames Per Second feature. - * - * @generated - */ - protected void addFramesPerSecondPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Cabin_framesPerSecond_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Cabin_framesPerSecond_feature", "_UI_Cabin_type"), - CabinPackage.Literals.CABIN__FRAMES_PER_SECOND, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } - /** * This adds a property descriptor for the Number Of Decks feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addNumberOfDecksPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -174,8 +132,9 @@ protected void addNumberOfDecksPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Aircraft Type feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addAircraftTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -194,63 +153,41 @@ protected void addAircraftTypePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Use Preset Settings feature. - * - * @generated - */ - protected void addUsePresetSettingsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Cabin_usePresetSettings_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Cabin_usePresetSettings_feature", "_UI_Cabin_type"), - CabinPackage.Literals.CABIN__USE_PRESET_SETTINGS, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Speed Factor feature. + * This adds a property descriptor for the Simulation Settings feature. * * * @generated */ - protected void addSpeedFactorPropertyDescriptor(Object object) { + protected void addSimulationSettingsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Cabin_speedFactor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Cabin_speedFactor_feature", "_UI_Cabin_type"), - CabinPackage.Literals.CABIN__SPEED_FACTOR, + getString("_UI_Cabin_simulationSettings_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Cabin_simulationSettings_feature", "_UI_Cabin_type"), + CabinPackage.Literals.CABIN__SIMULATION_SETTINGS, true, false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + true, + null, null, null)); } /** - * This adds a property descriptor for the Simulation Settings feature. + * This adds a property descriptor for the Simulation Results feature. * * * @generated */ - protected void addSimulationSettingsPropertyDescriptor(Object object) { + protected void addSimulationResultsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Cabin_simulationSettings_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Cabin_simulationSettings_feature", "_UI_Cabin_type"), - CabinPackage.Literals.CABIN__SIMULATION_SETTINGS, + getString("_UI_Cabin_simulationResults_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Cabin_simulationResults_feature", "_UI_Cabin_type"), + CabinPackage.Literals.CABIN__SIMULATION_RESULTS, true, false, true, @@ -262,8 +199,9 @@ protected void addSimulationSettingsPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Row Nonexistent feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addRowNonexistentPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -284,8 +222,9 @@ protected void addRowNonexistentPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Aisle Width feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addAisleWidthPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -315,6 +254,8 @@ public Collection getChildrenFeatures( Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); + childrenFeatures.add(CabinPackage.Literals.CABIN__SIMULATION_SETTINGS); + childrenFeatures.add(CabinPackage.Literals.CABIN__SIMULATION_RESULTS); childrenFeatures.add(CabinPackage.Literals.CABIN__CLASSES); childrenFeatures.add(CabinPackage.Literals.CABIN__DOORS); childrenFeatures.add(CabinPackage.Literals.CABIN__LAVATORIES); @@ -328,8 +269,12 @@ public Collection getChildrenFeatures( } /** - * - * @generated + * . + * + * @param object the object + * @param child the child + * @return the child feature + * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { @@ -380,14 +325,12 @@ public void notifyChanged(Notification notification) { case CabinPackage.CABIN__YDIMENSION: case CabinPackage.CABIN__ROW_NONEXISTENT: case CabinPackage.CABIN__AISLE_WIDTH: - case CabinPackage.CABIN__FRAMES_PER_SECOND: case CabinPackage.CABIN__NUMBER_OF_DECKS: - case CabinPackage.CABIN__SCALE: case CabinPackage.CABIN__AIRCRAFT_TYPE: - case CabinPackage.CABIN__USE_PRESET_SETTINGS: - case CabinPackage.CABIN__SPEED_FACTOR: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; + case CabinPackage.CABIN__SIMULATION_SETTINGS: + case CabinPackage.CABIN__SIMULATION_RESULTS: case CabinPackage.CABIN__CLASSES: case CabinPackage.CABIN__DOORS: case CabinPackage.CABIN__LAVATORIES: @@ -406,8 +349,10 @@ public void notifyChanged(Notification notification) { * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s * describing the children that can be created under this object. - * - * @generated + * + * @param newChildDescriptors the new child descriptors + * @param object the object + * @generated */ @Override protected void collectNewChildDescriptors( @@ -416,38 +361,23 @@ protected void collectNewChildDescriptors( newChildDescriptors.add (createChildParameter - (CabinPackage.Literals.CABIN__CLASSES, - CabinFactory.eINSTANCE.createBusinessClass())); + (CabinPackage.Literals.CABIN__SIMULATION_SETTINGS, + CabinFactory.eINSTANCE.createSimulationProperties())); newChildDescriptors.add (createChildParameter - (CabinPackage.Literals.CABIN__CLASSES, - CabinFactory.eINSTANCE.createFirstClass())); + (CabinPackage.Literals.CABIN__SIMULATION_RESULTS, + CabinFactory.eINSTANCE.createSimulationResult())); newChildDescriptors.add (createChildParameter (CabinPackage.Literals.CABIN__CLASSES, - CabinFactory.eINSTANCE.createEconomyClass())); - - newChildDescriptors.add - (createChildParameter - (CabinPackage.Literals.CABIN__CLASSES, - CabinFactory.eINSTANCE.createPremiumEconomyClass())); - - newChildDescriptors.add - (createChildParameter - (CabinPackage.Literals.CABIN__DOORS, - CabinFactory.eINSTANCE.createMainDoor())); + CabinFactory.eINSTANCE.createTravelClass())); newChildDescriptors.add (createChildParameter (CabinPackage.Literals.CABIN__DOORS, - CabinFactory.eINSTANCE.createEmergencyExit())); - - newChildDescriptors.add - (createChildParameter - (CabinPackage.Literals.CABIN__DOORS, - CabinFactory.eINSTANCE.createStandardDoor())); + CabinFactory.eINSTANCE.createDoor())); newChildDescriptors.add (createChildParameter @@ -483,8 +413,9 @@ protected void collectNewChildDescriptors( /** * Return the resource locator for this item provider's resources. - * - * @generated + * + * @return the resource locator + * @generated */ @Override public ResourceLocator getResourceLocator() { diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProviderAdapterFactory.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProviderAdapterFactory.java index 04a2c29a..67005e2e 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProviderAdapterFactory.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CabinItemProviderAdapterFactory.java @@ -117,95 +117,26 @@ public Adapter createRowAdapter() { } /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.BusinessClass} instances. + * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.TravelClass} instances. * * * @generated */ - protected BusinessClassItemProvider businessClassItemProvider; + protected TravelClassItemProvider travelClassItemProvider; /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.BusinessClass}. + * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.TravelClass}. * * * @generated */ @Override - public Adapter createBusinessClassAdapter() { - if (businessClassItemProvider == null) { - businessClassItemProvider = new BusinessClassItemProvider(this); + public Adapter createTravelClassAdapter() { + if (travelClassItemProvider == null) { + travelClassItemProvider = new TravelClassItemProvider(this); } - return businessClassItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.FirstClass} instances. - * - * - * @generated - */ - protected FirstClassItemProvider firstClassItemProvider; - - /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.FirstClass}. - * - * - * @generated - */ - @Override - public Adapter createFirstClassAdapter() { - if (firstClassItemProvider == null) { - firstClassItemProvider = new FirstClassItemProvider(this); - } - - return firstClassItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.EconomyClass} instances. - * - * - * @generated - */ - protected EconomyClassItemProvider economyClassItemProvider; - - /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.EconomyClass}. - * - * - * @generated - */ - @Override - public Adapter createEconomyClassAdapter() { - if (economyClassItemProvider == null) { - economyClassItemProvider = new EconomyClassItemProvider(this); - } - - return economyClassItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.PremiumEconomyClass} instances. - * - * - * @generated - */ - protected PremiumEconomyClassItemProvider premiumEconomyClassItemProvider; - - /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.PremiumEconomyClass}. - * - * - * @generated - */ - @Override - public Adapter createPremiumEconomyClassAdapter() { - if (premiumEconomyClassItemProvider == null) { - premiumEconomyClassItemProvider = new PremiumEconomyClassItemProvider(this); - } - - return premiumEconomyClassItemProvider; + return travelClassItemProvider; } /** @@ -393,72 +324,26 @@ public Adapter createStowageAdapter() { } /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.MainDoor} instances. - * - * - * @generated - */ - protected MainDoorItemProvider mainDoorItemProvider; - - /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.MainDoor}. - * - * - * @generated - */ - @Override - public Adapter createMainDoorAdapter() { - if (mainDoorItemProvider == null) { - mainDoorItemProvider = new MainDoorItemProvider(this); - } - - return mainDoorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.EmergencyExit} instances. + * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.Door} instances. * * * @generated */ - protected EmergencyExitItemProvider emergencyExitItemProvider; + protected DoorItemProvider doorItemProvider; /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.EmergencyExit}. + * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.Door}. * * * @generated */ @Override - public Adapter createEmergencyExitAdapter() { - if (emergencyExitItemProvider == null) { - emergencyExitItemProvider = new EmergencyExitItemProvider(this); + public Adapter createDoorAdapter() { + if (doorItemProvider == null) { + doorItemProvider = new DoorItemProvider(this); } - return emergencyExitItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link net.bhl.cdt.paxelerate.model.StandardDoor} instances. - * - * - * @generated - */ - protected StandardDoorItemProvider standardDoorItemProvider; - - /** - * This creates an adapter for a {@link net.bhl.cdt.paxelerate.model.StandardDoor}. - * - * - * @generated - */ - @Override - public Adapter createStandardDoorAdapter() { - if (standardDoorItemProvider == null) { - standardDoorItemProvider = new StandardDoorItemProvider(this); - } - - return standardDoorItemProvider; + return doorItemProvider; } /** @@ -575,8 +460,11 @@ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) /** * - * - * @generated + * . + * + * @param type the type + * @return true, if is factory for type + * @generated */ @Override public boolean isFactoryForType(Object type) { @@ -596,8 +484,12 @@ public Adapter adapt(Notifier notifier, Object type) { /** * - * - * @generated + * . + * + * @param object the object + * @param type the type + * @return the object + * @generated */ @Override public Object adapt(Object object, Object type) { @@ -654,10 +546,7 @@ public void fireNotifyChanged(Notification notification) { public void dispose() { if (cabinItemProvider != null) cabinItemProvider.dispose(); if (rowItemProvider != null) rowItemProvider.dispose(); - if (businessClassItemProvider != null) businessClassItemProvider.dispose(); - if (firstClassItemProvider != null) firstClassItemProvider.dispose(); - if (economyClassItemProvider != null) economyClassItemProvider.dispose(); - if (premiumEconomyClassItemProvider != null) premiumEconomyClassItemProvider.dispose(); + if (travelClassItemProvider != null) travelClassItemProvider.dispose(); if (seatItemProvider != null) seatItemProvider.dispose(); if (passengerItemProvider != null) passengerItemProvider.dispose(); if (crewMemberItemProvider != null) crewMemberItemProvider.dispose(); @@ -666,9 +555,7 @@ public void dispose() { if (stairwayItemProvider != null) stairwayItemProvider.dispose(); if (curtainItemProvider != null) curtainItemProvider.dispose(); if (stowageItemProvider != null) stowageItemProvider.dispose(); - if (mainDoorItemProvider != null) mainDoorItemProvider.dispose(); - if (emergencyExitItemProvider != null) emergencyExitItemProvider.dispose(); - if (standardDoorItemProvider != null) standardDoorItemProvider.dispose(); + if (doorItemProvider != null) doorItemProvider.dispose(); if (simulationPropertiesItemProvider != null) simulationPropertiesItemProvider.dispose(); if (luggagePropertiesItemProvider != null) luggagePropertiesItemProvider.dispose(); if (simulationResultItemProvider != null) simulationResultItemProvider.dispose(); diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CrewMemberItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CrewMemberItemProvider.java index 11cec546..9b3b91ec 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CrewMemberItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CrewMemberItemProvider.java @@ -37,6 +37,7 @@ public class CrewMemberItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CurtainItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CurtainItemProvider.java index 73744c64..515f2ca8 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CurtainItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/CurtainItemProvider.java @@ -24,6 +24,7 @@ */ public class CurtainItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/DoorItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/DoorItemProvider.java index 193fee18..b4be41a7 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/DoorItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/DoorItemProvider.java @@ -2,7 +2,6 @@ */ package net.bhl.cdt.paxelerate.model.provider; - import java.util.Collection; import java.util.List; @@ -22,6 +21,7 @@ import net.bhl.cdt.paxelerate.model.CabinPackage; import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.util.string.StringHelper; /** * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.Door} object. @@ -29,29 +29,27 @@ * * @generated */ -public class DoorItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { +public class DoorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated + * This constructs an instance from a factory and a notifier. + * + * @param adapterFactory the adapter factory + * @generated */ public DoorItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** - * This returns the property descriptors for the adapted class. - * - * - * @generated + * This returns the property descriptors for the adapted class. + * + * @param object the object + * @return the property descriptors + * @generated */ @Override public List getPropertyDescriptors(Object object) { @@ -65,15 +63,17 @@ public List getPropertyDescriptors(Object object) { addNumberOfSimultaneousPassengersPropertyDescriptor(object); addIsActivePropertyDescriptor(object); addWaitingPassengersPropertyDescriptor(object); + addDoorOptionPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the XPosition feature. - * - * - * @generated + * This adds a property descriptor for the XPosition feature. + * + * @param object the object + * @generated */ protected void addXPositionPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -92,10 +92,11 @@ protected void addXPositionPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the On Both Sides feature. - * - * - * @generated + * This adds a property descriptor for the On Both Sides feature. + * + * @param object the object + * @generated */ protected void addOnBothSidesPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -114,10 +115,11 @@ protected void addOnBothSidesPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Width feature. - * - * - * @generated + * This adds a property descriptor for the Width feature. + * + * @param object the object + * @generated */ protected void addWidthPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -137,8 +139,8 @@ protected void addWidthPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Id feature. - * - * + * * @generated */ protected void addIdPropertyDescriptor(Object object) { @@ -159,8 +161,7 @@ protected void addIdPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Number Of Simultaneous Passengers feature. - * - * + * * @generated */ protected void addNumberOfSimultaneousPassengersPropertyDescriptor(Object object) { @@ -180,10 +181,11 @@ protected void addNumberOfSimultaneousPassengersPropertyDescriptor(Object object } /** - * This adds a property descriptor for the Is Active feature. - * - * - * @generated + * This adds a property descriptor for the Is Active feature. + * + * @param object the object + * @generated */ protected void addIsActivePropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -202,10 +204,11 @@ protected void addIsActivePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Waiting Passengers feature. - * - * - * @generated + * This adds a property descriptor for the Waiting Passengers feature. + * + * @param object the object + * @generated */ protected void addWaitingPassengersPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -224,34 +227,69 @@ protected void addWaitingPassengersPropertyDescriptor(Object object) { } /** - * This returns Door.gif. - * - * - * @generated + * This adds a property descriptor for the Door Option feature. + * + * @param object the object + * @generated + */ + protected void addDoorOptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Door_doorOption_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Door_doorOption_feature", "_UI_Door_type"), + CabinPackage.Literals.DOOR__DOOR_OPTION, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns Door.gif. + * + * @param object the object + * @return the image + * @generated NOT */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Door")); + switch (((Door) object).getDoorOption()) { + case EMERGENCY_EXIT: + return overlayImage(object, getResourceLocator().getImage("full/obj16/EmergencyExit")); + default: + return overlayImage(object, getResourceLocator().getImage("full/obj16/Door")); + } + } /** - * This returns the label text for the adapted class. - * - * - * @generated + * This returns the label text for the adapted class. + * + * @param object the object + * @return the text + * @generated NOT */ @Override public String getText(Object object) { - Door door = (Door)object; - return getString("_UI_Door_type") + " " + door.getId(); + Door door = (Door) object; + String correct = "âś—"; + if (door.isIsActive()) { + correct = "âś“"; + } + return StringHelper.splitCamelCase(door.getDoorOption().getName() + " (" + correct + ")"); } - /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * + * * @generated */ @Override @@ -265,6 +303,7 @@ public void notifyChanged(Notification notification) { case CabinPackage.DOOR__ID: case CabinPackage.DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS: case CabinPackage.DOOR__IS_ACTIVE: + case CabinPackage.DOOR__DOOR_OPTION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -272,11 +311,13 @@ public void notifyChanged(Notification notification) { } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @param newChildDescriptors the new child descriptors + * @param object the object + * @generated */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { @@ -284,10 +325,11 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors } /** - * Return the resource locator for this item provider's resources. - * - * - * @generated + * Return the resource locator for this item provider's resources. + * + * @return the resource locator + * @generated */ @Override public ResourceLocator getResourceLocator() { diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EconomyClassItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EconomyClassItemProvider.java deleted file mode 100644 index a5fb8de9..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EconomyClassItemProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.EconomyClass; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.EconomyClass} object. - * - * - * @generated - */ -public class EconomyClassItemProvider extends TravelClassItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public EconomyClassItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns EconomyClass.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/EconomyClass")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((EconomyClass)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_EconomyClass_type") : - getString("_UI_EconomyClass_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EmergencyExitItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EmergencyExitItemProvider.java deleted file mode 100644 index 9072fbd6..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/EmergencyExitItemProvider.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.EmergencyExit; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.EmergencyExit} object. - * - * - * @generated - */ -public class EmergencyExitItemProvider extends DoorItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public EmergencyExitItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns EmergencyExit.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/EmergencyExit")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - EmergencyExit emergencyExit = (EmergencyExit)object; - return getString("_UI_EmergencyExit_type") + " " + emergencyExit.getId(); - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/FirstClassItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/FirstClassItemProvider.java deleted file mode 100644 index d33fe62b..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/FirstClassItemProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.FirstClass; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.FirstClass} object. - * - * - * @generated - */ -public class FirstClassItemProvider extends TravelClassItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public FirstClassItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns FirstClass.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/FirstClass")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((FirstClass)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_FirstClass_type") : - getString("_UI_FirstClass_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/GalleyItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/GalleyItemProvider.java index 3191e0dd..0c583f7c 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/GalleyItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/GalleyItemProvider.java @@ -20,6 +20,7 @@ */ public class GalleyItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LavatoryItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LavatoryItemProvider.java index 4533383a..6992064f 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LavatoryItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LavatoryItemProvider.java @@ -20,6 +20,7 @@ */ public class LavatoryItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LuggagePropertiesItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LuggagePropertiesItemProvider.java index e5b83ba5..51d28aea 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LuggagePropertiesItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/LuggagePropertiesItemProvider.java @@ -39,6 +39,7 @@ public class LuggagePropertiesItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * @@ -60,8 +61,8 @@ public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addLuggageStowingDistanceFromSeatMeanPropertyDescriptor(object); - addLuggageStowingDistanceFromSeatDeviationPropertyDescriptor(object); + addLuggageStowDistanceFromSeatMeanPropertyDescriptor(object); + addLuggageStowDistanceFromSeatDeviationPropertyDescriptor(object); addPercentageOfPassengersWithNoLuggagePropertyDescriptor(object); addPercentageOfPassengersWithSmallLuggagePropertyDescriptor(object); addPercentageOfPassengersWithMediumLuggagePropertyDescriptor(object); @@ -77,19 +78,19 @@ public List getPropertyDescriptors(Object object) { } /** - * This adds a property descriptor for the Luggage Stowing Distance From Seat Mean feature. + * This adds a property descriptor for the Luggage Stow Distance From Seat Mean feature. * * * @generated */ - protected void addLuggageStowingDistanceFromSeatMeanPropertyDescriptor(Object object) { + protected void addLuggageStowDistanceFromSeatMeanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_LuggageProperties_luggageStowingDistanceFromSeatMean_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_LuggageProperties_luggageStowingDistanceFromSeatMean_feature", "_UI_LuggageProperties_type"), - CabinPackage.Literals.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN, + getString("_UI_LuggageProperties_luggageStowDistanceFromSeatMean_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LuggageProperties_luggageStowDistanceFromSeatMean_feature", "_UI_LuggageProperties_type"), + CabinPackage.Literals.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN, true, false, false, @@ -99,19 +100,19 @@ protected void addLuggageStowingDistanceFromSeatMeanPropertyDescriptor(Object ob } /** - * This adds a property descriptor for the Luggage Stowing Distance From Seat Deviation feature. + * This adds a property descriptor for the Luggage Stow Distance From Seat Deviation feature. * * * @generated */ - protected void addLuggageStowingDistanceFromSeatDeviationPropertyDescriptor(Object object) { + protected void addLuggageStowDistanceFromSeatDeviationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_LuggageProperties_luggageStowingDistanceFromSeatDeviation_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_LuggageProperties_luggageStowingDistanceFromSeatDeviation_feature", "_UI_LuggageProperties_type"), - CabinPackage.Literals.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION, + getString("_UI_LuggageProperties_luggageStowDistanceFromSeatDeviation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LuggageProperties_luggageStowDistanceFromSeatDeviation_feature", "_UI_LuggageProperties_type"), + CabinPackage.Literals.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION, true, false, false, @@ -355,6 +356,9 @@ public Object getImage(Object object) { * This returns the label text for the adapted class. * * + * + * @param object the object + * @return the text * @generated NOT */ @Override @@ -376,8 +380,8 @@ public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(LuggageProperties.class)) { - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN: - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION: + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN: + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION: case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE: case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_SMALL_LUGGAGE: case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_MEDIUM_LUGGAGE: diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/MainDoorItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/MainDoorItemProvider.java deleted file mode 100644 index 246dd4f8..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/MainDoorItemProvider.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.MainDoor; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.MainDoor} object. - * - * @generated - */ -public class MainDoorItemProvider extends DoorItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * @generated - */ - public MainDoorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns MainDoor.gif. - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/MainDoor")); - } - - /** - * This returns the label text for the adapted class. - * - * @generated NOT - */ - @Override - public String getText(Object object) { - MainDoor mainDoor = (MainDoor) object; - String str = "âś—"; - if (mainDoor.isIsActive()) { - str = "âś“"; - } - return getString("_UI_MainDoor_type") + " " + mainDoor.getId() + " (" - + str + ")"; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing the children that can be created under this object. - * - * @generated - */ - @Override - protected void collectNewChildDescriptors( - Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerItemProvider.java index a196b7fb..c296efa9 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerItemProvider.java @@ -37,6 +37,7 @@ public class PassengerItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * @@ -64,10 +65,10 @@ public List getPropertyDescriptors(Object object) { addAgePropertyDescriptor(object); addWeightPropertyDescriptor(object); addDoorPropertyDescriptor(object); - addSeatPropertyDescriptor(object); + addSeatIDPropertyDescriptor(object); addNamePropertyDescriptor(object); addBoardingTimePropertyDescriptor(object); - addSeatRefPropertyDescriptor(object); + addSeatPropertyDescriptor(object); addWidthPropertyDescriptor(object); addDepthPropertyDescriptor(object); addOrientationInDegreePropertyDescriptor(object); @@ -76,13 +77,16 @@ public List getPropertyDescriptors(Object object) { addIsSeatedPropertyDescriptor(object); addWalkingSpeedPropertyDescriptor(object); addStartBoardingAfterDelayPropertyDescriptor(object); - addNumberOfWaitsPropertyDescriptor(object); addLuggageStowTimePropertyDescriptor(object); - addLuggageStowingDistancePropertyDescriptor(object); + addLuggageStowDistancePropertyDescriptor(object); addTravelClassPropertyDescriptor(object); addPassengerMoodPropertyDescriptor(object); + addNumberOfWaitsPropertyDescriptor(object); addNumberOfMakeWayOperationsPropertyDescriptor(object); + addDistanceWalkedPropertyDescriptor(object); addLuggagePropertyDescriptor(object); + addCostOfPathPropertyDescriptor(object); + addTotalTimeWaitedPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -148,7 +152,7 @@ protected void addSeatPropertyDescriptor(Object object) { true, false, true, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, null, null)); } @@ -192,29 +196,7 @@ protected void addBoardingTimePropertyDescriptor(Object object) { true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Seat Ref feature. - * - * - * @generated - */ - protected void addSeatRefPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Passenger_seatRef_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Passenger_seatRef_feature", "_UI_Passenger_type"), - CabinPackage.Literals.PASSENGER__SEAT_REF, - true, - false, - true, - null, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } @@ -440,19 +422,19 @@ protected void addLuggageStowTimePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Luggage Stowing Distance feature. + * This adds a property descriptor for the Luggage Stow Distance feature. * * * @generated */ - protected void addLuggageStowingDistancePropertyDescriptor(Object object) { + protected void addLuggageStowDistancePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Passenger_luggageStowingDistance_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Passenger_luggageStowingDistance_feature", "_UI_Passenger_type"), - CabinPackage.Literals.PASSENGER__LUGGAGE_STOWING_DISTANCE, + getString("_UI_Passenger_luggageStowDistance_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Passenger_luggageStowDistance_feature", "_UI_Passenger_type"), + CabinPackage.Literals.PASSENGER__LUGGAGE_STOW_DISTANCE, true, false, false, @@ -549,6 +531,72 @@ protected void addLuggagePropertyDescriptor(Object object) { null)); } + /** + * This adds a property descriptor for the Distance Walked feature. + * + * + * @generated + */ + protected void addDistanceWalkedPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Passenger_distanceWalked_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Passenger_distanceWalked_feature", "_UI_Passenger_type"), + CabinPackage.Literals.PASSENGER__DISTANCE_WALKED, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cost Of Path feature. + * + * + * @generated + */ + protected void addCostOfPathPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Passenger_costOfPath_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Passenger_costOfPath_feature", "_UI_Passenger_type"), + CabinPackage.Literals.PASSENGER__COST_OF_PATH, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Total Time Waited feature. + * + * + * @generated + */ + protected void addTotalTimeWaitedPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Passenger_totalTimeWaited_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Passenger_totalTimeWaited_feature", "_UI_Passenger_type"), + CabinPackage.Literals.PASSENGER__TOTAL_TIME_WAITED, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + /** * This adds a property descriptor for the Height feature. * @@ -637,6 +685,28 @@ protected void addDoorPropertyDescriptor(Object object) { null)); } + /** + * This adds a property descriptor for the Seat ID feature. + * + * + * @generated + */ + protected void addSeatIDPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Passenger_seatID_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Passenger_seatID_feature", "_UI_Passenger_type"), + CabinPackage.Literals.PASSENGER__SEAT_ID, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + /** * This returns Passenger.gif. * @@ -679,6 +749,7 @@ public void notifyChanged(Notification notification) { case CabinPackage.PASSENGER__HEIGHT: case CabinPackage.PASSENGER__AGE: case CabinPackage.PASSENGER__WEIGHT: + case CabinPackage.PASSENGER__SEAT_ID: case CabinPackage.PASSENGER__NAME: case CabinPackage.PASSENGER__BOARDING_TIME: case CabinPackage.PASSENGER__WIDTH: @@ -689,12 +760,15 @@ public void notifyChanged(Notification notification) { case CabinPackage.PASSENGER__IS_SEATED: case CabinPackage.PASSENGER__WALKING_SPEED: case CabinPackage.PASSENGER__START_BOARDING_AFTER_DELAY: - case CabinPackage.PASSENGER__NUMBER_OF_WAITS: case CabinPackage.PASSENGER__LUGGAGE_STOW_TIME: - case CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE: + case CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE: case CabinPackage.PASSENGER__PASSENGER_MOOD: + case CabinPackage.PASSENGER__NUMBER_OF_WAITS: case CabinPackage.PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS: + case CabinPackage.PASSENGER__DISTANCE_WALKED: case CabinPackage.PASSENGER__LUGGAGE: + case CabinPackage.PASSENGER__COST_OF_PATH: + case CabinPackage.PASSENGER__TOTAL_TIME_WAITED: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerPropertiesItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerPropertiesItemProvider.java index 6a50959a..3abdbab9 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerPropertiesItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PassengerPropertiesItemProvider.java @@ -39,6 +39,7 @@ public class PassengerPropertiesItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * @@ -77,6 +78,13 @@ public List getPropertyDescriptors(Object object) { addPassengerHeightDeviationFemalePropertyDescriptor(object); addPassengerDepthMeanFemalePropertyDescriptor(object); addPassengerDepthDeviationFemalePropertyDescriptor(object); + addPassengerAggressiveMoodSharePropertyDescriptor(object); + addSeatInterferenceStandingUpPassengerWaitingTimePropertyDescriptor(object); + addSeatInterferenceProcessTimeMeanPropertyDescriptor(object); + addSeatInterferenceProcessTimeDeviationPropertyDescriptor(object); + addSeatInterferenceProcessTimeFoldingSeatMeanPropertyDescriptor(object); + addSeatInterferenceProcessTimeFoldingSeatDeviationPropertyDescriptor(object); + addPassivePassengerWaitingTimeAfterCollisionPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -455,6 +463,160 @@ protected void addPassengerDepthDeviationFemalePropertyDescriptor(Object object) null)); } + /** + * This adds a property descriptor for the Passenger Aggressive Mood Share feature. + * + * + * @generated + */ + protected void addPassengerAggressiveMoodSharePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_passengerAggressiveMoodShare_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_passengerAggressiveMoodShare_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Seat Interference Standing Up Passenger Waiting Time feature. + * + * + * @generated + */ + protected void addSeatInterferenceStandingUpPassengerWaitingTimePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_seatInterferenceStandingUpPassengerWaitingTime_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_seatInterferenceStandingUpPassengerWaitingTime_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Seat Interference Process Time Mean feature. + * + * + * @generated + */ + protected void addSeatInterferenceProcessTimeMeanPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_seatInterferenceProcessTimeMean_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_seatInterferenceProcessTimeMean_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Seat Interference Process Time Deviation feature. + * + * + * @generated + */ + protected void addSeatInterferenceProcessTimeDeviationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_seatInterferenceProcessTimeDeviation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_seatInterferenceProcessTimeDeviation_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Seat Interference Process Time Folding Seat Mean feature. + * + * + * @generated + */ + protected void addSeatInterferenceProcessTimeFoldingSeatMeanPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatMean_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatMean_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Seat Interference Process Time Folding Seat Deviation feature. + * + * + * @generated + */ + protected void addSeatInterferenceProcessTimeFoldingSeatDeviationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatDeviation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_seatInterferenceProcessTimeFoldingSeatDeviation_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Passive Passenger Waiting Time After Collision feature. + * + * + * @generated + */ + protected void addPassivePassengerWaitingTimeAfterCollisionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassengerProperties_passivePassengerWaitingTimeAfterCollision_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassengerProperties_passivePassengerWaitingTimeAfterCollision_feature", "_UI_PassengerProperties_type"), + CabinPackage.Literals.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + /** * This returns PassengerProperties.gif. * @@ -470,6 +632,9 @@ public Object getImage(Object object) { * This returns the label text for the adapted class. * * + * + * @param object the object + * @return the text * @generated NOT */ @Override @@ -508,6 +673,13 @@ public void notifyChanged(Notification notification) { case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_HEIGHT_DEVIATION_FEMALE: case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_MEAN_FEMALE: case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE: + case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE: + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN: + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION: + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN: + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION: + case CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PhysicalObjectItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PhysicalObjectItemProvider.java index edeccbd0..e2664e60 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PhysicalObjectItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PhysicalObjectItemProvider.java @@ -37,6 +37,7 @@ public class PhysicalObjectItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PremiumEconomyClassItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PremiumEconomyClassItemProvider.java deleted file mode 100644 index bf5a9335..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/PremiumEconomyClassItemProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.PremiumEconomyClass} object. - * - * - * @generated - */ -public class PremiumEconomyClassItemProvider extends TravelClassItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public PremiumEconomyClassItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns PremiumEconomyClass.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/PremiumEconomyClass")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((PremiumEconomyClass)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_PremiumEconomyClass_type") : - getString("_UI_PremiumEconomyClass_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/RowItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/RowItemProvider.java index 9eb23d63..8a129672 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/RowItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/RowItemProvider.java @@ -39,6 +39,7 @@ public class RowItemProvider ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. * @@ -61,7 +62,6 @@ public List getPropertyDescriptors(Object object) { super.getPropertyDescriptors(object); addRowNumberPropertyDescriptor(object); - addOffsetInRowPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -88,28 +88,6 @@ protected void addRowNumberPropertyDescriptor(Object object) { null)); } - /** - * This adds a property descriptor for the Offset In Row feature. - * - * - * @generated - */ - protected void addOffsetInRowPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Row_offsetInRow_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Row_offsetInRow_feature", "_UI_Row_type"), - CabinPackage.Literals.ROW__OFFSET_IN_ROW, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or @@ -129,8 +107,12 @@ public Collection getChildrenFeatures(Object objec /** * - * - * @generated + * . + * + * @param object the object + * @param child the child + * @return the child feature + * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { @@ -176,7 +158,6 @@ public void notifyChanged(Notification notification) { switch (notification.getFeatureID(Row.class)) { case CabinPackage.ROW__ROW_NUMBER: - case CabinPackage.ROW__OFFSET_IN_ROW: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case CabinPackage.ROW__SEATS: diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SeatItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SeatItemProvider.java index ef882ae5..4f643c1a 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SeatItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SeatItemProvider.java @@ -24,6 +24,7 @@ */ public class SeatItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * @@ -52,7 +53,7 @@ public List getPropertyDescriptors(Object object) { addRowPropertyDescriptor(object); addOccupiedPropertyDescriptor(object); addPassengerPropertyDescriptor(object); - addCurrentlyFoldedPropertyDescriptor(object); + addLayoutConceptPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -212,23 +213,23 @@ protected void addPassengerPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Currently Folded feature. + * This adds a property descriptor for the Layout Concept feature. * * * @generated */ - protected void addCurrentlyFoldedPropertyDescriptor(Object object) { + protected void addLayoutConceptPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Seat_currentlyFolded_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Seat_currentlyFolded_feature", "_UI_Seat_type"), - CabinPackage.Literals.SEAT__CURRENTLY_FOLDED, + getString("_UI_Seat_layoutConcept_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Seat_layoutConcept_feature", "_UI_Seat_type"), + CabinPackage.Literals.SEAT__LAYOUT_CONCEPT, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } @@ -274,7 +275,7 @@ public void notifyChanged(Notification notification) { case CabinPackage.SEAT__CREW_SEAT: case CabinPackage.SEAT__LETTER: case CabinPackage.SEAT__OCCUPIED: - case CabinPackage.SEAT__CURRENTLY_FOLDED: + case CabinPackage.SEAT__LAYOUT_CONCEPT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationPropertiesItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationPropertiesItemProvider.java index 3c31e2bb..4b323923 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationPropertiesItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationPropertiesItemProvider.java @@ -34,11 +34,13 @@ public class SimulationPropertiesItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. - * - * @generated + * + * @param adapterFactory the adapter factory + * @generated */ public SimulationPropertiesItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); @@ -47,31 +49,82 @@ public SimulationPropertiesItemProvider(AdapterFactory adapterFactory) { /** * This returns the property descriptors for the adapted class. - * - * @generated + * + * @param object the object + * @return the property descriptors + * @generated */ @Override public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); + addResultsPropertyDescriptor(object); + addPassengersBoardingPerMinutePropertyDescriptor(object); + addLayoutConceptPropertyDescriptor(object); + addScalePropertyDescriptor(object); + addSimulationSpeedFactorPropertyDescriptor(object); + addUsePresetSettingsPropertyDescriptor(object); addSimulateWithoutUIPropertyDescriptor(object); addNumberOfSimulationLoopsPropertyDescriptor(object); - addRandomSortBetweenLoopsPropertyDescriptor(object); - addUseFoldableSeatsPropertyDescriptor(object); - addBringYourOwnSeatPropertyDescriptor(object); - addResultsPropertyDescriptor(object); + addDeveloperModePropertyDescriptor(object); + addDataExportPropertyDescriptor(object); + addDisplayMapPropertyDescriptor(object); + addSortPassengerBetweenLoopsPropertyDescriptor(object); addSortingPropertyDescriptor(object); - addSimulationSpeedFactorPropertyDescriptor(object); - addSeatInterferenceStandingUpPassengerWaitingTimePropertyDescriptor(object); - addSeatInterferenceProcessTimePropertyDescriptor(object); addThreadSleepTimeDefaultPropertyDescriptor(object); - addDeveloperModePropertyDescriptor(object); - addPassengersBoardingPerMinutePropertyDescriptor(object); + addSidewaysFoldabeSeatPopupTimeMeanPropertyDescriptor(object); + addSidewaysFoldabeSeatPopupTimeDeviationPropertyDescriptor(object); + addLiftingSeatPanPopupTimeMeanPropertyDescriptor(object); + addLiftingSeatPanPopupTimeDeviationPropertyDescriptor(object); } return itemPropertyDescriptors; } + /** + * This adds a property descriptor for the Scale feature. + * + * + * @generated + */ + protected void addScalePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationProperties_scale_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_scale_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SCALE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Use Preset Settings feature. + * + * + * @generated + */ + protected void addUsePresetSettingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationProperties_usePresetSettings_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_usePresetSettings_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + /** * This adds a property descriptor for the Simulate Without UI feature. * @@ -117,239 +170,283 @@ protected void addNumberOfSimulationLoopsPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Random Sort Between Loops feature. + * This adds a property descriptor for the Results feature. * * * @generated */ - protected void addRandomSortBetweenLoopsPropertyDescriptor(Object object) { + protected void addResultsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_randomSortBetweenLoops_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_randomSortBetweenLoops_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS, + getString("_UI_SimulationProperties_results_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_results_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__RESULTS, true, false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + true, + null, null, null)); } /** - * This adds a property descriptor for the Use Foldable Seats feature. + * This adds a property descriptor for the Sorting feature. * * * @generated */ - protected void addUseFoldableSeatsPropertyDescriptor(Object object) { + protected void addSortingPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_useFoldableSeats_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_useFoldableSeats_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS, + getString("_UI_SimulationProperties_sorting_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_sorting_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SORTING, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Bring Your Own Seat feature. + * This adds a property descriptor for the Simulation Speed Factor feature. * * * @generated */ - protected void addBringYourOwnSeatPropertyDescriptor(Object object) { + protected void addSimulationSpeedFactorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_bringYourOwnSeat_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_bringYourOwnSeat_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT, + getString("_UI_SimulationProperties_simulationSpeedFactor_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_simulationSpeedFactor_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Results feature. + * This adds a property descriptor for the Thread Sleep Time Default feature. * * * @generated */ - protected void addResultsPropertyDescriptor(Object object) { + protected void addThreadSleepTimeDefaultPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_results_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_results_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__RESULTS, + getString("_UI_SimulationProperties_threadSleepTimeDefault_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_threadSleepTimeDefault_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT, true, false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Developer Mode feature. + * + * + * @generated + */ + protected void addDeveloperModePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationProperties_developerMode_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_developerMode_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__DEVELOPER_MODE, true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, + null)); + } + + /** + * This adds a property descriptor for the Sort Passenger Between Loops feature. + * + * + * @generated + */ + protected void addSortPassengerBetweenLoopsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationProperties_sortPassengerBetweenLoops_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_sortPassengerBetweenLoops_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Sorting feature. + * This adds a property descriptor for the Passengers Boarding Per Minute feature. * * * @generated */ - protected void addSortingPropertyDescriptor(Object object) { + protected void addPassengersBoardingPerMinutePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_sorting_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_sorting_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__SORTING, + getString("_UI_SimulationProperties_passengersBoardingPerMinute_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_passengersBoardingPerMinute_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Simulation Speed Factor feature. + * This adds a property descriptor for the Data Export feature. * * * @generated */ - protected void addSimulationSpeedFactorPropertyDescriptor(Object object) { + protected void addDataExportPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_simulationSpeedFactor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_simulationSpeedFactor_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR, + getString("_UI_SimulationProperties_dataExport_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_dataExport_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__DATA_EXPORT, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Seat Interference Standing Up Passenger Waiting Time feature. + * This adds a property descriptor for the Display Map feature. * * * @generated */ - protected void addSeatInterferenceStandingUpPassengerWaitingTimePropertyDescriptor(Object object) { + protected void addDisplayMapPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_seatInterferenceStandingUpPassengerWaitingTime_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_seatInterferenceStandingUpPassengerWaitingTime_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME, + getString("_UI_SimulationProperties_displayMap_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_displayMap_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__DISPLAY_MAP, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Seat Interference Process Time feature. + * This adds a property descriptor for the Sideways Foldabe Seat Popup Time Mean feature. * * * @generated */ - protected void addSeatInterferenceProcessTimePropertyDescriptor(Object object) { + protected void addSidewaysFoldabeSeatPopupTimeMeanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_seatInterferenceProcessTime_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_seatInterferenceProcessTime_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME, + getString("_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeMean_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeMean_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Thread Sleep Time Default feature. + * This adds a property descriptor for the Sideways Foldabe Seat Popup Time Deviation feature. * * * @generated */ - protected void addThreadSleepTimeDefaultPropertyDescriptor(Object object) { + protected void addSidewaysFoldabeSeatPopupTimeDeviationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_threadSleepTimeDefault_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_threadSleepTimeDefault_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT, + getString("_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeDeviation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_sidewaysFoldabeSeatPopupTimeDeviation_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Developer Mode feature. + * This adds a property descriptor for the Lifting Seat Pan Popup Time Mean feature. * * * @generated */ - protected void addDeveloperModePropertyDescriptor(Object object) { + protected void addLiftingSeatPanPopupTimeMeanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_developerMode_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_developerMode_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__DEVELOPER_MODE, + getString("_UI_SimulationProperties_liftingSeatPanPopupTimeMean_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_liftingSeatPanPopupTimeMean_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Passengers Boarding Per Minute feature. + * This adds a property descriptor for the Lifting Seat Pan Popup Time Deviation feature. * * * @generated */ - protected void addPassengersBoardingPerMinutePropertyDescriptor(Object object) { + protected void addLiftingSeatPanPopupTimeDeviationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SimulationProperties_passengersBoardingPerMinute_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_passengersBoardingPerMinute_feature", "_UI_SimulationProperties_type"), - CabinPackage.Literals.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE, + getString("_UI_SimulationProperties_liftingSeatPanPopupTimeDeviation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_liftingSeatPanPopupTimeDeviation_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION, true, false, false, @@ -358,6 +455,28 @@ protected void addPassengersBoardingPerMinutePropertyDescriptor(Object object) { null)); } + /** + * This adds a property descriptor for the Layout Concept feature. + * + * + * @generated + */ + protected void addLayoutConceptPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationProperties_layoutConcept_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationProperties_layoutConcept_feature", "_UI_SimulationProperties_type"), + CabinPackage.Literals.SIMULATION_PROPERTIES__LAYOUT_CONCEPT, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or @@ -378,8 +497,12 @@ public Collection getChildrenFeatures(Object objec /** * - * - * @generated + * . + * + * @param object the object + * @param child the child + * @return the child feature + * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { @@ -403,7 +526,9 @@ public Object getImage(Object object) { /** * This returns the label text for the adapted class. - * + * + * @param object the object + * @return the text * @generated NOT */ @Override @@ -424,18 +549,23 @@ public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(SimulationProperties.class)) { + case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: + case CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT: + case CabinPackage.SIMULATION_PROPERTIES__SCALE: + case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: + case CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS: case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: - case CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS: - case CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS: - case CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT: + case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: + case CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT: + case CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP: + case CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS: case CabinPackage.SIMULATION_PROPERTIES__SORTING: - case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME: case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: - case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: - case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN: + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION: + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN: + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: @@ -450,8 +580,10 @@ public void notifyChanged(Notification notification) { * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s * describing the children that can be created under this object. - * - * @generated + * + * @param newChildDescriptors the new child descriptors + * @param object the object + * @generated */ @Override protected void collectNewChildDescriptors( @@ -472,8 +604,9 @@ protected void collectNewChildDescriptors( /** * Return the resource locator for this item provider's resources. - * - * @generated + * + * @return the resource locator + * @generated */ @Override public ResourceLocator getResourceLocator() { diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationResultItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationResultItemProvider.java index 551dc2d6..7c06d841 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationResultItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/SimulationResultItemProvider.java @@ -31,11 +31,13 @@ public class SimulationResultItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** * This constructs an instance from a factory and a notifier. - * - * @generated + * + * @param adapterFactory the adapter factory + * @generated */ public SimulationResultItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); @@ -44,8 +46,10 @@ public SimulationResultItemProvider(AdapterFactory adapterFactory) { /** * This returns the property descriptors for the adapted class. - * - * @generated + * + * @param object the object + * @return the property descriptors + * @generated */ @Override public List getPropertyDescriptors(Object object) { @@ -58,6 +62,9 @@ public List getPropertyDescriptors(Object object) { addIdPropertyDescriptor(object); addDatePropertyDescriptor(object); addBoardingTimeStringPropertyDescriptor(object); + addWaymakingSkippedPropertyDescriptor(object); + addWaymakingCompletedPropertyDescriptor(object); + addLayoutConceptTypePropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -65,8 +72,9 @@ public List getPropertyDescriptors(Object object) { /** * This adds a property descriptor for the Boarding Time feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addBoardingTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -87,8 +95,9 @@ protected void addBoardingTimePropertyDescriptor(Object object) { /** * This adds a property descriptor for the Passengers feature. - * - * @generated + * + * @param object the object + * @generated */ protected void addPassengersPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -194,6 +203,72 @@ protected void addBoardingTimeStringPropertyDescriptor(Object object) { null)); } + /** + * This adds a property descriptor for the Waymaking Skipped feature. + * + * + * @generated + */ + protected void addWaymakingSkippedPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationResult_waymakingSkipped_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationResult_waymakingSkipped_feature", "_UI_SimulationResult_type"), + CabinPackage.Literals.SIMULATION_RESULT__WAYMAKING_SKIPPED, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Waymaking Completed feature. + * + * + * @generated + */ + protected void addWaymakingCompletedPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationResult_waymakingCompleted_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationResult_waymakingCompleted_feature", "_UI_SimulationResult_type"), + CabinPackage.Literals.SIMULATION_RESULT__WAYMAKING_COMPLETED, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Layout Concept Type feature. + * + * + * @generated + */ + protected void addLayoutConceptTypePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SimulationResult_layoutConceptType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SimulationResult_layoutConceptType_feature", "_UI_SimulationResult_type"), + CabinPackage.Literals.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + /** * This returns SimulationResult.gif. * - * + * + * @param object the object + * @return the text * @generated NOT */ @Override @@ -236,6 +313,9 @@ public void notifyChanged(Notification notification) { case CabinPackage.SIMULATION_RESULT__ID: case CabinPackage.SIMULATION_RESULT__DATE: case CabinPackage.SIMULATION_RESULT__BOARDING_TIME_STRING: + case CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED: + case CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED: + case CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -246,8 +326,10 @@ public void notifyChanged(Notification notification) { * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s * describing the children that can be created under this object. - * - * @generated + * + * @param newChildDescriptors the new child descriptors + * @param object the object + * @generated */ @Override protected void collectNewChildDescriptors( @@ -258,8 +340,9 @@ protected void collectNewChildDescriptors( /** * Return the resource locator for this item provider's resources. - * - * @generated + * + * @return the resource locator + * @generated */ @Override public ResourceLocator getResourceLocator() { diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StairwayItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StairwayItemProvider.java index 0eb1bdf2..188d6fe7 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StairwayItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StairwayItemProvider.java @@ -24,6 +24,7 @@ */ public class StairwayItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StandardDoorItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StandardDoorItemProvider.java deleted file mode 100644 index 6824235e..00000000 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StandardDoorItemProvider.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.provider; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; - -import net.bhl.cdt.paxelerate.model.StandardDoor; - -/** - * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.StandardDoor} object. - * - * - * @generated - */ -public class StandardDoorItemProvider extends DoorItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * @generated - */ - public StandardDoorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns StandardDoor.gif. - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/StandardDoor")); - } - - /** - * This returns the label text for the adapted class. - * - * @generated NOT - */ - @Override - public String getText(Object object) { - StandardDoor door = (StandardDoor) object; - String str = "âś—"; - if (door.isIsActive()) { - str = "âś“"; - } - return getString("_UI_StandardDoor_type") + " " + door.getId() + " (" - + str + ")"; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing the children that can be created under this object. - * - * @generated - */ - @Override - protected void collectNewChildDescriptors( - Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StowageItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StowageItemProvider.java index dd64c769..c7fe12d8 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StowageItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/StowageItemProvider.java @@ -20,6 +20,7 @@ */ public class StowageItemProvider extends PhysicalObjectItemProvider { + /** * This constructs an instance from a factory and a notifier. * diff --git a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/TravelClassItemProvider.java b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/TravelClassItemProvider.java index 6874dd61..4e7ddea1 100644 --- a/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/TravelClassItemProvider.java +++ b/net.bhl.cdt.paxelerate.model.edit/src/net/bhl/cdt/paxelerate/model/provider/TravelClassItemProvider.java @@ -2,7 +2,6 @@ */ package net.bhl.cdt.paxelerate.model.provider; - import java.util.Collection; import java.util.List; @@ -24,36 +23,35 @@ import net.bhl.cdt.paxelerate.model.CabinFactory; import net.bhl.cdt.paxelerate.model.CabinPackage; import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.util.string.StringHelper; /** * This is the item provider adapter for a {@link net.bhl.cdt.paxelerate.model.TravelClass} object. - * - * + * * @generated */ -public class TravelClassItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { +public class TravelClassItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated + * This constructs an instance from a factory and a notifier. + * + * @param adapterFactory the adapter factory + * @generated */ public TravelClassItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** - * This returns the property descriptors for the adapted class. - * - * - * @generated + * This returns the property descriptors for the adapted class. + * + * @param object the object + * @return the property descriptors + * @generated */ @Override public List getPropertyDescriptors(Object object) { @@ -69,15 +67,17 @@ public List getPropertyDescriptors(Object object) { addNamePropertyDescriptor(object); addRowStructurePropertyDescriptor(object); addLoadFactorPropertyDescriptor(object); + addTravelOptionPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Sequence feature. - * - * - * @generated + * This adds a property descriptor for the Sequence feature. + * + * @param object the object + * @generated */ protected void addSequencePropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -96,10 +96,11 @@ protected void addSequencePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Passengers feature. - * - * - * @generated + * This adds a property descriptor for the Passengers feature. + * + * @param object the object + * @generated */ protected void addPassengersPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -118,10 +119,11 @@ protected void addPassengersPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Available Seats feature. - * - * - * @generated + * This adds a property descriptor for the Available Seats feature. + * + * @param object the object + * @generated */ protected void addAvailableSeatsPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -140,10 +142,11 @@ protected void addAvailableSeatsPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Seat Pitch feature. - * - * - * @generated + * This adds a property descriptor for the Seat Pitch feature. + * + * @param object the object + * @generated */ protected void addSeatPitchPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -162,10 +165,11 @@ protected void addSeatPitchPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the XDimension Of Seats feature. - * - * - * @generated + * This adds a property descriptor for the XDimension Of Seats feature. + * + * @param object the object + * @generated */ protected void addXDimensionOfSeatsPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -184,10 +188,11 @@ protected void addXDimensionOfSeatsPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the YDimension Of Seats feature. - * - * - * @generated + * This adds a property descriptor for the YDimension Of Seats feature. + * + * @param object the object + * @generated */ protected void addYDimensionOfSeatsPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -207,8 +212,8 @@ protected void addYDimensionOfSeatsPropertyDescriptor(Object object) { /** * This adds a property descriptor for the Name feature. - * - * + * * @generated */ protected void addNamePropertyDescriptor(Object object) { @@ -228,10 +233,11 @@ protected void addNamePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Row Structure feature. - * - * - * @generated + * This adds a property descriptor for the Row Structure feature. + * + * @param object the object + * @generated */ protected void addRowStructurePropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -250,10 +256,11 @@ protected void addRowStructurePropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Load Factor feature. - * - * - * @generated + * This adds a property descriptor for the Load Factor feature. + * + * @param object the object + * @generated */ protected void addLoadFactorPropertyDescriptor(Object object) { itemPropertyDescriptors.add @@ -266,7 +273,29 @@ protected void addLoadFactorPropertyDescriptor(Object object) { true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Travel Option feature. + * + * + * @generated + */ + protected void addTravelOptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_TravelClass_travelOption_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TravelClass_travelOption_feature", "_UI_TravelClass_type"), + CabinPackage.Literals.TRAVEL_CLASS__TRAVEL_OPTION, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } @@ -275,8 +304,7 @@ protected void addLoadFactorPropertyDescriptor(Object object) { * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * + * * @generated */ @Override @@ -289,9 +317,12 @@ public Collection getChildrenFeatures(Object objec } /** - * - * - * @generated + * . + * + * @param object the object + * @param child the child + * @return the child feature + * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { @@ -302,36 +333,49 @@ protected EStructuralFeature getChildFeature(Object object, Object child) { } /** - * This returns TravelClass.gif. - * - * - * @generated + * This returns TravelClass.gif. + * + * @param object the object + * @return the image + * @generated NOT */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/TravelClass")); + switch (((TravelClass) object).getTravelOption()) { + case FIRST_CLASS: + return overlayImage(object, getResourceLocator().getImage("full/obj16/FirstClass")); + case BUSINESS_CLASS: + return overlayImage(object, getResourceLocator().getImage("full/obj16/BusinessClass")); + case PREMIUM_ECONOMY_CLASS: + return overlayImage(object, getResourceLocator().getImage("full/obj16/PremiumEconomyClass")); + case ECONOMY_CLASS: + return overlayImage(object, getResourceLocator().getImage("full/obj16/EconomyClass")); + default: + return overlayImage(object, getResourceLocator().getImage("full/obj16/TravelClass")); + } } /** - * This returns the label text for the adapted class. - * - * - * @generated + * This returns the label text for the adapted class. + * + * @param object the object + * @return the text + * @generated NOT */ @Override public String getText(Object object) { - String label = ((TravelClass)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_TravelClass_type") : - getString("_UI_TravelClass_type") + " " + label; + String label = ((TravelClass) object).getTravelOption().getName(); + return StringHelper.splitCamelCase(label); + } - /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * + * * @generated */ @Override @@ -348,6 +392,7 @@ public void notifyChanged(Notification notification) { case CabinPackage.TRAVEL_CLASS__NAME: case CabinPackage.TRAVEL_CLASS__ROW_STRUCTURE: case CabinPackage.TRAVEL_CLASS__LOAD_FACTOR: + case CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case CabinPackage.TRAVEL_CLASS__ROWS: @@ -358,11 +403,13 @@ public void notifyChanged(Notification notification) { } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. + * + * @param newChildDescriptors the new child descriptors + * @param object the object + * @generated */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { @@ -375,14 +422,15 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors } /** - * Return the resource locator for this item provider's resources. - * - * - * @generated + * Return the resource locator for this item provider's resources. + * + * @return the resource locator + * @generated */ @Override public ResourceLocator getResourceLocator() { return CabinEditPlugin.INSTANCE; } -} +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.model.viewmodel/META-INF/MANIFEST.MF index 9712abe3..9b1fe341 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.model.viewmodel/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PAXelerate - View Models Bundle-SymbolicName: net.bhl.cdt.paxelerate.model.viewmodel;singleton:=true -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Require-Bundle: org.eclipse.emf.ecp.view.model.provider.xmi, org.eclipse.emf.ecp.view.categorization.model;bundle-version="1.7.2", org.eclipse.emf.ecp.view.categorization.model.edit;bundle-version="1.7.2", diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/build.properties b/net.bhl.cdt.paxelerate.model.viewmodel/build.properties index e1a1caf5..9122d2dc 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/build.properties +++ b/net.bhl.cdt.paxelerate.model.viewmodel/build.properties @@ -1,5 +1,4 @@ bin.includes = META-INF/,\ plugin.xml,\ - viewmodels/Curtain.view,\ viewmodels/ diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/plugin.xml b/net.bhl.cdt.paxelerate.model.viewmodel/plugin.xml index ea144a2f..47f94852 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/plugin.xml +++ b/net.bhl.cdt.paxelerate.model.viewmodel/plugin.xml @@ -1,15 +1,11 @@ - - - - - - + + + @@ -17,68 +13,19 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/BusinessClass.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/BusinessClass.view deleted file mode 100644 index 3fe994ed..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/BusinessClass.view +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Cabin.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Cabin.view index 8b244ed3..a648eb69 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Cabin.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Cabin.view @@ -24,7 +24,7 @@ - + @@ -36,24 +36,5 @@ - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Door.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Door.view new file mode 100644 index 00000000..3e3010d3 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Door.view @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EconomyClass.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EconomyClass.view deleted file mode 100644 index 74a3437b..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EconomyClass.view +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EmergencyExit.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EmergencyExit.view deleted file mode 100644 index 118acac2..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/EmergencyExit.view +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/FirstClass.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/FirstClass.view deleted file mode 100644 index d995a2c9..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/FirstClass.view +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/LuggageProperties.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/LuggageProperties.view index 759e1e2c..5c2df172 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/LuggageProperties.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/LuggageProperties.view @@ -1,76 +1,76 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/MainDoor.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/MainDoor.view deleted file mode 100644 index a1573cd1..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/MainDoor.view +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Passenger.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Passenger.view index 22025dd3..bb79a0ea 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Passenger.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Passenger.view @@ -29,6 +29,11 @@ + + + + + @@ -62,6 +67,20 @@ + + + + + + + + + + + + + + @@ -74,70 +93,63 @@ - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PassengerProperties.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PassengerProperties.view index be2d96b3..43bdf795 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PassengerProperties.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PassengerProperties.view @@ -97,4 +97,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PremiumEconomyClass.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PremiumEconomyClass.view deleted file mode 100644 index 673f922d..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/PremiumEconomyClass.view +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Row.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Row.view index 33f8ba1d..b2c05cce 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Row.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Row.view @@ -7,10 +7,5 @@ - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Seat.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Seat.view index 11202667..eac28e9f 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Seat.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/Seat.view @@ -33,9 +33,9 @@ - - - + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationProperties.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationProperties.view index e0120e5f..9309f268 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationProperties.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationProperties.view @@ -2,74 +2,97 @@ - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationResult.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationResult.view index 16309f36..a17d41da 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationResult.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/SimulationResult.view @@ -18,6 +18,11 @@ + + + + + @@ -35,6 +40,16 @@ + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/StandardDoor.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/StandardDoor.view deleted file mode 100644 index 2bb326e3..00000000 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/StandardDoor.view +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/TravelClass.view b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/TravelClass.view index 54af02b9..7df74597 100644 --- a/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/TravelClass.view +++ b/net.bhl.cdt.paxelerate.model.viewmodel/viewmodels/TravelClass.view @@ -1,48 +1,71 @@ - + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + - - + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model/.settings/org.eclipse.core.resources.prefs b/net.bhl.cdt.paxelerate.model/.settings/org.eclipse.core.resources.prefs index 78dd1cfc..18389644 100644 --- a/net.bhl.cdt.paxelerate.model/.settings/org.eclipse.core.resources.prefs +++ b/net.bhl.cdt.paxelerate.model/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,4 @@ eclipse.preferences.version=1 encoding//model/cabin.ecore=UTF-8 encoding//model/cabin.ecorediag=UTF-8 +encoding//src/net/bhl/cdt/paxelerate/model/astar/ObstacleGenerator.java=UTF-8 diff --git a/net.bhl.cdt.paxelerate.model/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.model/META-INF/MANIFEST.MF index e21bdf79..9c58e131 100644 --- a/net.bhl.cdt.paxelerate.model/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.model/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PAXelerate - ModelS Bundle-SymbolicName: net.bhl.cdt.paxelerate.model;singleton:=true -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Bundle-ClassPath: . Bundle-Vendor: http://www.paxelerate.com/ Bundle-Localization: plugin @@ -16,7 +16,7 @@ Require-Bundle: javax.inject, org.eclipse.ui.intro, net.bhl.cdt.ui;bundle-version="0.1.0", net.bhl.cdt.model;visibility:=reexport, - net.bhl.cdt.paxelerate.util;bundle-version="0.6.0" + net.bhl.cdt.paxelerate.util;bundle-version="0.7.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: net.bhl.cdt.paxelerate.model, diff --git a/net.bhl.cdt.paxelerate.model/model/cabin.ecore b/net.bhl.cdt.paxelerate.model/model/cabin.ecore index 7649526b..8738ad86 100644 --- a/net.bhl.cdt.paxelerate.model/model/cabin.ecore +++ b/net.bhl.cdt.paxelerate.model/model/cabin.ecore @@ -9,12 +9,14 @@ - + + eType="#//SimulationProperties" containment="true"/> + - - - - - - + @@ -80,13 +75,11 @@ defaultValueLiteral="Placeholder String"/> - + - - - - @@ -96,8 +89,8 @@ - + @@ -106,12 +99,11 @@ - + - - + + @@ -123,19 +115,24 @@ defaultValueLiteral="2.0"/> - - + + + + + @@ -169,7 +166,7 @@ - + @@ -180,10 +177,9 @@ defaultValueLiteral="true"/> + - - - @@ -198,33 +194,12 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="100"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + + + @@ -300,7 +310,7 @@ + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="1"/> + + + + + + + @@ -328,4 +352,15 @@ + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model/model/cabin.genmodel b/net.bhl.cdt.paxelerate.model/model/cabin.genmodel index 1a3c3b55..fb11b521 100644 --- a/net.bhl.cdt.paxelerate.model/model/cabin.genmodel +++ b/net.bhl.cdt.paxelerate.model/model/cabin.genmodel @@ -25,7 +25,7 @@ - + @@ -39,14 +39,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + @@ -55,15 +82,10 @@ - - - - - @@ -76,6 +98,7 @@ + @@ -85,10 +108,6 @@ - - - - @@ -97,7 +116,7 @@ - + @@ -106,10 +125,10 @@ - + - + @@ -118,13 +137,16 @@ - - + + + + + @@ -160,30 +182,33 @@ + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + @@ -202,6 +227,9 @@ + + + @@ -221,6 +249,13 @@ + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Activator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Activator.java index f52aa89d..2a25ad9f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Activator.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Activator.java @@ -8,10 +8,19 @@ import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; +/** + * The Class Activator. + */ public class Activator implements BundleActivator { + /** The context. */ private static BundleContext context; + /** + * Gets the context. + * + * @return the context + */ static BundleContext getContext() { return context; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/AircraftType.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/AircraftType.java index 9080049b..54f42c9b 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/AircraftType.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/AircraftType.java @@ -169,22 +169,25 @@ public static AircraftType get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -202,8 +205,10 @@ private AircraftType(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -211,8 +216,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -220,8 +227,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BCwithBlockedSeat.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BCwithBlockedSeat.java deleted file mode 100644 index 5a005e20..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BCwithBlockedSeat.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -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 'BCwith Blocked Seat', - * and utility methods for working with them. - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getBCwithBlockedSeat() - * @model - * @generated - */ -public enum BCwithBlockedSeat implements Enumerator { - /** - * The 'No' literal object. - * - * - * @see #NO_VALUE - * @generated - * @ordered - */ - NO(0, "no", "no"), - - /** - * The 'Yes' literal object. - * - * - * @see #YES_VALUE - * @generated - * @ordered - */ - YES(1, "yes", "yes"); - - /** - * The 'No' literal value. - * - *

- * If the meaning of 'No' literal object isn't clear, - * there really should be more of a description here... - *

- * - * @see #NO - * @model name="no" - * @generated - * @ordered - */ - public static final int NO_VALUE = 0; - - /** - * The 'Yes' literal value. - * - *

- * If the meaning of 'Yes' literal object isn't clear, - * there really should be more of a description here... - *

- * - * @see #YES - * @model name="yes" - * @generated - * @ordered - */ - public static final int YES_VALUE = 1; - - /** - * An array of all the 'BCwith Blocked Seat' enumerators. - * - * - * @generated - */ - private static final BCwithBlockedSeat[] VALUES_ARRAY = - new BCwithBlockedSeat[] { - NO, - YES, - }; - - /** - * A public read-only list of all the 'BCwith Blocked Seat' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'BCwith Blocked Seat' literal with the specified literal value. - * - * - * @generated - */ - public static BCwithBlockedSeat get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - BCwithBlockedSeat result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'BCwith Blocked Seat' literal with the specified name. - * - * - * @generated - */ - public static BCwithBlockedSeat getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - BCwithBlockedSeat result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'BCwith Blocked Seat' literal with the specified integer value. - * - * - * @generated - */ - public static BCwithBlockedSeat get(int value) { - switch (value) { - case NO_VALUE: return NO; - case YES_VALUE: return YES; - } - 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 BCwithBlockedSeat(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //BCwithBlockedSeat diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BusinessClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BusinessClass.java deleted file mode 100644 index ea4156d6..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/BusinessClass.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Business Class'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getBusinessClass() - * @model - * @generated - */ -public interface BusinessClass extends TravelClass { -} // BusinessClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Cabin.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Cabin.java index fb7f5649..5b6cce39 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Cabin.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Cabin.java @@ -19,9 +19,10 @@ *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getYDimension YDimension}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getRowNonexistent Row Nonexistent}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getAisleWidth Aisle Width}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getFramesPerSecond Frames Per Second}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getNumberOfDecks Number Of Decks}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getAircraftType Aircraft Type}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings Simulation Settings}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationResults Simulation Results}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getClasses Classes}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getDoors Doors}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getLavatories Lavatories}
  • @@ -30,10 +31,6 @@ *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getCurtains Curtains}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getStowages Stowages}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getPassengers Passengers}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getScale Scale}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getAircraftType Aircraft Type}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#isUsePresetSettings Use Preset Settings}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Cabin#getSpeedFactor Speed Factor}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin() @@ -193,74 +190,46 @@ public interface Cabin extends NamedElement { EList getStowages(); /** - * Returns the value of the 'Scale' attribute. - * The default value is "10". + * Returns the value of the 'Passengers' containment reference list. + * The list contents are of type {@link net.bhl.cdt.paxelerate.model.Passenger}. * *

    - * If the meaning of the 'Scale' attribute isn't clear, + * If the meaning of the 'Passengers' reference isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Scale' attribute. - * @see #setScale(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_Scale() - * @model default="10" - * @generated - */ - int getScale(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getScale Scale}' attribute. - * - * - * @param value the new value of the 'Scale' attribute. - * @see #getScale() + * @return the value of the 'Passengers' containment reference list. + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_Passengers() + * @model containment="true" * @generated */ - void setScale(int value); + EList getPassengers(); /** - * Returns the value of the 'Frames Per Second' attribute. - * The default value is "5". + * Returns the value of the 'Simulation Results' containment reference. * *

    - * If the meaning of the 'Frames Per Second' attribute isn't clear, + * If the meaning of the 'Simulation Results' containment reference isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Frames Per Second' attribute. - * @see #setFramesPerSecond(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_FramesPerSecond() - * @model default="5" - * @generated - */ - int getFramesPerSecond(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getFramesPerSecond Frames Per Second}' attribute. - * - * - * @param value the new value of the 'Frames Per Second' attribute. - * @see #getFramesPerSecond() + * @return the value of the 'Simulation Results' containment reference. + * @see #setSimulationResults(SimulationResult) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_SimulationResults() + * @model containment="true" * @generated */ - void setFramesPerSecond(int value); + SimulationResult getSimulationResults(); /** - * Returns the value of the 'Passengers' containment reference list. - * The list contents are of type {@link net.bhl.cdt.paxelerate.model.Passenger}. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationResults Simulation Results}' containment reference. * - *

    - * If the meaning of the 'Passengers' reference isn't clear, - * there really should be more of a description here... - *

    * - * @return the value of the 'Passengers' containment reference list. - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_Passengers() - * @model containment="true" + * @param value the new value of the 'Simulation Results' containment reference. + * @see #getSimulationResults() * @generated */ - EList getPassengers(); + void setSimulationResults(SimulationResult value); /** * Returns the value of the 'Number Of Decks' attribute. @@ -291,6 +260,7 @@ public interface Cabin extends NamedElement { /** * Returns the value of the 'Aircraft Type' attribute. + * The default value is "narrowbody". * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.AircraftType}. * *

    @@ -302,7 +272,7 @@ public interface Cabin extends NamedElement { * @see net.bhl.cdt.paxelerate.model.AircraftType * @see #setAircraftType(AircraftType) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_AircraftType() - * @model + * @model default="narrowbody" required="true" * @generated */ AircraftType getAircraftType(); @@ -319,79 +289,26 @@ public interface Cabin extends NamedElement { void setAircraftType(AircraftType value); /** - * Returns the value of the 'Use Preset Settings' attribute. - * The default value is "false". - * - *

    - * If the meaning of the 'Use Preset Settings' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Use Preset Settings' attribute. - * @see #setUsePresetSettings(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_UsePresetSettings() - * @model default="false" - * @generated - */ - boolean isUsePresetSettings(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#isUsePresetSettings Use Preset Settings}' attribute. - * - * - * @param value the new value of the 'Use Preset Settings' attribute. - * @see #isUsePresetSettings() - * @generated - */ - void setUsePresetSettings(boolean value); - - /** - * Returns the value of the 'Speed Factor' attribute. - * - *

    - * If the meaning of the 'Speed Factor' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Speed Factor' attribute. - * @see #setSpeedFactor(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_SpeedFactor() - * @model - * @generated - */ - int getSpeedFactor(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getSpeedFactor Speed Factor}' attribute. - * - * - * @param value the new value of the 'Speed Factor' attribute. - * @see #getSpeedFactor() - * @generated - */ - void setSpeedFactor(int value); - - /** - * Returns the value of the 'Simulation Settings' reference. + * Returns the value of the 'Simulation Settings' containment reference. * *

    * If the meaning of the 'Simulation Settings' reference isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Simulation Settings' reference. + * @return the value of the 'Simulation Settings' containment reference. * @see #setSimulationSettings(SimulationProperties) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabin_SimulationSettings() - * @model required="true" + * @model containment="true" required="true" * @generated */ SimulationProperties getSimulationSettings(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings Simulation Settings}' reference. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings Simulation Settings}' containment reference. * * - * @param value the new value of the 'Simulation Settings' reference. + * @param value the new value of the 'Simulation Settings' containment reference. * @see #getSimulationSettings() * @generated */ diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinFactory.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinFactory.java index 5dcb0994..4bcd9ea9 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinFactory.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinFactory.java @@ -40,40 +40,13 @@ public interface CabinFactory extends EFactory { Row createRow(); /** - * Returns a new object of class 'Business Class'. + * Returns a new object of class 'Travel Class'. * * - * @return a new object of class 'Business Class'. + * @return a new object of class 'Travel Class'. * @generated */ - BusinessClass createBusinessClass(); - - /** - * Returns a new object of class 'First Class'. - * - * - * @return a new object of class 'First Class'. - * @generated - */ - FirstClass createFirstClass(); - - /** - * Returns a new object of class 'Economy Class'. - * - * - * @return a new object of class 'Economy Class'. - * @generated - */ - EconomyClass createEconomyClass(); - - /** - * Returns a new object of class 'Premium Economy Class'. - * - * - * @return a new object of class 'Premium Economy Class'. - * @generated - */ - PremiumEconomyClass createPremiumEconomyClass(); + TravelClass createTravelClass(); /** * Returns a new object of class 'Seat'. @@ -148,31 +121,13 @@ public interface CabinFactory extends EFactory { Stowage createStowage(); /** - * Returns a new object of class 'Main Door'. - * - * - * @return a new object of class 'Main Door'. - * @generated - */ - MainDoor createMainDoor(); - - /** - * Returns a new object of class 'Emergency Exit'. - * - * - * @return a new object of class 'Emergency Exit'. - * @generated - */ - EmergencyExit createEmergencyExit(); - - /** - * Returns a new object of class 'Standard Door'. + * Returns a new object of class 'Door'. * * - * @return a new object of class 'Standard Door'. + * @return a new object of class 'Door'. * @generated */ - StandardDoor createStandardDoor(); + Door createDoor(); /** * Returns a new object of class 'Simulation Properties'. diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinPackage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinPackage.java index 277ec6ce..01b77689 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinPackage.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinPackage.java @@ -116,25 +116,25 @@ public interface CabinPackage extends EPackage { int CABIN__AISLE_WIDTH = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 3; /** - * The feature id for the 'Frames Per Second' attribute. + * The feature id for the 'Number Of Decks' attribute. * * * @generated * @ordered */ - int CABIN__FRAMES_PER_SECOND = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 4; + int CABIN__NUMBER_OF_DECKS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 4; /** - * The feature id for the 'Number Of Decks' attribute. + * The feature id for the 'Aircraft Type' attribute. * * * @generated * @ordered */ - int CABIN__NUMBER_OF_DECKS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 5; + int CABIN__AIRCRAFT_TYPE = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 5; /** - * The feature id for the 'Simulation Settings' reference. + * The feature id for the 'Simulation Settings' containment reference. * * * @generated @@ -142,6 +142,15 @@ public interface CabinPackage extends EPackage { */ int CABIN__SIMULATION_SETTINGS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 6; + /** + * The feature id for the 'Simulation Results' containment reference. + * + * + * @generated + * @ordered + */ + int CABIN__SIMULATION_RESULTS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 7; + /** * The feature id for the 'Classes' containment reference list. * @@ -149,7 +158,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__CLASSES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 7; + int CABIN__CLASSES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 8; /** * The feature id for the 'Doors' containment reference list. @@ -158,7 +167,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__DOORS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 8; + int CABIN__DOORS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 9; /** * The feature id for the 'Lavatories' containment reference list. @@ -167,7 +176,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__LAVATORIES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 9; + int CABIN__LAVATORIES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 10; /** * The feature id for the 'Galleys' containment reference list. @@ -176,7 +185,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__GALLEYS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 10; + int CABIN__GALLEYS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 11; /** * The feature id for the 'Stairways' containment reference list. @@ -185,7 +194,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__STAIRWAYS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 11; + int CABIN__STAIRWAYS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 12; /** * The feature id for the 'Curtains' containment reference list. @@ -194,7 +203,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__CURTAINS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 12; + int CABIN__CURTAINS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 13; /** * The feature id for the 'Stowages' containment reference list. @@ -203,7 +212,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__STOWAGES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 13; + int CABIN__STOWAGES = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 14; /** * The feature id for the 'Passengers' containment reference list. @@ -212,43 +221,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN__PASSENGERS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 14; - - /** - * The feature id for the 'Scale' attribute. - * - * - * @generated - * @ordered - */ - int CABIN__SCALE = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 15; - - /** - * The feature id for the 'Aircraft Type' attribute. - * - * - * @generated - * @ordered - */ - int CABIN__AIRCRAFT_TYPE = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 16; - - /** - * The feature id for the 'Use Preset Settings' attribute. - * - * - * @generated - * @ordered - */ - int CABIN__USE_PRESET_SETTINGS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 17; - - /** - * The feature id for the 'Speed Factor' attribute. - * - * - * @generated - * @ordered - */ - int CABIN__SPEED_FACTOR = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 18; + int CABIN__PASSENGERS = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 15; /** * The number of structural features of the 'Cabin' class. @@ -257,7 +230,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int CABIN_FEATURE_COUNT = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 19; + int CABIN_FEATURE_COUNT = ModelPackage.NAMED_ELEMENT_FEATURE_COUNT + 16; /** * The number of operations of the 'Cabin' class. @@ -297,15 +270,6 @@ public interface CabinPackage extends EPackage { */ int ROW__ROW_NUMBER = 1; - /** - * The feature id for the 'Offset In Row' attribute. - * - * - * @generated - * @ordered - */ - int ROW__OFFSET_IN_ROW = 2; - /** * The number of structural features of the 'Row' class. * @@ -313,7 +277,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int ROW_FEATURE_COUNT = 3; + int ROW_FEATURE_COUNT = 2; /** * The number of operations of the 'Row' class. @@ -407,575 +371,40 @@ public interface CabinPackage extends EPackage { int TRAVEL_CLASS__NAME = 7; /** - * The feature id for the 'Row Structure' attribute. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS__ROW_STRUCTURE = 8; - - /** - * The feature id for the 'Load Factor' attribute. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS__LOAD_FACTOR = 9; - - /** - * The number of structural features of the 'Travel Class' class. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS_FEATURE_COUNT = 10; - - /** - * The operation id for the 'Too Many Passengers' operation. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = 0; - - /** - * The operation id for the 'Wrong Row Structure' operation. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = 1; - - /** - * The number of operations of the 'Travel Class' class. - * - * - * @generated - * @ordered - */ - int TRAVEL_CLASS_OPERATION_COUNT = 2; - - /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.BusinessClassImpl Business Class}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.BusinessClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getBusinessClass() - * @generated - */ - int BUSINESS_CLASS = 3; - - /** - * The feature id for the 'Rows' containment reference list. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__ROWS = TRAVEL_CLASS__ROWS; - - /** - * The feature id for the 'Sequence' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__SEQUENCE = TRAVEL_CLASS__SEQUENCE; - - /** - * The feature id for the 'Passengers' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__PASSENGERS = TRAVEL_CLASS__PASSENGERS; - - /** - * The feature id for the 'Available Seats' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__AVAILABLE_SEATS = TRAVEL_CLASS__AVAILABLE_SEATS; - - /** - * The feature id for the 'Seat Pitch' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__SEAT_PITCH = TRAVEL_CLASS__SEAT_PITCH; - - /** - * The feature id for the 'XDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__XDIMENSION_OF_SEATS = TRAVEL_CLASS__XDIMENSION_OF_SEATS; - - /** - * The feature id for the 'YDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__YDIMENSION_OF_SEATS = TRAVEL_CLASS__YDIMENSION_OF_SEATS; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__NAME = TRAVEL_CLASS__NAME; - - /** - * The feature id for the 'Row Structure' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__ROW_STRUCTURE = TRAVEL_CLASS__ROW_STRUCTURE; - - /** - * The feature id for the 'Load Factor' attribute. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS__LOAD_FACTOR = TRAVEL_CLASS__LOAD_FACTOR; - - /** - * The number of structural features of the 'Business Class' class. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS_FEATURE_COUNT = TRAVEL_CLASS_FEATURE_COUNT + 0; - - /** - * The operation id for the 'Too Many Passengers' operation. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP; - - /** - * The operation id for the 'Wrong Row Structure' operation. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP; - - /** - * The number of operations of the 'Business Class' class. - * - * - * @generated - * @ordered - */ - int BUSINESS_CLASS_OPERATION_COUNT = TRAVEL_CLASS_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.FirstClassImpl First Class}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.FirstClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getFirstClass() - * @generated - */ - int FIRST_CLASS = 4; - - /** - * The feature id for the 'Rows' containment reference list. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__ROWS = TRAVEL_CLASS__ROWS; - - /** - * The feature id for the 'Sequence' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__SEQUENCE = TRAVEL_CLASS__SEQUENCE; - - /** - * The feature id for the 'Passengers' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__PASSENGERS = TRAVEL_CLASS__PASSENGERS; - - /** - * The feature id for the 'Available Seats' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__AVAILABLE_SEATS = TRAVEL_CLASS__AVAILABLE_SEATS; - - /** - * The feature id for the 'Seat Pitch' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__SEAT_PITCH = TRAVEL_CLASS__SEAT_PITCH; - - /** - * The feature id for the 'XDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__XDIMENSION_OF_SEATS = TRAVEL_CLASS__XDIMENSION_OF_SEATS; - - /** - * The feature id for the 'YDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__YDIMENSION_OF_SEATS = TRAVEL_CLASS__YDIMENSION_OF_SEATS; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__NAME = TRAVEL_CLASS__NAME; - - /** - * The feature id for the 'Row Structure' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__ROW_STRUCTURE = TRAVEL_CLASS__ROW_STRUCTURE; - - /** - * The feature id for the 'Load Factor' attribute. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS__LOAD_FACTOR = TRAVEL_CLASS__LOAD_FACTOR; - - /** - * The number of structural features of the 'First Class' class. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS_FEATURE_COUNT = TRAVEL_CLASS_FEATURE_COUNT + 0; - - /** - * The operation id for the 'Too Many Passengers' operation. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP; - - /** - * The operation id for the 'Wrong Row Structure' operation. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP; - - /** - * The number of operations of the 'First Class' class. - * - * - * @generated - * @ordered - */ - int FIRST_CLASS_OPERATION_COUNT = TRAVEL_CLASS_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.EconomyClassImpl Economy Class}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.EconomyClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getEconomyClass() - * @generated - */ - int ECONOMY_CLASS = 5; - - /** - * The feature id for the 'Rows' containment reference list. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__ROWS = TRAVEL_CLASS__ROWS; - - /** - * The feature id for the 'Sequence' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__SEQUENCE = TRAVEL_CLASS__SEQUENCE; - - /** - * The feature id for the 'Passengers' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__PASSENGERS = TRAVEL_CLASS__PASSENGERS; - - /** - * The feature id for the 'Available Seats' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__AVAILABLE_SEATS = TRAVEL_CLASS__AVAILABLE_SEATS; - - /** - * The feature id for the 'Seat Pitch' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__SEAT_PITCH = TRAVEL_CLASS__SEAT_PITCH; - - /** - * The feature id for the 'XDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__XDIMENSION_OF_SEATS = TRAVEL_CLASS__XDIMENSION_OF_SEATS; - - /** - * The feature id for the 'YDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__YDIMENSION_OF_SEATS = TRAVEL_CLASS__YDIMENSION_OF_SEATS; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__NAME = TRAVEL_CLASS__NAME; - - /** - * The feature id for the 'Row Structure' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__ROW_STRUCTURE = TRAVEL_CLASS__ROW_STRUCTURE; - - /** - * The feature id for the 'Load Factor' attribute. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS__LOAD_FACTOR = TRAVEL_CLASS__LOAD_FACTOR; - - /** - * The number of structural features of the 'Economy Class' class. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS_FEATURE_COUNT = TRAVEL_CLASS_FEATURE_COUNT + 0; - - /** - * The operation id for the 'Too Many Passengers' operation. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP; - - /** - * The operation id for the 'Wrong Row Structure' operation. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP; - - /** - * The number of operations of the 'Economy Class' class. - * - * - * @generated - * @ordered - */ - int ECONOMY_CLASS_OPERATION_COUNT = TRAVEL_CLASS_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.PremiumEconomyClassImpl Premium Economy Class}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.PremiumEconomyClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPremiumEconomyClass() - * @generated - */ - int PREMIUM_ECONOMY_CLASS = 6; - - /** - * The feature id for the 'Rows' containment reference list. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__ROWS = TRAVEL_CLASS__ROWS; - - /** - * The feature id for the 'Sequence' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__SEQUENCE = TRAVEL_CLASS__SEQUENCE; - - /** - * The feature id for the 'Passengers' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__PASSENGERS = TRAVEL_CLASS__PASSENGERS; - - /** - * The feature id for the 'Available Seats' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__AVAILABLE_SEATS = TRAVEL_CLASS__AVAILABLE_SEATS; - - /** - * The feature id for the 'Seat Pitch' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__SEAT_PITCH = TRAVEL_CLASS__SEAT_PITCH; - - /** - * The feature id for the 'XDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__XDIMENSION_OF_SEATS = TRAVEL_CLASS__XDIMENSION_OF_SEATS; - - /** - * The feature id for the 'YDimension Of Seats' attribute. - * - * - * @generated - * @ordered - */ - int PREMIUM_ECONOMY_CLASS__YDIMENSION_OF_SEATS = TRAVEL_CLASS__YDIMENSION_OF_SEATS; - - /** - * The feature id for the 'Name' attribute. + * The feature id for the 'Row Structure' attribute. * * * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS__NAME = TRAVEL_CLASS__NAME; + int TRAVEL_CLASS__ROW_STRUCTURE = 8; /** - * The feature id for the 'Row Structure' attribute. + * The feature id for the 'Load Factor' attribute. * * * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS__ROW_STRUCTURE = TRAVEL_CLASS__ROW_STRUCTURE; + int TRAVEL_CLASS__LOAD_FACTOR = 9; /** - * The feature id for the 'Load Factor' attribute. + * The feature id for the 'Travel Option' attribute. * * * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS__LOAD_FACTOR = TRAVEL_CLASS__LOAD_FACTOR; + int TRAVEL_CLASS__TRAVEL_OPTION = 10; /** - * The number of structural features of the 'Premium Economy Class' class. + * The number of structural features of the 'Travel Class' class. * * * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS_FEATURE_COUNT = TRAVEL_CLASS_FEATURE_COUNT + 0; + int TRAVEL_CLASS_FEATURE_COUNT = 11; /** * The operation id for the 'Too Many Passengers' operation. @@ -984,7 +413,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP; + int TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = 0; /** * The operation id for the 'Wrong Row Structure' operation. @@ -993,16 +422,16 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP; + int TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = 1; /** - * The number of operations of the 'Premium Economy Class' class. + * The number of operations of the 'Travel Class' class. * * * @generated * @ordered */ - int PREMIUM_ECONOMY_CLASS_OPERATION_COUNT = TRAVEL_CLASS_OPERATION_COUNT + 0; + int TRAVEL_CLASS_OPERATION_COUNT = 2; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.DoorImpl Door}' class. @@ -1012,7 +441,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getDoor() * @generated */ - int DOOR = 16; + int DOOR = 12; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.SeatImpl Seat}' class. @@ -1022,7 +451,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSeat() * @generated */ - int SEAT = 7; + int SEAT = 3; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl Passenger}' class. @@ -1032,7 +461,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPassenger() * @generated */ - int PASSENGER = 8; + int PASSENGER = 4; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.CrewMemberImpl Crew Member}' class. @@ -1042,7 +471,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getCrewMember() * @generated */ - int CREW_MEMBER = 9; + int CREW_MEMBER = 5; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.PhysicalObjectImpl Physical Object}' class. @@ -1052,7 +481,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPhysicalObject() * @generated */ - int PHYSICAL_OBJECT = 10; + int PHYSICAL_OBJECT = 6; /** * The feature id for the 'YPosition' attribute. @@ -1253,13 +682,13 @@ public interface CabinPackage extends EPackage { int SEAT__PASSENGER = PHYSICAL_OBJECT_FEATURE_COUNT + 6; /** - * The feature id for the 'Currently Folded' attribute. + * The feature id for the 'Layout Concept' attribute. * * * @generated * @ordered */ - int SEAT__CURRENTLY_FOLDED = PHYSICAL_OBJECT_FEATURE_COUNT + 7; + int SEAT__LAYOUT_CONCEPT = PHYSICAL_OBJECT_FEATURE_COUNT + 7; /** * The number of structural features of the 'Seat' class. @@ -1343,13 +772,13 @@ public interface CabinPackage extends EPackage { int PASSENGER__DOOR = 5; /** - * The feature id for the 'Seat' attribute. + * The feature id for the 'Seat ID' attribute. * * * @generated * @ordered */ - int PASSENGER__SEAT = 6; + int PASSENGER__SEAT_ID = 6; /** * The feature id for the 'Name' attribute. @@ -1370,13 +799,13 @@ public interface CabinPackage extends EPackage { int PASSENGER__BOARDING_TIME = 8; /** - * The feature id for the 'Seat Ref' reference. + * The feature id for the 'Seat' reference. * * * @generated * @ordered */ - int PASSENGER__SEAT_REF = 9; + int PASSENGER__SEAT = 9; /** * The feature id for the 'Width' attribute. @@ -1451,49 +880,49 @@ public interface CabinPackage extends EPackage { int PASSENGER__START_BOARDING_AFTER_DELAY = 17; /** - * The feature id for the 'Number Of Waits' attribute. + * The feature id for the 'Luggage Stow Time' attribute. * * * @generated * @ordered */ - int PASSENGER__NUMBER_OF_WAITS = 18; + int PASSENGER__LUGGAGE_STOW_TIME = 18; /** - * The feature id for the 'Luggage Stow Time' attribute. + * The feature id for the 'Luggage Stow Distance' attribute. * * * @generated * @ordered */ - int PASSENGER__LUGGAGE_STOW_TIME = 19; + int PASSENGER__LUGGAGE_STOW_DISTANCE = 19; /** - * The feature id for the 'Luggage Stowing Distance' attribute. + * The feature id for the 'Travel Class' reference. * * * @generated * @ordered */ - int PASSENGER__LUGGAGE_STOWING_DISTANCE = 20; + int PASSENGER__TRAVEL_CLASS = 20; /** - * The feature id for the 'Travel Class' reference. + * The feature id for the 'Passenger Mood' attribute. * * * @generated * @ordered */ - int PASSENGER__TRAVEL_CLASS = 21; + int PASSENGER__PASSENGER_MOOD = 21; /** - * The feature id for the 'Passenger Mood' attribute. + * The feature id for the 'Number Of Waits' attribute. * * * @generated * @ordered */ - int PASSENGER__PASSENGER_MOOD = 22; + int PASSENGER__NUMBER_OF_WAITS = 22; /** * The feature id for the 'Number Of Make Way Operations' attribute. @@ -1504,6 +933,15 @@ public interface CabinPackage extends EPackage { */ int PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS = 23; + /** + * The feature id for the 'Distance Walked' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER__DISTANCE_WALKED = 24; + /** * The feature id for the 'Luggage' attribute. * @@ -1511,7 +949,25 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int PASSENGER__LUGGAGE = 24; + int PASSENGER__LUGGAGE = 25; + + /** + * The feature id for the 'Cost Of Path' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER__COST_OF_PATH = 26; + + /** + * The feature id for the 'Total Time Waited' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER__TOTAL_TIME_WAITED = 27; /** * The number of structural features of the 'Passenger' class. @@ -1520,7 +976,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int PASSENGER_FEATURE_COUNT = 25; + int PASSENGER_FEATURE_COUNT = 28; /** * The number of operations of the 'Passenger' class. @@ -1575,7 +1031,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getLavatory() * @generated */ - int LAVATORY = 11; + int LAVATORY = 7; /** * The feature id for the 'YPosition' attribute. @@ -1666,7 +1122,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getGalley() * @generated */ - int GALLEY = 12; + int GALLEY = 8; /** * The feature id for the 'YPosition' attribute. @@ -1757,7 +1213,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStairway() * @generated */ - int STAIRWAY = 13; + int STAIRWAY = 9; /** * The feature id for the 'YPosition' attribute. @@ -1857,7 +1313,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getCurtain() * @generated */ - int CURTAIN = 14; + int CURTAIN = 10; /** * The feature id for the 'YPosition' attribute. @@ -1905,603 +1361,384 @@ public interface CabinPackage extends EPackage { int CURTAIN__NAME = PHYSICAL_OBJECT__NAME; /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int CURTAIN__ID = PHYSICAL_OBJECT__ID; - - /** - * The feature id for the 'Postition After Row' attribute. - * - * - * @generated - * @ordered - */ - int CURTAIN__POSTITION_AFTER_ROW = PHYSICAL_OBJECT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Curtain Open' attribute. - * - * - * @generated - * @ordered - */ - int CURTAIN__CURTAIN_OPEN = PHYSICAL_OBJECT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Curtain' class. - * - * - * @generated - * @ordered - */ - int CURTAIN_FEATURE_COUNT = PHYSICAL_OBJECT_FEATURE_COUNT + 2; - - /** - * The operation id for the 'Out Of Bounds' operation. - * - * - * @generated - * @ordered - */ - int CURTAIN___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP = PHYSICAL_OBJECT___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP; - - /** - * The number of operations of the 'Curtain' class. - * - * - * @generated - * @ordered - */ - int CURTAIN_OPERATION_COUNT = PHYSICAL_OBJECT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.StowageImpl Stowage}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.StowageImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStowage() - * @generated - */ - int STOWAGE = 15; - - /** - * The feature id for the 'YPosition' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__YPOSITION = PHYSICAL_OBJECT__YPOSITION; - - /** - * The feature id for the 'XPosition' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__XPOSITION = PHYSICAL_OBJECT__XPOSITION; - - /** - * The feature id for the 'YDimension' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__YDIMENSION = PHYSICAL_OBJECT__YDIMENSION; - - /** - * The feature id for the 'XDimension' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__XDIMENSION = PHYSICAL_OBJECT__XDIMENSION; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__NAME = PHYSICAL_OBJECT__NAME; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int STOWAGE__ID = PHYSICAL_OBJECT__ID; - - /** - * The number of structural features of the 'Stowage' class. - * - * - * @generated - * @ordered - */ - int STOWAGE_FEATURE_COUNT = PHYSICAL_OBJECT_FEATURE_COUNT + 0; - - /** - * The operation id for the 'Out Of Bounds' operation. - * - * - * @generated - * @ordered - */ - int STOWAGE___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP = PHYSICAL_OBJECT___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP; - - /** - * The number of operations of the 'Stowage' class. - * - * - * @generated - * @ordered - */ - int STOWAGE_OPERATION_COUNT = PHYSICAL_OBJECT_OPERATION_COUNT + 0; - - /** - * The feature id for the 'XPosition' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__XPOSITION = 0; - - /** - * The feature id for the 'On Both Sides' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__ON_BOTH_SIDES = 1; - - /** - * The feature id for the 'Width' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__WIDTH = 2; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__ID = 3; - - /** - * The feature id for the 'Number Of Simultaneous Passengers' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS = 4; - - /** - * The feature id for the 'Is Active' attribute. - * - * - * @generated - * @ordered - */ - int DOOR__IS_ACTIVE = 5; - - /** - * The feature id for the 'Waiting Passengers' reference list. - * - * - * @generated - * @ordered - */ - int DOOR__WAITING_PASSENGERS = 6; - - /** - * The number of structural features of the 'Door' class. - * - * - * @generated - * @ordered - */ - int DOOR_FEATURE_COUNT = 7; - - /** - * The number of operations of the 'Door' class. + * The feature id for the 'Id' attribute. * * * @generated * @ordered */ - int DOOR_OPERATION_COUNT = 0; + int CURTAIN__ID = PHYSICAL_OBJECT__ID; /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.MainDoorImpl Main Door}' class. + * The feature id for the 'Postition After Row' attribute. * * - * @see net.bhl.cdt.paxelerate.model.impl.MainDoorImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getMainDoor() * @generated + * @ordered */ - int MAIN_DOOR = 17; + int CURTAIN__POSTITION_AFTER_ROW = PHYSICAL_OBJECT_FEATURE_COUNT + 0; /** - * The feature id for the 'XPosition' attribute. + * The feature id for the 'Curtain Open' attribute. * * * @generated * @ordered */ - int MAIN_DOOR__XPOSITION = DOOR__XPOSITION; + int CURTAIN__CURTAIN_OPEN = PHYSICAL_OBJECT_FEATURE_COUNT + 1; /** - * The feature id for the 'On Both Sides' attribute. + * The number of structural features of the 'Curtain' class. * * * @generated * @ordered */ - int MAIN_DOOR__ON_BOTH_SIDES = DOOR__ON_BOTH_SIDES; + int CURTAIN_FEATURE_COUNT = PHYSICAL_OBJECT_FEATURE_COUNT + 2; /** - * The feature id for the 'Width' attribute. + * The operation id for the 'Out Of Bounds' operation. * * * @generated * @ordered */ - int MAIN_DOOR__WIDTH = DOOR__WIDTH; + int CURTAIN___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP = PHYSICAL_OBJECT___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP; /** - * The feature id for the 'Id' attribute. + * The number of operations of the 'Curtain' class. * * * @generated * @ordered */ - int MAIN_DOOR__ID = DOOR__ID; + int CURTAIN_OPERATION_COUNT = PHYSICAL_OBJECT_OPERATION_COUNT + 0; /** - * The feature id for the 'Number Of Simultaneous Passengers' attribute. + * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.StowageImpl Stowage}' class. * * + * @see net.bhl.cdt.paxelerate.model.impl.StowageImpl + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStowage() * @generated - * @ordered */ - int MAIN_DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS = DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS; + int STOWAGE = 11; /** - * The feature id for the 'Is Active' attribute. + * The feature id for the 'YPosition' attribute. * * * @generated * @ordered */ - int MAIN_DOOR__IS_ACTIVE = DOOR__IS_ACTIVE; + int STOWAGE__YPOSITION = PHYSICAL_OBJECT__YPOSITION; /** - * The feature id for the 'Waiting Passengers' reference list. + * The feature id for the 'XPosition' attribute. * * * @generated * @ordered */ - int MAIN_DOOR__WAITING_PASSENGERS = DOOR__WAITING_PASSENGERS; + int STOWAGE__XPOSITION = PHYSICAL_OBJECT__XPOSITION; /** - * The number of structural features of the 'Main Door' class. + * The feature id for the 'YDimension' attribute. * * * @generated * @ordered */ - int MAIN_DOOR_FEATURE_COUNT = DOOR_FEATURE_COUNT + 0; + int STOWAGE__YDIMENSION = PHYSICAL_OBJECT__YDIMENSION; /** - * The number of operations of the 'Main Door' class. + * The feature id for the 'XDimension' attribute. * * * @generated * @ordered */ - int MAIN_DOOR_OPERATION_COUNT = DOOR_OPERATION_COUNT + 0; + int STOWAGE__XDIMENSION = PHYSICAL_OBJECT__XDIMENSION; /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.EmergencyExitImpl Emergency Exit}' class. + * The feature id for the 'Name' attribute. * * - * @see net.bhl.cdt.paxelerate.model.impl.EmergencyExitImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getEmergencyExit() * @generated + * @ordered */ - int EMERGENCY_EXIT = 18; + int STOWAGE__NAME = PHYSICAL_OBJECT__NAME; /** - * The feature id for the 'XPosition' attribute. + * The feature id for the 'Id' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT__XPOSITION = DOOR__XPOSITION; + int STOWAGE__ID = PHYSICAL_OBJECT__ID; /** - * The feature id for the 'On Both Sides' attribute. + * The number of structural features of the 'Stowage' class. * * * @generated * @ordered */ - int EMERGENCY_EXIT__ON_BOTH_SIDES = DOOR__ON_BOTH_SIDES; + int STOWAGE_FEATURE_COUNT = PHYSICAL_OBJECT_FEATURE_COUNT + 0; /** - * The feature id for the 'Width' attribute. + * The operation id for the 'Out Of Bounds' operation. * * * @generated * @ordered */ - int EMERGENCY_EXIT__WIDTH = DOOR__WIDTH; + int STOWAGE___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP = PHYSICAL_OBJECT___OUT_OF_BOUNDS__DIAGNOSTICCHAIN_MAP; /** - * The feature id for the 'Id' attribute. + * The number of operations of the 'Stowage' class. * * * @generated * @ordered */ - int EMERGENCY_EXIT__ID = DOOR__ID; + int STOWAGE_OPERATION_COUNT = PHYSICAL_OBJECT_OPERATION_COUNT + 0; /** - * The feature id for the 'Number Of Simultaneous Passengers' attribute. + * The feature id for the 'XPosition' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT__NUMBER_OF_SIMULTANEOUS_PASSENGERS = DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS; + int DOOR__XPOSITION = 0; /** - * The feature id for the 'Is Active' attribute. + * The feature id for the 'On Both Sides' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT__IS_ACTIVE = DOOR__IS_ACTIVE; + int DOOR__ON_BOTH_SIDES = 1; /** - * The feature id for the 'Waiting Passengers' reference list. + * The feature id for the 'Width' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT__WAITING_PASSENGERS = DOOR__WAITING_PASSENGERS; + int DOOR__WIDTH = 2; /** - * The number of structural features of the 'Emergency Exit' class. + * The feature id for the 'Id' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT_FEATURE_COUNT = DOOR_FEATURE_COUNT + 0; + int DOOR__ID = 3; /** - * The number of operations of the 'Emergency Exit' class. + * The feature id for the 'Number Of Simultaneous Passengers' attribute. * * * @generated * @ordered */ - int EMERGENCY_EXIT_OPERATION_COUNT = DOOR_OPERATION_COUNT + 0; + int DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS = 4; /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.StandardDoorImpl Standard Door}' class. + * The feature id for the 'Is Active' attribute. * * - * @see net.bhl.cdt.paxelerate.model.impl.StandardDoorImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStandardDoor() * @generated + * @ordered */ - int STANDARD_DOOR = 19; + int DOOR__IS_ACTIVE = 5; /** - * The feature id for the 'XPosition' attribute. + * The feature id for the 'Waiting Passengers' reference list. * * * @generated * @ordered */ - int STANDARD_DOOR__XPOSITION = DOOR__XPOSITION; + int DOOR__WAITING_PASSENGERS = 6; /** - * The feature id for the 'On Both Sides' attribute. + * The feature id for the 'Door Option' attribute. * * * @generated * @ordered */ - int STANDARD_DOOR__ON_BOTH_SIDES = DOOR__ON_BOTH_SIDES; + int DOOR__DOOR_OPTION = 7; /** - * The feature id for the 'Width' attribute. + * The number of structural features of the 'Door' class. * * * @generated * @ordered */ - int STANDARD_DOOR__WIDTH = DOOR__WIDTH; + int DOOR_FEATURE_COUNT = 8; /** - * The feature id for the 'Id' attribute. + * The number of operations of the 'Door' class. * * * @generated * @ordered */ - int STANDARD_DOOR__ID = DOOR__ID; + int DOOR_OPERATION_COUNT = 0; /** - * The feature id for the 'Number Of Simultaneous Passengers' attribute. + * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl Simulation Properties}' class. * * + * @see net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSimulationProperties() * @generated - * @ordered */ - int STANDARD_DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS = DOOR__NUMBER_OF_SIMULTANEOUS_PASSENGERS; + int SIMULATION_PROPERTIES = 13; /** - * The feature id for the 'Is Active' attribute. + * The feature id for the 'Results' reference list. * * * @generated * @ordered */ - int STANDARD_DOOR__IS_ACTIVE = DOOR__IS_ACTIVE; + int SIMULATION_PROPERTIES__RESULTS = 0; /** - * The feature id for the 'Waiting Passengers' reference list. + * The feature id for the 'Luggage Properties' containment reference. * * * @generated * @ordered */ - int STANDARD_DOOR__WAITING_PASSENGERS = DOOR__WAITING_PASSENGERS; + int SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES = 1; /** - * The number of structural features of the 'Standard Door' class. + * The feature id for the 'Passenger Properties' containment reference. * * * @generated * @ordered */ - int STANDARD_DOOR_FEATURE_COUNT = DOOR_FEATURE_COUNT + 0; + int SIMULATION_PROPERTIES__PASSENGER_PROPERTIES = 2; /** - * The number of operations of the 'Standard Door' class. + * The feature id for the 'Passengers Boarding Per Minute' attribute. * * * @generated * @ordered */ - int STANDARD_DOOR_OPERATION_COUNT = DOOR_OPERATION_COUNT + 0; + int SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE = 3; /** - * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl Simulation Properties}' class. + * The feature id for the 'Layout Concept' attribute. * * - * @see net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSimulationProperties() * @generated + * @ordered */ - int SIMULATION_PROPERTIES = 20; + int SIMULATION_PROPERTIES__LAYOUT_CONCEPT = 4; /** - * The feature id for the 'Simulate Without UI' attribute. + * The feature id for the 'Scale' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI = 0; + int SIMULATION_PROPERTIES__SCALE = 5; /** - * The feature id for the 'Number Of Simulation Loops' attribute. + * The feature id for the 'Simulation Speed Factor' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS = 1; + int SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR = 6; /** - * The feature id for the 'Random Sort Between Loops' attribute. + * The feature id for the 'Use Preset Settings' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS = 2; + int SIMULATION_PROPERTIES__USE_PRESET_SETTINGS = 7; /** - * The feature id for the 'Use Foldable Seats' attribute. + * The feature id for the 'Simulate Without UI' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS = 3; + int SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI = 8; /** - * The feature id for the 'Bring Your Own Seat' attribute. + * The feature id for the 'Number Of Simulation Loops' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT = 4; + int SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS = 9; /** - * The feature id for the 'Results' reference list. + * The feature id for the 'Developer Mode' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__RESULTS = 5; + int SIMULATION_PROPERTIES__DEVELOPER_MODE = 10; /** - * The feature id for the 'Sorting' attribute. + * The feature id for the 'Data Export' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__SORTING = 6; + int SIMULATION_PROPERTIES__DATA_EXPORT = 11; /** - * The feature id for the 'Simulation Speed Factor' attribute. + * The feature id for the 'Display Map' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR = 7; + int SIMULATION_PROPERTIES__DISPLAY_MAP = 12; /** - * The feature id for the 'Seat Interference Standing Up Passenger Waiting Time' attribute. + * The feature id for the 'Sort Passenger Between Loops' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME = 8; + int SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS = 13; /** - * The feature id for the 'Seat Interference Process Time' attribute. + * The feature id for the 'Sorting' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME = 9; + int SIMULATION_PROPERTIES__SORTING = 14; /** * The feature id for the 'Thread Sleep Time Default' attribute. @@ -2510,43 +1747,43 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT = 10; + int SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT = 15; /** - * The feature id for the 'Developer Mode' attribute. + * The feature id for the 'Sideways Foldabe Seat Popup Time Mean' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__DEVELOPER_MODE = 11; + int SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN = 16; /** - * The feature id for the 'Luggage Properties' containment reference. + * The feature id for the 'Sideways Foldabe Seat Popup Time Deviation' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES = 12; + int SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION = 17; /** - * The feature id for the 'Passenger Properties' containment reference. + * The feature id for the 'Lifting Seat Pan Popup Time Mean' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__PASSENGER_PROPERTIES = 13; + int SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN = 18; /** - * The feature id for the 'Passengers Boarding Per Minute' attribute. + * The feature id for the 'Lifting Seat Pan Popup Time Deviation' attribute. * * * @generated * @ordered */ - int SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE = 14; + int SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION = 19; /** * The number of structural features of the 'Simulation Properties' class. @@ -2555,7 +1792,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int SIMULATION_PROPERTIES_FEATURE_COUNT = 15; + int SIMULATION_PROPERTIES_FEATURE_COUNT = 20; /** * The number of operations of the 'Simulation Properties' class. @@ -2574,25 +1811,25 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getLuggageProperties() * @generated */ - int LUGGAGE_PROPERTIES = 21; + int LUGGAGE_PROPERTIES = 14; /** - * The feature id for the 'Luggage Stowing Distance From Seat Mean' attribute. + * The feature id for the 'Luggage Stow Distance From Seat Mean' attribute. * * * @generated * @ordered */ - int LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN = 0; + int LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN = 0; /** - * The feature id for the 'Luggage Stowing Distance From Seat Deviation' attribute. + * The feature id for the 'Luggage Stow Distance From Seat Deviation' attribute. * * * @generated * @ordered */ - int LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION = 1; + int LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION = 1; /** * The feature id for the 'Percentage Of Passengers With No Luggage' attribute. @@ -2710,7 +1947,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSimulationResult() * @generated */ - int SIMULATION_RESULT = 22; + int SIMULATION_RESULT = 15; /** * The feature id for the 'Boarding Time' attribute. @@ -2766,6 +2003,33 @@ public interface CabinPackage extends EPackage { */ int SIMULATION_RESULT__BOARDING_TIME_STRING = 5; + /** + * The feature id for the 'Waymaking Skipped' attribute. + * + * + * @generated + * @ordered + */ + int SIMULATION_RESULT__WAYMAKING_SKIPPED = 6; + + /** + * The feature id for the 'Waymaking Completed' attribute. + * + * + * @generated + * @ordered + */ + int SIMULATION_RESULT__WAYMAKING_COMPLETED = 7; + + /** + * The feature id for the 'Layout Concept Type' attribute. + * + * + * @generated + * @ordered + */ + int SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE = 8; + /** * The number of structural features of the 'Simulation Result' class. * @@ -2773,7 +2037,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int SIMULATION_RESULT_FEATURE_COUNT = 6; + int SIMULATION_RESULT_FEATURE_COUNT = 9; /** * The number of operations of the 'Simulation Result' class. @@ -2792,7 +2056,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPassengerProperties() * @generated */ - int PASSENGER_PROPERTIES = 23; + int PASSENGER_PROPERTIES = 16; /** * The feature id for the 'Passenger Width Mean Male' attribute. @@ -2947,6 +2211,69 @@ public interface CabinPackage extends EPackage { */ int PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE = 16; + /** + * The feature id for the 'Passenger Aggressive Mood Share' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE = 17; + + /** + * The feature id for the 'Seat Interference Standing Up Passenger Waiting Time' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME = 18; + + /** + * The feature id for the 'Seat Interference Process Time Mean' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN = 19; + + /** + * The feature id for the 'Seat Interference Process Time Deviation' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION = 20; + + /** + * The feature id for the 'Seat Interference Process Time Folding Seat Mean' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN = 21; + + /** + * The feature id for the 'Seat Interference Process Time Folding Seat Deviation' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION = 22; + + /** + * The feature id for the 'Passive Passenger Waiting Time After Collision' attribute. + * + * + * @generated + * @ordered + */ + int PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION = 23; + /** * The number of structural features of the 'Passenger Properties' class. * @@ -2954,7 +2281,7 @@ public interface CabinPackage extends EPackage { * @generated * @ordered */ - int PASSENGER_PROPERTIES_FEATURE_COUNT = 17; + int PASSENGER_PROPERTIES_FEATURE_COUNT = 24; /** * The number of operations of the 'Passenger Properties' class. @@ -2973,7 +2300,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStairwayDirection() * @generated */ - int STAIRWAY_DIRECTION = 25; + int STAIRWAY_DIRECTION = 18; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.AircraftType Aircraft Type}' enum. @@ -2983,7 +2310,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getAircraftType() * @generated */ - int AIRCRAFT_TYPE = 26; + int AIRCRAFT_TYPE = 19; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.PassengerMood Passenger Mood}' enum. @@ -2993,7 +2320,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPassengerMood() * @generated */ - int PASSENGER_MOOD = 27; + int PASSENGER_MOOD = 20; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.LuggageSize Luggage Size}' enum. @@ -3003,7 +2330,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getLuggageSize() * @generated */ - int LUGGAGE_SIZE = 28; + int LUGGAGE_SIZE = 21; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.SortingStyle Sorting Style}' enum. @@ -3013,7 +2340,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSortingStyle() * @generated */ - int SORTING_STYLE = 29; + int SORTING_STYLE = 22; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.TravelOption Travel Option}' enum. @@ -3023,7 +2350,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getTravelOption() * @generated */ - int TRAVEL_OPTION = 30; + int TRAVEL_OPTION = 23; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.ObjectOption Object Option}' enum. @@ -3033,7 +2360,27 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getObjectOption() * @generated */ - int OBJECT_OPTION = 31; + int OBJECT_OPTION = 24; + + /** + * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.DoorOption Door Option}' enum. + * + * + * @see net.bhl.cdt.paxelerate.model.DoorOption + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getDoorOption() + * @generated + */ + int DOOR_OPTION = 25; + + /** + * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.LayoutConcept Layout Concept}' enum. + * + * + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getLayoutConcept() + * @generated + */ + int LAYOUT_CONCEPT = 26; /** * The meta object id for the '{@link net.bhl.cdt.paxelerate.model.Sex Sex}' enum. @@ -3043,7 +2390,7 @@ public interface CabinPackage extends EPackage { * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSex() * @generated */ - int SEX = 24; + int SEX = 17; /** @@ -3145,37 +2492,26 @@ public interface CabinPackage extends EPackage { EReference getCabin_Stowages(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Cabin#getScale Scale}'. - * - * - * @return the meta object for the attribute 'Scale'. - * @see net.bhl.cdt.paxelerate.model.Cabin#getScale() - * @see #getCabin() - * @generated - */ - EAttribute getCabin_Scale(); - - /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Cabin#getFramesPerSecond Frames Per Second}'. + * Returns the meta object for the containment reference list '{@link net.bhl.cdt.paxelerate.model.Cabin#getPassengers Passengers}'. * * - * @return the meta object for the attribute 'Frames Per Second'. - * @see net.bhl.cdt.paxelerate.model.Cabin#getFramesPerSecond() + * @return the meta object for the containment reference list 'Passengers'. + * @see net.bhl.cdt.paxelerate.model.Cabin#getPassengers() * @see #getCabin() * @generated */ - EAttribute getCabin_FramesPerSecond(); + EReference getCabin_Passengers(); /** - * Returns the meta object for the containment reference list '{@link net.bhl.cdt.paxelerate.model.Cabin#getPassengers Passengers}'. + * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationResults Simulation Results}'. * * - * @return the meta object for the containment reference list 'Passengers'. - * @see net.bhl.cdt.paxelerate.model.Cabin#getPassengers() + * @return the meta object for the containment reference 'Simulation Results'. + * @see net.bhl.cdt.paxelerate.model.Cabin#getSimulationResults() * @see #getCabin() * @generated */ - EReference getCabin_Passengers(); + EReference getCabin_SimulationResults(); /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Cabin#getNumberOfDecks Number Of Decks}'. @@ -3200,32 +2536,10 @@ public interface CabinPackage extends EPackage { EAttribute getCabin_AircraftType(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Cabin#isUsePresetSettings Use Preset Settings}'. - * - * - * @return the meta object for the attribute 'Use Preset Settings'. - * @see net.bhl.cdt.paxelerate.model.Cabin#isUsePresetSettings() - * @see #getCabin() - * @generated - */ - EAttribute getCabin_UsePresetSettings(); - - /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Cabin#getSpeedFactor Speed Factor}'. - * - * - * @return the meta object for the attribute 'Speed Factor'. - * @see net.bhl.cdt.paxelerate.model.Cabin#getSpeedFactor() - * @see #getCabin() - * @generated - */ - EAttribute getCabin_SpeedFactor(); - - /** - * Returns the meta object for the reference '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings Simulation Settings}'. + * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings Simulation Settings}'. * * - * @return the meta object for the reference 'Simulation Settings'. + * @return the meta object for the containment reference 'Simulation Settings'. * @see net.bhl.cdt.paxelerate.model.Cabin#getSimulationSettings() * @see #getCabin() * @generated @@ -3297,17 +2611,6 @@ public interface CabinPackage extends EPackage { */ EAttribute getRow_RowNumber(); - /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Row#isOffsetInRow Offset In Row}'. - * - * - * @return the meta object for the attribute 'Offset In Row'. - * @see net.bhl.cdt.paxelerate.model.Row#isOffsetInRow() - * @see #getRow() - * @generated - */ - EAttribute getRow_OffsetInRow(); - /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.TravelClass Travel Class}'. * @@ -3422,71 +2725,42 @@ public interface CabinPackage extends EPackage { * * * @return the meta object for the attribute 'Load Factor'. - * @see net.bhl.cdt.paxelerate.model.TravelClass#getLoadFactor() - * @see #getTravelClass() - * @generated - */ - EAttribute getTravelClass_LoadFactor(); - - /** - * Returns the meta object for the '{@link net.bhl.cdt.paxelerate.model.TravelClass#tooManyPassengers(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Too Many Passengers}' operation. - * - * - * @return the meta object for the 'Too Many Passengers' operation. - * @see net.bhl.cdt.paxelerate.model.TravelClass#tooManyPassengers(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) - * @generated - */ - EOperation getTravelClass__TooManyPassengers__DiagnosticChain_Map(); - - /** - * Returns the meta object for the '{@link net.bhl.cdt.paxelerate.model.TravelClass#wrongRowStructure(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Wrong Row Structure}' operation. - * - * - * @return the meta object for the 'Wrong Row Structure' operation. - * @see net.bhl.cdt.paxelerate.model.TravelClass#wrongRowStructure(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) - * @generated - */ - EOperation getTravelClass__WrongRowStructure__DiagnosticChain_Map(); - - /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.BusinessClass Business Class}'. - * - * - * @return the meta object for class 'Business Class'. - * @see net.bhl.cdt.paxelerate.model.BusinessClass + * @see net.bhl.cdt.paxelerate.model.TravelClass#getLoadFactor() + * @see #getTravelClass() * @generated */ - EClass getBusinessClass(); + EAttribute getTravelClass_LoadFactor(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.FirstClass First Class}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.TravelClass#getTravelOption Travel Option}'. * * - * @return the meta object for class 'First Class'. - * @see net.bhl.cdt.paxelerate.model.FirstClass + * @return the meta object for the attribute 'Travel Option'. + * @see net.bhl.cdt.paxelerate.model.TravelClass#getTravelOption() + * @see #getTravelClass() * @generated */ - EClass getFirstClass(); + EAttribute getTravelClass_TravelOption(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.EconomyClass Economy Class}'. + * Returns the meta object for the '{@link net.bhl.cdt.paxelerate.model.TravelClass#tooManyPassengers(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Too Many Passengers}' operation. * * - * @return the meta object for class 'Economy Class'. - * @see net.bhl.cdt.paxelerate.model.EconomyClass + * @return the meta object for the 'Too Many Passengers' operation. + * @see net.bhl.cdt.paxelerate.model.TravelClass#tooManyPassengers(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) * @generated */ - EClass getEconomyClass(); + EOperation getTravelClass__TooManyPassengers__DiagnosticChain_Map(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.PremiumEconomyClass Premium Economy Class}'. + * Returns the meta object for the '{@link net.bhl.cdt.paxelerate.model.TravelClass#wrongRowStructure(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Wrong Row Structure}' operation. * * - * @return the meta object for class 'Premium Economy Class'. - * @see net.bhl.cdt.paxelerate.model.PremiumEconomyClass + * @return the meta object for the 'Wrong Row Structure' operation. + * @see net.bhl.cdt.paxelerate.model.TravelClass#wrongRowStructure(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) * @generated */ - EClass getPremiumEconomyClass(); + EOperation getTravelClass__WrongRowStructure__DiagnosticChain_Map(); /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.Door Door}'. @@ -3575,6 +2849,17 @@ public interface CabinPackage extends EPackage { */ EReference getDoor_WaitingPassengers(); + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Door#getDoorOption Door Option}'. + * + * + * @return the meta object for the attribute 'Door Option'. + * @see net.bhl.cdt.paxelerate.model.Door#getDoorOption() + * @see #getDoor() + * @generated + */ + EAttribute getDoor_DoorOption(); + /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.Seat Seat}'. * @@ -3663,15 +2948,15 @@ public interface CabinPackage extends EPackage { EReference getSeat_Passenger(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Seat#isCurrentlyFolded Currently Folded}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Seat#getLayoutConcept Layout Concept}'. * * - * @return the meta object for the attribute 'Currently Folded'. - * @see net.bhl.cdt.paxelerate.model.Seat#isCurrentlyFolded() + * @return the meta object for the attribute 'Layout Concept'. + * @see net.bhl.cdt.paxelerate.model.Seat#getLayoutConcept() * @see #getSeat() * @generated */ - EAttribute getSeat_CurrentlyFolded(); + EAttribute getSeat_LayoutConcept(); /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.Passenger Passenger}'. @@ -3706,15 +2991,15 @@ public interface CabinPackage extends EPackage { EAttribute getPassenger_Sex(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}'. + * Returns the meta object for the reference '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}'. * * - * @return the meta object for the attribute 'Seat'. + * @return the meta object for the reference 'Seat'. * @see net.bhl.cdt.paxelerate.model.Passenger#getSeat() * @see #getPassenger() * @generated */ - EAttribute getPassenger_Seat(); + EReference getPassenger_Seat(); /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getName Name}'. @@ -3738,17 +3023,6 @@ public interface CabinPackage extends EPackage { */ EAttribute getPassenger_BoardingTime(); - /** - * Returns the meta object for the reference '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeatRef Seat Ref}'. - * - * - * @return the meta object for the reference 'Seat Ref'. - * @see net.bhl.cdt.paxelerate.model.Passenger#getSeatRef() - * @see #getPassenger() - * @generated - */ - EReference getPassenger_SeatRef(); - /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getWidth Width}'. * @@ -3860,15 +3134,15 @@ public interface CabinPackage extends EPackage { EAttribute getPassenger_LuggageStowTime(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowingDistance Luggage Stowing Distance}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowDistance Luggage Stow Distance}'. * * - * @return the meta object for the attribute 'Luggage Stowing Distance'. - * @see net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowingDistance() + * @return the meta object for the attribute 'Luggage Stow Distance'. + * @see net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowDistance() * @see #getPassenger() * @generated */ - EAttribute getPassenger_LuggageStowingDistance(); + EAttribute getPassenger_LuggageStowDistance(); /** * Returns the meta object for the reference '{@link net.bhl.cdt.paxelerate.model.Passenger#getTravelClass Travel Class}'. @@ -3914,6 +3188,39 @@ public interface CabinPackage extends EPackage { */ EAttribute getPassenger_Luggage(); + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getDistanceWalked Distance Walked}'. + * + * + * @return the meta object for the attribute 'Distance Walked'. + * @see net.bhl.cdt.paxelerate.model.Passenger#getDistanceWalked() + * @see #getPassenger() + * @generated + */ + EAttribute getPassenger_DistanceWalked(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getCostOfPath Cost Of Path}'. + * + * + * @return the meta object for the attribute 'Cost Of Path'. + * @see net.bhl.cdt.paxelerate.model.Passenger#getCostOfPath() + * @see #getPassenger() + * @generated + */ + EAttribute getPassenger_CostOfPath(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getTotalTimeWaited Total Time Waited}'. + * + * + * @return the meta object for the attribute 'Total Time Waited'. + * @see net.bhl.cdt.paxelerate.model.Passenger#getTotalTimeWaited() + * @see #getPassenger() + * @generated + */ + EAttribute getPassenger_TotalTimeWaited(); + /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getHeight Height}'. * @@ -3958,6 +3265,17 @@ public interface CabinPackage extends EPackage { */ EReference getPassenger_Door(); + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeatID Seat ID}'. + * + * + * @return the meta object for the attribute 'Seat ID'. + * @see net.bhl.cdt.paxelerate.model.Passenger#getSeatID() + * @see #getPassenger() + * @generated + */ + EAttribute getPassenger_SeatID(); + /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.CrewMember Crew Member}'. * @@ -4074,44 +3392,36 @@ public interface CabinPackage extends EPackage { EClass getStowage(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.MainDoor Main Door}'. - * - * - * @return the meta object for class 'Main Door'. - * @see net.bhl.cdt.paxelerate.model.MainDoor - * @generated - */ - EClass getMainDoor(); - - /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.EmergencyExit Emergency Exit}'. + * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.SimulationProperties Simulation Properties}'. * * - * @return the meta object for class 'Emergency Exit'. - * @see net.bhl.cdt.paxelerate.model.EmergencyExit + * @return the meta object for class 'Simulation Properties'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties * @generated */ - EClass getEmergencyExit(); + EClass getSimulationProperties(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.StandardDoor Standard Door}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getScale Scale}'. * * - * @return the meta object for class 'Standard Door'. - * @see net.bhl.cdt.paxelerate.model.StandardDoor + * @return the meta object for the attribute 'Scale'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getScale() + * @see #getSimulationProperties() * @generated */ - EClass getStandardDoor(); + EAttribute getSimulationProperties_Scale(); /** - * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.SimulationProperties Simulation Properties}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUsePresetSettings Use Preset Settings}'. * * - * @return the meta object for class 'Simulation Properties'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties + * @return the meta object for the attribute 'Use Preset Settings'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isUsePresetSettings() + * @see #getSimulationProperties() * @generated */ - EClass getSimulationProperties(); + EAttribute getSimulationProperties_UsePresetSettings(); /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSimulateWithoutUI Simulate Without UI}'. @@ -4136,147 +3446,180 @@ public interface CabinPackage extends EPackage { EAttribute getSimulationProperties_NumberOfSimulationLoops(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isRandomSortBetweenLoops Random Sort Between Loops}'. + * Returns the meta object for the reference list '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getResults Results}'. * * - * @return the meta object for the attribute 'Random Sort Between Loops'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isRandomSortBetweenLoops() + * @return the meta object for the reference list 'Results'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getResults() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_RandomSortBetweenLoops(); + EReference getSimulationProperties_Results(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUseFoldableSeats Use Foldable Seats}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting Sorting}'. * * - * @return the meta object for the attribute 'Use Foldable Seats'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isUseFoldableSeats() + * @return the meta object for the attribute 'Sorting'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_UseFoldableSeats(); + EAttribute getSimulationProperties_Sorting(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isBringYourOwnSeat Bring Your Own Seat}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor Simulation Speed Factor}'. * * - * @return the meta object for the attribute 'Bring Your Own Seat'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isBringYourOwnSeat() + * @return the meta object for the attribute 'Simulation Speed Factor'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_BringYourOwnSeat(); + EAttribute getSimulationProperties_SimulationSpeedFactor(); /** - * Returns the meta object for the reference list '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getResults Results}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault Thread Sleep Time Default}'. * * - * @return the meta object for the reference list 'Results'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getResults() + * @return the meta object for the attribute 'Thread Sleep Time Default'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault() * @see #getSimulationProperties() * @generated */ - EReference getSimulationProperties_Results(); + EAttribute getSimulationProperties_ThreadSleepTimeDefault(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting Sorting}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode Developer Mode}'. * * - * @return the meta object for the attribute 'Sorting'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting() + * @return the meta object for the attribute 'Developer Mode'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_Sorting(); + EAttribute getSimulationProperties_DeveloperMode(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor Simulation Speed Factor}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSortPassengerBetweenLoops Sort Passenger Between Loops}'. * * - * @return the meta object for the attribute 'Simulation Speed Factor'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor() + * @return the meta object for the attribute 'Sort Passenger Between Loops'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isSortPassengerBetweenLoops() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_SimulationSpeedFactor(); + EAttribute getSimulationProperties_SortPassengerBetweenLoops(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}'. + * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLuggageProperties Luggage Properties}'. * * - * @return the meta object for the attribute 'Seat Interference Standing Up Passenger Waiting Time'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceStandingUpPassengerWaitingTime() + * @return the meta object for the containment reference 'Luggage Properties'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getLuggageProperties() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_SeatInterferenceStandingUpPassengerWaitingTime(); + EReference getSimulationProperties_LuggageProperties(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceProcessTime Seat Interference Process Time}'. + * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengerProperties Passenger Properties}'. * * - * @return the meta object for the attribute 'Seat Interference Process Time'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceProcessTime() + * @return the meta object for the containment reference 'Passenger Properties'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengerProperties() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_SeatInterferenceProcessTime(); + EReference getSimulationProperties_PassengerProperties(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault Thread Sleep Time Default}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengersBoardingPerMinute Passengers Boarding Per Minute}'. * * - * @return the meta object for the attribute 'Thread Sleep Time Default'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault() + * @return the meta object for the attribute 'Passengers Boarding Per Minute'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengersBoardingPerMinute() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_ThreadSleepTimeDefault(); + EAttribute getSimulationProperties_PassengersBoardingPerMinute(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode Developer Mode}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDataExport Data Export}'. * * - * @return the meta object for the attribute 'Developer Mode'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode() + * @return the meta object for the attribute 'Data Export'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isDataExport() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_DeveloperMode(); + EAttribute getSimulationProperties_DataExport(); /** - * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLuggageProperties Luggage Properties}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDisplayMap Display Map}'. * * - * @return the meta object for the containment reference 'Luggage Properties'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getLuggageProperties() + * @return the meta object for the attribute 'Display Map'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#isDisplayMap() * @see #getSimulationProperties() * @generated */ - EReference getSimulationProperties_LuggageProperties(); + EAttribute getSimulationProperties_DisplayMap(); /** - * Returns the meta object for the containment reference '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengerProperties Passenger Properties}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeMean Sideways Foldabe Seat Popup Time Mean}'. * * - * @return the meta object for the containment reference 'Passenger Properties'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengerProperties() + * @return the meta object for the attribute 'Sideways Foldabe Seat Popup Time Mean'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeMean() * @see #getSimulationProperties() * @generated */ - EReference getSimulationProperties_PassengerProperties(); + EAttribute getSimulationProperties_SidewaysFoldabeSeatPopupTimeMean(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengersBoardingPerMinute Passengers Boarding Per Minute}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeDeviation Sideways Foldabe Seat Popup Time Deviation}'. * * - * @return the meta object for the attribute 'Passengers Boarding Per Minute'. - * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengersBoardingPerMinute() + * @return the meta object for the attribute 'Sideways Foldabe Seat Popup Time Deviation'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeDeviation() * @see #getSimulationProperties() * @generated */ - EAttribute getSimulationProperties_PassengersBoardingPerMinute(); + EAttribute getSimulationProperties_SidewaysFoldabeSeatPopupTimeDeviation(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeMean Lifting Seat Pan Popup Time Mean}'. + * + * + * @return the meta object for the attribute 'Lifting Seat Pan Popup Time Mean'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeMean() + * @see #getSimulationProperties() + * @generated + */ + EAttribute getSimulationProperties_LiftingSeatPanPopupTimeMean(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeDeviation Lifting Seat Pan Popup Time Deviation}'. + * + * + * @return the meta object for the attribute 'Lifting Seat Pan Popup Time Deviation'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeDeviation() + * @see #getSimulationProperties() + * @generated + */ + EAttribute getSimulationProperties_LiftingSeatPanPopupTimeDeviation(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLayoutConcept Layout Concept}'. + * + * + * @return the meta object for the attribute 'Layout Concept'. + * @see net.bhl.cdt.paxelerate.model.SimulationProperties#getLayoutConcept() + * @see #getSimulationProperties() + * @generated + */ + EAttribute getSimulationProperties_LayoutConcept(); /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.LuggageProperties Luggage Properties}'. @@ -4289,26 +3632,26 @@ public interface CabinPackage extends EPackage { EClass getLuggageProperties(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatMean Luggage Stowing Distance From Seat Mean}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatMean Luggage Stow Distance From Seat Mean}'. * * - * @return the meta object for the attribute 'Luggage Stowing Distance From Seat Mean'. - * @see net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatMean() + * @return the meta object for the attribute 'Luggage Stow Distance From Seat Mean'. + * @see net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatMean() * @see #getLuggageProperties() * @generated */ - EAttribute getLuggageProperties_LuggageStowingDistanceFromSeatMean(); + EAttribute getLuggageProperties_LuggageStowDistanceFromSeatMean(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatDeviation Luggage Stowing Distance From Seat Deviation}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatDeviation Luggage Stow Distance From Seat Deviation}'. * * - * @return the meta object for the attribute 'Luggage Stowing Distance From Seat Deviation'. - * @see net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatDeviation() + * @return the meta object for the attribute 'Luggage Stow Distance From Seat Deviation'. + * @see net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatDeviation() * @see #getLuggageProperties() * @generated */ - EAttribute getLuggageProperties_LuggageStowingDistanceFromSeatDeviation(); + EAttribute getLuggageProperties_LuggageStowDistanceFromSeatDeviation(); /** * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getPercentageOfPassengersWithNoLuggage Percentage Of Passengers With No Luggage}'. @@ -4496,6 +3839,39 @@ public interface CabinPackage extends EPackage { */ EAttribute getSimulationResult_BoardingTimeString(); + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingSkipped Waymaking Skipped}'. + * + * + * @return the meta object for the attribute 'Waymaking Skipped'. + * @see net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingSkipped() + * @see #getSimulationResult() + * @generated + */ + EAttribute getSimulationResult_WaymakingSkipped(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingCompleted Waymaking Completed}'. + * + * + * @return the meta object for the attribute 'Waymaking Completed'. + * @see net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingCompleted() + * @see #getSimulationResult() + * @generated + */ + EAttribute getSimulationResult_WaymakingCompleted(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getLayoutConceptType Layout Concept Type}'. + * + * + * @return the meta object for the attribute 'Layout Concept Type'. + * @see net.bhl.cdt.paxelerate.model.SimulationResult#getLayoutConceptType() + * @see #getSimulationResult() + * @generated + */ + EAttribute getSimulationResult_LayoutConceptType(); + /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.PassengerProperties Passenger Properties}'. * @@ -4603,95 +3979,172 @@ public interface CabinPackage extends EPackage { * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PercentageOfWomen(); + EAttribute getPassengerProperties_PercentageOfWomen(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthMeanFemale Passenger Width Mean Female}'. + * + * + * @return the meta object for the attribute 'Passenger Width Mean Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthMeanFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerWidthMeanFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthDeviationFemale Passenger Width Deviation Female}'. + * + * + * @return the meta object for the attribute 'Passenger Width Deviation Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthDeviationFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerWidthDeviationFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightMeanFemale Passenger Weight Mean Female}'. + * + * + * @return the meta object for the attribute 'Passenger Weight Mean Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightMeanFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerWeightMeanFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightDeviationFemale Passenger Weight Deviation Female}'. + * + * + * @return the meta object for the attribute 'Passenger Weight Deviation Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightDeviationFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerWeightDeviationFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightMeanFemale Passenger Height Mean Female}'. + * + * + * @return the meta object for the attribute 'Passenger Height Mean Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightMeanFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerHeightMeanFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightDeviationFemale Passenger Height Deviation Female}'. + * + * + * @return the meta object for the attribute 'Passenger Height Deviation Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightDeviationFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerHeightDeviationFemale(); + + /** + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthMeanFemale Passenger Depth Mean Female}'. + * + * + * @return the meta object for the attribute 'Passenger Depth Mean Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthMeanFemale() + * @see #getPassengerProperties() + * @generated + */ + EAttribute getPassengerProperties_PassengerDepthMeanFemale(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthMeanFemale Passenger Width Mean Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthDeviationFemale Passenger Depth Deviation Female}'. * * - * @return the meta object for the attribute 'Passenger Width Mean Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthMeanFemale() + * @return the meta object for the attribute 'Passenger Depth Deviation Female'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthDeviationFemale() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerWidthMeanFemale(); + EAttribute getPassengerProperties_PassengerDepthDeviationFemale(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthDeviationFemale Passenger Width Deviation Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerAggressiveMoodShare Passenger Aggressive Mood Share}'. * * - * @return the meta object for the attribute 'Passenger Width Deviation Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWidthDeviationFemale() + * @return the meta object for the attribute 'Passenger Aggressive Mood Share'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerAggressiveMoodShare() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerWidthDeviationFemale(); + EAttribute getPassengerProperties_PassengerAggressiveMoodShare(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightMeanFemale Passenger Weight Mean Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}'. * * - * @return the meta object for the attribute 'Passenger Weight Mean Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightMeanFemale() + * @return the meta object for the attribute 'Seat Interference Standing Up Passenger Waiting Time'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceStandingUpPassengerWaitingTime() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerWeightMeanFemale(); + EAttribute getPassengerProperties_SeatInterferenceStandingUpPassengerWaitingTime(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightDeviationFemale Passenger Weight Deviation Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeMean Seat Interference Process Time Mean}'. * * - * @return the meta object for the attribute 'Passenger Weight Deviation Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerWeightDeviationFemale() + * @return the meta object for the attribute 'Seat Interference Process Time Mean'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeMean() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerWeightDeviationFemale(); + EAttribute getPassengerProperties_SeatInterferenceProcessTimeMean(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightMeanFemale Passenger Height Mean Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeDeviation Seat Interference Process Time Deviation}'. * * - * @return the meta object for the attribute 'Passenger Height Mean Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightMeanFemale() + * @return the meta object for the attribute 'Seat Interference Process Time Deviation'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeDeviation() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerHeightMeanFemale(); + EAttribute getPassengerProperties_SeatInterferenceProcessTimeDeviation(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightDeviationFemale Passenger Height Deviation Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatMean Seat Interference Process Time Folding Seat Mean}'. * * - * @return the meta object for the attribute 'Passenger Height Deviation Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightDeviationFemale() + * @return the meta object for the attribute 'Seat Interference Process Time Folding Seat Mean'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatMean() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerHeightDeviationFemale(); + EAttribute getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatMean(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthMeanFemale Passenger Depth Mean Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatDeviation Seat Interference Process Time Folding Seat Deviation}'. * * - * @return the meta object for the attribute 'Passenger Depth Mean Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthMeanFemale() + * @return the meta object for the attribute 'Seat Interference Process Time Folding Seat Deviation'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatDeviation() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerDepthMeanFemale(); + EAttribute getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatDeviation(); /** - * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthDeviationFemale Passenger Depth Deviation Female}'. + * Returns the meta object for the attribute '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassivePassengerWaitingTimeAfterCollision Passive Passenger Waiting Time After Collision}'. * * - * @return the meta object for the attribute 'Passenger Depth Deviation Female'. - * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthDeviationFemale() + * @return the meta object for the attribute 'Passive Passenger Waiting Time After Collision'. + * @see net.bhl.cdt.paxelerate.model.PassengerProperties#getPassivePassengerWaitingTimeAfterCollision() * @see #getPassengerProperties() * @generated */ - EAttribute getPassengerProperties_PassengerDepthDeviationFemale(); + EAttribute getPassengerProperties_PassivePassengerWaitingTimeAfterCollision(); /** * Returns the meta object for class '{@link net.bhl.cdt.paxelerate.model.PhysicalObject Physical Object}'. @@ -4849,6 +4302,26 @@ public interface CabinPackage extends EPackage { */ EEnum getObjectOption(); + /** + * Returns the meta object for enum '{@link net.bhl.cdt.paxelerate.model.DoorOption Door Option}'. + * + * + * @return the meta object for enum 'Door Option'. + * @see net.bhl.cdt.paxelerate.model.DoorOption + * @generated + */ + EEnum getDoorOption(); + + /** + * Returns the meta object for enum '{@link net.bhl.cdt.paxelerate.model.LayoutConcept Layout Concept}'. + * + * + * @return the meta object for enum 'Layout Concept'. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @generated + */ + EEnum getLayoutConcept(); + /** * Returns the meta object for enum '{@link net.bhl.cdt.paxelerate.model.Sex Sex}'. * @@ -4878,8 +4351,9 @@ public interface CabinPackage extends EPackage { *
  • each enum,
  • *
  • and each data type
  • * - * - * @generated + * . + * + * @generated */ interface Literals { /** @@ -4948,26 +4422,19 @@ interface Literals { */ EReference CABIN__STOWAGES = eINSTANCE.getCabin_Stowages(); /** - * The meta object literal for the 'Scale' attribute feature. - * - * - * @generated - */ - EAttribute CABIN__SCALE = eINSTANCE.getCabin_Scale(); - /** - * The meta object literal for the 'Frames Per Second' attribute feature. + * The meta object literal for the 'Passengers' containment reference list feature. * * * @generated */ - EAttribute CABIN__FRAMES_PER_SECOND = eINSTANCE.getCabin_FramesPerSecond(); + EReference CABIN__PASSENGERS = eINSTANCE.getCabin_Passengers(); /** - * The meta object literal for the 'Passengers' containment reference list feature. + * The meta object literal for the 'Simulation Results' containment reference feature. * * * @generated */ - EReference CABIN__PASSENGERS = eINSTANCE.getCabin_Passengers(); + EReference CABIN__SIMULATION_RESULTS = eINSTANCE.getCabin_SimulationResults(); /** * The meta object literal for the 'Number Of Decks' attribute feature. * @@ -4983,21 +4450,7 @@ interface Literals { */ EAttribute CABIN__AIRCRAFT_TYPE = eINSTANCE.getCabin_AircraftType(); /** - * The meta object literal for the 'Use Preset Settings' attribute feature. - * - * - * @generated - */ - EAttribute CABIN__USE_PRESET_SETTINGS = eINSTANCE.getCabin_UsePresetSettings(); - /** - * The meta object literal for the 'Speed Factor' attribute feature. - * - * - * @generated - */ - EAttribute CABIN__SPEED_FACTOR = eINSTANCE.getCabin_SpeedFactor(); - /** - * The meta object literal for the 'Simulation Settings' reference feature. + * The meta object literal for the 'Simulation Settings' containment reference feature. * * * @generated @@ -5047,13 +4500,6 @@ interface Literals { * @generated */ EAttribute ROW__ROW_NUMBER = eINSTANCE.getRow_RowNumber(); - /** - * The meta object literal for the 'Offset In Row' attribute feature. - * - * - * @generated - */ - EAttribute ROW__OFFSET_IN_ROW = eINSTANCE.getRow_OffsetInRow(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.TravelClassImpl Travel Class}' class. * @@ -5134,55 +4580,26 @@ interface Literals { */ EAttribute TRAVEL_CLASS__LOAD_FACTOR = eINSTANCE.getTravelClass_LoadFactor(); /** - * The meta object literal for the 'Too Many Passengers' operation. - * - * - * @generated - */ - EOperation TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = eINSTANCE.getTravelClass__TooManyPassengers__DiagnosticChain_Map(); - /** - * The meta object literal for the 'Wrong Row Structure' operation. - * - * - * @generated - */ - EOperation TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = eINSTANCE.getTravelClass__WrongRowStructure__DiagnosticChain_Map(); - /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.BusinessClassImpl Business Class}' class. - * - * - * @see net.bhl.cdt.paxelerate.model.impl.BusinessClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getBusinessClass() - * @generated - */ - EClass BUSINESS_CLASS = eINSTANCE.getBusinessClass(); - /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.FirstClassImpl First Class}' class. + * The meta object literal for the 'Travel Option' attribute feature. * * - * @see net.bhl.cdt.paxelerate.model.impl.FirstClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getFirstClass() * @generated */ - EClass FIRST_CLASS = eINSTANCE.getFirstClass(); + EAttribute TRAVEL_CLASS__TRAVEL_OPTION = eINSTANCE.getTravelClass_TravelOption(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.EconomyClassImpl Economy Class}' class. + * The meta object literal for the 'Too Many Passengers' operation. * * - * @see net.bhl.cdt.paxelerate.model.impl.EconomyClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getEconomyClass() * @generated */ - EClass ECONOMY_CLASS = eINSTANCE.getEconomyClass(); + EOperation TRAVEL_CLASS___TOO_MANY_PASSENGERS__DIAGNOSTICCHAIN_MAP = eINSTANCE.getTravelClass__TooManyPassengers__DiagnosticChain_Map(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.PremiumEconomyClassImpl Premium Economy Class}' class. + * The meta object literal for the 'Wrong Row Structure' operation. * * - * @see net.bhl.cdt.paxelerate.model.impl.PremiumEconomyClassImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getPremiumEconomyClass() * @generated */ - EClass PREMIUM_ECONOMY_CLASS = eINSTANCE.getPremiumEconomyClass(); + EOperation TRAVEL_CLASS___WRONG_ROW_STRUCTURE__DIAGNOSTICCHAIN_MAP = eINSTANCE.getTravelClass__WrongRowStructure__DiagnosticChain_Map(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.DoorImpl Door}' class. * @@ -5241,6 +4658,13 @@ interface Literals { * @generated */ EReference DOOR__WAITING_PASSENGERS = eINSTANCE.getDoor_WaitingPassengers(); + /** + * The meta object literal for the 'Door Option' attribute feature. + * + * + * @generated + */ + EAttribute DOOR__DOOR_OPTION = eINSTANCE.getDoor_DoorOption(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.SeatImpl Seat}' class. * @@ -5300,12 +4724,12 @@ interface Literals { */ EReference SEAT__PASSENGER = eINSTANCE.getSeat_Passenger(); /** - * The meta object literal for the 'Currently Folded' attribute feature. + * The meta object literal for the 'Layout Concept' attribute feature. * * * @generated */ - EAttribute SEAT__CURRENTLY_FOLDED = eINSTANCE.getSeat_CurrentlyFolded(); + EAttribute SEAT__LAYOUT_CONCEPT = eINSTANCE.getSeat_LayoutConcept(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl Passenger}' class. * @@ -5330,12 +4754,12 @@ interface Literals { */ EAttribute PASSENGER__SEX = eINSTANCE.getPassenger_Sex(); /** - * The meta object literal for the 'Seat' attribute feature. + * The meta object literal for the 'Seat' reference feature. * * * @generated */ - EAttribute PASSENGER__SEAT = eINSTANCE.getPassenger_Seat(); + EReference PASSENGER__SEAT = eINSTANCE.getPassenger_Seat(); /** * The meta object literal for the 'Name' attribute feature. * @@ -5350,13 +4774,6 @@ interface Literals { * @generated */ EAttribute PASSENGER__BOARDING_TIME = eINSTANCE.getPassenger_BoardingTime(); - /** - * The meta object literal for the 'Seat Ref' reference feature. - * - * - * @generated - */ - EReference PASSENGER__SEAT_REF = eINSTANCE.getPassenger_SeatRef(); /** * The meta object literal for the 'Width' attribute feature. * @@ -5428,12 +4845,12 @@ interface Literals { */ EAttribute PASSENGER__LUGGAGE_STOW_TIME = eINSTANCE.getPassenger_LuggageStowTime(); /** - * The meta object literal for the 'Luggage Stowing Distance' attribute feature. + * The meta object literal for the 'Luggage Stow Distance' attribute feature. * * * @generated */ - EAttribute PASSENGER__LUGGAGE_STOWING_DISTANCE = eINSTANCE.getPassenger_LuggageStowingDistance(); + EAttribute PASSENGER__LUGGAGE_STOW_DISTANCE = eINSTANCE.getPassenger_LuggageStowDistance(); /** * The meta object literal for the 'Travel Class' reference feature. * @@ -5462,6 +4879,27 @@ interface Literals { * @generated */ EAttribute PASSENGER__LUGGAGE = eINSTANCE.getPassenger_Luggage(); + /** + * The meta object literal for the 'Distance Walked' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER__DISTANCE_WALKED = eINSTANCE.getPassenger_DistanceWalked(); + /** + * The meta object literal for the 'Cost Of Path' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER__COST_OF_PATH = eINSTANCE.getPassenger_CostOfPath(); + /** + * The meta object literal for the 'Total Time Waited' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER__TOTAL_TIME_WAITED = eINSTANCE.getPassenger_TotalTimeWaited(); /** * The meta object literal for the 'Height' attribute feature. * @@ -5490,6 +4928,13 @@ interface Literals { * @generated */ EReference PASSENGER__DOOR = eINSTANCE.getPassenger_Door(); + /** + * The meta object literal for the 'Seat ID' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER__SEAT_ID = eINSTANCE.getPassenger_SeatID(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.CrewMemberImpl Crew Member}' class. * @@ -5580,146 +5025,154 @@ interface Literals { */ EClass STOWAGE = eINSTANCE.getStowage(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.MainDoorImpl Main Door}' class. + * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl Simulation Properties}' class. * * - * @see net.bhl.cdt.paxelerate.model.impl.MainDoorImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getMainDoor() + * @see net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSimulationProperties() * @generated */ - EClass MAIN_DOOR = eINSTANCE.getMainDoor(); + EClass SIMULATION_PROPERTIES = eINSTANCE.getSimulationProperties(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.EmergencyExitImpl Emergency Exit}' class. + * The meta object literal for the 'Scale' attribute feature. * * - * @see net.bhl.cdt.paxelerate.model.impl.EmergencyExitImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getEmergencyExit() * @generated */ - EClass EMERGENCY_EXIT = eINSTANCE.getEmergencyExit(); + EAttribute SIMULATION_PROPERTIES__SCALE = eINSTANCE.getSimulationProperties_Scale(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.StandardDoorImpl Standard Door}' class. + * The meta object literal for the 'Use Preset Settings' attribute feature. * * - * @see net.bhl.cdt.paxelerate.model.impl.StandardDoorImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getStandardDoor() * @generated */ - EClass STANDARD_DOOR = eINSTANCE.getStandardDoor(); + EAttribute SIMULATION_PROPERTIES__USE_PRESET_SETTINGS = eINSTANCE.getSimulationProperties_UsePresetSettings(); /** - * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl Simulation Properties}' class. + * The meta object literal for the 'Simulate Without UI' attribute feature. * * - * @see net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl - * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getSimulationProperties() * @generated */ - EClass SIMULATION_PROPERTIES = eINSTANCE.getSimulationProperties(); + EAttribute SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI = eINSTANCE.getSimulationProperties_SimulateWithoutUI(); /** - * The meta object literal for the 'Simulate Without UI' attribute feature. + * The meta object literal for the 'Number Of Simulation Loops' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI = eINSTANCE.getSimulationProperties_SimulateWithoutUI(); + EAttribute SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS = eINSTANCE.getSimulationProperties_NumberOfSimulationLoops(); /** - * The meta object literal for the 'Number Of Simulation Loops' attribute feature. + * The meta object literal for the 'Results' reference list feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS = eINSTANCE.getSimulationProperties_NumberOfSimulationLoops(); + EReference SIMULATION_PROPERTIES__RESULTS = eINSTANCE.getSimulationProperties_Results(); + /** + * The meta object literal for the 'Sorting' attribute feature. + * + * + * @generated + */ + EAttribute SIMULATION_PROPERTIES__SORTING = eINSTANCE.getSimulationProperties_Sorting(); /** - * The meta object literal for the 'Random Sort Between Loops' attribute feature. + * The meta object literal for the 'Simulation Speed Factor' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS = eINSTANCE.getSimulationProperties_RandomSortBetweenLoops(); + EAttribute SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR = eINSTANCE.getSimulationProperties_SimulationSpeedFactor(); /** - * The meta object literal for the 'Use Foldable Seats' attribute feature. + * The meta object literal for the 'Thread Sleep Time Default' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS = eINSTANCE.getSimulationProperties_UseFoldableSeats(); + EAttribute SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT = eINSTANCE.getSimulationProperties_ThreadSleepTimeDefault(); /** - * The meta object literal for the 'Bring Your Own Seat' attribute feature. + * The meta object literal for the 'Developer Mode' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT = eINSTANCE.getSimulationProperties_BringYourOwnSeat(); + EAttribute SIMULATION_PROPERTIES__DEVELOPER_MODE = eINSTANCE.getSimulationProperties_DeveloperMode(); /** - * The meta object literal for the 'Results' reference list feature. + * The meta object literal for the 'Sort Passenger Between Loops' attribute feature. * * * @generated */ - EReference SIMULATION_PROPERTIES__RESULTS = eINSTANCE.getSimulationProperties_Results(); + EAttribute SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS = eINSTANCE.getSimulationProperties_SortPassengerBetweenLoops(); /** - * The meta object literal for the 'Sorting' attribute feature. + * The meta object literal for the 'Luggage Properties' containment reference feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__SORTING = eINSTANCE.getSimulationProperties_Sorting(); + EReference SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES = eINSTANCE.getSimulationProperties_LuggageProperties(); /** - * The meta object literal for the 'Simulation Speed Factor' attribute feature. + * The meta object literal for the 'Passenger Properties' containment reference feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR = eINSTANCE.getSimulationProperties_SimulationSpeedFactor(); + EReference SIMULATION_PROPERTIES__PASSENGER_PROPERTIES = eINSTANCE.getSimulationProperties_PassengerProperties(); /** - * The meta object literal for the 'Seat Interference Standing Up Passenger Waiting Time' attribute feature. + * The meta object literal for the 'Passengers Boarding Per Minute' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME = eINSTANCE.getSimulationProperties_SeatInterferenceStandingUpPassengerWaitingTime(); + EAttribute SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE = eINSTANCE.getSimulationProperties_PassengersBoardingPerMinute(); /** - * The meta object literal for the 'Seat Interference Process Time' attribute feature. + * The meta object literal for the 'Data Export' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME = eINSTANCE.getSimulationProperties_SeatInterferenceProcessTime(); + EAttribute SIMULATION_PROPERTIES__DATA_EXPORT = eINSTANCE.getSimulationProperties_DataExport(); /** - * The meta object literal for the 'Thread Sleep Time Default' attribute feature. + * The meta object literal for the 'Display Map' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT = eINSTANCE.getSimulationProperties_ThreadSleepTimeDefault(); + EAttribute SIMULATION_PROPERTIES__DISPLAY_MAP = eINSTANCE.getSimulationProperties_DisplayMap(); /** - * The meta object literal for the 'Developer Mode' attribute feature. + * The meta object literal for the 'Sideways Foldabe Seat Popup Time Mean' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__DEVELOPER_MODE = eINSTANCE.getSimulationProperties_DeveloperMode(); + EAttribute SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN = eINSTANCE.getSimulationProperties_SidewaysFoldabeSeatPopupTimeMean(); /** - * The meta object literal for the 'Luggage Properties' containment reference feature. + * The meta object literal for the 'Sideways Foldabe Seat Popup Time Deviation' attribute feature. * * * @generated */ - EReference SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES = eINSTANCE.getSimulationProperties_LuggageProperties(); + EAttribute SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION = eINSTANCE.getSimulationProperties_SidewaysFoldabeSeatPopupTimeDeviation(); /** - * The meta object literal for the 'Passenger Properties' containment reference feature. + * The meta object literal for the 'Lifting Seat Pan Popup Time Mean' attribute feature. * * * @generated */ - EReference SIMULATION_PROPERTIES__PASSENGER_PROPERTIES = eINSTANCE.getSimulationProperties_PassengerProperties(); + EAttribute SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN = eINSTANCE.getSimulationProperties_LiftingSeatPanPopupTimeMean(); /** - * The meta object literal for the 'Passengers Boarding Per Minute' attribute feature. + * The meta object literal for the 'Lifting Seat Pan Popup Time Deviation' attribute feature. * * * @generated */ - EAttribute SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE = eINSTANCE.getSimulationProperties_PassengersBoardingPerMinute(); + EAttribute SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION = eINSTANCE.getSimulationProperties_LiftingSeatPanPopupTimeDeviation(); + /** + * The meta object literal for the 'Layout Concept' attribute feature. + * + * + * @generated + */ + EAttribute SIMULATION_PROPERTIES__LAYOUT_CONCEPT = eINSTANCE.getSimulationProperties_LayoutConcept(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl Luggage Properties}' class. * @@ -5730,19 +5183,19 @@ interface Literals { */ EClass LUGGAGE_PROPERTIES = eINSTANCE.getLuggageProperties(); /** - * The meta object literal for the 'Luggage Stowing Distance From Seat Mean' attribute feature. + * The meta object literal for the 'Luggage Stow Distance From Seat Mean' attribute feature. * * * @generated */ - EAttribute LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN = eINSTANCE.getLuggageProperties_LuggageStowingDistanceFromSeatMean(); + EAttribute LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN = eINSTANCE.getLuggageProperties_LuggageStowDistanceFromSeatMean(); /** - * The meta object literal for the 'Luggage Stowing Distance From Seat Deviation' attribute feature. + * The meta object literal for the 'Luggage Stow Distance From Seat Deviation' attribute feature. * * * @generated */ - EAttribute LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION = eINSTANCE.getLuggageProperties_LuggageStowingDistanceFromSeatDeviation(); + EAttribute LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION = eINSTANCE.getLuggageProperties_LuggageStowDistanceFromSeatDeviation(); /** * The meta object literal for the 'Percentage Of Passengers With No Luggage' attribute feature. * @@ -5864,6 +5317,27 @@ interface Literals { * @generated */ EAttribute SIMULATION_RESULT__BOARDING_TIME_STRING = eINSTANCE.getSimulationResult_BoardingTimeString(); + /** + * The meta object literal for the 'Waymaking Skipped' attribute feature. + * + * + * @generated + */ + EAttribute SIMULATION_RESULT__WAYMAKING_SKIPPED = eINSTANCE.getSimulationResult_WaymakingSkipped(); + /** + * The meta object literal for the 'Waymaking Completed' attribute feature. + * + * + * @generated + */ + EAttribute SIMULATION_RESULT__WAYMAKING_COMPLETED = eINSTANCE.getSimulationResult_WaymakingCompleted(); + /** + * The meta object literal for the 'Layout Concept Type' attribute feature. + * + * + * @generated + */ + EAttribute SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE = eINSTANCE.getSimulationResult_LayoutConceptType(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl Passenger Properties}' class. * @@ -5992,6 +5466,55 @@ interface Literals { * @generated */ EAttribute PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE = eINSTANCE.getPassengerProperties_PassengerDepthDeviationFemale(); + /** + * The meta object literal for the 'Passenger Aggressive Mood Share' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE = eINSTANCE.getPassengerProperties_PassengerAggressiveMoodShare(); + /** + * The meta object literal for the 'Seat Interference Standing Up Passenger Waiting Time' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME = eINSTANCE.getPassengerProperties_SeatInterferenceStandingUpPassengerWaitingTime(); + /** + * The meta object literal for the 'Seat Interference Process Time Mean' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN = eINSTANCE.getPassengerProperties_SeatInterferenceProcessTimeMean(); + /** + * The meta object literal for the 'Seat Interference Process Time Deviation' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION = eINSTANCE.getPassengerProperties_SeatInterferenceProcessTimeDeviation(); + /** + * The meta object literal for the 'Seat Interference Process Time Folding Seat Mean' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN = eINSTANCE.getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatMean(); + /** + * The meta object literal for the 'Seat Interference Process Time Folding Seat Deviation' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION = eINSTANCE.getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatDeviation(); + /** + * The meta object literal for the 'Passive Passenger Waiting Time After Collision' attribute feature. + * + * + * @generated + */ + EAttribute PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION = eINSTANCE.getPassengerProperties_PassivePassengerWaitingTimeAfterCollision(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.impl.PhysicalObjectImpl Physical Object}' class. * @@ -6113,6 +5636,24 @@ interface Literals { * @generated */ EEnum OBJECT_OPTION = eINSTANCE.getObjectOption(); + /** + * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.DoorOption Door Option}' enum. + * + * + * @see net.bhl.cdt.paxelerate.model.DoorOption + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getDoorOption() + * @generated + */ + EEnum DOOR_OPTION = eINSTANCE.getDoorOption(); + /** + * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.LayoutConcept Layout Concept}' enum. + * + * + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see net.bhl.cdt.paxelerate.model.impl.CabinPackageImpl#getLayoutConcept() + * @generated + */ + EEnum LAYOUT_CONCEPT = eINSTANCE.getLayoutConcept(); /** * The meta object literal for the '{@link net.bhl.cdt.paxelerate.model.Sex Sex}' enum. * diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinViewSettings.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinViewSettings.java deleted file mode 100644 index f58a5ee4..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/CabinViewSettings.java +++ /dev/null @@ -1,415 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'View Settings'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowSeatlabels Show Seatlabels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowRowLabels Show Row Labels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowGalleyAndLavatoryLabels Show Galley And Lavatory Labels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowCurtains Show Curtains}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowSeats Show Seats}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowGalleys Show Galleys}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowLavatories Show Lavatories}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowDoors Show Doors}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowOccupiedSeats Show Occupied Seats}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getSizeOfPassengerCircle Size Of Passenger Circle}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getDoorOffSetInPixels Door Off Set In Pixels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getXZeroInPixels XZero In Pixels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getYZeroInPixels YZero In Pixels}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getYDimensionInPixels Cabin Width In Pixels}
    • - *
    - *

    - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings() - * @model - * @generated - */ -public interface CabinViewSettings extends EObject { - /** - * Returns the value of the 'Show Seatlabels' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Seatlabels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Seatlabels' attribute. - * @see #setShowSeatlabels(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowSeatlabels() - * @model default="true" - * @generated - */ - boolean isShowSeatlabels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowSeatlabels Show Seatlabels}' attribute. - * - * - * @param value the new value of the 'Show Seatlabels' attribute. - * @see #isShowSeatlabels() - * @generated - */ - void setShowSeatlabels(boolean value); - - /** - * Returns the value of the 'Show Row Labels' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Row Labels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Row Labels' attribute. - * @see #setShowRowLabels(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowRowLabels() - * @model default="true" - * @generated - */ - boolean isShowRowLabels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowRowLabels Show Row Labels}' attribute. - * - * - * @param value the new value of the 'Show Row Labels' attribute. - * @see #isShowRowLabels() - * @generated - */ - void setShowRowLabels(boolean value); - - /** - * Returns the value of the 'Show Galley And Lavatory Labels' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Galley And Lavatory Labels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Galley And Lavatory Labels' attribute. - * @see #setShowGalleyAndLavatoryLabels(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowGalleyAndLavatoryLabels() - * @model default="true" - * @generated - */ - boolean isShowGalleyAndLavatoryLabels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowGalleyAndLavatoryLabels Show Galley And Lavatory Labels}' attribute. - * - * - * @param value the new value of the 'Show Galley And Lavatory Labels' attribute. - * @see #isShowGalleyAndLavatoryLabels() - * @generated - */ - void setShowGalleyAndLavatoryLabels(boolean value); - - /** - * Returns the value of the 'Show Curtains' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Curtains' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Curtains' attribute. - * @see #setShowCurtains(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowCurtains() - * @model default="true" - * @generated - */ - boolean isShowCurtains(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowCurtains Show Curtains}' attribute. - * - * - * @param value the new value of the 'Show Curtains' attribute. - * @see #isShowCurtains() - * @generated - */ - void setShowCurtains(boolean value); - - /** - * Returns the value of the 'Show Seats' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Seats' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Seats' attribute. - * @see #setShowSeats(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowSeats() - * @model default="true" - * @generated - */ - boolean isShowSeats(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowSeats Show Seats}' attribute. - * - * - * @param value the new value of the 'Show Seats' attribute. - * @see #isShowSeats() - * @generated - */ - void setShowSeats(boolean value); - - /** - * Returns the value of the 'Show Galleys' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Galleys' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Galleys' attribute. - * @see #setShowGalleys(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowGalleys() - * @model default="true" - * @generated - */ - boolean isShowGalleys(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowGalleys Show Galleys}' attribute. - * - * - * @param value the new value of the 'Show Galleys' attribute. - * @see #isShowGalleys() - * @generated - */ - void setShowGalleys(boolean value); - - /** - * Returns the value of the 'Show Lavatories' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Lavatories' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Lavatories' attribute. - * @see #setShowLavatories(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowLavatories() - * @model default="true" - * @generated - */ - boolean isShowLavatories(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowLavatories Show Lavatories}' attribute. - * - * - * @param value the new value of the 'Show Lavatories' attribute. - * @see #isShowLavatories() - * @generated - */ - void setShowLavatories(boolean value); - - /** - * Returns the value of the 'Show Doors' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Doors' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Doors' attribute. - * @see #setShowDoors(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowDoors() - * @model default="true" - * @generated - */ - boolean isShowDoors(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowDoors Show Doors}' attribute. - * - * - * @param value the new value of the 'Show Doors' attribute. - * @see #isShowDoors() - * @generated - */ - void setShowDoors(boolean value); - - /** - * Returns the value of the 'Show Occupied Seats' attribute. - * The default value is "true". - * - *

    - * If the meaning of the 'Show Occupied Seats' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Show Occupied Seats' attribute. - * @see #setShowOccupiedSeats(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_ShowOccupiedSeats() - * @model default="true" - * @generated - */ - boolean isShowOccupiedSeats(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#isShowOccupiedSeats Show Occupied Seats}' attribute. - * - * - * @param value the new value of the 'Show Occupied Seats' attribute. - * @see #isShowOccupiedSeats() - * @generated - */ - void setShowOccupiedSeats(boolean value); - - /** - * Returns the value of the 'Size Of Passenger Circle' attribute. - * The default value is "0.75". - * - *

    - * If the meaning of the 'Size Of Passenger Circle' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Size Of Passenger Circle' attribute. - * @see #setSizeOfPassengerCircle(double) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_SizeOfPassengerCircle() - * @model default="0.75" - * @generated - */ - double getSizeOfPassengerCircle(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getSizeOfPassengerCircle Size Of Passenger Circle}' attribute. - * - * - * @param value the new value of the 'Size Of Passenger Circle' attribute. - * @see #getSizeOfPassengerCircle() - * @generated - */ - void setSizeOfPassengerCircle(double value); - - /** - * Returns the value of the 'Door Off Set In Pixels' attribute. - * The default value is "2". - * - *

    - * If the meaning of the 'Door Off Set In Pixels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Door Off Set In Pixels' attribute. - * @see #setDoorOffSetInPixels(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_DoorOffSetInPixels() - * @model default="2" - * @generated - */ - int getDoorOffSetInPixels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getDoorOffSetInPixels Door Off Set In Pixels}' attribute. - * - * - * @param value the new value of the 'Door Off Set In Pixels' attribute. - * @see #getDoorOffSetInPixels() - * @generated - */ - void setDoorOffSetInPixels(int value); - - /** - * Returns the value of the 'XZero In Pixels' attribute. - * The default value is "138". - * - *

    - * If the meaning of the 'XZero In Pixels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'XZero In Pixels' attribute. - * @see #setXZeroInPixels(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_XZeroInPixels() - * @model default="138" - * @generated - */ - int getXZeroInPixels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getXZeroInPixels XZero In Pixels}' attribute. - * - * - * @param value the new value of the 'XZero In Pixels' attribute. - * @see #getXZeroInPixels() - * @generated - */ - void setXZeroInPixels(int value); - - /** - * Returns the value of the 'YZero In Pixels' attribute. - * The default value is "90". - * - *

    - * If the meaning of the 'YZero In Pixels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'YZero In Pixels' attribute. - * @see #setYZeroInPixels(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_YZeroInPixels() - * @model default="90" - * @generated - */ - int getYZeroInPixels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getYZeroInPixels YZero In Pixels}' attribute. - * - * - * @param value the new value of the 'YZero In Pixels' attribute. - * @see #getYZeroInPixels() - * @generated - */ - void setYZeroInPixels(int value); - - /** - * Returns the value of the 'Cabin Width In Pixels' attribute. - * The default value is "96". - * - *

    - * If the meaning of the 'Cabin Width In Pixels' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Cabin Width In Pixels' attribute. - * @see #setYDimensionInPixels(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getCabinViewSettings_YDimensionInPixels() - * @model default="96" - * @generated - */ - int getYDimensionInPixels(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.CabinViewSettings#getYDimensionInPixels Cabin Width In Pixels}' attribute. - * - * - * @param value the new value of the 'Cabin Width In Pixels' attribute. - * @see #getYDimensionInPixels() - * @generated - */ - void setYDimensionInPixels(int value); - -} // CabinViewSettings diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ClassType.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ClassType.java index beccaaf4..2840f17e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ClassType.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ClassType.java @@ -142,7 +142,10 @@ public enum ClassType implements Enumerator { * Returns the 'Class Type' literal with the specified literal value. * * - * @generated + * + * @param literal the literal + * @return the class type + * @generated */ public static ClassType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { @@ -158,7 +161,10 @@ public static ClassType get(String literal) { * Returns the 'Class Type' literal with the specified name. * * - * @generated + * + * @param name the name + * @return the by name + * @generated */ public static ClassType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { @@ -174,7 +180,10 @@ public static ClassType getByName(String name) { * Returns the 'Class Type' literal with the specified integer value. * * - * @generated + * + * @param value the value + * @return the class type + * @generated */ public static ClassType get(int value) { switch (value) { @@ -188,22 +197,25 @@ public static ClassType get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -211,7 +223,11 @@ public static ClassType get(int value) { * Only this class can construct instances. * * - * @generated + * + * @param value the value + * @param name the name + * @param literal the literal + * @generated */ private ClassType(int value, String name, String literal) { this.value = value; @@ -221,8 +237,10 @@ private ClassType(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -230,8 +248,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -239,8 +259,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; @@ -250,7 +272,9 @@ public String getLiteral() { * Returns the literal value of the enumerator, which is its string representation. * * - * @generated + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Door.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Door.java index ac8b13ca..8e98a0dd 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Door.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Door.java @@ -21,10 +21,11 @@ *
  • {@link net.bhl.cdt.paxelerate.model.Door#getNumberOfSimultaneousPassengers Number Of Simultaneous Passengers}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Door#isIsActive Is Active}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Door#getWaitingPassengers Waiting Passengers}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.Door#getDoorOption Door Option}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getDoor() - * @model abstract="true" + * @model * @generated */ public interface Door extends EObject { @@ -201,4 +202,34 @@ public interface Door extends EObject { */ EList getWaitingPassengers(); + /** + * Returns the value of the 'Door Option' attribute. + * The default value is "StandardDoor". + * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.DoorOption}. + * + *

    + * If the meaning of the 'Door Option' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Door Option' attribute. + * @see net.bhl.cdt.paxelerate.model.DoorOption + * @see #setDoorOption(DoorOption) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getDoor_DoorOption() + * @model default="StandardDoor" required="true" + * @generated + */ + DoorOption getDoorOption(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Door#getDoorOption Door Option}' attribute. + * + * + * @param value the new value of the 'Door Option' attribute. + * @see net.bhl.cdt.paxelerate.model.DoorOption + * @see #getDoorOption() + * @generated + */ + void setDoorOption(DoorOption value); + } // Door diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorType.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorOption.java similarity index 62% rename from net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorType.java rename to net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorOption.java index dd70aee6..5bb5611f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorType.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/DoorOption.java @@ -10,14 +10,14 @@ /** * - * A representation of the literals of the enumeration 'Door Type', + * A representation of the literals of the enumeration 'Door Option', * and utility methods for working with them. * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getDoorType() + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getDoorOption() * @model * @generated */ -public enum DoorType implements Enumerator { +public enum DoorOption implements Enumerator { /** * The 'Main Door' literal object. * @@ -26,25 +26,27 @@ public enum DoorType implements Enumerator { * @generated * @ordered */ - MAIN_DOOR(0, "mainDoor", "mainDoor"), + MAIN_DOOR(0, "MainDoor", "MainDoor"), /** - * The 'Emergency Exit' literal object. + * The 'Standard Door' literal object. * * - * @see #EMERGENCY_EXIT_VALUE + * @see #STANDARD_DOOR_VALUE * @generated * @ordered */ - EMERGENCY_EXIT(1, "emergencyExit", "emergencyExit"), /** - * The 'Standard Door' literal object. + STANDARD_DOOR(1, "StandardDoor", "StandardDoor"), + + /** + * The 'Emergency Exit' literal object. * * - * @see #STANDARD_DOOR_VALUE + * @see #EMERGENCY_EXIT_VALUE * @generated * @ordered */ - STANDARD_DOOR(2, "standardDoor", ""); + EMERGENCY_EXIT(2, "EmergencyExit", "EmergencyExit"); /** * The 'Main Door' literal value. @@ -55,72 +57,74 @@ public enum DoorType implements Enumerator { *

    * * @see #MAIN_DOOR - * @model name="mainDoor" + * @model name="MainDoor" * @generated * @ordered */ public static final int MAIN_DOOR_VALUE = 0; /** - * The 'Emergency Exit' literal value. + * The 'Standard Door' literal value. * *

    - * If the meaning of 'Emergency Exit' literal object isn't clear, + * If the meaning of 'Standard Door' literal object isn't clear, * there really should be more of a description here... *

    * - * @see #EMERGENCY_EXIT - * @model name="emergencyExit" + * @see #STANDARD_DOOR + * @model name="StandardDoor" * @generated * @ordered */ - public static final int EMERGENCY_EXIT_VALUE = 1; + public static final int STANDARD_DOOR_VALUE = 1; /** - * The 'Standard Door' literal value. + * The 'Emergency Exit' literal value. * *

    - * If the meaning of 'Standard Door' literal object isn't clear, + * If the meaning of 'Emergency Exit' literal object isn't clear, * there really should be more of a description here... *

    * - * @see #STANDARD_DOOR - * @model name="standardDoor" literal="" + * @see #EMERGENCY_EXIT + * @model name="EmergencyExit" * @generated * @ordered */ - public static final int STANDARD_DOOR_VALUE = 2; + public static final int EMERGENCY_EXIT_VALUE = 2; /** - * An array of all the 'Door Type' enumerators. + * An array of all the 'Door Option' enumerators. * * * @generated */ - private static final DoorType[] VALUES_ARRAY = - new DoorType[] { + private static final DoorOption[] VALUES_ARRAY = + new DoorOption[] { MAIN_DOOR, - EMERGENCY_EXIT, STANDARD_DOOR, + EMERGENCY_EXIT, }; /** - * A public read-only list of all the 'Door Type' enumerators. + * A public read-only list of all the 'Door Option' enumerators. * * * @generated */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the 'Door Type' literal with the specified literal value. + * Returns the 'Door Option' literal with the specified literal value. * * + * @param literal the literal. + * @return the matching enumerator or null. * @generated */ - public static DoorType get(String literal) { + public static DoorOption get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DoorType result = VALUES_ARRAY[i]; + DoorOption result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } @@ -129,14 +133,16 @@ public static DoorType get(String literal) { } /** - * Returns the 'Door Type' literal with the specified name. + * Returns the 'Door Option' literal with the specified name. * * + * @param name the name. + * @return the matching enumerator or null. * @generated */ - public static DoorType getByName(String name) { + public static DoorOption getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DoorType result = VALUES_ARRAY[i]; + DoorOption result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } @@ -145,38 +151,43 @@ public static DoorType getByName(String name) { } /** - * Returns the 'Door Type' literal with the specified integer value. + * Returns the 'Door Option' literal with the specified integer value. * * + * @param value the integer value. + * @return the matching enumerator or null. * @generated */ - public static DoorType get(int value) { + public static DoorOption get(int value) { switch (value) { case MAIN_DOOR_VALUE: return MAIN_DOOR; - case EMERGENCY_EXIT_VALUE: return EMERGENCY_EXIT; case STANDARD_DOOR_VALUE: return STANDARD_DOOR; + case EMERGENCY_EXIT_VALUE: return EMERGENCY_EXIT; } return null; } /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -186,7 +197,7 @@ public static DoorType get(int value) { * * @generated */ - private DoorType(int value, String name, String literal) { + private DoorOption(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; @@ -194,8 +205,10 @@ private DoorType(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -203,8 +216,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -212,8 +227,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; @@ -230,4 +247,4 @@ public String toString() { return literal; } -} //DoorType +} //DoorOption diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EconomyClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EconomyClass.java deleted file mode 100644 index 954690bd..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EconomyClass.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Economy Class'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getEconomyClass() - * @model - * @generated - */ -public interface EconomyClass extends TravelClass { -} // EconomyClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExit.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExit.java deleted file mode 100644 index e6d370db..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExit.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Emergency Exit'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getEmergencyExit() - * @model - * @generated - */ -public interface EmergencyExit extends Door { - -} // EmergencyExit diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExits.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExits.java deleted file mode 100644 index 41576349..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/EmergencyExits.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Emergency Exits'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link net.bhl.cdt.paxelerate.model.EmergencyExits#getExitInRow Exit In Row}
    • - *
    - *

    - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getEmergencyExits() - * @model - * @generated - */ -public interface EmergencyExits extends EObject { - /** - * Returns the value of the 'Exit In Row' attribute. - * - *

    - * If the meaning of the 'Exit In Row' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Exit In Row' attribute. - * @see #setExitInRow(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getEmergencyExits_ExitInRow() - * @model - * @generated - */ - int getExitInRow(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.EmergencyExits#getExitInRow Exit In Row}' attribute. - * - * - * @param value the new value of the 'Exit In Row' attribute. - * @see #getExitInRow() - * @generated - */ - void setExitInRow(int value); - -} // EmergencyExits diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ExitType.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ExitType.java index 830353a7..d21ad82f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ExitType.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ExitType.java @@ -114,7 +114,10 @@ public enum ExitType implements Enumerator { * Returns the 'Exit Type' literal with the specified literal value. * * - * @generated + * + * @param literal the literal + * @return the exit type + * @generated */ public static ExitType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { @@ -130,7 +133,10 @@ public static ExitType get(String literal) { * Returns the 'Exit Type' literal with the specified name. * * - * @generated + * + * @param name the name + * @return the by name + * @generated */ public static ExitType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { @@ -146,7 +152,10 @@ public static ExitType getByName(String name) { * Returns the 'Exit Type' literal with the specified integer value. * * - * @generated + * + * @param value the value + * @return the exit type + * @generated */ public static ExitType get(int value) { switch (value) { @@ -159,22 +168,25 @@ public static ExitType get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -182,7 +194,11 @@ public static ExitType get(int value) { * Only this class can construct instances. * * - * @generated + * + * @param value the value + * @param name the name + * @param literal the literal + * @generated */ private ExitType(int value, String name, String literal) { this.value = value; @@ -192,8 +208,10 @@ private ExitType(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -201,8 +219,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -210,8 +230,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; @@ -221,7 +243,9 @@ public String getLiteral() { * Returns the literal value of the enumerator, which is its string representation. * * - * @generated + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/FirstClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/FirstClass.java deleted file mode 100644 index f95b25cf..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/FirstClass.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'First Class'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getFirstClass() - * @model - * @generated - */ -public interface FirstClass extends TravelClass { -} // FirstClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LavatoryPorperties.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LavatoryPorperties.java deleted file mode 100644 index b9b5e9dd..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LavatoryPorperties.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -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 'Lavatory Porperties', - * and utility methods for working with them. - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLavatoryPorperties() - * @model - * @generated - */ -public enum LavatoryPorperties implements Enumerator { - /** - * The 'XDimension' literal object. - * - * - * @see #XDIMENSION_VALUE - * @generated - * @ordered - */ - XDIMENSION(100, "xDimension", "xDimension"), - - /** - * The 'YDimension' literal object. - * - * - * @see #YDIMENSION_VALUE - * @generated - * @ordered - */ - YDIMENSION(300, "yDimension", "yDimension"); - - /** - * The 'XDimension' literal value. - * - *

    - * If the meaning of 'XDimension' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #XDIMENSION - * @model name="xDimension" - * @generated - * @ordered - */ - public static final int XDIMENSION_VALUE = 100; - - /** - * The 'YDimension' literal value. - * - *

    - * If the meaning of 'YDimension' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #YDIMENSION - * @model name="yDimension" - * @generated - * @ordered - */ - public static final int YDIMENSION_VALUE = 300; - - /** - * An array of all the 'Lavatory Porperties' enumerators. - * - * - * @generated - */ - private static final LavatoryPorperties[] VALUES_ARRAY = - new LavatoryPorperties[] { - XDIMENSION, - YDIMENSION, - }; - - /** - * A public read-only list of all the 'Lavatory Porperties' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Lavatory Porperties' literal with the specified literal value. - * - * - * @generated - */ - public static LavatoryPorperties get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - LavatoryPorperties result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Lavatory Porperties' literal with the specified name. - * - * - * @generated - */ - public static LavatoryPorperties getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - LavatoryPorperties result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Lavatory Porperties' literal with the specified integer value. - * - * - * @generated - */ - public static LavatoryPorperties get(int value) { - switch (value) { - case XDIMENSION_VALUE: return XDIMENSION; - case YDIMENSION_VALUE: return YDIMENSION; - } - 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 LavatoryPorperties(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //LavatoryPorperties diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LayoutConcept.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LayoutConcept.java new file mode 100644 index 00000000..5e74608e --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LayoutConcept.java @@ -0,0 +1,268 @@ +/** + */ +package net.bhl.cdt.paxelerate.model; + +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 'Layout Concept', + * and utility methods for working with them. + * + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLayoutConcept() + * @model + * @generated + */ +public enum LayoutConcept implements Enumerator { + /** + * The 'Default' literal object. + * + * + * @see #DEFAULT_VALUE + * @generated + * @ordered + */ + DEFAULT(0, "Default", "Default"), + + /** + * The 'Sidways Foldable Seat' literal object. + * + * + * @see #SIDWAYS_FOLDABLE_SEAT_VALUE + * @generated + * @ordered + */ + SIDWAYS_FOLDABLE_SEAT(1, "SidwaysFoldableSeat", "SidwaysFoldableSeat"), + + /** + * The 'Lifting Seat Pan Seats' literal object. + * + * + * @see #LIFTING_SEAT_PAN_SEATS_VALUE + * @generated + * @ordered + */ + LIFTING_SEAT_PAN_SEATS(2, "LiftingSeatPanSeats", "LiftingSeatPanSeats"), + + /** + * The 'Bring Your Own Seat' literal object. + * + * + * @see #BRING_YOUR_OWN_SEAT_VALUE + * @generated + * @ordered + */ + BRING_YOUR_OWN_SEAT(3, "bringYourOwnSeat", "bringYourOwnSeat"); + + /** + * The 'Default' literal value. + * + *

    + * If the meaning of 'Default' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #DEFAULT + * @model name="Default" + * @generated + * @ordered + */ + public static final int DEFAULT_VALUE = 0; + + /** + * The 'Sidways Foldable Seat' literal value. + * + *

    + * If the meaning of 'Sidways Foldable Seat' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #SIDWAYS_FOLDABLE_SEAT + * @model name="SidwaysFoldableSeat" + * @generated + * @ordered + */ + public static final int SIDWAYS_FOLDABLE_SEAT_VALUE = 1; + + /** + * The 'Lifting Seat Pan Seats' literal value. + * + *

    + * If the meaning of 'Lifting Seat Pan Seats' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #LIFTING_SEAT_PAN_SEATS + * @model name="LiftingSeatPanSeats" + * @generated + * @ordered + */ + public static final int LIFTING_SEAT_PAN_SEATS_VALUE = 2; + + /** + * The 'Bring Your Own Seat' literal value. + * + *

    + * If the meaning of 'Bring Your Own Seat' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #BRING_YOUR_OWN_SEAT + * @model name="bringYourOwnSeat" + * @generated + * @ordered + */ + public static final int BRING_YOUR_OWN_SEAT_VALUE = 3; + + /** + * An array of all the 'Layout Concept' enumerators. + * + * + * @generated + */ + private static final LayoutConcept[] VALUES_ARRAY = + new LayoutConcept[] { + DEFAULT, + SIDWAYS_FOLDABLE_SEAT, + LIFTING_SEAT_PAN_SEATS, + BRING_YOUR_OWN_SEAT, + }; + + /** + * A public read-only list of all the 'Layout Concept' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Layout Concept' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static LayoutConcept get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LayoutConcept result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Layout Concept' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static LayoutConcept getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LayoutConcept result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Layout Concept' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static LayoutConcept get(int value) { + switch (value) { + case DEFAULT_VALUE: return DEFAULT; + case SIDWAYS_FOLDABLE_SEAT_VALUE: return SIDWAYS_FOLDABLE_SEAT; + case LIFTING_SEAT_PAN_SEATS_VALUE: return LIFTING_SEAT_PAN_SEATS; + case BRING_YOUR_OWN_SEAT_VALUE: return BRING_YOUR_OWN_SEAT; + } + 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 LayoutConcept(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LayoutConcept diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageProperties.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageProperties.java index 31c03c91..e9ee320d 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageProperties.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageProperties.java @@ -13,8 +13,8 @@ * The following features are supported: *

    *
      - *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatMean Luggage Stowing Distance From Seat Mean}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatDeviation Luggage Stowing Distance From Seat Deviation}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatMean Luggage Stow Distance From Seat Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatDeviation Luggage Stow Distance From Seat Deviation}
    • *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getPercentageOfPassengersWithNoLuggage Percentage Of Passengers With No Luggage}
    • *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getPercentageOfPassengersWithSmallLuggage Percentage Of Passengers With Small Luggage}
    • *
    • {@link net.bhl.cdt.paxelerate.model.LuggageProperties#getPercentageOfPassengersWithMediumLuggage Percentage Of Passengers With Medium Luggage}
    • @@ -33,61 +33,62 @@ */ public interface LuggageProperties extends EObject { /** - * Returns the value of the 'Luggage Stowing Distance From Seat Mean' attribute. + * Returns the value of the 'Luggage Stow Distance From Seat Mean' attribute. * The default value is "80". * *

      - * If the meaning of the 'Luggage Stowing Distance From Seat Mean' attribute isn't clear, + * If the meaning of the 'Luggage Stow Distance From Seat Mean' attribute isn't clear, * there really should be more of a description here... *

      * - * @return the value of the 'Luggage Stowing Distance From Seat Mean' attribute. - * @see #setLuggageStowingDistanceFromSeatMean(double) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_LuggageStowingDistanceFromSeatMean() + * @return the value of the 'Luggage Stow Distance From Seat Mean' attribute. + * @see #setLuggageStowDistanceFromSeatMean(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_LuggageStowDistanceFromSeatMean() * @model default="80" * @generated */ - double getLuggageStowingDistanceFromSeatMean(); + double getLuggageStowDistanceFromSeatMean(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatMean Luggage Stowing Distance From Seat Mean}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatMean Luggage Stow Distance From Seat Mean}' attribute. * * - * @param value the new value of the 'Luggage Stowing Distance From Seat Mean' attribute. - * @see #getLuggageStowingDistanceFromSeatMean() + * @param value the new value of the 'Luggage Stow Distance From Seat Mean' attribute. + * @see #getLuggageStowDistanceFromSeatMean() * @generated */ - void setLuggageStowingDistanceFromSeatMean(double value); + void setLuggageStowDistanceFromSeatMean(double value); /** - * Returns the value of the 'Luggage Stowing Distance From Seat Deviation' attribute. + * Returns the value of the 'Luggage Stow Distance From Seat Deviation' attribute. * The default value is "10". * *

      - * If the meaning of the 'Luggage Stowing Distance From Seat Deviation' attribute isn't clear, + * If the meaning of the 'Luggage Stow Distance From Seat Deviation' attribute isn't clear, * there really should be more of a description here... *

      * - * @return the value of the 'Luggage Stowing Distance From Seat Deviation' attribute. - * @see #setLuggageStowingDistanceFromSeatDeviation(double) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_LuggageStowingDistanceFromSeatDeviation() + * @return the value of the 'Luggage Stow Distance From Seat Deviation' attribute. + * @see #setLuggageStowDistanceFromSeatDeviation(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_LuggageStowDistanceFromSeatDeviation() * @model default="10" * @generated */ - double getLuggageStowingDistanceFromSeatDeviation(); + double getLuggageStowDistanceFromSeatDeviation(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowingDistanceFromSeatDeviation Luggage Stowing Distance From Seat Deviation}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.LuggageProperties#getLuggageStowDistanceFromSeatDeviation Luggage Stow Distance From Seat Deviation}' attribute. * * - * @param value the new value of the 'Luggage Stowing Distance From Seat Deviation' attribute. - * @see #getLuggageStowingDistanceFromSeatDeviation() + * @param value the new value of the 'Luggage Stow Distance From Seat Deviation' attribute. + * @see #getLuggageStowDistanceFromSeatDeviation() * @generated */ - void setLuggageStowingDistanceFromSeatDeviation(double value); + void setLuggageStowDistanceFromSeatDeviation(double value); /** * Returns the value of the 'Percentage Of Passengers With No Luggage' attribute. + * The default value is "100". * *

      * If the meaning of the 'Percentage Of Passengers With No Luggage' attribute isn't clear, @@ -97,7 +98,7 @@ public interface LuggageProperties extends EObject { * @return the value of the 'Percentage Of Passengers With No Luggage' attribute. * @see #setPercentageOfPassengersWithNoLuggage(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_PercentageOfPassengersWithNoLuggage() - * @model + * @model default="100" * @generated */ double getPercentageOfPassengersWithNoLuggage(); @@ -114,6 +115,7 @@ public interface LuggageProperties extends EObject { /** * Returns the value of the 'Percentage Of Passengers With Small Luggage' attribute. + * The default value is "0". * *

      * If the meaning of the 'Percentage Of Passengers With Small Luggage' attribute isn't clear, @@ -123,7 +125,7 @@ public interface LuggageProperties extends EObject { * @return the value of the 'Percentage Of Passengers With Small Luggage' attribute. * @see #setPercentageOfPassengersWithSmallLuggage(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_PercentageOfPassengersWithSmallLuggage() - * @model + * @model default="0" * @generated */ double getPercentageOfPassengersWithSmallLuggage(); @@ -140,6 +142,7 @@ public interface LuggageProperties extends EObject { /** * Returns the value of the 'Percentage Of Passengers With Medium Luggage' attribute. + * The default value is "0". * *

      * If the meaning of the 'Percentage Of Passengers With Medium Luggage' attribute isn't clear, @@ -149,7 +152,7 @@ public interface LuggageProperties extends EObject { * @return the value of the 'Percentage Of Passengers With Medium Luggage' attribute. * @see #setPercentageOfPassengersWithMediumLuggage(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_PercentageOfPassengersWithMediumLuggage() - * @model + * @model default="0" * @generated */ double getPercentageOfPassengersWithMediumLuggage(); @@ -166,6 +169,7 @@ public interface LuggageProperties extends EObject { /** * Returns the value of the 'Percentage Of Passengers With Big Luggage' attribute. + * The default value is "0". * *

      * If the meaning of the 'Percentage Of Passengers With Big Luggage' attribute isn't clear, @@ -175,7 +179,7 @@ public interface LuggageProperties extends EObject { * @return the value of the 'Percentage Of Passengers With Big Luggage' attribute. * @see #setPercentageOfPassengersWithBigLuggage(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getLuggageProperties_PercentageOfPassengersWithBigLuggage() - * @model + * @model default="0" * @generated */ double getPercentageOfPassengersWithBigLuggage(); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageSize.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageSize.java index 2076106f..817fc492 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageSize.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/LuggageSize.java @@ -196,22 +196,25 @@ public static LuggageSize get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -229,8 +232,10 @@ private LuggageSize(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -238,8 +243,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -247,8 +254,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/MainDoor.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/MainDoor.java deleted file mode 100644 index 43ce0cad..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/MainDoor.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Main Door'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getMainDoor() - * @model - * @generated - */ -public interface MainDoor extends Door { -} // MainDoor diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ObjectOption.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ObjectOption.java index aba67c98..5a4d0383 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ObjectOption.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/ObjectOption.java @@ -250,22 +250,25 @@ public static ObjectOption get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -283,8 +286,10 @@ private ObjectOption(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -292,8 +297,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -301,8 +308,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Passenger.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Passenger.java index 309d9547..e037c939 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Passenger.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Passenger.java @@ -19,10 +19,10 @@ *

    • {@link net.bhl.cdt.paxelerate.model.Passenger#getAge Age}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getWeight Weight}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getDoor Door}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getSeatID Seat ID}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getName Name}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getBoardingTime Boarding Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getSeatRef Seat Ref}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getWidth Width}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getDepth Depth}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getOrientationInDegree Orientation In Degree}
    • @@ -31,13 +31,16 @@ *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#isIsSeated Is Seated}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getWalkingSpeed Walking Speed}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getStartBoardingAfterDelay Start Boarding After Delay}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getNumberOfWaits Number Of Waits}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowTime Luggage Stow Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowingDistance Luggage Stowing Distance}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowDistance Luggage Stow Distance}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getTravelClass Travel Class}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getPassengerMood Passenger Mood}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getNumberOfWaits Number Of Waits}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getNumberOfMakeWayOperations Number Of Make Way Operations}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getDistanceWalked Distance Walked}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getLuggage Luggage}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getCostOfPath Cost Of Path}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.Passenger#getTotalTimeWaited Total Time Waited}
    • *
    * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger() @@ -101,30 +104,30 @@ public interface Passenger extends EObject { void setSex(Sex value); /** - * Returns the value of the 'Seat' attribute. + * Returns the value of the 'Seat' reference. * *

    * If the meaning of the 'Seat' reference isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Seat' attribute. - * @see #setSeat(int) + * @return the value of the 'Seat' reference. + * @see #setSeat(Seat) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_Seat() - * @model + * @model required="true" * @generated */ - int getSeat(); + Seat getSeat(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeat Seat}' reference. * * - * @param value the new value of the 'Seat' attribute. + * @param value the new value of the 'Seat' reference. * @see #getSeat() * @generated */ - void setSeat(int value); + void setSeat(Seat value); /** * Returns the value of the 'Name' attribute. @@ -162,12 +165,12 @@ public interface Passenger extends EObject { *

    * * @return the value of the 'Boarding Time' attribute. - * @see #setBoardingTime(int) + * @see #setBoardingTime(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_BoardingTime() * @model * @generated */ - int getBoardingTime(); + double getBoardingTime(); /** * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getBoardingTime Boarding Time}' attribute. @@ -177,33 +180,7 @@ public interface Passenger extends EObject { * @see #getBoardingTime() * @generated */ - void setBoardingTime(int value); - - /** - * Returns the value of the 'Seat Ref' reference. - * - *

    - * If the meaning of the 'Seat Ref' reference isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Seat Ref' reference. - * @see #setSeatRef(Seat) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_SeatRef() - * @model required="true" - * @generated - */ - Seat getSeatRef(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeatRef Seat Ref}' reference. - * - * - * @param value the new value of the 'Seat Ref' reference. - * @see #getSeatRef() - * @generated - */ - void setSeatRef(Seat value); + void setBoardingTime(double value); /** * Returns the value of the 'Width' attribute. @@ -471,30 +448,30 @@ public interface Passenger extends EObject { void setLuggageStowTime(double value); /** - * Returns the value of the 'Luggage Stowing Distance' attribute. + * Returns the value of the 'Luggage Stow Distance' attribute. * *

    - * If the meaning of the 'Luggage Stowing Distance' attribute isn't clear, + * If the meaning of the 'Luggage Stow Distance' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Luggage Stowing Distance' attribute. - * @see #setLuggageStowingDistance(double) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_LuggageStowingDistance() + * @return the value of the 'Luggage Stow Distance' attribute. + * @see #setLuggageStowDistance(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_LuggageStowDistance() * @model * @generated */ - double getLuggageStowingDistance(); + double getLuggageStowDistance(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowingDistance Luggage Stowing Distance}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getLuggageStowDistance Luggage Stow Distance}' attribute. * * - * @param value the new value of the 'Luggage Stowing Distance' attribute. - * @see #getLuggageStowingDistance() + * @param value the new value of the 'Luggage Stow Distance' attribute. + * @see #getLuggageStowDistance() * @generated */ - void setLuggageStowingDistance(double value); + void setLuggageStowDistance(double value); /** * Returns the value of the 'Travel Class' reference. @@ -607,6 +584,87 @@ public interface Passenger extends EObject { */ void setLuggage(LuggageSize value); + /** + * Returns the value of the 'Distance Walked' attribute. + * The default value is "0". + * + *

    + * If the meaning of the 'Distance Walked' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Distance Walked' attribute. + * @see #setDistanceWalked(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_DistanceWalked() + * @model default="0" + * @generated + */ + int getDistanceWalked(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getDistanceWalked Distance Walked}' attribute. + * + * + * @param value the new value of the 'Distance Walked' attribute. + * @see #getDistanceWalked() + * @generated + */ + void setDistanceWalked(int value); + + /** + * Returns the value of the 'Cost Of Path' attribute. + * The default value is "0". + * + *

    + * If the meaning of the 'Cost Of Path' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Cost Of Path' attribute. + * @see #setCostOfPath(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_CostOfPath() + * @model default="0" + * @generated + */ + int getCostOfPath(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getCostOfPath Cost Of Path}' attribute. + * + * + * @param value the new value of the 'Cost Of Path' attribute. + * @see #getCostOfPath() + * @generated + */ + void setCostOfPath(int value); + + /** + * Returns the value of the 'Total Time Waited' attribute. + * The default value is "0". + * + *

    + * If the meaning of the 'Total Time Waited' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Total Time Waited' attribute. + * @see #setTotalTimeWaited(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_TotalTimeWaited() + * @model default="0" + * @generated + */ + double getTotalTimeWaited(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getTotalTimeWaited Total Time Waited}' attribute. + * + * + * @param value the new value of the 'Total Time Waited' attribute. + * @see #getTotalTimeWaited() + * @generated + */ + void setTotalTimeWaited(double value); + /** * Returns the value of the 'Height' attribute. * @@ -711,4 +769,30 @@ public interface Passenger extends EObject { */ void setDoor(Door value); + /** + * Returns the value of the 'Seat ID' attribute. + * + *

    + * If the meaning of the 'Seat ID' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat ID' attribute. + * @see #setSeatID(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassenger_SeatID() + * @model + * @generated + */ + int getSeatID(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Passenger#getSeatID Seat ID}' attribute. + * + * + * @param value the new value of the 'Seat ID' attribute. + * @see #getSeatID() + * @generated + */ + void setSeatID(int value); + } // Passenger diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerClass.java deleted file mode 100644 index a2f6ce81..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerClass.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Passenger Class'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link net.bhl.cdt.paxelerate.model.PassengerClass#getType Type}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.PassengerClass#getAvailableSeats Available Seats}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.PassengerClass#getRows Rows}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.PassengerClass#getSequence Sequence}
    • - *
    - *

    - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerClass() - * @model - * @generated - */ -public interface PassengerClass extends EObject { - /** - * Returns the value of the 'Type' attribute. - * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.ClassType}. - * - *

    - * If the meaning of the 'Type' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Type' attribute. - * @see net.bhl.cdt.paxelerate.model.ClassType - * @see #setType(ClassType) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerClass_Type() - * @model - * @generated - */ - ClassType getType(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerClass#getType Type}' attribute. - * - * - * @param value the new value of the 'Type' attribute. - * @see net.bhl.cdt.paxelerate.model.ClassType - * @see #getType() - * @generated - */ - void setType(ClassType value); - - /** - * Returns the value of the 'Available Seats' attribute. - * - *

    - * If the meaning of the 'Available Seats' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Available Seats' attribute. - * @see #setAvailableSeats(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerClass_AvailableSeats() - * @model - * @generated - */ - int getAvailableSeats(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerClass#getAvailableSeats Available Seats}' attribute. - * - * - * @param value the new value of the 'Available Seats' attribute. - * @see #getAvailableSeats() - * @generated - */ - void setAvailableSeats(int value); - - /** - * Returns the value of the 'Rows' containment reference list. - * The list contents are of type {@link net.bhl.cdt.paxelerate.model.Row}. - * - *

    - * If the meaning of the 'Rows' containment reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Rows' containment reference list. - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerClass_Rows() - * @model containment="true" lower="2" - * @generated - */ - EList getRows(); - - /** - * Returns the value of the 'Sequence' attribute. - * - *

    - * If the meaning of the 'Sequence' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Sequence' attribute. - * @see #setSequence(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerClass_Sequence() - * @model - * @generated - */ - int getSequence(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerClass#getSequence Sequence}' attribute. - * - * - * @param value the new value of the 'Sequence' attribute. - * @see #getSequence() - * @generated - */ - void setSequence(int value); - -} // PassengerClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerMood.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerMood.java index 0db1a548..20cbe910 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerMood.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerMood.java @@ -19,16 +19,14 @@ */ public enum PassengerMood implements Enumerator { /** - * The 'Agressive' literal object. + * The 'Aggressive' literal object. * * - * @see #AGRESSIVE_VALUE + * @see #AGGRESSIVE_VALUE * @generated * @ordered */ - AGRESSIVE(0, "agressive", "agressive"), - - /** + AGGRESSIVE(0, "aggressive", "aggressive"), /** * The 'Passive' literal object. * * @@ -39,19 +37,19 @@ public enum PassengerMood implements Enumerator { PASSIVE(1, "passive", "passive"); /** - * The 'Agressive' literal value. + * The 'Aggressive' literal value. * *

    - * If the meaning of 'Agressive' literal object isn't clear, + * If the meaning of 'Aggressive' literal object isn't clear, * there really should be more of a description here... *

    * - * @see #AGRESSIVE - * @model name="agressive" + * @see #AGGRESSIVE + * @model name="aggressive" * @generated * @ordered */ - public static final int AGRESSIVE_VALUE = 0; + public static final int AGGRESSIVE_VALUE = 0; /** * The 'Passive' literal value. @@ -76,7 +74,7 @@ public enum PassengerMood implements Enumerator { */ private static final PassengerMood[] VALUES_ARRAY = new PassengerMood[] { - AGRESSIVE, + AGGRESSIVE, PASSIVE, }; @@ -134,7 +132,7 @@ public static PassengerMood getByName(String name) { */ public static PassengerMood get(int value) { switch (value) { - case AGRESSIVE_VALUE: return AGRESSIVE; + case AGGRESSIVE_VALUE: return AGGRESSIVE; case PASSIVE_VALUE: return PASSIVE; } return null; @@ -142,22 +140,25 @@ public static PassengerMood get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -175,8 +176,10 @@ private PassengerMood(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -184,8 +187,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -193,8 +198,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerProperties.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerProperties.java index d93fee8b..8873fbc1 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerProperties.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PassengerProperties.java @@ -30,6 +30,13 @@ *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerHeightDeviationFemale Passenger Height Deviation Female}
  • *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthMeanFemale Passenger Depth Mean Female}
  • *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerDepthDeviationFemale Passenger Depth Deviation Female}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerAggressiveMoodShare Passenger Aggressive Mood Share}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeMean Seat Interference Process Time Mean}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeDeviation Seat Interference Process Time Deviation}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatMean Seat Interference Process Time Folding Seat Mean}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatDeviation Seat Interference Process Time Folding Seat Deviation}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassivePassengerWaitingTimeAfterCollision Passive Passenger Waiting Time After Collision}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties() @@ -309,7 +316,7 @@ public interface PassengerProperties extends EObject { /** * Returns the value of the 'Passenger Width Deviation Female' attribute. - * The default value is "2.8". + * The default value is "1". * *

    * If the meaning of the 'Passenger Width Deviation Female' attribute isn't clear, @@ -319,7 +326,7 @@ public interface PassengerProperties extends EObject { * @return the value of the 'Passenger Width Deviation Female' attribute. * @see #setPassengerWidthDeviationFemale(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_PassengerWidthDeviationFemale() - * @model default="2.8" + * @model default="1" * @generated */ double getPassengerWidthDeviationFemale(); @@ -496,4 +503,193 @@ public interface PassengerProperties extends EObject { */ void setPassengerDepthDeviationFemale(double value); + /** + * Returns the value of the 'Passenger Aggressive Mood Share' attribute. + * The default value is "0". + * + *

    + * If the meaning of the 'Passenger Aggressive Mood Share' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Passenger Aggressive Mood Share' attribute. + * @see #setPassengerAggressiveMoodShare(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_PassengerAggressiveMoodShare() + * @model default="0" + * @generated + */ + int getPassengerAggressiveMoodShare(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassengerAggressiveMoodShare Passenger Aggressive Mood Share}' attribute. + * + * + * @param value the new value of the 'Passenger Aggressive Mood Share' attribute. + * @see #getPassengerAggressiveMoodShare() + * @generated + */ + void setPassengerAggressiveMoodShare(int value); + + /** + * Returns the value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. + * The default value is "3". + * + *

    + * If the meaning of the 'Seat Interference Standing Up Passenger Waiting Time' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. + * @see #setSeatInterferenceStandingUpPassengerWaitingTime(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_SeatInterferenceStandingUpPassengerWaitingTime() + * @model default="3" + * @generated + */ + double getSeatInterferenceStandingUpPassengerWaitingTime(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}' attribute. + * + * + * @param value the new value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. + * @see #getSeatInterferenceStandingUpPassengerWaitingTime() + * @generated + */ + void setSeatInterferenceStandingUpPassengerWaitingTime(double value); + + /** + * Returns the value of the 'Seat Interference Process Time Mean' attribute. + * The default value is "7". + * + *

    + * If the meaning of the 'Seat Interference Process Time Mean' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat Interference Process Time Mean' attribute. + * @see #setSeatInterferenceProcessTimeMean(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_SeatInterferenceProcessTimeMean() + * @model default="7" + * @generated + */ + double getSeatInterferenceProcessTimeMean(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeMean Seat Interference Process Time Mean}' attribute. + * + * + * @param value the new value of the 'Seat Interference Process Time Mean' attribute. + * @see #getSeatInterferenceProcessTimeMean() + * @generated + */ + void setSeatInterferenceProcessTimeMean(double value); + + /** + * Returns the value of the 'Seat Interference Process Time Deviation' attribute. + * The default value is "1.5". + * + *

    + * If the meaning of the 'Seat Interference Process Time Deviation' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat Interference Process Time Deviation' attribute. + * @see #setSeatInterferenceProcessTimeDeviation(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_SeatInterferenceProcessTimeDeviation() + * @model default="1.5" + * @generated + */ + double getSeatInterferenceProcessTimeDeviation(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeDeviation Seat Interference Process Time Deviation}' attribute. + * + * + * @param value the new value of the 'Seat Interference Process Time Deviation' attribute. + * @see #getSeatInterferenceProcessTimeDeviation() + * @generated + */ + void setSeatInterferenceProcessTimeDeviation(double value); + + /** + * Returns the value of the 'Seat Interference Process Time Folding Seat Mean' attribute. + * The default value is "5". + * + *

    + * If the meaning of the 'Seat Interference Process Time Folding Seat Mean' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat Interference Process Time Folding Seat Mean' attribute. + * @see #setSeatInterferenceProcessTimeFoldingSeatMean(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatMean() + * @model default="5" + * @generated + */ + double getSeatInterferenceProcessTimeFoldingSeatMean(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatMean Seat Interference Process Time Folding Seat Mean}' attribute. + * + * + * @param value the new value of the 'Seat Interference Process Time Folding Seat Mean' attribute. + * @see #getSeatInterferenceProcessTimeFoldingSeatMean() + * @generated + */ + void setSeatInterferenceProcessTimeFoldingSeatMean(double value); + + /** + * Returns the value of the 'Seat Interference Process Time Folding Seat Deviation' attribute. + * The default value is "1". + * + *

    + * If the meaning of the 'Seat Interference Process Time Folding Seat Deviation' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Seat Interference Process Time Folding Seat Deviation' attribute. + * @see #setSeatInterferenceProcessTimeFoldingSeatDeviation(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatDeviation() + * @model default="1" + * @generated + */ + double getSeatInterferenceProcessTimeFoldingSeatDeviation(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getSeatInterferenceProcessTimeFoldingSeatDeviation Seat Interference Process Time Folding Seat Deviation}' attribute. + * + * + * @param value the new value of the 'Seat Interference Process Time Folding Seat Deviation' attribute. + * @see #getSeatInterferenceProcessTimeFoldingSeatDeviation() + * @generated + */ + void setSeatInterferenceProcessTimeFoldingSeatDeviation(double value); + + /** + * Returns the value of the 'Passive Passenger Waiting Time After Collision' attribute. + * The default value is "0.3". + * + *

    + * If the meaning of the 'Passive Passenger Waiting Time After Collision' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Passive Passenger Waiting Time After Collision' attribute. + * @see #setPassivePassengerWaitingTimeAfterCollision(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPassengerProperties_PassivePassengerWaitingTimeAfterCollision() + * @model default="0.3" + * @generated + */ + double getPassivePassengerWaitingTimeAfterCollision(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.PassengerProperties#getPassivePassengerWaitingTimeAfterCollision Passive Passenger Waiting Time After Collision}' attribute. + * + * + * @param value the new value of the 'Passive Passenger Waiting Time After Collision' attribute. + * @see #getPassivePassengerWaitingTimeAfterCollision() + * @generated + */ + void setPassivePassengerWaitingTimeAfterCollision(double value); + } // PassengerProperties diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PhysicalObject.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PhysicalObject.java index 23d45bf7..49720705 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PhysicalObject.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PhysicalObject.java @@ -188,9 +188,13 @@ public interface PhysicalObject extends EObject { /** * - * - * @model - * @generated + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful + * @model + * @generated */ boolean outOfBounds(DiagnosticChain chain, Map context); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PremiumEconomyClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PremiumEconomyClass.java deleted file mode 100644 index 1506e473..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/PremiumEconomyClass.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Premium Economy Class'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getPremiumEconomyClass() - * @model - * @generated - */ -public interface PremiumEconomyClass extends TravelClass { -} // PremiumEconomyClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Row.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Row.java index 3e3804ae..2bf7f5e8 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Row.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Row.java @@ -16,7 +16,6 @@ *
      *
    • {@link net.bhl.cdt.paxelerate.model.Row#getSeats Seats}
    • *
    • {@link net.bhl.cdt.paxelerate.model.Row#getRowNumber Row Number}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.Row#isOffsetInRow Offset In Row}
    • *
    * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getRow() @@ -66,30 +65,4 @@ public interface Row extends EObject { */ void setRowNumber(int value); - /** - * Returns the value of the 'Offset In Row' attribute. - * - *

    - * If the meaning of the 'Offset In Row' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Offset In Row' attribute. - * @see #setOffsetInRow(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getRow_OffsetInRow() - * @model - * @generated - */ - boolean isOffsetInRow(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Row#isOffsetInRow Offset In Row}' attribute. - * - * - * @param value the new value of the 'Offset In Row' attribute. - * @see #isOffsetInRow() - * @generated - */ - void setOffsetInRow(boolean value); - } // Row diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Seat.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Seat.java index a1636d61..27e719d0 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Seat.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Seat.java @@ -20,7 +20,7 @@ *
  • {@link net.bhl.cdt.paxelerate.model.Seat#getRow Row}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Seat#isOccupied Occupied}
  • *
  • {@link net.bhl.cdt.paxelerate.model.Seat#getPassenger Passenger}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.Seat#isCurrentlyFolded Currently Folded}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.Seat#getLayoutConcept Layout Concept}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeat() @@ -211,30 +211,33 @@ public interface Seat extends PhysicalObject { void setPassenger(Passenger value); /** - * Returns the value of the 'Currently Folded' attribute. - * The default value is "false". + * Returns the value of the 'Layout Concept' attribute. + * The default value is "Default". + * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.LayoutConcept}. * *

    - * If the meaning of the 'Currently Folded' attribute isn't clear, + * If the meaning of the 'Layout Concept' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Currently Folded' attribute. - * @see #setCurrentlyFolded(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeat_CurrentlyFolded() - * @model default="false" + * @return the value of the 'Layout Concept' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #setLayoutConcept(LayoutConcept) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeat_LayoutConcept() + * @model default="Default" required="true" * @generated */ - boolean isCurrentlyFolded(); + LayoutConcept getLayoutConcept(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Seat#isCurrentlyFolded Currently Folded}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.Seat#getLayoutConcept Layout Concept}' attribute. * * - * @param value the new value of the 'Currently Folded' attribute. - * @see #isCurrentlyFolded() + * @param value the new value of the 'Layout Concept' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #getLayoutConcept() * @generated */ - void setCurrentlyFolded(boolean value); + void setLayoutConcept(LayoutConcept value); } // Seat diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatLetter.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatLetter.java deleted file mode 100644 index 2379abfb..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatLetter.java +++ /dev/null @@ -1,316 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -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 'Seat Letter', - * and utility methods for working with them. - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeatLetter() - * @model - * @generated - */ -public enum SeatLetter implements Enumerator { - /** - * The 'A' literal object. - * - * - * @see #A_VALUE - * @generated - * @ordered - */ - A(0, "A", "A"), - - /** - * The 'B' literal object. - * - * - * @see #B_VALUE - * @generated - * @ordered - */ - B(1, "B", "B"), - - /** - * The 'C' literal object. - * - * - * @see #C_VALUE - * @generated - * @ordered - */ - C(2, "C", "C"), - - /** - * The 'D' literal object. - * - * - * @see #D_VALUE - * @generated - * @ordered - */ - D(3, "D", "D"), - - /** - * The 'E' literal object. - * - * - * @see #E_VALUE - * @generated - * @ordered - */ - E(4, "E", "E"), - - /** - * The 'F' literal object. - * - * - * @see #F_VALUE - * @generated - * @ordered - */ - F(5, "F", "F"); - - /** - * The 'A' literal value. - * - *

    - * If the meaning of 'A' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #A - * @model - * @generated - * @ordered - */ - public static final int A_VALUE = 0; - - /** - * The 'B' literal value. - * - *

    - * If the meaning of 'B' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #B - * @model - * @generated - * @ordered - */ - public static final int B_VALUE = 1; - - /** - * The 'C' literal value. - * - *

    - * If the meaning of 'C' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #C - * @model - * @generated - * @ordered - */ - public static final int C_VALUE = 2; - - /** - * The 'D' literal value. - * - *

    - * If the meaning of 'D' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #D - * @model - * @generated - * @ordered - */ - public static final int D_VALUE = 3; - - /** - * The 'E' literal value. - * - *

    - * If the meaning of 'E' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #E - * @model - * @generated - * @ordered - */ - public static final int E_VALUE = 4; - - /** - * The 'F' literal value. - * - *

    - * If the meaning of 'F' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #F - * @model - * @generated - * @ordered - */ - public static final int F_VALUE = 5; - - /** - * An array of all the 'Seat Letter' enumerators. - * - * - * @generated - */ - private static final SeatLetter[] VALUES_ARRAY = - new SeatLetter[] { - A, - B, - C, - D, - E, - F, - }; - - /** - * A public read-only list of all the 'Seat Letter' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Seat Letter' literal with the specified literal value. - * - * - * @generated - */ - public static SeatLetter get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SeatLetter result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Seat Letter' literal with the specified name. - * - * - * @generated - */ - public static SeatLetter getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SeatLetter result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Seat Letter' literal with the specified integer value. - * - * - * @generated - */ - public static SeatLetter get(int value) { - switch (value) { - case A_VALUE: return A; - case B_VALUE: return B; - case C_VALUE: return C; - case D_VALUE: return D; - case E_VALUE: return E; - case F_VALUE: return F; - } - 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 SeatLetter(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //SeatLetter diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatProperties.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatProperties.java deleted file mode 100644 index af1912c9..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatProperties.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - -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 'Seat Properties', - * and utility methods for working with them. - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeatProperties() - * @model - * @generated - */ -public enum SeatProperties implements Enumerator { - /** - * The 'Width' literal object. - * - * - * @see #WIDTH_VALUE - * @generated - * @ordered - */ - WIDTH(50, "width", "width"), - - /** - * The 'Length' literal object. - * - * - * @see #LENGTH_VALUE - * @generated - * @ordered - */ - LENGTH(100, "length", "length"); - - /** - * The 'Width' literal value. - * - *

    - * If the meaning of 'Width' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #WIDTH - * @model name="width" - * @generated - * @ordered - */ - public static final int WIDTH_VALUE = 50; - - /** - * The 'Length' literal value. - * - *

    - * If the meaning of 'Length' literal object isn't clear, - * there really should be more of a description here... - *

    - * - * @see #LENGTH - * @model name="length" - * @generated - * @ordered - */ - public static final int LENGTH_VALUE = 100; - - /** - * An array of all the 'Seat Properties' enumerators. - * - * - * @generated - */ - private static final SeatProperties[] VALUES_ARRAY = - new SeatProperties[] { - WIDTH, - LENGTH, - }; - - /** - * A public read-only list of all the 'Seat Properties' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Seat Properties' literal with the specified literal value. - * - * - * @generated - */ - public static SeatProperties get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SeatProperties result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Seat Properties' literal with the specified name. - * - * - * @generated - */ - public static SeatProperties getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SeatProperties result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Seat Properties' literal with the specified integer value. - * - * - * @generated - */ - public static SeatProperties get(int value) { - switch (value) { - case WIDTH_VALUE: return WIDTH; - case LENGTH_VALUE: return LENGTH; - } - 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 SeatProperties(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //SeatProperties diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatType.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatType.java new file mode 100644 index 00000000..cd0f86e4 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SeatType.java @@ -0,0 +1,266 @@ +/** + */ +package net.bhl.cdt.paxelerate.model; + +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 'Seat Type', + * and utility methods for working with them. + * + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSeatType() + * @model + * @generated + */ +public enum SeatType implements Enumerator { + /** + * The 'Default' literal object. + * + * + * @see #DEFAULT_VALUE + * @generated + * @ordered + */ + DEFAULT(0, "Default", "Default"), + + /** + * The 'Folded Away' literal object. + * + * + * @see #FOLDED_AWAY_VALUE + * @generated + * @ordered + */ + FOLDED_AWAY(1, "FoldedAway", "FoldedAway"), + + /** + * The 'Folded Upwards' literal object. + * + * + * @see #FOLDED_UPWARDS_VALUE + * @generated + * @ordered + */ + FOLDED_UPWARDS(2, "FoldedUpwards", "FoldedUpwards"), /** + * The 'Bring Your Own' literal object. + * + * + * @see #BRING_YOUR_OWN_VALUE + * @generated + * @ordered + */ + BRING_YOUR_OWN(3, "BringYourOwn", "BringYourOwn"); + + /** + * The 'Default' literal value. + * + *

    + * If the meaning of 'Default' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #DEFAULT + * @model name="Default" + * @generated + * @ordered + */ + public static final int DEFAULT_VALUE = 0; + + /** + * The 'Folded Away' literal value. + * + *

    + * If the meaning of 'Folded Away' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #FOLDED_AWAY + * @model name="FoldedAway" + * @generated + * @ordered + */ + public static final int FOLDED_AWAY_VALUE = 1; + + /** + * The 'Folded Upwards' literal value. + * + *

    + * If the meaning of 'Folded Upwards' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #FOLDED_UPWARDS + * @model name="FoldedUpwards" + * @generated + * @ordered + */ + public static final int FOLDED_UPWARDS_VALUE = 2; + + /** + * The 'Bring Your Own' literal value. + * + *

    + * If the meaning of 'Bring Your Own' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #BRING_YOUR_OWN + * @model name="BringYourOwn" + * @generated + * @ordered + */ + public static final int BRING_YOUR_OWN_VALUE = 3; + + /** + * An array of all the 'Seat Type' enumerators. + * + * + * @generated + */ + private static final SeatType[] VALUES_ARRAY = + new SeatType[] { + DEFAULT, + FOLDED_AWAY, + FOLDED_UPWARDS, + BRING_YOUR_OWN, + }; + + /** + * A public read-only list of all the 'Seat Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Seat Type' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static SeatType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SeatType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Seat Type' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static SeatType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SeatType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Seat Type' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static SeatType get(int value) { + switch (value) { + case DEFAULT_VALUE: return DEFAULT; + case FOLDED_AWAY_VALUE: return FOLDED_AWAY; + case FOLDED_UPWARDS_VALUE: return FOLDED_UPWARDS; + case BRING_YOUR_OWN_VALUE: return BRING_YOUR_OWN; + } + 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 SeatType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //SeatType diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Sex.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Sex.java index 7a88ca59..9aa97a00 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Sex.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/Sex.java @@ -142,22 +142,25 @@ public static Sex get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -175,8 +178,10 @@ private Sex(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -184,8 +189,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -193,8 +200,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationProperties.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationProperties.java index 5feabcf2..42b09317 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationProperties.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationProperties.java @@ -14,21 +14,26 @@ * The following features are supported: *

    *
      - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSimulateWithoutUI Simulate Without UI}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getNumberOfSimulationLoops Number Of Simulation Loops}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isRandomSortBetweenLoops Random Sort Between Loops}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUseFoldableSeats Use Foldable Seats}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isBringYourOwnSeat Bring Your Own Seat}
    • *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getResults Results}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting Sorting}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor Simulation Speed Factor}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceProcessTime Seat Interference Process Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault Thread Sleep Time Default}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode Developer Mode}
    • *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLuggageProperties Luggage Properties}
    • *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengerProperties Passenger Properties}
    • *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getPassengersBoardingPerMinute Passengers Boarding Per Minute}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLayoutConcept Layout Concept}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getScale Scale}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSimulationSpeedFactor Simulation Speed Factor}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUsePresetSettings Use Preset Settings}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSimulateWithoutUI Simulate Without UI}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getNumberOfSimulationLoops Number Of Simulation Loops}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDeveloperMode Developer Mode}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDataExport Data Export}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDisplayMap Display Map}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSortPassengerBetweenLoops Sort Passenger Between Loops}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSorting Sorting}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getThreadSleepTimeDefault Thread Sleep Time Default}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeMean Sideways Foldabe Seat Popup Time Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeDeviation Sideways Foldabe Seat Popup Time Deviation}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeMean Lifting Seat Pan Popup Time Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeDeviation Lifting Seat Pan Popup Time Deviation}
    • *
    * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties() @@ -37,139 +42,112 @@ */ public interface SimulationProperties extends EObject { /** - * Returns the value of the 'Simulate Without UI' attribute. - * The default value is "false". - * - *

    - * If the meaning of the 'Simulate Without UI' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Simulate Without UI' attribute. - * @see #setSimulateWithoutUI(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SimulateWithoutUI() - * @model default="false" - * @generated - */ - boolean isSimulateWithoutUI(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSimulateWithoutUI Simulate Without UI}' attribute. - * - * - * @param value the new value of the 'Simulate Without UI' attribute. - * @see #isSimulateWithoutUI() - * @generated - */ - void setSimulateWithoutUI(boolean value); - - /** - * Returns the value of the 'Number Of Simulation Loops' attribute. - * The default value is "1". + * Returns the value of the 'Scale' attribute. + * The default value is "10". * *

    - * If the meaning of the 'Number Of Simulation Loops' attribute isn't clear, + * If the meaning of the 'Scale' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Number Of Simulation Loops' attribute. - * @see #setNumberOfSimulationLoops(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_NumberOfSimulationLoops() - * @model default="1" + * @return the value of the 'Scale' attribute. + * @see #setScale(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_Scale() + * @model default="10" * @generated */ - int getNumberOfSimulationLoops(); + int getScale(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getNumberOfSimulationLoops Number Of Simulation Loops}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getScale Scale}' attribute. * * - * @param value the new value of the 'Number Of Simulation Loops' attribute. - * @see #getNumberOfSimulationLoops() + * @param value the new value of the 'Scale' attribute. + * @see #getScale() * @generated */ - void setNumberOfSimulationLoops(int value); + void setScale(int value); /** - * Returns the value of the 'Random Sort Between Loops' attribute. - * The default value is "true". + * Returns the value of the 'Use Preset Settings' attribute. + * The default value is "false". * *

    - * If the meaning of the 'Random Sort Between Loops' attribute isn't clear, + * If the meaning of the 'Use Preset Settings' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Random Sort Between Loops' attribute. - * @see #setRandomSortBetweenLoops(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_RandomSortBetweenLoops() - * @model default="true" + * @return the value of the 'Use Preset Settings' attribute. + * @see #setUsePresetSettings(boolean) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_UsePresetSettings() + * @model default="false" * @generated */ - boolean isRandomSortBetweenLoops(); + boolean isUsePresetSettings(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isRandomSortBetweenLoops Random Sort Between Loops}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUsePresetSettings Use Preset Settings}' attribute. * * - * @param value the new value of the 'Random Sort Between Loops' attribute. - * @see #isRandomSortBetweenLoops() + * @param value the new value of the 'Use Preset Settings' attribute. + * @see #isUsePresetSettings() * @generated */ - void setRandomSortBetweenLoops(boolean value); + void setUsePresetSettings(boolean value); /** - * Returns the value of the 'Use Foldable Seats' attribute. + * Returns the value of the 'Simulate Without UI' attribute. * The default value is "false". * *

    - * If the meaning of the 'Use Foldable Seats' attribute isn't clear, + * If the meaning of the 'Simulate Without UI' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Use Foldable Seats' attribute. - * @see #setUseFoldableSeats(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_UseFoldableSeats() + * @return the value of the 'Simulate Without UI' attribute. + * @see #setSimulateWithoutUI(boolean) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SimulateWithoutUI() * @model default="false" * @generated */ - boolean isUseFoldableSeats(); + boolean isSimulateWithoutUI(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isUseFoldableSeats Use Foldable Seats}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSimulateWithoutUI Simulate Without UI}' attribute. * * - * @param value the new value of the 'Use Foldable Seats' attribute. - * @see #isUseFoldableSeats() + * @param value the new value of the 'Simulate Without UI' attribute. + * @see #isSimulateWithoutUI() * @generated */ - void setUseFoldableSeats(boolean value); + void setSimulateWithoutUI(boolean value); /** - * Returns the value of the 'Bring Your Own Seat' attribute. - * The default value is "false". + * Returns the value of the 'Number Of Simulation Loops' attribute. + * The default value is "1". * *

    - * If the meaning of the 'Bring Your Own Seat' attribute isn't clear, + * If the meaning of the 'Number Of Simulation Loops' attribute isn't clear, * there really should be more of a description here... *

    * - * @return the value of the 'Bring Your Own Seat' attribute. - * @see #setBringYourOwnSeat(boolean) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_BringYourOwnSeat() - * @model default="false" + * @return the value of the 'Number Of Simulation Loops' attribute. + * @see #setNumberOfSimulationLoops(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_NumberOfSimulationLoops() + * @model default="1" * @generated */ - boolean isBringYourOwnSeat(); + int getNumberOfSimulationLoops(); /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isBringYourOwnSeat Bring Your Own Seat}' attribute. + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getNumberOfSimulationLoops Number Of Simulation Loops}' attribute. * * - * @param value the new value of the 'Bring Your Own Seat' attribute. - * @see #isBringYourOwnSeat() + * @param value the new value of the 'Number Of Simulation Loops' attribute. + * @see #getNumberOfSimulationLoops() * @generated */ - void setBringYourOwnSeat(boolean value); + void setNumberOfSimulationLoops(int value); /** * Returns the value of the 'Results' reference list. @@ -218,7 +196,7 @@ public interface SimulationProperties extends EObject { /** * Returns the value of the 'Simulation Speed Factor' attribute. - * The default value is "10". + * The default value is "5". * *

    * If the meaning of the 'Simulation Speed Factor' attribute isn't clear, @@ -228,7 +206,7 @@ public interface SimulationProperties extends EObject { * @return the value of the 'Simulation Speed Factor' attribute. * @see #setSimulationSpeedFactor(int) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SimulationSpeedFactor() - * @model default="10" + * @model default="5" * @generated */ int getSimulationSpeedFactor(); @@ -243,60 +221,6 @@ public interface SimulationProperties extends EObject { */ void setSimulationSpeedFactor(int value); - /** - * Returns the value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. - * The default value is "3". - * - *

    - * If the meaning of the 'Seat Interference Standing Up Passenger Waiting Time' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. - * @see #setSeatInterferenceStandingUpPassengerWaitingTime(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SeatInterferenceStandingUpPassengerWaitingTime() - * @model default="3" - * @generated - */ - int getSeatInterferenceStandingUpPassengerWaitingTime(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}' attribute. - * - * - * @param value the new value of the 'Seat Interference Standing Up Passenger Waiting Time' attribute. - * @see #getSeatInterferenceStandingUpPassengerWaitingTime() - * @generated - */ - void setSeatInterferenceStandingUpPassengerWaitingTime(int value); - - /** - * Returns the value of the 'Seat Interference Process Time' attribute. - * The default value is "7". - * - *

    - * If the meaning of the 'Seat Interference Process Time' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Seat Interference Process Time' attribute. - * @see #setSeatInterferenceProcessTime(int) - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SeatInterferenceProcessTime() - * @model default="7" - * @generated - */ - int getSeatInterferenceProcessTime(); - - /** - * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSeatInterferenceProcessTime Seat Interference Process Time}' attribute. - * - * - * @param value the new value of the 'Seat Interference Process Time' attribute. - * @see #getSeatInterferenceProcessTime() - * @generated - */ - void setSeatInterferenceProcessTime(int value); - /** * Returns the value of the 'Thread Sleep Time Default' attribute. * The default value is "10". @@ -326,7 +250,7 @@ public interface SimulationProperties extends EObject { /** * Returns the value of the 'Developer Mode' attribute. - * The default value is "false". + * The default value is "true". * *

    * If the meaning of the 'Developer Mode' attribute isn't clear, @@ -336,7 +260,7 @@ public interface SimulationProperties extends EObject { * @return the value of the 'Developer Mode' attribute. * @see #setDeveloperMode(boolean) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_DeveloperMode() - * @model default="false" + * @model default="true" * @generated */ boolean isDeveloperMode(); @@ -351,6 +275,33 @@ public interface SimulationProperties extends EObject { */ void setDeveloperMode(boolean value); + /** + * Returns the value of the 'Sort Passenger Between Loops' attribute. + * The default value is "true". + * + *

    + * If the meaning of the 'Sort Passenger Between Loops' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Sort Passenger Between Loops' attribute. + * @see #setSortPassengerBetweenLoops(boolean) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SortPassengerBetweenLoops() + * @model default="true" + * @generated + */ + boolean isSortPassengerBetweenLoops(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isSortPassengerBetweenLoops Sort Passenger Between Loops}' attribute. + * + * + * @param value the new value of the 'Sort Passenger Between Loops' attribute. + * @see #isSortPassengerBetweenLoops() + * @generated + */ + void setSortPassengerBetweenLoops(boolean value); + /** * Returns the value of the 'Luggage Properties' containment reference. * @@ -430,4 +381,196 @@ public interface SimulationProperties extends EObject { */ void setPassengersBoardingPerMinute(double value); + /** + * Returns the value of the 'Data Export' attribute. + * The default value is "true". + * + *

    + * If the meaning of the 'Data Export' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Data Export' attribute. + * @see #setDataExport(boolean) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_DataExport() + * @model default="true" + * @generated + */ + boolean isDataExport(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDataExport Data Export}' attribute. + * + * + * @param value the new value of the 'Data Export' attribute. + * @see #isDataExport() + * @generated + */ + void setDataExport(boolean value); + + /** + * Returns the value of the 'Display Map' attribute. + * The default value is "false". + * + *

    + * If the meaning of the 'Display Map' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Display Map' attribute. + * @see #setDisplayMap(boolean) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_DisplayMap() + * @model default="false" + * @generated + */ + boolean isDisplayMap(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#isDisplayMap Display Map}' attribute. + * + * + * @param value the new value of the 'Display Map' attribute. + * @see #isDisplayMap() + * @generated + */ + void setDisplayMap(boolean value); + + /** + * Returns the value of the 'Sideways Foldabe Seat Popup Time Mean' attribute. + * The default value is "5". + * + *

    + * If the meaning of the 'Sideways Foldabe Seat Popup Time Mean' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Sideways Foldabe Seat Popup Time Mean' attribute. + * @see #setSidewaysFoldabeSeatPopupTimeMean(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SidewaysFoldabeSeatPopupTimeMean() + * @model default="5" + * @generated + */ + double getSidewaysFoldabeSeatPopupTimeMean(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeMean Sideways Foldabe Seat Popup Time Mean}' attribute. + * + * + * @param value the new value of the 'Sideways Foldabe Seat Popup Time Mean' attribute. + * @see #getSidewaysFoldabeSeatPopupTimeMean() + * @generated + */ + void setSidewaysFoldabeSeatPopupTimeMean(double value); + + /** + * Returns the value of the 'Sideways Foldabe Seat Popup Time Deviation' attribute. + * The default value is "1". + * + *

    + * If the meaning of the 'Sideways Foldabe Seat Popup Time Deviation' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Sideways Foldabe Seat Popup Time Deviation' attribute. + * @see #setSidewaysFoldabeSeatPopupTimeDeviation(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_SidewaysFoldabeSeatPopupTimeDeviation() + * @model default="1" + * @generated + */ + double getSidewaysFoldabeSeatPopupTimeDeviation(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getSidewaysFoldabeSeatPopupTimeDeviation Sideways Foldabe Seat Popup Time Deviation}' attribute. + * + * + * @param value the new value of the 'Sideways Foldabe Seat Popup Time Deviation' attribute. + * @see #getSidewaysFoldabeSeatPopupTimeDeviation() + * @generated + */ + void setSidewaysFoldabeSeatPopupTimeDeviation(double value); + + /** + * Returns the value of the 'Lifting Seat Pan Popup Time Mean' attribute. + * The default value is "2". + * + *

    + * If the meaning of the 'Lifting Seat Pan Popup Time Mean' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Lifting Seat Pan Popup Time Mean' attribute. + * @see #setLiftingSeatPanPopupTimeMean(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_LiftingSeatPanPopupTimeMean() + * @model default="2" + * @generated + */ + double getLiftingSeatPanPopupTimeMean(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeMean Lifting Seat Pan Popup Time Mean}' attribute. + * + * + * @param value the new value of the 'Lifting Seat Pan Popup Time Mean' attribute. + * @see #getLiftingSeatPanPopupTimeMean() + * @generated + */ + void setLiftingSeatPanPopupTimeMean(double value); + + /** + * Returns the value of the 'Lifting Seat Pan Popup Time Deviation' attribute. + * The default value is "0.5". + * + *

    + * If the meaning of the 'Lifting Seat Pan Popup Time Deviation' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Lifting Seat Pan Popup Time Deviation' attribute. + * @see #setLiftingSeatPanPopupTimeDeviation(double) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_LiftingSeatPanPopupTimeDeviation() + * @model default="0.5" + * @generated + */ + double getLiftingSeatPanPopupTimeDeviation(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLiftingSeatPanPopupTimeDeviation Lifting Seat Pan Popup Time Deviation}' attribute. + * + * + * @param value the new value of the 'Lifting Seat Pan Popup Time Deviation' attribute. + * @see #getLiftingSeatPanPopupTimeDeviation() + * @generated + */ + void setLiftingSeatPanPopupTimeDeviation(double value); + + /** + * Returns the value of the 'Layout Concept' attribute. + * The default value is "Default". + * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.LayoutConcept}. + * + *

    + * If the meaning of the 'Layout Concept' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Layout Concept' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #setLayoutConcept(LayoutConcept) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationProperties_LayoutConcept() + * @model default="Default" required="true" + * @generated + */ + LayoutConcept getLayoutConcept(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationProperties#getLayoutConcept Layout Concept}' attribute. + * + * + * @param value the new value of the 'Layout Concept' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #getLayoutConcept() + * @generated + */ + void setLayoutConcept(LayoutConcept value); + } // SimulationProperties diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationResult.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationResult.java index 7f69458e..0c41db83 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationResult.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SimulationResult.java @@ -21,6 +21,9 @@ *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getId Id}
  • *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getDate Date}
  • *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getBoardingTimeString Boarding Time String}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingSkipped Waymaking Skipped}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingCompleted Waymaking Completed}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.SimulationResult#getLayoutConceptType Layout Concept Type}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationResult() @@ -184,4 +187,86 @@ public interface SimulationResult extends EObject { */ void setBoardingTimeString(String value); + /** + * Returns the value of the 'Waymaking Skipped' attribute. + * + *

    + * If the meaning of the 'Waymaking Skipped' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Waymaking Skipped' attribute. + * @see #setWaymakingSkipped(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationResult_WaymakingSkipped() + * @model + * @generated + */ + int getWaymakingSkipped(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingSkipped Waymaking Skipped}' attribute. + * + * + * @param value the new value of the 'Waymaking Skipped' attribute. + * @see #getWaymakingSkipped() + * @generated + */ + void setWaymakingSkipped(int value); + + /** + * Returns the value of the 'Waymaking Completed' attribute. + * + *

    + * If the meaning of the 'Waymaking Completed' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Waymaking Completed' attribute. + * @see #setWaymakingCompleted(int) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationResult_WaymakingCompleted() + * @model + * @generated + */ + int getWaymakingCompleted(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getWaymakingCompleted Waymaking Completed}' attribute. + * + * + * @param value the new value of the 'Waymaking Completed' attribute. + * @see #getWaymakingCompleted() + * @generated + */ + void setWaymakingCompleted(int value); + + /** + * Returns the value of the 'Layout Concept Type' attribute. + * The default value is "Default". + * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.LayoutConcept}. + * + *

    + * If the meaning of the 'Layout Concept Type' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Layout Concept Type' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #setLayoutConceptType(LayoutConcept) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getSimulationResult_LayoutConceptType() + * @model default="Default" required="true" + * @generated + */ + LayoutConcept getLayoutConceptType(); + + /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.SimulationResult#getLayoutConceptType Layout Concept Type}' attribute. + * + * + * @param value the new value of the 'Layout Concept Type' attribute. + * @see net.bhl.cdt.paxelerate.model.LayoutConcept + * @see #getLayoutConceptType() + * @generated + */ + void setLayoutConceptType(LayoutConcept value); + } // SimulationResult diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SortingStyle.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SortingStyle.java index d41cea0c..b9788997 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SortingStyle.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/SortingStyle.java @@ -169,22 +169,25 @@ public static SortingStyle get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -202,8 +205,10 @@ private SortingStyle(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -211,8 +216,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -220,8 +227,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StairwayDirection.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StairwayDirection.java index ec483ce9..3a350e4f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StairwayDirection.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StairwayDirection.java @@ -142,22 +142,25 @@ public static StairwayDirection get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -175,8 +178,10 @@ private StairwayDirection(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -184,8 +189,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -193,8 +200,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StandardDoor.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StandardDoor.java deleted file mode 100644 index 06efca36..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/StandardDoor.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model; - - -/** - * - * A representation of the model object 'Standard Door'. - * - * - * - * @see net.bhl.cdt.paxelerate.model.CabinPackage#getStandardDoor() - * @model - * @generated - */ -public interface StandardDoor extends Door { -} // StandardDoor diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelClass.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelClass.java index 7e87d7fd..55d15652 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelClass.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelClass.java @@ -27,10 +27,11 @@ *
  • {@link net.bhl.cdt.paxelerate.model.TravelClass#getName Name}
  • *
  • {@link net.bhl.cdt.paxelerate.model.TravelClass#getRowStructure Row Structure}
  • *
  • {@link net.bhl.cdt.paxelerate.model.TravelClass#getLoadFactor Load Factor}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.TravelClass#getTravelOption Travel Option}
  • * * * @see net.bhl.cdt.paxelerate.model.CabinPackage#getTravelClass() - * @model abstract="true" + * @model * @generated */ public interface TravelClass extends EObject { @@ -275,12 +276,12 @@ public interface TravelClass extends EObject { *

    * * @return the value of the 'Load Factor' attribute. - * @see #setLoadFactor(int) + * @see #setLoadFactor(double) * @see net.bhl.cdt.paxelerate.model.CabinPackage#getTravelClass_LoadFactor() * @model default="0" * @generated */ - int getLoadFactor(); + double getLoadFactor(); /** * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.TravelClass#getLoadFactor Load Factor}' attribute. @@ -290,22 +291,60 @@ public interface TravelClass extends EObject { * @see #getLoadFactor() * @generated */ - void setLoadFactor(int value); + void setLoadFactor(double value); /** + * Returns the value of the 'Travel Option' attribute. + * The default value is "EconomyClass". + * The literals are from the enumeration {@link net.bhl.cdt.paxelerate.model.TravelOption}. * + *

    + * If the meaning of the 'Travel Option' attribute isn't clear, + * there really should be more of a description here... + *

    * - * @model + * @return the value of the 'Travel Option' attribute. + * @see net.bhl.cdt.paxelerate.model.TravelOption + * @see #setTravelOption(TravelOption) + * @see net.bhl.cdt.paxelerate.model.CabinPackage#getTravelClass_TravelOption() + * @model default="EconomyClass" required="true" * @generated */ - boolean tooManyPassengers(DiagnosticChain chain, Map context); + TravelOption getTravelOption(); /** + * Sets the value of the '{@link net.bhl.cdt.paxelerate.model.TravelClass#getTravelOption Travel Option}' attribute. * * - * @model + * @param value the new value of the 'Travel Option' attribute. + * @see net.bhl.cdt.paxelerate.model.TravelOption + * @see #getTravelOption() * @generated */ + void setTravelOption(TravelOption value); + + /** + * + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful + * @model + * @generated + */ + boolean tooManyPassengers(DiagnosticChain chain, Map context); + + /** + * + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful + * @model + * @generated + */ boolean wrongRowStructure(DiagnosticChain chain, Map context); } // TravelClass diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelOption.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelOption.java index 4d58150f..29751bad 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelOption.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/TravelOption.java @@ -196,22 +196,25 @@ public static TravelOption get(int value) { /** * - * - * @generated + * . + * + * @generated */ private final int value; /** * - * - * @generated + * . + * + * @generated */ private final String name; /** * - * - * @generated + * . + * + * @generated */ private final String literal; @@ -229,8 +232,10 @@ private TravelOption(int value, String name, String literal) { /** * - * - * @generated + * . + * + * @return the value + * @generated */ public int getValue() { return value; @@ -238,8 +243,10 @@ public int getValue() { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -247,8 +254,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @return the literal + * @generated */ public String getLiteral() { return literal; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinAdapterFactory.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinAdapterFactory.java index 17819abf..7258f587 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinAdapterFactory.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinAdapterFactory.java @@ -10,8 +10,14 @@ import net.bhl.cdt.paxelerate.model.Cabin; +/** + * A factory for creating CabinAdapter objects. + */ public class CabinAdapterFactory implements IAdapterFactory { + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) + */ @Override public Object getAdapter(Object adaptableObject, Class adapterType) { if (adapterType == IPropertySource.class && adaptableObject instanceof Cabin) { @@ -20,9 +26,12 @@ public Object getAdapter(Object adaptableObject, Class adapterType) { return null; } + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() + */ @Override public Class[] getAdapterList() { - // TODO Auto-generated method stub + // Auto-generated method stub return null; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinPropertySource.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinPropertySource.java index ed53e55a..44675cbb 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinPropertySource.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/adapters/CabinPropertySource.java @@ -11,24 +11,42 @@ import net.bhl.cdt.paxelerate.model.Cabin; +/** + * The Class CabinPropertySource. + */ public class CabinPropertySource implements IPropertySource { + /** The cabin. */ private final Cabin cabin; + /** + * Instantiates a new cabin property source. + * + * @param cabin the cabin + */ public CabinPropertySource(Cabin cabin) { this.cabin = cabin; } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object) + */ @Override public boolean isPropertySet(Object id) { return false; } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue() + */ @Override public Object getEditableValue() { return this; } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() + */ @Override public IPropertyDescriptor[] getPropertyDescriptors() { @@ -36,6 +54,9 @@ public IPropertyDescriptor[] getPropertyDescriptors() { new TextPropertyDescriptor("description", "Description") }; } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object) + */ @Override public Object getPropertyValue(Object id) { if (id.equals("summary")) { @@ -47,11 +68,17 @@ public Object getPropertyValue(Object id) { return null; } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object) + */ @Override public void resetPropertyValue(Object id) { } + /* (non-Javadoc) + * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object) + */ @Override public void setPropertyValue(Object id, Object value) { String s = (String) value; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Agent.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Agent.java index 68732e1e..763f6197 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Agent.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Agent.java @@ -9,9 +9,11 @@ import java.util.ArrayList; import java.util.ConcurrentModificationException; +import org.eclipse.swt.SWTException; + import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.CabinFactory; -import net.bhl.cdt.paxelerate.model.LuggageProperties; +import net.bhl.cdt.paxelerate.model.LayoutConcept; import net.bhl.cdt.paxelerate.model.LuggageSize; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.PassengerMood; @@ -19,7 +21,7 @@ import net.bhl.cdt.paxelerate.model.SimulationProperties; import net.bhl.cdt.paxelerate.model.astar.AStarHelper; import net.bhl.cdt.paxelerate.model.astar.Core; -import net.bhl.cdt.paxelerate.model.astar.CostMap; +import net.bhl.cdt.paxelerate.model.astar.Costmap; import net.bhl.cdt.paxelerate.model.astar.Node; import net.bhl.cdt.paxelerate.model.astar.Node.Property; import net.bhl.cdt.paxelerate.model.astar.Path; @@ -28,6 +30,7 @@ import net.bhl.cdt.paxelerate.model.util.Rotator; import net.bhl.cdt.paxelerate.util.math.GaussOptions; import net.bhl.cdt.paxelerate.util.math.GaussianRandom; +import net.bhl.cdt.paxelerate.util.math.MathHelper; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; import net.bhl.cdt.paxelerate.util.time.StopWatch; @@ -36,75 +39,187 @@ * This class is the agent object. It walks a specific calculated path and * reacts to obstacles occurring on the go. * - * @author marc.engelmann + * @author marc.engelmann, michael.schmidt + * @version 1.2 + * @since 0.5 * */ public class Agent extends Subject implements Runnable { + + /** The thread. */ private Thread thread; + + /** The path. */ private Path path; + /** The Constant PIXELS_FOR_WAY. */ private final static int PIXELS_FOR_WAY = 7; + /** The current position. */ private Vector start, goal, desiredPosition, currentPosition; - private CostMap mutableCostMap; - private int numbOfInterupts = 0, waycounter = 0; + /** The mutable cost map. */ + private Costmap mutableCostMap; + + /** The dim. */ + private int numbOfInterupts = 0, waycounter = 0, dim = 2; - private double distance; + /** The way making skipped. */ + private int wayMakingSkipped = 0; + + /** The way making foldable seat skipped. */ + private int wayMakingFoldableSeatSkipped = 0; + /** The total waiting time. */ + private long totalWaitingTime = 0; + + /** The moved once. */ private boolean alreadyStowed = false, waitingCompleted = false, - initialized = false, exitTheMainLoop = false, movedOnce = false;; + initialized = false, exitTheMainLoop = false, movedOnce = false, + foldingSeats = false, stowingAtAisleSeat = false, + waitingAtAisleSeat = false, aisleSeat = false; + /** The stopwatch. */ private StopWatch stopwatch = new StopWatch(); + + /** The pathlist. */ private ArrayList pathlist = new ArrayList(); + /** The agent mood. */ private AgentMood agentMood; + + /** The blocking agent. */ private Agent blockingAgent; + /** The final costmap. */ /* constant values */ - private final CostMap finalCostmap; + + private final Costmap finalCostmap; + + /** The passenger. */ private final Passenger passenger; + /** The scale. */ private final int scale; + + /** The developer mode. */ + private final boolean developerMode; + + /** The waiting time after collision. */ + private final double waitingTimeAfterCollision; + + /** The mode. */ private final AgentMode mode; + /** The current state. */ private State currentState; + /** The passenger i let in the row. */ private Passenger thePassengerILetInTheRow; - private LuggageProperties simLuggageSettings; - + /** The sim settings. */ private SimulationProperties simSettings; + /** The last move time. */ + private long lastMoveTime; + + /** + * Gets the the passenger i let in the row. + * + * @return the the passenger i let in the row + */ public Passenger getThePassengerILetInTheRow() { return thePassengerILetInTheRow; } + /** + * The Enum AgentMode. + * + * @author marc.engelmann + */ public static enum AgentMode { - GO_TO_SEAT, MAKE_WAY + + /** The go to seat. */ + GO_TO_SEAT, + /** The make way. */ + MAKE_WAY } + /** + * The Enum State. + * + * @author marc.engelmann + */ public static enum State { - FOLLOWING_PATH, WAITING_FOR_ROW_CLEARING, CLEARING_ROW, STOWING_LUGGAGE, PREPARING, QUEUEING_UP, WAITING_FOR_OTHER_PASSENGER_TO_SEAT, RETURNING_TO_SEAT; + + /** The following path. */ + FOLLOWING_PATH, + /** The waiting for row clearing. */ + WAITING_FOR_ROW_CLEARING, + /** The clearing row. */ + CLEARING_ROW, + /** The stowing luggage. */ + STOWING_LUGGAGE, + /** The unfold seat. */ + UNFOLDING_SEAT, + /** The preparing. */ + PREPARING, + /** The queueing up. */ + QUEUEING_UP, + /** The waiting for other passenger to seat. */ + WAITING_FOR_OTHER_PASSENGER_TO_SEAT, + /** The returning to seat. */ + RETURNING_TO_SEAT; + } + + /** + * Gets the last move timestamp. + * + * @return the last move timestamp + */ + public long getLastMoveTimestamp() { + return lastMoveTime; + } + + /** + * Gets the waiting time after collision. + * + * @return the waiting time after collision + */ + public double getWaitingTimeAfterCollision() { + return waitingTimeAfterCollision; + } + + /** + * Gets the cost map. + * + * @return the cost map + */ + public Costmap getCostMap() { + return finalCostmap; } - private int[][] defaultPassengerArea; - private int[][] adaptedPassengerArea; + /** The rotated footprint. */ + private int[][] footprint, rotatedFootprint; /** * This method constructs an agent. - * + * * @param passenger * the passenger which is represented by the agent * @param start * the starting vector * @param goal * the goal vector - * @param scale - * the scale of the simulation + * @param costmap + * the costmap + * @param mode + * the mode + * @param thePassengerILetInTheRow + * the the passenger i let in the row */ public Agent(Passenger passenger, Vector start, Vector goal, - CostMap costmap, AgentMode mode, + Costmap costmap, AgentMode mode, Passenger thePassengerILetInTheRow) { /* assign the initializer values to the objects values */ @@ -112,37 +227,48 @@ public Agent(Passenger passenger, Vector start, Vector goal, this.passenger = passenger; this.start = start; this.goal = goal; - this.scale = SimulationHandler.getCabin().getScale(); + + this.scale = SimulationHandler.getCabin().getSimulationSettings() + .getScale(); + this.finalCostmap = costmap; this.thePassengerILetInTheRow = thePassengerILetInTheRow; this.simSettings = SimulationHandler.getCabin().getSimulationSettings(); - this.simLuggageSettings = SimulationHandler.getCabin() - .getSimulationSettings().getLuggageProperties(); + this.developerMode = simSettings.isDeveloperMode(); + this.foldingSeats = (simSettings + .getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT + || simSettings + .getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS); + this.aisleSeat = "CD".contains(passenger.getSeat().getLetter()); + this.waitingTimeAfterCollision = simSettings.getPassengerProperties() + .getPassivePassengerWaitingTimeAfterCollision(); /* generate a mood for the passenger depending on his presets */ - if (passenger.getPassengerMood() == PassengerMood.AGRESSIVE) { - this.agentMood = new AgressiveMood(this); + if (passenger.getPassengerMood() == PassengerMood.AGGRESSIVE) { + this.agentMood = new AggressiveMood(this); } else if (passenger.getPassengerMood() == PassengerMood.PASSIVE) { this.agentMood = new PassiveMood(this); } // this.agentMood = new AgressiveMood(this); - defaultPassengerArea = new int[passenger.getWidth() - / scale][passenger.getDepth() / scale]; + footprint = new int[passenger.getWidth() / scale][passenger.getDepth() + / scale]; for (int i = 0; i < passenger.getWidth() / scale; i++) { for (int j = 0; j < passenger.getDepth() / scale; j++) { - defaultPassengerArea[i][j] = 1; + footprint[i][j] = 1; } } } + /** The other passengers in row blocking me. */ public ArrayList otherPassengersInRowBlockingMe = new ArrayList(); /** - * - * @return + * Gets the other passengers in row blocking me. + * + * @return the other passengers in row blocking me */ public Passenger getOtherPassengersInRowBlockingMe() { if (!otherPassengersInRowBlockingMe.isEmpty()) { @@ -152,111 +278,310 @@ public Passenger getOtherPassengersInRowBlockingMe() { } } - private int dim = 2; + /** + * Reset agent. + */ + public void resetAgent() { + thread = null; + path = null; + start = null; + goal = null; + desiredPosition = null; + currentPosition = null; + mutableCostMap = null; + thePassengerILetInTheRow = null; + simSettings = null; + + pathlist.clear(); + // finalCostmap = null; + // passenger = null; + } + /** + * Gets the passenger. + * + * @return the passenger + */ public Passenger getPassenger() { return passenger; } + /** + * Sets the current state. + * + * @param status + * the new current state + */ public void setCurrentState(State status) { this.currentState = status; } + /** + * Gets the current state. + * + * @return the current state + */ public State getCurrentState() { return currentState; } + /** + * Gets the agent mode. + * + * @return the agent mode + */ public AgentMode getAgentMode() { return mode; } + /** + * Gets the blocking agent. + * + * @return the blocking agent + */ public Agent getBlockingAgent() { return blockingAgent; } + /** + * Checks if is initialized. + * + * @return true, if is initialized + */ public boolean isInitialized() { return initialized; } + /** + * Sets the initialized. + * + * @param initialized + * the new initialized + */ public void setInitialized(boolean initialized) { this.initialized = initialized; } + /** + * Sets the blocking agent. + * + * @param blockingAgent + * the new blocking agent + */ public void setBlockingAgent(Agent blockingAgent) { this.blockingAgent = blockingAgent; } + /** + * Gets the start. + * + * @return the start + */ public Vector getStart() { return start; } + /** + * Gets the current position. + * + * @return the current position + */ public Vector getCurrentPosition() { return currentPosition; } + /** + * Gets the desired position. + * + * @return the desired position + */ public Vector getDesiredPosition() { return desiredPosition; } + /** + * Gets the goal. + * + * @return the goal + */ public Vector getGoal() { return goal; } + /** + * Did move once. + * + * @return true, if successful + */ public boolean didMoveOnce() { return movedOnce; } + /** + * Increase total waiting time. + * + * @param time the time + */ + private void increaseTotalWaitingTime(long time) { + totalWaitingTime = totalWaitingTime + time; + } + + /** + * Checks for luggage. + * + * @return true, if successful + */ + private boolean hasLuggage() { + return (passenger.getLuggage() != LuggageSize.NONE); + } + /** * This method returns the distance form the seat where PAX is stowing his - * luggage in multiple of the current map scaling - * + * luggage in multiple of the current map scaling. + * * @return distance in multiple of the current map scaling */ private int getLuggageStowDistance() { - distance = (GaussianRandom.gaussianRandom( - simLuggageSettings.getLuggageStowingDistanceFromSeatMean(), - GaussOptions.PERCENT_95, - simLuggageSettings.getLuggageStowingDistanceFromSeatDeviation()) - / scale); - return (int) distance; + return (int) (passenger.getLuggageStowDistance() / scale); } /** - * This method returns if the passenger is ready to stow his luggage - * + * This method returns if the passenger is ready to stow his luggage. + * * @return if the passenger is ready to stow luggage */ public boolean passengerStowsLuggage() { - - /* get the passengers seat */ - Seat seat = this.passenger.getSeatRef(); - /* * return true if the passenger does have luggage and if he is near his * seat */ - return (hasLuggage() && isInXRangeEqual(seat.getXPosition(), - getLuggageStowDistance(), false)); + return (hasLuggage() && isInRangeEqual( + passenger.getSeat().getXPosition(), + desiredPosition.getX() * scale, getLuggageStowDistance())); + } + + /** + * Passenger stows luggage at aisle seat. + * + * @return true, if successful + */ + public boolean passengerStowsLuggageAtAisleSeat() { + int yCoordAisleSeat = 0; + int distanceToAisleSeat = 1; + + for (Seat seat : passenger.getSeat().getRow().getSeats()) { + if ("ABC".contains(passenger.getSeat().getLetter())) { + if ("C".contains(seat.getLetter())) { + yCoordAisleSeat = seat.getYPosition() + + seat.getYDimension() / 2; + } + } else if ("DEF".contains(passenger.getSeat().getLetter())) { + if ("D".contains(seat.getLetter())) { + yCoordAisleSeat = seat.getYPosition() + + seat.getYDimension() / 2; + } + } + } + + return (hasLuggage() && isInRangeSmaller((int) passenger.getPositionY(), + yCoordAisleSeat, distanceToAisleSeat)); + } + + /** + * Passenger wait at aisle seat. + * + * @return true, if successful + */ + public boolean passengerWaitAtAisleSeat() { + int yCoordAisleSeat = 0; + int distanceToAisleSeat = 1; + + for (Seat seat : passenger.getSeat().getRow().getSeats()) { + if ("ABC".contains(passenger.getSeat().getLetter())) { + if ("C".contains(seat.getLetter())) { + yCoordAisleSeat = seat.getYPosition() + + seat.getYDimension() / 2; + } + } else if ("DEF".contains(passenger.getSeat().getLetter())) { + if ("D".contains(seat.getLetter())) { + yCoordAisleSeat = seat.getYPosition() + + seat.getYDimension() / 2; + } + } + } + + return isInRangeSmaller((int) passenger.getPositionY(), yCoordAisleSeat, + distanceToAisleSeat); } - private boolean isInXRangeEqual(int position, int range, boolean print) { + /** + * Checks if is in x/y range equal. + * + * @param position the position + * @param desiredPosition the desired position + * @param range the range + * @return true, if is in x/y range equal + */ + private boolean isInRangeEqual(int position, int desiredPosition, + int range) { - if (Math.abs(desiredPosition.getX() - position / scale) == range) { + if (Math.abs((desiredPosition - position) / scale) == range) { return true; } return false; } - private boolean isInXRangeSmaller(int position, int range, boolean print) { + /** + * Checks if is in x/y range smaller. + * + * @param position the position + * @param desiredPosition the desired position + * @param range the range + * @return true, if is in x/y range smaller + */ + private boolean isInRangeSmaller(int position, int desiredPosition, + int range) { - if (Math.abs(desiredPosition.getX() - position / scale) < range) { + if (Math.abs((desiredPosition - position) / scale) < range) { return true; } return false; } - private boolean hasLuggage() { - return (passenger.getLuggage() != LuggageSize.NONE); + /** + * Checks for foldable seat. + * + * @return true, if successful + */ + private boolean hasFoldableSeat() { + return (passenger.getSeat() + .getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT + || passenger.getSeat() + .getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS); + } + + /** + * Gets the seat folding distance. + * + * @return the seat folding distance + */ + private int getSeatFoldingDistance() { + return 10 / scale; + } + + /** + * Passenger unfolds seat. + * + * @return true, if successful + */ + public boolean passengerUnfoldsSeat() { + /* + * return true if the passenger does have luggage and if he is near his + * seat + */ + return (hasFoldableSeat() && isInRangeEqual( + passenger.getSeat().getXPosition(), + desiredPosition.getX() * scale, getSeatFoldingDistance())); } /** @@ -288,11 +613,8 @@ private synchronized void blockArea(Vector vector, boolean occupy, * check the possibility that the node is already blocked by an agent. * Normally this should never happen. */ - if (SimulationHandler.getMap().getNode(vector) + if (SimulationHandler.getMap().get(vector) .getProperty() == Property.AGENT && occupy) { - - /* Print out if there is an overlap */ - // System.out.println("Node already blocked. Error!"); } /* @@ -305,17 +627,15 @@ private synchronized void blockArea(Vector vector, boolean occupy, /* if you want to rotate only, you can specify the rotation angle */ if (rotateOnly) { - adaptedPassengerArea = Rotator.rotate(rotation, - defaultPassengerArea); + rotatedFootprint = Rotator.rotate(rotation, footprint); /* if you want to do auto rotation, this method is called. */ } else { if (rotationAllowed()) { - adaptedPassengerArea = Rotator.rotate( - AgentFunctions.getRotation(this), - defaultPassengerArea); + rotatedFootprint = Rotator.rotate( + AgentFunctions.getRotation(this), footprint); } else { - adaptedPassengerArea = null; + rotatedFootprint = null; } } @@ -325,8 +645,8 @@ private synchronized void blockArea(Vector vector, boolean occupy, * if no rotation is needed or possible, skip the rotation process and * assign the basic layout to the object. */ - if (adaptedPassengerArea == null) { - adaptedPassengerArea = defaultPassengerArea; + if (rotatedFootprint == null) { + rotatedFootprint = footprint; } /* @@ -334,8 +654,8 @@ private synchronized void blockArea(Vector vector, boolean occupy, * values. */ - double dimension = Math.max(adaptedPassengerArea.length, - adaptedPassengerArea[1].length); + double dimension = Math.max(rotatedFootprint.length, + rotatedFootprint[1].length); /* * this is the dimension you need to go in every direction from the @@ -352,14 +672,14 @@ private synchronized void blockArea(Vector vector, boolean occupy, vector.getY() + y); /* if the point is within the bounds of the passenger area */ - if (x + dim < adaptedPassengerArea.length - && y + dim < adaptedPassengerArea[0].length) { + if (x + dim < rotatedFootprint.length + && y + dim < rotatedFootprint[0].length) { /* * if the passenger area has a passenger located on this * specific node */ - if (adaptedPassengerArea[x + dim][y + dim] == 1) { + if (rotatedFootprint[x + dim][y + dim] == 1) { /* block or deblock the specific node */ AgentMover.blockNode(location, occupy, property, @@ -371,8 +691,8 @@ private synchronized void blockArea(Vector vector, boolean occupy, } /** - * This method is used to rotate the agent! - * + * This method is used to rotate the agent!. + * * @param degrees * is the rotation in degrees */ @@ -416,6 +736,14 @@ public void redefinePathLayout() { /* add the newly calculated path as well */ pathlist.add(path); + + int costOfPaths = 0; + + for (Path path : pathlist) { + costOfPaths += path.getCost(); + } + + passenger.setCostOfPath(costOfPaths); } /** @@ -423,21 +751,30 @@ public void redefinePathLayout() { * there is no overlapping of different agent positions over time. The cost * map is always modified based on the non-editable final cost map * calculated at the beginning. + * + * @throws NullPointerException + * the null pointer exception */ public void findNewPath() throws NullPointerException { + // Path oldPath = null; + // double pathFindingDecisionFactor = 1.1; + /* starts the StopWatch - used for performance testing */ stopwatch.start(); /* reset the mutable CostMap to the original cost map */ mutableCostMap = finalCostmap; - SimulationHandler.getMap().setStartLocation(currentPosition, this); + SimulationHandler.getAreamapHandler().setStartLocation(currentPosition, + this); /* this is only run if its not the initial path finding process */ if (currentPosition != null) { - blockArea(currentPosition, false, false, null); + // // TODO: is this only a "pointer"? + // /* store the old path */ + // oldPath = path; /* this sets the new start of the A* to the current position */ start = currentPosition; @@ -447,11 +784,33 @@ public void findNewPath() throws NullPointerException { } /* run the path finding algorithm */ - Core astar = new Core(SimulationHandler.getMap(), mutableCostMap, this); + Core astar = new Core(SimulationHandler.getAreamapHandler(), + mutableCostMap, this); /* retrieve the path information */ path = astar.getBestPath(); + // System.out.println("old: " + oldPath.getCost() + ", new: " + // + path.getCost() + " diff in %: " + // + oldPath.getCost() / path.getCost() * 100.0); + + // /* this is only run if its not the initial path finding process */ + // if (currentPosition != null) { + // + // /* check if the new path is way more expensive than the old one */ + // + // // TODO: Calulate only the part of the path lying ahead! + // if (oldPath.getCost() * pathFindingDecisionFactor <= path + // .getCost()) { + // + // /* if so, return to the old path */ + // path = oldPath; + // + // /* exit the function */ + // return; + // } + // } + /* * setting the new desired and current positions. This causes a * NullPointerException if no path is found! @@ -459,17 +818,27 @@ public void findNewPath() throws NullPointerException { desiredPosition = path.get(0).getPosition(); + /* this is only run if its not the initial path finding process */ + if (currentPosition != null) + + { + blockArea(currentPosition, false, false, null); + } + if (!initialized) { currentPosition = new Vector2D(0, 0); - } + + /* apply cost the the passenger element */ + passenger.setCostOfPath(path.getCost()); + /* ends the stop watch performance logging */ stopwatch.stop(); } /** - * This method returns the current position of the agent - * + * This method returns the current position of the agent. + * * @return the current position */ public Vector getPosition() { @@ -477,8 +846,9 @@ public Vector getPosition() { } /** - * - * @return + * Goal reached. + * + * @return true, if successful */ private boolean goalReached() { return (desiredPosition.equals(goal)); @@ -498,13 +868,13 @@ private Property nodeBlocked(Vector vector) { int y = dim; - if (passenger.getSeatRef().getXPosition() < passenger.getDoor() + if (passenger.getSeat().getXPosition() < passenger.getDoor() .getXPosition()) { y = -(y + 1); } - Node checkNode = SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX() + x, vector.getY() + y); + Node checkNode = SimulationHandler.getMap().get(vector.getX() + x, + vector.getY() + y); if (checkNode != null) { if (checkNode.getProperty() == Property.AGENT) { @@ -522,7 +892,7 @@ private Property nodeBlocked(Vector vector) { return Property.AGENT; } } - if (checkNode.getProperty() == Property.OBSTACLE) { + if (checkNode.isObstacle()) { return null; } } @@ -531,14 +901,19 @@ private Property nodeBlocked(Vector vector) { } /** - * - * @return + * Gets the path list. + * + * @return the path list */ public ArrayList getPathList() { return pathlist; } - /* check if there is still on passenger seated */ + /** + * check if there is still on passenger seated. + * + * @return true, if successful + */ private boolean otherPassengerStoodUp() { for (Passenger pax : otherPassengersInRowBlockingMe) { if (pax.isIsSeated()) { @@ -549,64 +924,443 @@ private boolean otherPassengerStoodUp() { } /** - * This method is the main path following loop for the agent. + * Anyone near me. + * + * @return true, if successful */ - private void followPath() { - - /* define the try catch loop as main loop */ - mainloop: try { + private boolean anyoneNearMe() { + for (Passenger pax : SimulationHandler.getCabin().getPassengers()) { + if (!pax.isIsSeated()) { + if (pax.getId() != passenger.getId()) { + if (isInRangeSmaller( + SimulationHandler.getAgentByPassenger(pax) + .getCurrentPosition().getX() * scale, + desiredPosition.getX(), 10)) { + return true; + } + } + } + } + return false; + } - /* - * i represents the number of steps taken as well as the current - * step count. The actual position is one step behind i, so i is the - * desired step. - */ - int i = 0; + /** + * Waymaking allowed. + * + * @return true, if successful + */ + private boolean waymakingAllowed() { + if (SimulationHandler.waymakingInRange(passenger)) { + waycounter++; + if (waycounter < 30) { + return false; + } else { + return true; + } + } + return true; + } - /* run the path up to its end */ - while (i < path.getLength()) { + /** + * Waiting for clearing of row. + * + * @return true, if successful + */ + private boolean waitingForClearingOfRow() { - /* - * at the first step, there is no current location but only a - * desired first location. So ignore this at the first loop. - */ - if (i != 0) { + if (isInRangeEqual(passenger.getSeat().getXPosition(), + desiredPosition.getX() * scale, PIXELS_FOR_WAY)) { + if (AgentFunctions.someoneAlreadyInThisPartOfTheRow(this)) { + return true; + } + } - /* - * the current position is the last taken step in the path - */ - currentPosition = path.get(i - 1).getPosition(); + return false; + } - } + /** + * Occupy one step ahead. + */ + private synchronized void occupyOneStepAhead() { + blockArea(currentPosition, false, false, null); + blockArea(desiredPosition, true, false, null); + SimulationHandler.getMap().get(desiredPosition) + .raiseNumberOfOccupations(); + } - if (i == 2) { - movedOnce = true; - } + /** + * Checks if is exit path loop. + * + * @return true, if is exit path loop + */ + public boolean isExitPathLoop() { + return exitTheMainLoop; + } - /* the new planned location is current step in the path */ - desiredPosition = path.get(i).getPosition(); + /** + * Define seated. + * + * @param isSeated + * the is seated + */ + private void defineSeated(boolean isSeated) { - /* check if the desired next step is blocked by someone else */ - Property property = nodeBlocked(desiredPosition); - if (property != null) { + /* when the goal is reached, the passenger is defined seated */ + passenger.setIsSeated(isSeated); - setCurrentState(State.QUEUEING_UP); + /* then the assigned seat is declared occupied */ + passenger.getSeat().setOccupied(isSeated); - /* raise the interrupts counter up by one */ - numbOfInterupts++; - SimulationHandler.getMap().getNode(currentPosition) - .raiseNumberOfInterrupts(); + /* RunAStar is notified that a passenger is seated now */ + SimulationHandler.setPassengerSeated(passenger, isSeated); + } - /* get the correct behavior for an obstacle avoidance */ - Situation collision = new Situation(agentMood, property); + /** + * In default boarding mode. + * + * @return true, if successful + */ + private boolean inDefaultBoardingMode() { + if (mode == AgentMode.MAKE_WAY) { + return false; + } else { + return true; + } + } - /* Perform the correct behavior */ - collision.handle(); + /** + * Sets the exit path loop. + * + * @param exitPathLoop + * the new exit path loop + */ + public void setExitPathLoop(boolean exitPathLoop) { + this.exitTheMainLoop = exitPathLoop; + } - /* - * the main loop is quit, if there is a new path calculated - */ - if (exitTheMainLoop) { + /** + * Interrupt agent. + * + * @param duration + * the duration + */ + public void interruptAgent(int duration) { + try { + Thread.sleep(duration); + System.out.println("Sleeping!"); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("Sleeping not possible!"); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + } + + /** + * Perform final elements. + * + * @return true, if successful + */ + public boolean performFinalElements() { + + if (!passenger.getSeat().isOccupied()) { + + /* the stop watch is interrupted */ + stopwatch.stop(); + + /* clear the current position of the agent */ + blockArea(currentPosition, false, false, null); + blockArea(desiredPosition, false, false, null); + + defineSeated(true); + + /* the boarding time is then submitted back to the passenger */ + passenger + .setBoardingTime(stopwatch.getElapsedTime() / 1000.0 + * SimulationHandler.getCabin() + .getSimulationSettings() + .getSimulationSpeedFactor()); + + /* the number of interrupts is submitted to the passenger */ + passenger.setNumberOfWaits(numbOfInterupts); + passenger.setTotalTimeWaited(totalWaitingTime); + SimulationHandler.getMap().get(getGoal()) + .setProperty(Property.DEFAULT, getPassenger()); + + // stopThread(); + + return true; + } else { + return false; + } + + } + + /** + * Waymaking skipped. + */ + private void waymakingSkipped() { + + if (developerMode) { + System.out.println("waymaking skipped. Delay simulated!"); + } + + long sleepTime = 0; + try { + if (waitingAtAisleSeat) { + sleepTime = AStarHelper.time(GaussianRandom.gaussianRandom( + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeFoldingSeatMean(), + GaussOptions.PERCENT_95, + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeFoldingSeatDeviation())); + Thread.sleep(sleepTime); + increaseTotalWaitingTime(sleepTime); + wayMakingFoldableSeatSkipped++; + } else { + sleepTime = AStarHelper.time(GaussianRandom.gaussianRandom( + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeMean(), + GaussOptions.PERCENT_95, + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeDeviation())); + Thread.sleep(sleepTime); + increaseTotalWaitingTime(sleepTime); + wayMakingSkipped++; + } + + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + + waitingCompleted = true; + + } + + /** + * Stow luggage. + */ + private void stowLuggage() { + + setCurrentState(State.STOWING_LUGGAGE); + rotateAgent(90); + + /* sleep the thread as long as the luggage is stowed */ + long sleepTime = AStarHelper.time(passenger.getLuggageStowTime()); + try { + Thread.sleep(sleepTime); + increaseTotalWaitingTime(sleepTime); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + /* notify everyone that the luggage is now stowed */ + alreadyStowed = true; + + } + + /** + * Unfolding seat procedure. + */ + private void unfoldingSeatProcedure() { + + setCurrentState(State.UNFOLDING_SEAT); + + /* Unfold seat if necessary */ + /* Sideways foldable seat */ + if (passenger.getSeat() + .getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT) { + unfoldSeat(GaussianRandom.gaussianRandom( + simSettings.getSidewaysFoldabeSeatPopupTimeMean(), + GaussOptions.PERCENT_95, + simSettings.getSidewaysFoldabeSeatPopupTimeDeviation())); + + /* Lifting seat pan */ + } else if (passenger.getSeat() + .getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS) { + unfoldSeat(GaussianRandom.gaussianRandom( + simSettings.getLiftingSeatPanPopupTimeMean(), + GaussOptions.PERCENT_95, + simSettings.getLiftingSeatPanPopupTimeDeviation())); + } + } + + /** + * Unfold sideways foldable seat or lifting seat pan seat. + * + * @param d + * the seat popup time + */ + private void unfoldSeat(double d) { + + Seat seat = passenger.getSeat(); + seat.setLayoutConcept(LayoutConcept.DEFAULT); + + int width = seat.getYDimension() / scale; + int length = seat.getXDimension() / scale; + int yPosition = seat.getYPosition() / scale; + int xPosition = seat.getXPosition() / scale; + + if (developerMode) { + System.out.println("Passenger " + passenger.getId() + + " unfolds Seat " + seat.getName()); + } + + for (int i = 0; i < width; i++) { + for (int j = 0; j < length; j++) { + int k = yPosition + i; + int l = xPosition + j; + if (k < SimulationHandler.getMap().getDimensions().getY() + && l < SimulationHandler.getMap().getDimensions() + .getX()) { + SimulationHandler.getMap().get(l, k) + .setProperty(Property.OBSTACLE, null); + } + } + } + + /* Pauses the agent for the seat pop up time */ + try { + increaseTotalWaitingTime(AStarHelper.time(d)); + Thread.sleep(AStarHelper.time(d)); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + } + + /** + * This method starts the agent. + */ + public void start() { + if (getThread() == null) { + setThread(new Thread(this, passenger.getName())); + getThread().start(); + } + } + + /** + * This method returns the thread. + * + * @return the thread + */ + public Thread getThread() { + return thread; + } + + /** + * This method sets the thread. + * + * @param thread + * the thread + */ + public void setThread(Thread thread) { + this.thread = thread; + } + + /** + * Stop thread. + */ + public void stopThread() { + thread.interrupt(); + } + + /** + * Removes the. + */ + public void remove() { + if (performFinalElements() == true) { + if (developerMode) { + System.out.println("Passenger " + passenger.getId() + + " is now force-seated!"); + } + + } else { + System.out.println("Passenger is already seated!"); + } + } + + /** + * Gets the number way making skipped. + * + * @return the number way making skipped + */ + /* + * public int getNumberWayMakingSkipped() { return wayMakingSkipped; } + */ + + public int getNumberWayMakingSkipped() { + return wayMakingSkipped; + } + + /** + * This method is the main path following loop for the agent. + */ + private void followPath() { + + /* define the try catch loop as main loop */ + mainloop: try { + + /* + * i represents the number of steps taken as well as the current + * step count. The actual position is one step behind i, so i is the + * desired step. + */ + int i = 0; + + /* run the path up to its end */ + while (i < path.getLength()) { + + /* + * at the first step, there is no current location but only a + * desired first location. So ignore this at the first loop. + */ + if (i != 0) { + + /* + * the current position is the last taken step in the path + */ + currentPosition = path.get(i - 1).getPosition(); + + } + + if (i == 2) { + movedOnce = true; + } + + /* the new planned location is current step in the path */ + desiredPosition = path.get(i).getPosition(); + + /* check if the desired next step is blocked by someone else */ + Property property = nodeBlocked(desiredPosition); + if (property != null) { + + setCurrentState(State.QUEUEING_UP); + + /* raise the interrupts counter up by one */ + numbOfInterupts++; + SimulationHandler.getMap().get(currentPosition) + .raiseNumberOfInterrupts(); + + /* get the correct behavior for an obstacle avoidance */ + Situation collision = new Situation(agentMood, property); + + /* Perform the correct behavior */ + collision.handle(); + + increaseTotalWaitingTime((long) waitingTimeAfterCollision); + /* + * the main loop is quit, if there is a new path calculated + */ + if (exitTheMainLoop) { /* cut the old path and add the new one to the list */ redefinePathLayout(); @@ -619,64 +1373,126 @@ private void followPath() { * if there is no obstacle in the way, check if the luggage * should be stowed now next */ - } else if (passengerStowsLuggage() && !alreadyStowed) { + } else if (foldingSeats && !stowingAtAisleSeat && !alreadyStowed + && passengerStowsLuggage()) { - setCurrentState(State.STOWING_LUGGAGE); - rotateAgent(90); + /* + * decision point: normal luggage stowing distance if the + * seat is still folded, the agent can stow his luggage + * directly at the seat position TODO: case if seat is + * unfolded in the meantime + */ + + if ((AgentFunctions + .checkSeatFoldingStatusInRow(passenger) == 1 + && "ABC".contains(passenger.getSeat().getLetter())) + || (AgentFunctions + .checkSeatFoldingStatusInRow(passenger) == 2 + && "DEF".contains( + passenger.getSeat().getLetter()))) { + stowingAtAisleSeat = true; + } else { + + stowLuggage(); + } - /* sleep the thread as long as the luggage is stowed */ - Thread.sleep( - AStarHelper.time(passenger.getLuggageStowTime())); + } else if (!alreadyStowed && !stowingAtAisleSeat + && passengerStowsLuggage()) { - /* notify everyone that the luggage is now stowed */ - alreadyStowed = true; + stowLuggage(); /* * if there is no obstacle or luggage stowing required, run * the default step */ - } else if (waitingForClearingOfRow() && !waitingCompleted) { + } else if (!alreadyStowed && stowingAtAisleSeat + && passengerStowsLuggageAtAisleSeat()) { - setCurrentState(State.WAITING_FOR_ROW_CLEARING); + stowLuggage(); - // TODO: only one passenger is detected, even if there are 2 - // already in the row! + } else if (foldingSeats && !waitingCompleted + && waitingForClearingOfRow()) { + + setCurrentState(State.WAITING_FOR_ROW_CLEARING); while (waymakingAllowed() == false) { + increaseTotalWaitingTime( + simSettings.getThreadSleepTimeDefault()); Thread.sleep(simSettings.getThreadSleepTimeDefault()); } - if (anyoneNearMe()) { - System.out - .println("waymaking skipped. Delay simulated!"); - Thread.sleep(AStarHelper.time( - simSettings.getSeatInterferenceProcessTime())); - waitingCompleted = true; - continue; + if ((AgentFunctions + .checkSeatFoldingStatusInRow(passenger) == 1 + && "ABC".contains(passenger.getSeat().getLetter())) + || (AgentFunctions + .checkSeatFoldingStatusInRow(passenger) == 2 + && "DEF".contains( + passenger.getSeat().getLetter()))) { + waitingAtAisleSeat = true; + waymakingSkipped(); + + } else { + + waymakingSkipped(); } - if (!waitingCompleted) { + } else if (!waitingCompleted && waitingForClearingOfRow()) { - for (Passenger pax : otherPassengersInRowBlockingMe) { + setCurrentState(State.WAITING_FOR_ROW_CLEARING); - SimulationHandler.launchWaymakingAgent(pax, - this.passenger); + // TODO: only one passenger is detected, even if there are 2 + // already in the row! - } + while (waymakingAllowed() == false) { + increaseTotalWaitingTime( + simSettings.getThreadSleepTimeDefault()); + Thread.sleep(simSettings.getThreadSleepTimeDefault()); + } - while (!otherPassengerStoodUp()) { - Thread.sleep( - simSettings.getThreadSleepTimeDefault()); + /* way making procedure is skipped */ + // if (anyoneNearMe()) { + if (!waitingCompleted) { + if (developerMode) { + System.out.println( + "waymaking skipped. Delay simulated!"); } - // TODO: calculate the waiting time! - Thread.sleep(AStarHelper.time(simSettings - .getSeatInterferenceStandingUpPassengerWaitingTime())); - + long sleepTime = AStarHelper + .time(GaussianRandom.gaussianRandom( + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeMean(), + GaussOptions.PERCENT_95, + simSettings.getPassengerProperties() + .getSeatInterferenceProcessTimeDeviation())); + increaseTotalWaitingTime(sleepTime); + Thread.sleep(sleepTime); + wayMakingSkipped++; waitingCompleted = true; + // continue; } + // way making works as planned + /* + * if (!waitingCompleted) { + * + * for (Passenger pax : otherPassengersInRowBlockingMe) { + * + * SimulationHandler.launchWaymakingAgent(pax, + * this.passenger); + * + * } + * + * while (!otherPassengerStoodUp()) { Thread.sleep( + * simSettings.getThreadSleepTimeDefault()); } + * + * // TODO: calculate the waiting time! + * Thread.sleep(AStarHelper.time(simSettings + * .getSeatInterferenceStandingUpPassengerWaitingTime())); + * + * waitingCompleted = true; } + */ + } else { setCurrentState(State.FOLLOWING_PATH); @@ -687,6 +1503,22 @@ private void followPath() { */ occupyOneStepAhead(); + if (currentPosition.getX() != 0 + && currentPosition.getY() != 0 + && desiredPosition.getX() != 0 + && desiredPosition.getY() != 0) { + + /* update the walked distance */ + passenger.setDistanceWalked(passenger + .getDistanceWalked() + + (int) (MathHelper.distanceBetween( + desiredPosition, currentPosition) + * scale)); + } + + /* notify next step */ + lastMoveTime = System.currentTimeMillis(); + /* then perform the step */ i++; @@ -706,178 +1538,26 @@ private void followPath() { e.printStackTrace(); } catch (ArrayIndexOutOfBoundsException a) { a.printStackTrace(); + } catch (SWTException swt) { + swt.printStackTrace(); } /* sleep as long as one step takes */ Thread.sleep((int) (1000 / SimulationHandler.getCabin() .getSimulationSettings().getSimulationSpeedFactor() - / (passenger.getWalkingSpeed() * 100 / scale))); + / passenger.getWalkingSpeed() / (100 / scale))); + } } /* catch possible interruptions */ } catch (InterruptedException e) { e.printStackTrace(); - } - } - - private boolean anyoneNearMe() { - for (Passenger pax : SimulationHandler.getCabin().getPassengers()) { - if (!pax.isIsSeated()) { - if (pax.getId() != passenger.getId()) { - if (isInXRangeSmaller( - SimulationHandler.getAgentByPassenger(pax) - .getCurrentPosition().getX() * scale, - 10, true)) { - return true; - } - } - } - } - return false; - } - - private boolean waymakingAllowed() { - if (SimulationHandler.waymakingInRange(passenger)) { - waycounter++; - if (waycounter < 30) { - return false; - } else { - return true; - } - } - return true; - } - - private boolean waitingForClearingOfRow() { - - if (isInXRangeEqual(passenger.getSeatRef().getXPosition(), - PIXELS_FOR_WAY, false)) { - if (AgentFunctions.someoneAlreadyInThisPartOfTheRow(this)) { - return true; - } - } - - return false; - } - - private synchronized void occupyOneStepAhead() { - blockArea(currentPosition, false, false, null); - blockArea(desiredPosition, true, false, null); - SimulationHandler.getMap().getNode(desiredPosition) - .raiseNumberOfOccupations(); - } - - /** - * - * @return - */ - public boolean isExitPathLoop() { - return exitTheMainLoop; - } - - private void defineSeated(boolean isSeated) { - - /* when the goal is reached, the passenger is defined seated */ - passenger.setIsSeated(isSeated); - - /* then the assigned seat is declared occupied */ - passenger.getSeatRef().setOccupied(isSeated); - - /* RunAStar is notified that a passenger is seated now */ - SimulationHandler.setPassengerSeated(passenger, isSeated); - } - - private boolean inDefaultBoardingMode() { - if (mode == AgentMode.MAKE_WAY) { - return false; - } else { - return true; - } - } - - /** - * - * @param exitPathLoop - */ - public void setExitPathLoop(boolean exitPathLoop) { - this.exitTheMainLoop = exitPathLoop; - } - - public void interruptAgent(int duration) { - try { - Thread.sleep(duration); - System.out.println("Sleeping!"); - } catch (InterruptedException e) { + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } catch (ConcurrentModificationException e) { e.printStackTrace(); - System.out.println("Sleeping not possible!"); - } - } - - public boolean performFinalElements() { - - if (!passenger.getSeatRef().isOccupied()) { - - /* clear the current position of the agent */ - blockArea(currentPosition, false, false, null); - blockArea(desiredPosition, false, false, null); - - if (passenger.getSeatRef().isCurrentlyFolded()) { - unfoldSeat(); - } - - defineSeated(true); - - /* the stop watch is then interrupted */ - stopwatch.stop(); - - /* the boarding time is then submitted back to the passenger */ - passenger.setBoardingTime((int) (stopwatch.getElapsedTimeSecs() - * SimulationHandler.getCabin().getSimulationSettings() - .getSimulationSpeedFactor())); - - /* the number of interrupts is submitted to the passenger */ - passenger.setNumberOfWaits(numbOfInterupts); - - SimulationHandler.getMap().getNode(getGoal()) - .setProperty(Property.DEFAULT, getPassenger()); - - return true; - } else { - return false; - } - - } - - private void unfoldSeat() { - - int defoldingTime = 5; - - Seat seat = passenger.getSeatRef(); - seat.setCurrentlyFolded(false); - - int width = seat.getYDimension() / scale; - int length = seat.getXDimension() / scale; - int yPosition = seat.getYPosition() / scale; - int xPosition = seat.getXPosition() / scale; - - for (int i = 0; i < width; i++) { - for (int j = 0; j < length; j++) { - int k = yPosition + i; - int l = xPosition + j; - if (k < SimulationHandler.getMap().getDimensions().getY() - && l < SimulationHandler.getMap().getDimensions() - .getX()) { - SimulationHandler.getMap().getNodeByCoordinate(k, l) - .setProperty(Property.OBSTACLE, null); - } - } - } - - try { - Thread.sleep(AStarHelper.time(defoldingTime)); - } catch (InterruptedException e) { - // } } @@ -921,9 +1601,6 @@ public void run() { } } - /* start counting the elapsed time for boarding */ - stopwatch.start(); - /* * tell the handler that the passengers now enters the cabin */ @@ -931,6 +1608,12 @@ public void run() { SimulationHandler.setPassengerActive(this.passenger); setCurrentState(State.FOLLOWING_PATH); + + passenger.setDistanceWalked(0); + + /* start counting the elapsed time for boarding */ + stopwatch.start(); + /* * run path following as long as the goal is not reached yet */ @@ -954,17 +1637,24 @@ public void run() { */ int offset = 3; + + if (passenger.getDoor().getXPosition() > passenger.getSeat() + .getXPosition()) { + offset = -offset; + } + double position = thePassengerILetInTheRow.getPositionX(); Cabin cabinBlocker = SimulationHandler.getCabin(); Passenger dummyPax = CabinFactory.eINSTANCE.createPassenger(); dummyPax.setId(Integer.MAX_VALUE); - for (int i = 0; i < cabinBlocker.getYDimension() - / cabinBlocker.getScale(); i++) { - Node node = SimulationHandler.getMap().getNodeByCoordinate( - (int) (position / cabinBlocker.getScale()) - offset, - i); - if (node.getProperty() != Property.OBSTACLE) { + for (int i = 0; i < cabinBlocker.getYDimension() / cabinBlocker + .getSimulationSettings().getScale(); i++) { + Node node = SimulationHandler.getMap() + .get((int) (position / cabinBlocker + .getSimulationSettings().getScale()) + - offset, i); + if (!node.isObstacle()) { node.setProperty(Property.AGENT, passenger); // node.setHidden(); } @@ -987,7 +1677,7 @@ public void run() { goal = new Vector2D(helper.getX(), helper.getY()); path.invert(); - path.appendWayPoint(SimulationHandler.getMap().getNode(goal)); + path.appendWayPoint(SimulationHandler.getMap().get(goal)); setCurrentState(State.RETURNING_TO_SEAT); @@ -1002,14 +1692,15 @@ public void run() { } - for (int i = 0; i < cabinBlocker.getYDimension() - / cabinBlocker.getScale(); i++) { + for (int i = 0; i < cabinBlocker.getYDimension() / cabinBlocker + .getSimulationSettings().getScale(); i++) { - Node node = SimulationHandler.getMap().getNodeByCoordinate( - (int) (position / cabinBlocker.getScale()) - offset, - i); + Node node = SimulationHandler.getMap() + .get((int) (position / cabinBlocker + .getSimulationSettings().getScale()) + - offset, i); - if (node.getProperty() != Property.OBSTACLE) { + if (!node.isObstacle()) { node.setProperty(Property.DEFAULT, passenger); } } @@ -1020,48 +1711,21 @@ public void run() { SimulationHandler.removeFromWaymakingList(passenger); } + // + if (foldingSeats && aisleSeat) { + unfoldingSeatProcedure(); + } + + // performFinalElements(); } catch (InterruptedException e) { e.printStackTrace(); - } - } - - /** - * This method starts the agent. - */ - public void start() { - if (getThread() == null) { - setThread(new Thread(this, passenger.getName())); - getThread().start(); - } - } - - /** - * This method returns the thread. - * - * @return the thread - */ - public Thread getThread() { - return thread; - } - - /** - * This method sets the thread. - * - * @param thread - * the thread - */ - public void setThread(Thread thread) { - this.thread = thread; - } - - public void remove() { - if (performFinalElements() == true) { - System.out.println( - "Passenger " + passenger.getId() + " is now force-seated!"); - } else { - System.out.println("Passenger is already seated!"); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } catch (ConcurrentModificationException e) { + e.printStackTrace(); } } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentFunctions.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentFunctions.java index 30c5a60f..7679a5b8 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentFunctions.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentFunctions.java @@ -11,7 +11,7 @@ import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.Row; import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.astar.CostMap; +import net.bhl.cdt.paxelerate.model.astar.Costmap; import net.bhl.cdt.paxelerate.model.astar.Node; import net.bhl.cdt.paxelerate.model.astar.Node.Property; import net.bhl.cdt.paxelerate.model.astar.SimulationHandler; @@ -19,72 +19,268 @@ import net.bhl.cdt.paxelerate.util.math.Vector2D; /** - * - * @author marc.engelmann + * The Class AgentFunctions. * + * @author marc.engelmann, michael.schmidt + * @version 1.1 + * @since 0.5 */ public class AgentFunctions { + /** The Constant PIXELS_FOR_SCANNING_AT_DOOR. */ public static final int PIXELS_FOR_SCANNING_AT_DOOR = 3; + /** + * Someone already in this part of the row. + * + * @param agent + * the agent + * @return true, if successful + */ public static boolean someoneAlreadyInThisPartOfTheRow(Agent agent) { - Row row = agent.getPassenger().getSeatRef().getRow(); + boolean rowOccupied = false; + Row row = agent.getPassenger().getSeat().getRow(); for (Seat checkSeat : row.getSeats()) { + /* check for blocked seats in my part of the row */ if (checkSeat.isOccupied()) { if (sameSideOfAisle(checkSeat, - agent.getPassenger().getSeatRef())) { + agent.getPassenger().getSeat())) { + /* identify passengers which have to stand up for me */ if (otherSeatCloserToAisle(checkSeat, - agent.getPassenger().getSeatRef())) { + agent.getPassenger().getSeat())) { agent.otherPassengersInRowBlockingMe .add(checkSeat.getPassenger()); - return true; + rowOccupied = true; } } } } - return false; + return rowOccupied; } - /* - * TODO: ONLY APPLICABLE FOR 3-3 CONFIGURATIONS OR BELOW! + /** + * Same side of aisle. + * + * @param checkSeat + * the check seat + * @param mySeat + * the my seat + * @return true, if successful */ private static boolean sameSideOfAisle(Seat checkSeat, Seat mySeat) { - if ("ABC".contains(checkSeat.getLetter())) { - if ("ABC".contains(mySeat.getLetter())) { + int seatAbrest = checkSeatAbrest(mySeat); + + switch (seatAbrest) { + + default: + return false; + case 4: + // TODO: temporary mods + /* AC - DF */ + if (checkSeatLocation(checkSeat, mySeat, "AB") + | checkSeatLocation(checkSeat, mySeat, "CD")) { + return true; + } + break; + case 5: + /* AC - DEF */ + if (checkSeatLocation(checkSeat, mySeat, "AC") + | checkSeatLocation(checkSeat, mySeat, "DEF")) { return true; } + break; + case 6: + /* ABC - DEF */ + if (checkSeatLocation(checkSeat, mySeat, "ABC") + | checkSeatLocation(checkSeat, mySeat, "DEF")) { + return true; + } + break; + case 7: + /* AB - DEF - JK */ + if (checkSeatLocation(checkSeat, mySeat, "AB") + | checkSeatLocation(checkSeat, mySeat, "DEF") + | checkSeatLocation(checkSeat, mySeat, "JK")) { + return true; + } + break; + case 8: + /* AB - DEFG - JK */ + if (checkSeatLocation(checkSeat, mySeat, "AB") + | checkSeatLocation(checkSeat, mySeat, "DEFG") + | checkSeatLocation(checkSeat, mySeat, "JK")) { + return true; + } + break; + case 9: + /* ABC - DEF - HJK */ + if (checkSeatLocation(checkSeat, mySeat, "ABC") + | checkSeatLocation(checkSeat, mySeat, "DEF") + | checkSeatLocation(checkSeat, mySeat, "HJK")) { + return true; + } + break; + case 10: + /* ABC - DEFG - HJK */ + if (checkSeatLocation(checkSeat, mySeat, "ABC") + | checkSeatLocation(checkSeat, mySeat, "DEFG") + | checkSeatLocation(checkSeat, mySeat, "HJK")) { + return true; + } + break; } - if ("DEF".contains(checkSeat.getLetter())) { - if ("DEF".contains(mySeat.getLetter())) { + + return false; + } + + /** + * Check seat abrest. + * + * @param seat the seat + * @return the int + */ + private static int checkSeatAbrest(Seat seat) { + return ModelHelper.getParent(Row.class, seat).getSeats().size(); + } + + /** + * Check seat location. + * + * @param checkSeat the check seat + * @param mySeat the my seat + * @param letter the letter + * @return true, if successful + */ + private static boolean checkSeatLocation(Seat checkSeat, Seat mySeat, + String letter) { + + if (letter.contains(checkSeat.getLetter())) { + if (letter.contains(mySeat.getLetter())) { return true; } } return false; + } - // TODO: this only works for a ONE AISLE configuration! + /** + * Other seat closer to aisle. + * + * @param otherSeat + * the other seat + * @param thisSeat + * the this seat + * @return true, if successful + */ public static boolean otherSeatCloserToAisle(Seat otherSeat, Seat thisSeat) { - int middleOfCabinX = (int) (ModelHelper.getParent(Cabin.class, thisSeat) - .getYDimension() / 2.0); + int middleOfAisleY = determineClosestAisle(thisSeat); - int otherSeatToAisleDistanceX = Math.abs(otherSeat.getYPosition() - + otherSeat.getYDimension() / 2 - middleOfCabinX); + int otherSeatToAisleDistanceY = Math.abs(otherSeat.getYPosition() + + otherSeat.getYDimension() / 2 - middleOfAisleY); - int mySeatToAisleDistanceX = Math.abs(thisSeat.getYPosition() - + thisSeat.getYDimension() / 2 - middleOfCabinX); + int mySeatToAisleDistanceY = Math.abs(thisSeat.getYPosition() + + thisSeat.getYDimension() / 2 - middleOfAisleY); - if (otherSeatToAisleDistanceX < mySeatToAisleDistanceX) { + if (otherSeatToAisleDistanceY < mySeatToAisleDistanceY) { return true; } return false; } + /** + * Determine closest aisle. + * + * @param mySeat the my seat + * @return the int + */ + // TODO: arbitrary seat abreast + public static int determineClosestAisle(Seat mySeat) { + + int seatAbrest = checkSeatAbrest(mySeat); + + int middleOfAisleY = 0; + + switch (seatAbrest) { + + default: + break; + + case 4: + case 6: + middleOfAisleY = (int) (ModelHelper.getParent(Cabin.class, mySeat) + .getYDimension() / 2.0); + break; + case 5: + case 7: + /* AB - DEF - JK */ + break; + case 8: + /* AB - DEFG - JK */ + break; + case 9: + /* ABC - DEF - HJK */ + break; + case 10: + /* ABC - DEFG - HJK */ + break; + } + + + return middleOfAisleY; + + } + + /** + * Check seat folding status in row. + * + * @param agent the agent + * @return the int + */ + // TODO: arbitrary seat abreast + public static int checkSeatFoldingStatusInRow(Passenger agent) { + + int seatAbrest = checkSeatAbrest(agent.getSeat()); + +switch (seatAbrest) { + + default: + return 0; + + case 4: + for (Seat seat : agent.getSeat().getRow().getSeats()) { + if (!seat.isOccupied() && "B".contains(seat.getLetter()) + && "AB".contains(agent.getSeat().getLetter())) { + return 1; + } else if (!seat.isOccupied() && "C".contains(seat.getLetter()) + && "CD".contains(agent.getSeat().getLetter())) { + return 2; + } + } + + case 6: + for (Seat seat : agent.getSeat().getRow().getSeats()) { + if (!seat.isOccupied() && "C".contains(seat.getLetter()) + && "ABC".contains(agent.getSeat().getLetter())) { + return 1; + } else if (!seat.isOccupied() && "D".contains(seat.getLetter()) + && "DEF".contains(agent.getSeat().getLetter())) { + return 2; + } + } + +} + return 0; + + } + /** * Rotation from 0 to 359 degrees. Only 45 degree steps. North is zero. - * + * + * @param agent + * the agent * @return the rotation in degrees. */ public static int getRotation(Agent agent) { @@ -109,41 +305,62 @@ public static int getRotation(Agent agent) { return angle; } + /** + * Doorway blocked. + * + * @param passenger + * the passenger + * @return true, if successful + */ public synchronized static boolean doorwayBlocked(Passenger passenger) { - boolean detectedBlocker = false; + + /* get the door of the passenger */ Door door = passenger.getDoor(); + + /* get the scale of the cabin */ + int scale = SimulationHandler.getCabin().getSimulationSettings() + .getScale(); + + /* + * loop through the area defined by the width of the door and a certain + * size for the first step into the cabin + */ for (int i = 0; i <= PIXELS_FOR_SCANNING_AT_DOOR; i++) { - for (int j = 0; j < door.getWidth() - / SimulationHandler.getCabin().getScale(); j++) { + for (int j = 0; j < door.getWidth() / scale; j++) { + + /* get the corresponding node */ Node node = SimulationHandler.getMap() - .getNodeByCoordinate(door.getXPosition() - / SimulationHandler.getCabin().getScale() + j, - i); + .get(door.getXPosition() / scale + j, i); + + /* check if the node is an agent */ if (node.getProperty() == Property.AGENT) { + + /* check if it is not the agent itself */ if (node.getPassenger().getId() != passenger.getId()) { - detectedBlocker = true; + return true; } } } } - if (detectedBlocker) { - return true; - } else { - // System.out.println("Doorway is now clear."); - return false; - } + return false; } + + /** * This method takes a cost map and adds a huge cost to the location and the * area around agents. The agent triggering this method is ignored. + * + * @param agent + * the agent + * @return the costmap */ - public static CostMap updateCostmap(Agent agent) { + public static Costmap updateCostmap(Agent agent) { /* * The cost map is flooded from the agents current location to his seat */ - CostMap costmap = new CostMap( + Costmap costmap = new Costmap( SimulationHandler.getMap().getDimensions(), agent.getStart(), SimulationHandler.getMap(), agent, true); @@ -159,7 +376,7 @@ public static CostMap updateCostmap(Agent agent) { agent.getCurrentPosition().getX() - squareDimension, agent.getCurrentPosition().getX() + squareDimension); - /* this is the expansion in the x Direction */ + /* this is the expansion in the y Direction */ Vector yVector = new Vector2D( agent.getCurrentPosition().getY() - squareDimension, agent.getCurrentPosition().getY() + squareDimension); @@ -178,10 +395,13 @@ public static CostMap updateCostmap(Agent agent) { /* prevent out of bounds exceptions */ if (xCoordinate > 0 && yCoordinate > 0) { + Node node = SimulationHandler.getMap().get(xCoordinate, + yCoordinate); + /* find all nodes occupied by agents */ - if (SimulationHandler.getMap() - .getNodeByCoordinate(xCoordinate, yCoordinate) - .getProperty() == Property.AGENT) { + if (node.getProperty() == Property.AGENT + && node.getPassenger().getId() != agent + .getPassenger().getId()) { /* * additionally to the surrounding points of the agents, @@ -192,10 +412,7 @@ public static CostMap updateCostmap(Agent agent) { for (int stepsAhead = 0; stepsAhead < 6; stepsAhead++) { /* the current agents position is excluded here! */ - if (!SimulationHandler.getMap() - .getNodeByCoordinate(xCoordinate, - yCoordinate) - .getPosition() + if (!node.getPosition() .equals(agent.getCurrentPosition())) { /* the surrounding points are calculated */ @@ -204,11 +421,9 @@ public static CostMap updateCostmap(Agent agent) { yCoordinate + stepsAhead)) { /* the surrounding costs are assigned */ - if (SimulationHandler.getMap() - .getNode(point) - .getProperty() != Property.OBSTACLE) { - costmap.setCost(point.getX(), - point.getY(), 5000); + if (!SimulationHandler.getMap().get(point) + .isObstacle()) { + costmap.setCost(point, 5000); } } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMood.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMood.java index d55b533e..96d54e2a 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMood.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMood.java @@ -8,24 +8,45 @@ import net.bhl.cdt.paxelerate.model.astar.Node.Property; /** - * - * @author marc.engelmann, tobias.bruegge-zobel + * The Class AgentMood. * + * @author marc.engelmann, tobias.bruegge-zobel + * @version 1.0 + * @since 0.5 */ public abstract class AgentMood implements Strategy { + /** The agent. */ private Agent agent; + /** + * Instantiates a new agent mood. + * + * @param agent the agent + */ public AgentMood(Agent agent) { this.setAgent(agent); } + /* (non-Javadoc) + * @see net.bhl.cdt.paxelerate.model.agent.Strategy#reactToCollision(net.bhl.cdt.paxelerate.model.astar.Node.Property) + */ public abstract void reactToCollision(Property property); + /** + * Gets the agent. + * + * @return the agent + */ public Agent getAgent() { return agent; } + /** + * Sets the agent. + * + * @param agent the new agent + */ public void setAgent(Agent agent) { this.agent = agent; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMover.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMover.java index 606e2244..e081a15b 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMover.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentMover.java @@ -10,46 +10,47 @@ import net.bhl.cdt.paxelerate.model.astar.SimulationHandler; import net.bhl.cdt.paxelerate.util.math.Vector; +/** + * The Class AgentMover. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class AgentMover { + /** * This method blocks the agents position if the rotation is rectangular. - * - * @param vector - * is the vector of the agents position - * @param occupy - * occupy or deoccupy the node - * @param property - * set the property of the node + * + * @param vector is the vector of the agents position + * @param occupy occupy or deoccupy the node + * @param property set the property of the node + * @param passenger the passenger */ public static void blockNode(Vector vector, boolean occupy, Property property, Passenger passenger) { /* check if the desired node is out of bounds */ - if (SimulationHandler.getMap().getNodeByCoordinate(vector.getX(), - vector.getY()) != null - && SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX(), vector.getY()) + if (SimulationHandler.getMap().get(vector.getX(), vector.getY()) != null + && SimulationHandler.getMap().get(vector.getX(), vector.getY()) .getPassenger() != null) { /* check if the agent itself blocked the node */ - if (SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX(), vector.getY()) + if (SimulationHandler.getMap().get(vector.getX(), vector.getY()) .getPassenger().getId() == passenger.getId() || SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX(), vector.getY()) + .get(vector.getX(), vector.getY()) .getProperty() != Property.AGENT) { /* check if the node is no obstacle */ - if (SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX(), vector.getY()) - .getProperty() != Property.OBSTACLE) { + if (!SimulationHandler.getMap() + .get(vector.getX(), vector.getY()).isObstacle()) { /* * set the node to the desired property and link the agent * id */ - SimulationHandler.getMap() - .getNodeByCoordinate(vector.getX(), vector.getY()) + SimulationHandler.getMap().get(vector.getX(), vector.getY()) .setProperty(property, passenger); } } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentPathFinder.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentPathFinder.java index 256b0c7e..07b60361 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentPathFinder.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgentPathFinder.java @@ -5,6 +5,13 @@ ***************************************************************************************/ package net.bhl.cdt.paxelerate.model.agent; +/** + * The Class AgentPathFinder. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class AgentPathFinder { } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgressiveMood.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AggressiveMood.java similarity index 51% rename from net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgressiveMood.java rename to net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AggressiveMood.java index 057a0f2f..e70ba6f1 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AgressiveMood.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/AggressiveMood.java @@ -1,42 +1,56 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ***************************************************************************************/ -package net.bhl.cdt.paxelerate.model.agent; - -import net.bhl.cdt.paxelerate.model.astar.AStarHelper; -import net.bhl.cdt.paxelerate.model.astar.Node.Property; - -/** - * - * @author marc.engelmann, tobias.bruegge-zobel - * - */ -public class AgressiveMood extends AgentMood implements Strategy { - - public AgressiveMood(Agent agent) { - super(agent); - // TODO Auto-generated constructor stub - } - - @SuppressWarnings("static-access") - @Override - public void reactToCollision(Property property) { - // only pass if other passenger is stowing luggage - // if (super.getAgent().getBlockingAgent().passengerStowsLuggage()) { - if (property == Property.OBSTACLE) { - super.getAgent().findNewPath(); - super.getAgent().setExitPathLoop(true); - } - // other wise if blocked act as passive agent - else { - try { - super.getAgent().getThread().sleep(AStarHelper.time(1)); - } catch (InterruptedException e) { - } - super.getAgent().setExitPathLoop(false); - - } - } +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.model.agent; + +import net.bhl.cdt.paxelerate.model.astar.Node.Property; + +/** + * The Class AgressiveMood. + * + * @author marc.engelmann, tobias.bruegge-zobel + * @version 1.0 + * @since 0.5 + */ +public class AggressiveMood extends AgentMood implements Strategy { + + /** + * Instantiates a new agressive mood. + * + * @param agent + * the agent + */ + public AggressiveMood(Agent agent) { + super(agent); + // Auto-generated constructor stub + } + + /* + * (non-Javadoc) + * + * @see + * net.bhl.cdt.paxelerate.model.agent.AgentMood#reactToCollision(net.bhl.cdt + * .paxelerate.model.astar.Node.Property) + */ + + @Override + public void reactToCollision(Property property) { + // only pass if other passenger is stowing luggage + if (super.getAgent().getBlockingAgent().passengerStowsLuggage() + || super.getAgent().getBlockingAgent().passengerUnfoldsSeat()) { + // if (property == Property.OBSTACLE) { + super.getAgent().findNewPath(); + super.getAgent().setExitPathLoop(true); + } + // // other wise if blocked act as passive agent + // else { + // try { + // super.getAgent().getThread().sleep(AStarHelper.time(1)); + // } catch (InterruptedException e) { + // } + // } + + } } \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/IssueScanner.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/IssueScanner.java index 56c8b83b..495a3283 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/IssueScanner.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/IssueScanner.java @@ -14,19 +14,30 @@ import net.bhl.cdt.paxelerate.util.time.StopWatch; /** - * - * @author marc.engelmann + * The Class IssueScanner. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class IssueScanner extends Subject implements Runnable { + /** The thread. */ private Thread thread; + + /** The watch. */ private StopWatch watch; + + /** The init. */ private boolean init = true; + /** The position tracker. */ private HashMap positionTracker = new HashMap(); + /* (non-Javadoc) + * @see java.lang.Runnable#run() + */ @Override public void run() { @@ -52,11 +63,18 @@ public void run() { Thread.sleep(200); } catch (InterruptedException e) { - + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); } } } + /** + * Check movement. + * + * @param pax the pax + */ private void checkMovement(Passenger pax) { Vector3D data = positionTracker.get(pax.getId()); if (noMovementDetected(pax)) { @@ -67,12 +85,21 @@ private void checkMovement(Passenger pax) { } } + /** + * No movement detected. + * + * @param pax the pax + * @return true, if successful + */ private boolean noMovementDetected(Passenger pax) { Vector3D data = positionTracker.get(pax.getId()); return (pax.getPositionX() == data.getX() && pax.getPositionY() == data .getY()); } + /** + * Update map. + */ private void updateMap() { for (Passenger pax : SimulationHandler.getCabin().getPassengers()) { int time = (int) watch.getElapsedTimeSecs(); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/PassiveMood.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/PassiveMood.java index b71f3aae..17530f90 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/PassiveMood.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/PassiveMood.java @@ -9,23 +9,44 @@ import net.bhl.cdt.paxelerate.model.astar.Node.Property; /** - * - * @author marc.engelmann, tobias.bruegge-zobel + * The Class PassiveMood. * + * @author marc.engelmann, tobias.bruegge-zobel, michael.schmidt + * @version 1.1 + * @since 0.5 */ public class PassiveMood extends AgentMood implements Strategy { + /** + * Instantiates a new passive mood. + * + * @param agent + * the agent + */ public PassiveMood(Agent agent) { super(agent); } + /* + * (non-Javadoc) + * + * @see + * net.bhl.cdt.paxelerate.model.agent.AgentMood#reactToCollision(net.bhl.cdt + * .paxelerate.model.astar.Node.Property) + */ @SuppressWarnings("static-access") @Override public void reactToCollision(Property property) { try { - super.getAgent().getThread().sleep(AStarHelper.time(1)); + /* agent waits for specific time before he continues walking */ + super.getAgent().getThread().sleep(AStarHelper + .time(super.getAgent().getWaitingTimeAfterCollision())); } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); } super.getAgent().setExitPathLoop(false); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Situation.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Situation.java index 09d8f60b..9a117e2e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Situation.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Situation.java @@ -7,22 +7,35 @@ import net.bhl.cdt.paxelerate.model.astar.Node.Property; - /** - * - * @author marc.engelmann, tobias.bruegge-zobel + * The Class Situation. * + * @author marc.engelmann, tobias.bruegge-zobel + * @version 1.0 + * @since 0.5 */ public class Situation { + /** The strategy. */ private Strategy strategy; + + /** The property. */ private Property property; + /** + * Instantiates a new situation. + * + * @param strategy the strategy + * @param property the property + */ public Situation(Strategy strategy, Property property) { this.strategy = strategy; this.property = property; } + /** + * Handle. + */ public void handle() { this.strategy.reactToCollision(property); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Strategy.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Strategy.java index 9f4bb971..08c7f414 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Strategy.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/agent/Strategy.java @@ -7,14 +7,20 @@ import net.bhl.cdt.paxelerate.model.astar.Node.Property; - /** - * - * @author marc.engelmann, tobias.bruegge-zobel + * The Interface Strategy. * + * @author marc.engelmann, tobias.bruegge-zobel + * @version 1.0 + * @since 0.5 */ public interface Strategy { + /** + * React to collision. + * + * @param property the property + */ public void reactToCollision(Property property); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AStarHelper.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AStarHelper.java index e71035dd..a79da480 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AStarHelper.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AStarHelper.java @@ -10,13 +10,22 @@ import java.util.Map.Entry; import net.bhl.cdt.paxelerate.model.Passenger; - /** - * This class is a helper class for the A* Algorithm - * @author marc.engelmann + * This class is a helper class for the A* Algorithm. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class AStarHelper { + + /** + * Lowest value in hash map. + * + * @param pax the pax + * @param hashmap the hashmap + * @return true, if successful + */ public static boolean lowestValueInHashMap(Passenger pax, HashMap hashmap) { int lowestValue = Integer.MAX_VALUE; @@ -36,10 +45,11 @@ public static boolean lowestValueInHashMap(Passenger pax, } /** - * - * @param pax - * @param list - * @return + * Passenger already in list. + * + * @param pax the pax + * @param list the list + * @return true, if successful */ public synchronized static boolean PassengerAlreadyInList(Passenger pax, ArrayList list) { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreaMap.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreaMap.java deleted file mode 100644 index 91fb5567..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreaMap.java +++ /dev/null @@ -1,287 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ***************************************************************************************/ - -package net.bhl.cdt.paxelerate.model.astar; - -import java.util.ArrayList; - -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.agent.Agent; -import net.bhl.cdt.paxelerate.model.astar.Node.Property; -import net.bhl.cdt.paxelerate.util.math.Vector; -import net.bhl.cdt.paxelerate.util.math.Vector2D; -import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; - -/** - * - * @author marc.engelmann - * - */ -public class AreaMap { - - private Vector dimensions = new Vector2D(0, 0); - private ArrayList> map; - private ArrayList nodeList = new ArrayList(); - - public ArrayList getNodeList() { - return nodeList; - } - - private ObstacleMap obstacleMap; - - /** - * This is the area map constructor. - * - * @param dimensions - * the dimensions of the map - * @param obstacleMap - * the obstacle map - */ - public AreaMap(Vector dimensions, Cabin cabin) { - this.dimensions = dimensions; - this.obstacleMap = new ObstacleMap(dimensions, cabin); - - createMap(); - Log.add(this, "Map Created"); - registerEdges(); - Log.add(this, "Map Node edges registered"); - } - - public AreaMap(AreaMap copy) { - this.map = copy.map; - this.dimensions = copy.dimensions; - this.obstacleMap = copy.obstacleMap; - this.nodeList = copy.nodeList; - } - - public ObstacleMap getObstacleMap() { - return obstacleMap; - } - - /** - * This method prints the map to the console. - */ - public void printMap() { - System.out.println("This is the area map:"); - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - if (map.get(i).get(j).getProperty() == Property.AGENT) { - System.out.print("O"); - } else if ((map.get(i).get(j) - .getProperty() == Property.OBSTACLE)) { - System.out.print("X"); - } else if ((map.get(i).get(j) - .getProperty() == Property.START)) { - System.out.print("X"); - } else { - System.out.print("-"); - } - } - System.out.println(); - } - System.out.println(); - System.out.println(); - } - - /** - * This method creates the area map. - */ - private void createMap() { - Node node; - - map = new ArrayList>(); - for (int x = 0; x < dimensions.getX(); x++) { - map.add(new ArrayList()); - for (int y = 0; y < dimensions.getY(); y++) { - node = new Node(new Vector2D(x, y)); - - if (obstacleMap.getValueAtPoint(x, y) == ObstacleMap - .getObstacleValue()) { - node.setProperty(Property.OBSTACLE, null); - } else { - node.setCost(obstacleMap.getValueAtPoint(x, y)); - } - map.get(x).add(node); - - nodeList.add(node); - - } - } - } - - /** - * Registers the nodes edges (connections to its neighbors). - */ - private void registerEdges() { - for (int x = 0; x < dimensions.getX() - 1; x++) { - for (int y = 0; y < dimensions.getY() - 1; y++) { - Node node = map.get(x).get(y); - if (!(y == 0)) { - node.setNorth(map.get(x).get(y - 1)); - } - if (!(y == 0) && !(x == dimensions.getX())) { - node.setNorthEast(map.get(x + 1).get(y - 1)); - } - if (!(x == dimensions.getX())) { - node.setEast(map.get(x + 1).get(y)); - } - if (!(x == dimensions.getX()) && !(y == dimensions.getY())) { - node.setSouthEast(map.get(x + 1).get(y + 1)); - } - if (!(y == dimensions.getY())) { - node.setSouth(map.get(x).get(y + 1)); - } - if (!(x == 0) && !(y == dimensions.getY())) { - node.setSouthWest(map.get(x - 1).get(y + 1)); - } - if (!(x == 0)) { - node.setWest(map.get(x - 1).get(y)); - } - if (!(x == 0) && !(y == 0)) { - node.setNorthWest(map.get(x - 1).get(y - 1)); - } - } - } - } - - /** - * This method returns the area map. - * - * @return the area map - */ - public ArrayList> getNodes() { - return map; - } - - /** - * This method returns a node at a specific point. - * - * @param x - * the x value - * @param y - * the y value - * @return the node - */ - public Node getNodeByCoordinate(int x, int y) { - try { - return map.get(x).get(y); - } catch (ArrayIndexOutOfBoundsException e) { - return null; - } catch (NullPointerException e) { - return null; - } catch (IndexOutOfBoundsException e) { - return null; - } - } - - /** - * This method returns a specific node at a vector point. - * - * @param vector - * the vector describing the position of the node - * @return the node - */ - public Node getNode(Vector vector) { - return map.get(vector.getX()).get(vector.getY()); - } - - /** - * Caution! This method only returns the first node with the property. Only - * use this method which properties that are assigned once! - * - * @param property - * is the property - * @return the node with the correct property - */ - public Node getNodeByProperty(Property property, Agent agent) { - - for (Node node : nodeList) { - - if (node.getProperty().equals(property) && node.getPassenger() - .getId() == agent.getPassenger().getId()) { - return node; - } - } - - return null; - } - - public synchronized void setStartLocation(Vector position, Agent agent) { - - if (position == null) { - getNode(agent.getStart()).getStartList().add(new NodeProperty( - agent.getPassenger().getId(), Property.START)); - } else { - Node oldStartLocation = this.getNode(agent.getStart()); - oldStartLocation.removeItemById(agent.getPassenger().getId()); - getNode(position).getStartList().add(new NodeProperty( - agent.getPassenger().getId(), Property.START)); - } - } - - /** - * This method calculates the distance between two nodes. - * - * @param node1 - * the first node - * @param node2 - * the second node - * @return the distance between the nodes - */ - public double getDistanceBetween(Node node1, Node node2) { - int exponent = 2; - double first = Math.pow( - (node2.getPosition().getX() - node1.getPosition().getX()), - exponent); - double second = Math.pow( - (node2.getPosition().getY() - node1.getPosition().getY()), - exponent); - return Math.sqrt(first + second); - } - - /** - * This method returns the dimensions of the map. - * - * @return the dimensions stored in a vector - */ - public Vector getDimensions() { - return dimensions; - } - - /** - * This method clears the area map. - */ - public void clear() { - createMap(); - registerEdges(); - } - - public void printMapWithLocation(Vector start, Vector goal) { - System.out.println("This is the area map:"); - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - if (i == goal.getX() && j == goal.getY()) { - System.out.print("G"); - } else if (i == start.getX() && j == start.getY()) { - System.out.print("S"); - } else if (map.get(i).get(j).getProperty() == Property.AGENT) { - System.out.print("O"); - } else if ((map.get(i).get(j) - .getProperty() == Property.OBSTACLE)) { - System.out.print("X"); - } else if ((map.get(i).get(j) - .getProperty() == Property.START)) { - System.out.print("X"); - } else { - System.out.print("-"); - } - } - System.out.println(); - } - System.out.println(); - System.out.println(); - } -} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Areamap.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Areamap.java new file mode 100644 index 00000000..190400f9 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Areamap.java @@ -0,0 +1,139 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.model.astar; + +import java.util.ArrayList; +import java.util.List; + +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; + +/** + * The Class Areamap. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ +public class Areamap { + + /** The structure. */ + private List> structure; + + /** The size. */ + private Vector size; + + /** + * Create a new empty area map. + * + * @param size + * the dimensions of the area map + */ + public Areamap(Vector size) { + + /* store the dimensions locally */ + this.size = size; + + /* initialize the structure of the area map */ + structure = new ArrayList>(); + + /* loop through all points in x dimension */ + for (int x = 0; x < size.getX(); x++) { + + /* add a new array list per point */ + structure.add(new ArrayList()); + + /* add a node for every point in y dimension */ + for (int y = 0; y < size.getY(); y++) { + + /* create the node */ + Node node = new Node(new Vector2D(x, y)); + + /* add the node to the list */ + structure.get(x).add(node); + } + } + } + + /** + * Get the node at a specific location using two coordinates. + * + * @param x + * the x location + * @param y + * the y location + * + * @return the desired node + */ + public Node get(int x, int y) { + + /* check if the requested location is within bounds */ + if (x < 0 || y < 0 || x >= size.getX() || y >= size.getY()) { + + /* request out of bounds */ + return null; + } + + /* return the specific node */ + return structure.get(x).get(y); + } + + /** + * Get the node at a specific location using a vector. + * + * @param point + * the location Vector of the requested node + * + * @return the desired node + */ + public Node get(Vector point) { + + /* check if the requested location is within bounds */ + if (point.getX() < 0 || point.getY() < 0 || point.getX() >= size.getX() + || point.getY() >= size.getY()) { + + /* no matching node found */ + return null; + } + + /* return the specific node */ + return structure.get(point.getX()).get(point.getY()); + } + + /** + * Get the dimensions of the area map. + * + * @return the dimensions vector + */ + public Vector getDimensions() { + return size; + } + + /** + * Get a list of all nodes within the area map. + * + * @return the list of nodes + */ + public List getNodes() { + + /* create a new list which will contain all nodes */ + List list = new ArrayList<>(); + + /* Loop through all sublists */ + for (ArrayList sublist : structure) { + + /* loop through all nodes */ + for (Node node : sublist) { + + /* add the node to the list */ + list.add(node); + } + } + + /* return the list */ + return list; + } +} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreamapHandler.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreamapHandler.java new file mode 100644 index 00000000..8d46d342 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/AreamapHandler.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ + +package net.bhl.cdt.paxelerate.model.astar; + +import java.util.ArrayList; + +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.agent.Agent; +import net.bhl.cdt.paxelerate.model.astar.Node.Direction; +import net.bhl.cdt.paxelerate.model.astar.Node.Property; +import net.bhl.cdt.paxelerate.model.astar.ObstacleGenerator.GradientOption; +import net.bhl.cdt.paxelerate.util.math.MathHelper; +import net.bhl.cdt.paxelerate.util.math.Vector; + +/** + * The Class AreamapHandler. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ +public class AreamapHandler { + + /** The areamap. */ + private Areamap areamap; + + /** The Constant NARROWING_OF_DOOR_PATH_IN_PIXELS. */ + public static final int DEFAULT_VALUE = 3, OBSTACLE_RANGE_IN_CM = 20, + HOLE_VALUE = 1, NARROWING_OF_DOOR_PATH_IN_PIXELS = 2, + GRADIENT_LOWER_BOUND = 6, GRADIENT_UPPER_BOUND = 10, + GRADIENT_WIDTH = 2, NARROWING_OF_AISLE_PATH_IN_PIXELS = 2, + AISLE_OVERLAP_FRONT_AND_REAR = 10; + + /** + * This is the area map constructor. + * + * @param dimensions + * the dimensions of the map + * @param cabin + * the cabin + */ + public AreamapHandler(Vector dimensions, Cabin cabin) { + + /* initialize an area map */ + areamap = new Areamap(dimensions); + + /* define the neighboring nodes of each node */ + defineNeighboringNodes(); + + /* apply obstacle values to the area map */ + areamap = new ObstacleGenerator(areamap, cabin, GradientOption.LINEAR) + .returnMap(); + } + + /** + * Define the neighbors of each node within the area map. + */ + private void defineNeighboringNodes() { + + /* get the dimensions of the map */ + Vector dimensions = areamap.getDimensions(); + + /* Loop through the area map */ + for (Node node : areamap.getNodes()) { + + /* define the position of the nodes */ + int x = node.getPosition().getX(); + int y = node.getPosition().getY(); + + /* clear any previous defined neighbors */ + node.getNeighborList().clear(); + + /* define the neighboring nodes */ + + /* the north node */ + if (!(y == 0)) { + node.addNeighbor(areamap.get(x, y - 1), Direction.NORTH); + } + + /* the north east node */ + if (!(y == 0) && !(x == dimensions.getX())) { + node.addNeighbor(areamap.get(x + 1, y - 1), + Direction.NORTH_EAST); + } + + /* the east node */ + if (!(x == dimensions.getX())) { + node.addNeighbor(areamap.get(x + 1, y), Direction.EAST); + } + + /* the south east node */ + if (!(x == dimensions.getX()) && !(y == dimensions.getY())) { + node.addNeighbor(areamap.get(x + 1, y + 1), + Direction.SOUTH_EAST); + } + + /* the south node */ + if (!(y == dimensions.getY())) { + node.addNeighbor(areamap.get(x, y + 1), Direction.SOUTH); + } + + /* the south west node */ + if (!(x == 0) && !(y == dimensions.getY())) { + node.addNeighbor(areamap.get(x - 1, y + 1), + Direction.SOUTH_WEST); + } + + /* the west node */ + if (!(x == 0)) { + node.addNeighbor(areamap.get(x - 1, y), Direction.WEST); + } + + /* the north west node */ + if (!(x == 0) && !(y == 0)) { + node.addNeighbor(areamap.get(x - 1, y - 1), + Direction.NORTH_WEST); + } + } + } + + /** + * This method returns the area map. + * + * @return the area map + */ + public Areamap getAreamap() { + return areamap; + } + + /** + * This function calculates the minimum distance to an obstacle. + * + * @param node the node which's distance is calculated + * @param obstacles the obstacles + * @return the minimum distance + */ + public static double minimumDistanceToObstacle(Node node, + ArrayList obstacles) { + + /* set the minimum as high as possible */ + double minimum = Integer.MAX_VALUE; + + /* loop through all obstacles */ + for (Node obstacle : obstacles) { + + /* calculate the distance using z = root(x˛ + y˛) */ + double distance = MathHelper.distanceBetween(node.getPosition(), + obstacle.getPosition()); + + /* check if there is a distance smaller than the current one */ + if (distance < minimum) { + + /* if so, define it as the new smallest distance */ + minimum = distance; + } + } + + /* return the distance */ + return minimum; + } + + /** + * This map sets the start location of an agent. + * + * @param position + * the position + * @param agent + * the agent + */ + public synchronized void setStartLocation(Vector position, Agent agent) { + + // TODO: improve this! Why is there a list of properties involved? + if (position == null) { + areamap.get(agent.getStart()).getStartList().add(new NodeProperty( + agent.getPassenger().getId(), Property.START)); + } else { + Node oldStartLocation = areamap.get(agent.getStart()); + oldStartLocation.removeItemById(agent.getPassenger().getId()); + areamap.get(position).getStartList().add(new NodeProperty( + agent.getPassenger().getId(), Property.START)); + } + } + + /** + * This method gathers all obstacle values into one array. + * + * @return the populated integer array + */ + public int[][] getObstaclemap() { + + /* create new 2D integer array */ + int[][] integerArray = new int[areamap.getDimensions().getX()][areamap + .getDimensions().getY()]; + + /* loop through all nodes */ + for (Node node : areamap.getNodes()) { + + /* store every obstacle value in the array */ + integerArray[node.getPosition().getX()][node.getPosition() + .getY()] = node.getObstacleValue(); + } + + /* return the populated integer array */ + return integerArray; + + } + + /** + * This method clears the area map. + */ + public void clear() { + + /* recreate the area map */ + areamap = new Areamap(areamap.getDimensions()); + + /* redefine all neighboring nodes */ + defineNeighboringNodes(); + } +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Core.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Core.java index de179656..9125741f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Core.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Core.java @@ -9,30 +9,49 @@ import net.bhl.cdt.paxelerate.model.agent.Agent; import net.bhl.cdt.paxelerate.model.astar.Node.Property; +import net.bhl.cdt.paxelerate.util.math.MathHelper; /** * This class is the A* algorithm. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class Core { - private AreaMap map; - private CostMap costmap; + + /** The areamap. */ + private Areamap areamap; + + /** The costmap. */ + private Costmap costmap; + + /** The best path. */ private Path bestPath; + + /** The closed list. */ private ArrayList closedList; + + /** The open list. */ private SortedNodeList openList; + + /** The agent. */ private Agent agent; /** * This method constructs the Core. - * - * @param map - * is the AreaMap that is fed into the algorithm + * + * @param maphandler + * the maphandler + * @param costmap + * the costmap + * @param agent + * the agent */ - public Core(AreaMap map, CostMap costmap, Agent agent) { + public Core(AreamapHandler maphandler, Costmap costmap, Agent agent) { - this.map = map; + this.areamap = maphandler.getAreamap(); this.agent = agent; this.costmap = costmap; closedList = new ArrayList(); @@ -43,29 +62,25 @@ public Core(AreaMap map, CostMap costmap, Agent agent) { /** * This method calculates the shortest path. - * - * @param start - * is the start vector - * @param goal - * is the goal vector + * * @return returns the shortest path */ private void calculateShortestPath() { /* mark start and goal node */ - map.getNode(agent.getGoal()).setProperty(Property.GOAL, + areamap.get(agent.getGoal()).setProperty(Property.GOAL, agent.getPassenger()); - map.getNode(agent.getStart()).setProperty(Property.START, + areamap.get(agent.getStart()).setProperty(Property.START, agent.getPassenger()); /* reset the properties of the start node */ - map.getNode(agent.getStart()).setDistanceFromStart(0); - map.getNode(agent.getStart()).setCostFromStart(0); + areamap.get(agent.getStart()).setDistanceFromStart(0); + areamap.get(agent.getStart()).setCostFromStart(0); /* reset the lists */ closedList.clear(); openList.clear(); - openList.add(map.getNode(agent.getStart())); + openList.add(areamap.get(agent.getStart())); /* while we haven't reached the goal yet */ while (openList.size() != 0) { @@ -83,8 +98,8 @@ private void calculateShortestPath() { if (current.getPosition().equals(agent.getGoal())) { /* the start node does never have a previous node! */ - if (map.getNode(agent.getStart()) != null) { - map.getNode(agent.getStart()).setPreviousNode(null); + if (areamap.get(agent.getStart()) != null) { + areamap.get(agent.getStart()).setPreviousNode(null); } /* if there is a path found, reconstruct it */ @@ -113,16 +128,49 @@ private void calculateShortestPath() { continue; } + /* + * if the distance to the closest obstacle is smaller than half + * of the diameter of the agent, it will not be able to pass + * through + */ + + // TODO: This is a problem concerning the design: the seats are + // much closer to each other than the passengers width! + + // DEACTIVATED INTENTIONALLY + // if (false && neighbor.getDistanceToClosestObstacle() != 0) { + // if (neighbor.getDistanceToClosestObstacle() <= agent + // .getPassenger().getWidth() + // / (double) SimulationHandler.getCabin() + // .getSimulationSettings().getScale()) { + // + // System.out.println(neighbor + // .getDistanceToClosestObstacle() + // + " <= " + // + agent.getPassenger().getDepth() + // / (double) SimulationHandler.getCabin() + // .getSimulationSettings() + // .getScale() + // + " -> agent does not fit through!"); + // continue; + // } + // } + /* also just continue if the neighbor is an obstacle */ - if (neighbor.getProperty() != Property.OBSTACLE) { + if (!neighbor.isObstacle()) { /* calculate the neighbors distance from start */ - double neighborDistanceFromStart = map.getDistanceBetween( - map.getNode(agent.getStart()), neighbor); + double neighborDistanceFromStart = MathHelper + .distanceBetween( + areamap.get(agent.getStart()).getPosition(), + neighbor.getPosition()); /* calculate the neighbors distance from start */ - double currentDistanceFromStart = map.getDistanceBetween( - map.getNode(agent.getStart()), current); + double currentDistanceFromStart = MathHelper + .distanceBetween( + (areamap.get(agent.getStart()) + .getPosition()), + current.getPosition()); /* calculate the neighbors cost */ int neighborCostFromStart = costmap @@ -156,9 +204,6 @@ private void calculateShortestPath() { neighborIsBetter = false; } - // TODO: check if passenger dimensions allow this specific - // node. - /* set neighbors parameters if it is better */ if (neighborIsBetter) { neighbor.setPreviousNode(current); @@ -191,7 +236,7 @@ public Path getBestPath() { */ private synchronized Path reconstructPath(Node node) { Path path = new Path(); - while (node.getPreviousNode() != null && node != null) { + while (node.getPreviousNode() != null) { path.prependWayPoint(node); node = node.getPreviousNode(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/CostMap.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Costmap.java similarity index 67% rename from net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/CostMap.java rename to net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Costmap.java index f95a4bd5..8cd18bae 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/CostMap.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Costmap.java @@ -5,7 +5,6 @@ ***************************************************************************************/ package net.bhl.cdt.paxelerate.model.astar; -//import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; @@ -22,57 +21,66 @@ * cost to get there from the initial value. In its current configuration, the * cost map is fed with an area map, width, height and the initial starting * point. - * - * @see net.bhl.cdt.model.astar/AreaMap.java - * @see net.bhl.cdt.model.astar/Node.java - * + * * @author marc.engelmann * @version 1.3 - * + * @since 0.5 + * @see net.bhl.cdt.model.astar/AreaMap.java + * @see net.bhl.cdt.model.astar/Node.java */ -public class CostMap { +public class Costmap { + /** The map. */ private int[][] map; - private Vector dimensions = new Vector2D(0, 0), - startPoint = new Vector2D(0, 0), goalPoint = new Vector2D(0, 0); + /** The goal point. */ + private Vector size, startPoint = new Vector2D(0, 0), + goalPoint = new Vector2D(0, 0); + + /** The point parking. */ private ArrayList visitedPoints = new ArrayList(), pointParkingHelper = new ArrayList(), onHoldList = new ArrayList(), pointParking = new ArrayList(); - private AreaMap areamap; + /** The lowest cost. */ private int lowestCost; /** - * - * @param dimension - * @param areaMap + * Instantiates a new costmap. + * + * @param size + * the size + * @param start + * the start + * @param areamap + * the areamap + * @param agent + * the agent + * @param OnlyFloodToSeat + * the only flood to seat */ - public CostMap(Vector dimension, Vector start, AreaMap areaMap, Agent agent, + public Costmap(Vector size, Vector start, Areamap areamap, Agent agent, boolean OnlyFloodToSeat) { - this.dimensions = dimension; + this.size = size; this.startPoint = start; if (OnlyFloodToSeat) { this.goalPoint = agent.getGoal(); } else { - this.goalPoint = new Vector2D(dimensions.getX() - 1, - dimensions.getY() / 2); + this.goalPoint = new Vector2D(size.getX() - 1, size.getY() / 2); } - this.areamap = areaMap; + map = new int[size.getX()][size.getY()]; - map = new int[dimensions.getX()][dimensions.getY()]; - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - Node node = areamap.getNodeByCoordinate(i, j); - if (node.getProperty() == Property.OBSTACLE) { - setCost(i, j, -1); - } else { - setCost(i, j, node.getCost()); - } + for (Node node : areamap.getNodes()) { + + if (node.isObstacle()) { + + setCost(node.getPosition(), -1); + } else { + setCost(node.getPosition(), node.getObstacleValue()); } } @@ -81,16 +89,24 @@ public CostMap(Vector dimension, Vector start, AreaMap areaMap, Agent agent, floodMap(); } - public void setCost(int x, int y, int value) { - map[x][y] = value; + /** + * Sets the cost. + * + * @param position + * the position + * @param value + * the value + */ + public void setCost(Vector position, int value) { + map[position.getX()][position.getY()] = value; } /** * This method prints the cost map with values. */ public void printMapToConsole() { - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { + for (int i = 0; i < size.getX(); i++) { + for (int j = 0; j < size.getY(); j++) { if (map[i][j] == -1) { System.out.print("X\t"); } else if (i == goalPoint.getX() && j == goalPoint.getY()) { @@ -107,11 +123,18 @@ public void printMapToConsole() { /** * This method prints the cost map with a path to the console. + * + * @param path + * the path + * @param areamap + * the areamap + * @param agent + * the agent */ - public void printMapPathToConsole(Path path, AreaMap areamap, Agent agent) { + public void printMapPathToConsole(Path path, Areamap areamap, Agent agent) { System.out.println("This is the cost map:"); - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { + for (int i = 0; i < size.getX(); i++) { + for (int j = 0; j < size.getY(); j++) { boolean foundNode = false; // TODO: check if there is a node at a specific point. if (path != null) { @@ -124,8 +147,7 @@ public void printMapPathToConsole(Path path, AreaMap areamap, Agent agent) { if (i == agent.getPosition().getX() && j == agent.getPosition().getY()) { System.out.print("I"); - } else if (areamap.getNodeByCoordinate(i, j) - .getProperty() == Property.AGENT) { + } else if (areamap.get(i, j).getProperty() == Property.AGENT) { System.out.print("A"); } else if (foundNode) { System.out.print(">"); @@ -138,8 +160,7 @@ public void printMapPathToConsole(Path path, AreaMap areamap, Agent agent) { } else if (i == startPoint.getX() && j == startPoint.getY()) { System.out.print("S"); } else { - System.out.print("-");// getCostForCoordinates(i, j) + - // "\t"); + System.out.print("-"); } } System.out.println(); @@ -251,12 +272,11 @@ private void createSurroundingCosts(Vector middlePoint) { for (Vector point : sortTheList( getSurroundingPoints(middlePoint.getX(), middlePoint.getY()))) { if (!(point.getX() < 0 || point.getY() < 0 - || point.getX() >= dimensions.getX() - || point.getY() >= dimensions.getY())) { + || point.getX() >= size.getX() + || point.getY() >= size.getY())) { if (!isObstacle(point)) { if (!(checkForPoint(visitedPoints, point))) { - setCost(point.getX(), point.getY(), - getCost(middlePoint) + getCost(point)); + setCost(point, getCost(middlePoint) + getCost(point)); visitedPoints.add(point); getPointParkingHelper().add(point); } @@ -265,38 +285,6 @@ private void createSurroundingCosts(Vector middlePoint) { } } - /** - * This method saves the whole cost map in a text file to the documents - * folder. - */ - // CURRENTLY DISAPLED, until Cost Map is unlinked from ui - @Deprecated - public void saveMapToFile() { - // PrintWriter printToFile = null; - try { - // TODO COST MAP MAY NOT LINK TO UI - // CabinViewPart.makeDirectory(); - // printToFile = new PrintWriter(CabinViewPart.getFilePath() - // + "costmap.txt"); - // for (int i = 0; i < dimensions.getY(); i++) { - // for (int j = 0; j < dimensions.getX(); j++) { - // if (map[j][i] == -1) { - // printToFile.print("X\t"); - // } else { - // printToFile.print(map[j][i] + "\t"); - // } - // } - // printToFile.println(); - // } - // } catch (FileNotFoundException e) { - // Log.add(this, "Could not save cost map to file."); - // } catch (NullPointerException e) { - // Log.add(this, "The file path is not available."); - } finally { - // printToFile.close(); - } - } - /** * This method returns the already calculated cost of a * specific point in the cost map. @@ -309,6 +297,7 @@ public int getCost(Vector point) { try { return map[point.getX()][point.getY()]; } catch (ArrayIndexOutOfBoundsException e) { + e.printStackTrace(); System.out.println( "###### !ArrayIndexOutOfBoundsException ERROR! ###### !COSTMAP - getCost()! ######"); return Integer.MAX_VALUE; @@ -329,23 +318,54 @@ public int getCost(Vector point) { private int getCostForCoordinates(int xCord, int yCord) { try { - if (xCord >= 0 && yCord >= 0 && xCord < dimensions.getX() - && yCord < dimensions.getY()) { + if (xCord >= 0 && yCord >= 0 && xCord < size.getX() + && yCord < size.getY()) { return map[xCord][yCord]; } return Integer.MAX_VALUE; } catch (ArrayIndexOutOfBoundsException e) { + e.printStackTrace(); System.out.println( "###### !ArrayIndexOutOfBoundsException ERROR! ###### !COSTMAP - getCostForCoordinate()! ######"); return Integer.MAX_VALUE; } } + /** + * Sort the list. + * + * @param sortedList + * the sorted list + * @return the array list + */ private ArrayList sortTheList(ArrayList sortedList) { Collections.sort(sortedList); return sortedList; } + /** + * Gets the maximum cost. + * + * @return the maximum cost + */ + public int getMaximumCost() { + int maximum = 0; + for (int i = 0; i < size.getX(); i++) { + for (int j = 0; j < size.getY(); j++) { + if (map[i][j] > maximum) { + maximum = map[i][j]; + } + } + } + return maximum; + } + + /** + * Check lowest cost. + * + * @param point + * the point + */ private void checkLowestCost(Vector point) { if (getCost(point) != 0) { if (getCost(point) < lowestCost) { @@ -358,37 +378,44 @@ private void checkLowestCost(Vector point) { * This method delivers all 8 surrounding points of a specific point in the * cost map. Starting in the north, all points are collected clockwise. * - * @param pointX + * @param x * x coordinate of the middle point - * @param pointY + * @param y * y coordinate of the middle point * @return returns the point vector */ - public ArrayList getSurroundingPoints(int pointX, int pointY) { - ArrayList surroundingPoints = new ArrayList(); - surroundingPoints.add(new Vector3D(pointX, pointY - 1, - getCostForCoordinates(pointX, pointY - 1))); - surroundingPoints.add(new Vector3D(pointX + 1, pointY - 1, - getCostForCoordinates(pointX + 1, pointY - 1))); - surroundingPoints.add(new Vector3D(pointX + 1, pointY, - getCostForCoordinates(pointX + 1, pointY))); - surroundingPoints.add(new Vector3D(pointX + 1, pointY + 1, - getCostForCoordinates(pointX + 1, pointY + 1))); - surroundingPoints.add(new Vector3D(pointX, pointY + 1, - getCostForCoordinates(pointX, pointY + 1))); - surroundingPoints.add(new Vector3D(pointX - 1, pointY + 1, - getCostForCoordinates(pointX - 1, pointY + 1))); - surroundingPoints.add(new Vector3D(pointX - 1, pointY, - getCostForCoordinates(pointX - 1, pointY))); - surroundingPoints.add(new Vector3D(pointX - 1, pointY - 1, - getCostForCoordinates(pointX - 1, pointY - 1))); - return surroundingPoints; + public ArrayList getSurroundingPoints(int x, int y) { + ArrayList neighbors = new ArrayList(); + neighbors.add(new Vector3D(x, y - 1, getCostForCoordinates(x, y - 1))); + neighbors.add(new Vector3D(x + 1, y - 1, + getCostForCoordinates(x + 1, y - 1))); + neighbors.add(new Vector3D(x + 1, y, getCostForCoordinates(x + 1, y))); + neighbors.add(new Vector3D(x + 1, y + 1, + getCostForCoordinates(x + 1, y + 1))); + neighbors.add(new Vector3D(x, y + 1, getCostForCoordinates(x, y + 1))); + neighbors.add(new Vector3D(x - 1, y + 1, + getCostForCoordinates(x - 1, y + 1))); + neighbors.add(new Vector3D(x - 1, y, getCostForCoordinates(x - 1, y))); + neighbors.add(new Vector3D(x - 1, y - 1, + getCostForCoordinates(x - 1, y - 1))); + + return neighbors; } + /** + * Gets the point parking helper. + * + * @return the point parking helper + */ private ArrayList getPointParkingHelper() { return pointParkingHelper; } + /** + * Gets the point parking. + * + * @return the point parking + */ private ArrayList getPointParking() { return pointParking; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Node.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Node.java index 25c8f629..787d8373 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Node.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/Node.java @@ -6,8 +6,10 @@ package net.bhl.cdt.paxelerate.model.astar; import java.util.ArrayList; +import java.util.ListIterator; import net.bhl.cdt.paxelerate.model.CabinFactory; +import net.bhl.cdt.paxelerate.model.ObjectOption; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; @@ -17,61 +19,206 @@ * for the path finding algorithm. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class Node implements Comparable { + + /** The previous node. */ private Node north, northEast, east, southEast, south, southWest, west, northWest, previousNode; - private ArrayList neighborList; - private double distanceFromStart; - private int costFromStart, cost, - numberOfOccupations = 0, numberOfInterrupts = 0; - private Vector position = new Vector2D(0, 0); + /** The distance from start. */ + private double distanceFromStart, distanceToClosestObstacle; + + /** The obstacle value. */ + private int costFromStart, numberOfOccupations = 0, numberOfInterrupts = 0, + obstacleValue = 0; + + /** The property. */ private Property property; + + /** The hidden. */ private boolean hidden = false; + + /** The linked passenger. */ private Passenger linkedPassenger; + + /** The start list. */ private ArrayList startList = new ArrayList(); + /** The position. */ + private Vector position = new Vector2D(0, 0); + + /** The obstacle type. */ + private ObjectOption obstacleType; + + /** + * Gets the obstacle type. + * + * @return the obstacle type + */ + public ObjectOption getObstacleType() { + return obstacleType; + } + + /** + * Sets the obstacle type. + * + * @param obstacleType + * the new obstacle type + */ + public void setObstacleType(ObjectOption obstacleType) { + this.obstacleType = obstacleType; + } + + /** + * Gets the distance to closest obstacle. + * + * @return the distance to closest obstacle + */ + public double getDistanceToClosestObstacle() { + return distanceToClosestObstacle; + } + + /** + * Sets the distance to closest obstacle. + * + * @param distanceToClosestObstacle the new distance to closest obstacle + */ + public void setDistanceToClosestObstacle(double distanceToClosestObstacle) { + this.distanceToClosestObstacle = distanceToClosestObstacle; + } + + /** + * Gets the obstacle value. + * + * @return the obstacle value + */ + public int getObstacleValue() { + return obstacleValue; + } + + /** + * Sets the obstacle value. + * + * @param obstacleValue + * the new obstacle value + */ + public void setObstacleValue(int obstacleValue) { + this.obstacleValue = obstacleValue; + } + + /** + * Gets the number of interrupts. + * + * @return the number of interrupts + */ public int getNumberOfInterrupts() { return numberOfInterrupts; } + /** + * Raise number of interrupts. + */ public void raiseNumberOfInterrupts() { this.numberOfInterrupts++; } + /** + * Gets the number of occupations. + * + * @return the number of occupations + */ public int getNumberOfOccupations() { return numberOfOccupations; } + /** + * Raise number of occupations. + */ public void raiseNumberOfOccupations() { this.numberOfOccupations++; } + /** + * Gets the start list. + * + * @return the start list + */ public ArrayList getStartList() { return startList; } + /** + * Checks if is hidden. + * + * @return true, if is hidden + */ public boolean isHidden() { return this.hidden; } + /** + * Sets the hidden. + */ public void setHidden() { this.hidden = true; } + /** + * Sets the start list. + * + * @param startList + * the new start list + */ public void setStartList(ArrayList startList) { this.startList = startList; } /** - * - * @author marc.engelmann + * The Enum Property. * + * @author marc.engelmann */ public enum Property { - OBSTACLE, AGENT, DEFAULT, START, GOAL + + /** The obstacle. */ + OBSTACLE, + /** The agent. */ + AGENT, + /** The default. */ + DEFAULT, + /** The start. */ + START, + /** The goal. */ + GOAL + } + + /** + * The Enum Direction. + * + * @author marc.engelmann + */ + public enum Direction { + + /** The north. */ + NORTH, + /** The north east. */ + NORTH_EAST, + /** The east. */ + EAST, + /** The south east. */ + SOUTH_EAST, + /** The south. */ + SOUTH, + /** The south west. */ + SOUTH_WEST, + /** The west. */ + WEST, + /** The north west. */ + NORTH_WEST; } /** @@ -81,37 +228,54 @@ public enum Property { * is the position vector */ public Node(Vector vector) { - neighborList = new ArrayList(); - position = vector; - this.distanceFromStart = Integer.MAX_VALUE; + + this.position = vector; + // value 0 causes a strange path for the first agent + this.distanceFromStart = Integer.MAX_VALUE; this.costFromStart = Integer.MAX_VALUE; property = Property.DEFAULT; linkedPassenger = CabinFactory.eINSTANCE.createPassenger(); linkedPassenger.setId(Integer.MAX_VALUE); + this.obstacleType = null; } /** - * This method returns the cost of the node. - * - * @return the cost + * Gets the property. + * + * @return the property */ - public int getCost() { - return cost; - } - - public Property getProperty() { + public synchronized Property getProperty() { return property; } + /** + * Gets the passenger. + * + * @return the passenger + */ public Passenger getPassenger() { return linkedPassenger; } + /** + * Sets the property. + * + * @param property + * the property + * @param agentID + * the agent id + */ public synchronized void setProperty(Property property, Passenger agentID) { this.property = property; this.linkedPassenger = agentID; } + /** + * Removes the item by id. + * + * @param id + * the id + */ public synchronized void removeItemById(int id) { NodeProperty theCulprit = null; for (NodeProperty property : startList) { @@ -124,15 +288,10 @@ public synchronized void removeItemById(int id) { } /** - * This method sets the cost of the node. - * - * @param cost - * the cost + * Gets the type for printing. + * + * @return the type for printing */ - public void setCost(int cost) { - this.cost = cost; - } - public String getTypeForPrinting() { switch (property) { case OBSTACLE: @@ -155,136 +314,48 @@ public String getTypeForPrinting() { } /** - * This method sets the corresponding node. - * - * @param north - * is the node + * Adds the neighbor. + * + * @param node + * the node + * @param direction + * the direction */ - public void setNorth(Node north) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.north)) { - neighborList.remove(this.north); - } - neighborList.add(north); + public void addNeighbor(Node node, Direction direction) { - // set the new Node - this.north = north; - } + switch (direction) { + case NORTH: + this.north = node; + break; - /** - * This method sets the corresponding node. - * - * @param northEast - * is the node - */ - public void setNorthEast(Node northEast) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.northEast)) { - neighborList.remove(this.northEast); - } - neighborList.add(northEast); + case NORTH_EAST: + this.northEast = node; + break; - // set the new Node - this.northEast = northEast; - } + case EAST: + this.east = node; + break; - /** - * This method sets the corresponding node. - * - * @param east - * is the node - */ - public void setEast(Node east) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.east)) { - neighborList.remove(this.east); - } - neighborList.add(east); + case SOUTH_EAST: + this.southEast = node; + break; - // set the new Node - this.east = east; - } - - /** - * This method sets the corresponding node. - * - * @param southEast - * is the node - */ - public void setSouthEast(Node southEast) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.southEast)) { - neighborList.remove(this.southEast); - } - neighborList.add(southEast); - - // set the new Node - this.southEast = southEast; - } + case SOUTH: + this.south = node; + break; - /** - * This method sets the corresponding node. - * - * @param south - * is the node - */ - public void setSouth(Node south) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.south)) { - neighborList.remove(this.south); - } - neighborList.add(south); + case SOUTH_WEST: + this.southWest = node; + break; - // set the new Node - this.south = south; - } + case WEST: + this.west = node; + break; - /** - * This method sets the corresponding node. - * - * @param southWest - * is the node - */ - public void setSouthWest(Node southWest) { - if (neighborList.contains(this.southWest)) { - neighborList.remove(this.southWest); + case NORTH_WEST: + this.northWest = node; + break; } - neighborList.add(southWest); - this.southWest = southWest; - } - - /** - * This method sets the corresponding node. - * - * @param west - * is the node - */ - public void setWest(Node west) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.west)) { - neighborList.remove(this.west); - } - neighborList.add(west); - - // set the new Node - this.west = west; - } - - /** - * This method sets the corresponding node. - * - * @param northWest - * is the node. - */ - public void setNorthWest(Node northWest) { - // replace the old Node with the new one in the neighborList - if (neighborList.contains(this.northWest)) { - neighborList.remove(this.northWest); - } - neighborList.add(northWest); - - // set the new Node - this.northWest = northWest; } /** @@ -294,7 +365,25 @@ public void setNorthWest(Node northWest) { */ public ArrayList getNeighborList() { - return neighborList; + ArrayList neighbors = new ArrayList<>(); + + neighbors.add(north); + neighbors.add(northEast); + neighbors.add(east); + neighbors.add(southEast); + neighbors.add(south); + neighbors.add(southWest); + neighbors.add(west); + neighbors.add(northWest); + + ListIterator iterator = neighbors.listIterator(); + while (iterator.hasNext()) { + if (iterator.next() == null) { + iterator.remove(); + } + } + + return neighbors; } /** @@ -308,9 +397,9 @@ public double getDistanceFromStart() { /** * This method sets the distance to the start. - * - * @param f - * the distance + * + * @param distance + * the new distance from start */ public void setDistanceFromStart(double distance) { this.distanceFromStart = distance; @@ -344,16 +433,6 @@ public Vector getPosition() { return position; } - /** - * This method returns the cost from the start. - * - * @param costFromStart - * is the cost from the start - */ - public void setCostFromStart(int costFromStart) { - this.costFromStart = costFromStart; - } - /** * This method checks for equality with another node. * @@ -366,6 +445,15 @@ public boolean equalsOtherNode(Node node) { && (node.getPosition().getY() == position.getY()); } + /** + * Checks if is obstacle. + * + * @return true, if is obstacle + */ + public boolean isObstacle() { + return property == Property.OBSTACLE; + } + /** * This method compares two nodes. * @@ -373,33 +461,54 @@ public boolean equalsOtherNode(Node node) { * the other node * @return returns the better node value */ + @Override public synchronized int compareTo(Node otherNode) { int better = -1; int equal = 0; int worse = 1; - - /* if this node is cheaper, it is better */ + + /* if this node is cheaper, it is better */ if (costFromStart < otherNode.costFromStart) { return better; - - /* if the other node is cheaper, this one is worse */ + + /* if the other node is cheaper, this one is worse */ } else if (costFromStart > otherNode.costFromStart) { return worse; - + /* if they are equally expensive, check the distance */ } else { - - /* if this node is closer to the start, it is better */ - if(distanceFromStart < otherNode.distanceFromStart) { + + /* if this node is closer to the start, it is better */ + if (distanceFromStart < otherNode.distanceFromStart) { return better; /* if the distance is greater, it is worse */ - } else if(distanceFromStart > otherNode.distanceFromStart) { + } else if (distanceFromStart > otherNode.distanceFromStart) { return worse; - - /* else the nodes are equal (concerning the criteria used here) */ + + /* + * else the nodes are equal (concerning the criteria used here) + */ } else { return equal; } } } + + /** + * Gets the cost from start. + * + * @return the cost from start + */ + public int getCostFromStart() { + return costFromStart; + } + + /** + * Sets the cost from start. + * + * @param cost the new cost from start + */ + public void setCostFromStart(int cost) { + costFromStart = cost; + } } \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/NodeProperty.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/NodeProperty.java index eb5e3637..d9488f23 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/NodeProperty.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/NodeProperty.java @@ -9,20 +9,25 @@ /** * This class defines the property values of a node. - * - * @see node.java - * @author marc.engelmann * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * @see node.java */ public class NodeProperty { + /** The agent id. */ private int agentID; + + /** The property. */ private Property property; /** - * - * @param agentID - * @param property + * Instantiates a new node property. + * + * @param agentID the agent id + * @param property the property */ public NodeProperty(int agentID, Property property) { this.agentID = agentID; @@ -30,32 +35,36 @@ public NodeProperty(int agentID, Property property) { } /** - * - * @return + * Gets the agent id. + * + * @return the agent id */ public int getAgentID() { return agentID; } /** - * - * @param agentID + * Sets the agent id. + * + * @param agentID the new agent id */ public void setAgentID(int agentID) { this.agentID = agentID; } /** - * - * @return + * Gets the property. + * + * @return the property */ public Property getProperty() { return property; } /** - * - * @param property + * Sets the property. + * + * @param property the new property */ public void setProperty(Property property) { this.property = property; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleGenerator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleGenerator.java new file mode 100644 index 00000000..178b7a11 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleGenerator.java @@ -0,0 +1,450 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.model.astar; + +import java.util.ArrayList; + +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.DoorOption; +import net.bhl.cdt.paxelerate.model.LayoutConcept; +import net.bhl.cdt.paxelerate.model.ObjectOption; +import net.bhl.cdt.paxelerate.model.PhysicalObject; +import net.bhl.cdt.paxelerate.model.Row; +import net.bhl.cdt.paxelerate.model.Seat; +import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.model.astar.Node.Property; +import net.bhl.cdt.paxelerate.model.util.POHelper; +import net.bhl.cdt.paxelerate.util.math.MathHelper; +import net.bhl.cdt.paxelerate.util.math.Vector3D; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * This class represents an obstacle map. Every point in the two dimensional + * array has a specific value which represents the strength of the obstacle. + * + * @author marc.engelmann, michael.schmidt + * @version 1.1 + * @since 0.5 + * + */ + +public class ObstacleGenerator { + + /** The scale. */ + private double scale; + + /** The developer mode. */ + private boolean developerMode; + + /** The areamap. */ + private Areamap areamap; + + /** The cabin. */ + private Cabin cabin; + + /** a list of all obstacle nodes. */ + private ArrayList obstacles = new ArrayList<>(); + + /** The gradient. */ + private GradientOption gradient; + + /** + * The different options for the gradient. + */ + public enum GradientOption { + + /** The linear. */ + LINEAR, + /** The cubic. */ + CUBIC, + /** The exponential. */ + EXPONENTIAL; + } + + /** + * This method generates a new obstacle generator. + * + * @param areamap + * the area map on which the obstacles should be applied to + * @param cabin + * the cabin from which to get the values + * @param gradientOption + * the gradient option + */ + public ObstacleGenerator(Areamap areamap, Cabin cabin, + GradientOption gradientOption) { + + /* store the needed values locally */ + this.areamap = areamap; + this.gradient = gradientOption; + this.scale = cabin.getSimulationSettings().getScale(); + this.developerMode = cabin.getSimulationSettings().isDeveloperMode(); + this.cabin = cabin; + + /* loop through all nodes and apply the default value */ + for (Node node : areamap.getNodes()) { + node.setObstacleValue(AreamapHandler.DEFAULT_VALUE); + } + + /* apply obstacle values to all obstacle positions */ + for (ObjectOption option : ObjectOption.VALUES) { + generateObstacles(option); + } + + checkForGaps(); + + /* generate the potential gradient around all obstacles */ + generatePotentialGradient(); + + /* generate a depression in the potential for the paths */ + generateDoorDepressions(); + + /* generate a depression in the potential for the aisles */ + generateAisleDepressions(); + + } + + /** + * This method creates the potential gradient around obstacle. + */ + private void generatePotentialGradient() { + + /* loop through all nodes */ + for (Node node : areamap.getNodes()) { + + /* + * only consider the ones which are no obstacle and have not been + * calculated before + */ + if (!node.isObstacle() && node + .getObstacleValue() == AreamapHandler.DEFAULT_VALUE) { + + /* calculate the distance to the closest obstacle node */ + double distanceToClosestObstacle = AreamapHandler + .minimumDistanceToObstacle(node, obstacles); + + /* + * check if the distance is smaller than the maximum allowed + * gradient width + */ + if (distanceToClosestObstacle <= AreamapHandler.GRADIENT_WIDTH) { + + /* calculate the gradient value and apply it to the node */ + node.setObstacleValue(getDistanceByOption( + distanceToClosestObstacle, gradient)); + node.setDistanceToClosestObstacle( + distanceToClosestObstacle); + } + } + } + } + + /** + * This function calculates the gradient value at a specific position within + * an integer array. + * + * @param distance + * is the position within the gradient + * @param option + * defines the option used for the gradient + * @return returns the value + */ + private int getDistanceByOption(double distance, GradientOption option) { + + /* calculate the value depending on the chosen function */ + switch (option) { + + case LINEAR: + + /* use linear interpolation here */ + return (int) MathHelper.linearInterpolation( + AreamapHandler.GRADIENT_UPPER_BOUND, + AreamapHandler.GRADIENT_LOWER_BOUND, + (AreamapHandler.GRADIENT_WIDTH - 1), (distance - 1)); + + default: + + /* return the default value */ + return AreamapHandler.DEFAULT_VALUE; + } + } + + /** + * This method generates the obstacle hole in the door path. This means that + * in the door area, the obstacle value is set to HOLE_VALUE. This makes the + * passengers use the door path as their preferred path. + */ + private void generateDoorDepressions() { + + /* Create the door paths for every door */ + for (Door door : cabin.getDoors()) { + + /* do not make a hole for emergency exits */ + if (door.getDoorOption() != DoorOption.EMERGENCY_EXIT) { + + /* get the borders of the door within the area map */ + int entryMin = (int) (door.getXPosition() / scale) + + AreamapHandler.NARROWING_OF_DOOR_PATH_IN_PIXELS; + int entryMax = (door.getXPosition() + door.getWidth()) + / (int) scale + - AreamapHandler.NARROWING_OF_DOOR_PATH_IN_PIXELS; + + /* loop through all nodes */ + for (Node node : areamap.getNodes()) { + + /* get the x position of the node */ + int x = node.getPosition().getX(); + + /* + * check if the node is within the door area and no obstacle + */ + if (x >= entryMin && x <= entryMax && !node.isObstacle()) { + + /* create a potential hole within the area map */ + node.setObstacleValue(AreamapHandler.HOLE_VALUE); + } + } + } + } + } + + /** + * Generate a hole in the potential of the area map where the aisle is + * located. + */ + private void generateAisleDepressions() { + + /* the minimum aisle width for automatic detection */ + int minimumAisleWidth = 4; + + /* loop through every class */ + for (TravelClass travelclass : cabin.getClasses()) { + + /* get the first row of each class */ + Row firstRowOfClass = travelclass.getRows().get(0); + + /* store a list of all aisles per class */ + ArrayList aisles = new ArrayList<>(); + + /* store the previous y position */ + int lastYPosition = 0; + + /* + * loop through all seats of the first row in order to find the gaps + */ + for (Seat seat : firstRowOfClass.getSeats()) { + + /* calculate the gap between current and previous seat */ + int gap = seat.getYPosition() / (int) scale - lastYPosition; + + /* if the gap is bigger than the predefined minimum, continue */ + if (gap >= minimumAisleWidth) { + + /* save the found aisle to the aisles list */ + aisles.add(new Vector3D(seat.getXPosition() / (int) scale, + seat.getYPosition() / (int) scale - gap, gap)); + + /* x & y = position of top left corner & z = width */ + } + + /* store the new last y position of the previous seat */ + lastYPosition = (seat.getYPosition() + seat.getYDimension()) + / (int) scale; + } + + /* load a seat from the last row of the current class */ + Seat lastSeat = travelclass.getRows() + .get(travelclass.getRows().size() - 1).getSeats().get(0); + + /* get the position of the end of the last seat in the class */ + int endOfLastRowSeat = (lastSeat.getXPosition() + + lastSeat.getXDimension()) / (int) scale; + + /* loop through all aisle found above */ + for (Vector3D aisle : aisles) { + + /* loop through the whole area of the aisle */ + for (int x = aisle.getX() + - AreamapHandler.AISLE_OVERLAP_FRONT_AND_REAR; x <= endOfLastRowSeat + + AreamapHandler.AISLE_OVERLAP_FRONT_AND_REAR; x++) { + for (int y = aisle.getY() + + AreamapHandler.NARROWING_OF_AISLE_PATH_IN_PIXELS; y < aisle + .getY() + - AreamapHandler.NARROWING_OF_AISLE_PATH_IN_PIXELS + + aisle.getZ(); y++) { + + /* check if there might be an obstacle somewhere */ + if (!areamap.get(x, y).isObstacle()) { + + /* apply the hole value */ + areamap.get(x, y).setObstacleValue( + AreamapHandler.HOLE_VALUE); + } + } + } + /* for debugging, output the found aisles */ + if (developerMode) { + System.out.println(travelclass.getName() + + ": aisle detected at " + aisle.getX() + "|" + + aisle.getY() + " , width: " + aisle.getZ()); + } + + } + } + } + + /** + * This function iterates through all instances of a specific class and + * generates the obstacles. + * + * @param option + * is the Class of the object that should be used + */ + private void generateObstacles(ObjectOption option) { + + /* first loop through every physical object within the cabin */ + for (PhysicalObject obj : POHelper.getObjectsByOption(option, cabin)) { + + /* define the dimension and position of the object */ + int xDimension = obj.getXDimension() / (int) scale; + int xPosition = obj.getXPosition() / (int) scale; + + int yDimension = obj.getYDimension() / (int) scale; + int yPosition = obj.getYPosition() / (int) scale; + + /* check if the object is a seat */ + if (obj instanceof Seat) { + + /* cast the object */ + Seat seat = (Seat) obj; + + /* + * check for sideways foldable seats and if it is currently + * folded + */ + if (cabin.getSimulationSettings() + .getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT + && seat.getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT) { + + /* if so, do not create an obstacle for that seat */ + continue; + + /* + * check for folding seat pans and if it is currently folded + */ + } else if (cabin.getSimulationSettings() + .getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS + && seat.getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS) { + + /* only the backrest is visible (percentage value) */ + int backrestThickness = 20; + xDimension = xDimension * backrestThickness / 100; + xPosition = xPosition + yDimension - xDimension; + + } + } + + /* loop from 0 to the dimension of the object */ + for (int relativePositionX = 0; relativePositionX < xDimension; relativePositionX++) { + for (int relativePositionY = 0; relativePositionY < yDimension; relativePositionY++) { + + /* begin at the top left corner */ + int absolutePositionX = xPosition + relativePositionX; + int absolutePositionY = yPosition + relativePositionY; + + /* get the node at the current position */ + Node node = areamap.get(absolutePositionX, + absolutePositionY); + + /* check if the node is already an obstacle! */ + // TODO: catch NullPointerException + if (node.isObstacle()) { + + Log.add(this, + + "WARNING! Overlap between 2 objects at x: " + + node.getPosition().getX() + ", y: " + + node.getPosition().getY()); + + } else { + + /* define the attributes to the current position */ + node.setObstacleValue(Integer.MAX_VALUE); + node.setProperty(Property.OBSTACLE, null); + node.setObstacleType(option); + + /* add the obstacle to the list of obstacles */ + obstacles.add(node); + } + } + } + } + } + + /** + * Check for gaps. + */ + private void checkForGaps() { + + /* loop through all nodes */ + for (Node node : areamap.getNodes()) { + + /* check if node is an obstacle */ + if (node.isObstacle()) { + + /* + * check if the node has one more node between itself and the + * border in the y dimension + */ + if (node.getPosition().getY() == 1 || node.getPosition() + .getY() == areamap.getDimensions().getY() - 2) { + + if (developerMode) { + System.out.println( + "detected: " + node.getPosition().getX() + " / " + + node.getPosition().getY()); + } + + /* check if the other node is not yet an obstacle */ + if (!areamap.get(node.getPosition().getX(), 0) + .isObstacle()) { + + Node newNode = areamap.get(node.getPosition().getX(), + 0); + + /* define the attributes to the current position */ + newNode.setObstacleValue(Integer.MAX_VALUE); + newNode.setProperty(Property.OBSTACLE, null); + newNode.setObstacleType(node.getObstacleType()); + } + if (!areamap + .get(node.getPosition().getX(), + areamap.getDimensions().getY() - 1) + .isObstacle()) { + + Node newNode = areamap.get(node.getPosition().getX(), + areamap.getDimensions().getY() - 1); + + /* define the attributes to the current position */ + newNode.setObstacleValue(Integer.MAX_VALUE); + newNode.setProperty(Property.OBSTACLE, null); + newNode.setObstacleType(node.getObstacleType()); + } + } + } + } + } + + /** + * Return map. + * + * @return the areamap + */ + public Areamap returnMap() { + return areamap; + } +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleMap.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleMap.java deleted file mode 100644 index 5f9a63e0..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/ObstacleMap.java +++ /dev/null @@ -1,324 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ***************************************************************************************/ -package net.bhl.cdt.paxelerate.model.astar; - -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.ObjectOption; -import net.bhl.cdt.paxelerate.model.PhysicalObject; -import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.util.POHelper; -import net.bhl.cdt.paxelerate.util.math.Vector; - -/** - * This class represents an obstacle map. Every point in the two dimensional - * array has a specific value which represents the strength of the obstacle. - * - * @author marc.engelmann - * - */ - -public class ObstacleMap { - private Cabin cabin; - private Vector dimensions; - private static final int MAX_VALUE = 100000, BASIC_VALUE = 3, - OBSTACLE_RANGE_IN_CM = 20, POTENTIAL_AROUND_OBSTACLE_MAXIMUM = 100, - HOLE_VALUE = 1; // DO NEVER SET THIS TO ZERO! - private static int[][] obstacleMap; - - /** - * This method constructs the obstacle map. - * - * @param cabin - * is the input cabin - */ - public ObstacleMap(Vector dimensions, Cabin cabin) { - this.cabin = cabin; - this.dimensions = dimensions; - obstacleMap = createObstacleMap(); - } - - /** - * This method returns the basic obstacle value. - * - * @return returns the obstacle value - */ - public static int getBasicValue() { - return BASIC_VALUE; - } - - /** - * - * @return - */ - public static int getPotentialValue() { - return POTENTIAL_AROUND_OBSTACLE_MAXIMUM; - } - - /** - * - * @return - */ - public static int getHoleValue() { - return HOLE_VALUE; - } - - /** - * This method returns the obstacle value. - * - * @return the obstacle value - */ - public static int getObstacleValue() { - return MAX_VALUE; - } - - /** - * This function returns the obstacle map. - * - * @return the obstacle map - */ - public int[][] getMap() { - return obstacleMap; - } - - /** - * This method generates the obstacle Map. - * - * @param - * - * @return obstacleMap is the obstacle map two dimensional array - */ - private int[][] createObstacleMap() { - obstacleMap = new int[dimensions.getX()][dimensions.getY()]; - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - obstacleMap[i][j] = BASIC_VALUE; - } - } - - for (ObjectOption option : ObjectOption.VALUES) { - generateObstacles(option); - } - - generateAisleHole(); - generatePotentialGradient(); - return obstacleMap; - } - - /** - * This method creates the potential gradient around obstacle. - */ - private void generatePotentialGradient() { - int range = OBSTACLE_RANGE_IN_CM / cabin.getScale(); - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - if (obstacleMap[i][j] == MAX_VALUE) { - for (int p = 1; p < range; p++) { - /** WEST - EAST - NORTH - SOUTH */ - if (((i - p) > 0) - && (obstacleMap[i - p][j] != MAX_VALUE)) { - obstacleMap[i - - p][j] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - if (((i + p) < dimensions.getX()) - && (obstacleMap[i + p][j] != MAX_VALUE)) { - obstacleMap[i - + p][j] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - - if (((j - p) > 0) - && (obstacleMap[i][j - p] != MAX_VALUE)) { - obstacleMap[i][j - - p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - if (((j + p) < dimensions.getY()) - && (obstacleMap[i][j + p] != MAX_VALUE)) { - obstacleMap[i][j - + p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - /* - * In order to create some kind of rounded shape around - * the obstacle, the corners are left out on the last - * loop of the gradient generation. - */ - if (p < (range - 1)) { - /** NORTHWEST - NORTHEAST - SOUTHEAST - SOUTHWEST */ - if ((((i - p) > 0) && ((j - p) > 0)) - && (obstacleMap[i - p][j - - p] != MAX_VALUE)) { - obstacleMap[i - p][j - - p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - if ((((i + p) < dimensions.getX()) && ((j - p) > 0)) - && (obstacleMap[i + p][j - - p] != MAX_VALUE)) { - obstacleMap[i + p][j - - p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - if ((((j + p) < dimensions.getY()) - && ((i + p) < dimensions.getX())) - && (obstacleMap[i + p][j - + p] != MAX_VALUE)) { - obstacleMap[i + p][j - + p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - if ((((j + p) < dimensions.getY()) && ((i - p) > 0)) - && (obstacleMap[i - p][j - + p] != MAX_VALUE)) { - obstacleMap[i - p][j - + p] = POTENTIAL_AROUND_OBSTACLE_MAXIMUM - - p; - } - } - } - } - } - } - } - - /** - * This method generates the obstacle hole in the aisle. This means that in - * the aisle, the obstacle value is set to HOLE_VALUE. This makes the - * passengers use the aisle as their preferred path. - */ - private void generateAisleHole() { - int entryMin = 0; - int entryMax = 0; - - /* - * Create the door path - */ - - for (Door door : cabin.getDoors()) { - entryMin = (door.getXPosition() / cabin.getScale()) + 2; - entryMax = (door.getXPosition() + door.getWidth()) - / cabin.getScale() - 2; - - for (int i = 0; i < dimensions.getY(); i++) { - for (int j = 0; j < dimensions.getX(); j++) { - if (obstacleMap[j][i] != MAX_VALUE) { - if (j > entryMin && j < entryMax) { - obstacleMap[j][i] = HOLE_VALUE; - } - - if (!cabin.getSimulationSettings().isBringYourOwnSeat() - && !cabin.getSimulationSettings() - .isUseFoldableSeats()) { - if (i < 19 && i > 16) { - obstacleMap[j][i] = HOLE_VALUE; - } - } else if (cabin.getSimulationSettings() - .isUseFoldableSeats() - && !cabin.getSimulationSettings() - .isBringYourOwnSeat()) { - if (i < 21 && i > 16) { - obstacleMap[j][i] = HOLE_VALUE; - } - if (j > 20) { - if (i == 19) { - obstacleMap[j][i] = 900; - } - } - } else { - if (j > 20) { - if (i == 5 || i == 10 || i == 15 || i == 31 - || i == 26 || i == 21) { - obstacleMap[j][i] = 900; - } - } - } - } - } - } - } - } - - /** - * This function iterates through all instances of a specific class and - * generates the obstacles. - * - * @param physicalObjectSubclass - * is the Class of the object that should be used - */ - private void generateObstacles(ObjectOption option) { - for (PhysicalObject obj : POHelper.getObjectByOption(option, cabin)) { - if (obj instanceof Seat) { - if (cabin.getSimulationSettings().isUseFoldableSeats() - && ((Seat) obj).isCurrentlyFolded()) { - break; - } - } - - int yDimension = obj.getYDimension() / cabin.getScale(); - int xDimension = obj.getXDimension() / cabin.getScale(); - int xPosition = obj.getXPosition() / cabin.getScale(); - int yPosition = obj.getYPosition() / cabin.getScale(); - - for (int i = 0; i < xDimension; i++) { - for (int j = 0; j < yDimension; j++) { - int k = xPosition + i; - int l = yPosition + j; - if (k < dimensions.getX() && l < dimensions.getY()) { - obstacleMap[k][l] = MAX_VALUE; - } - } - } - } - } - - /** - * This method returns the value of the obstacle map at a specific point. - * - * @param x - * the x value of the point - * @param y - * the y value of the point - * @return the value at the specific point - */ - public int getValueAtPoint(int x, int y) { - return obstacleMap[x][y]; - } - - public void print() { - for (int i = 0; i < dimensions.getX(); i++) { - for (int j = 0; j < dimensions.getY(); j++) { - System.out.print(obstacleMap[i][j] + "\t"); - } - System.out.println(); - } - } - - /** - * This method saves the obstacle map in a text file to the documents - * folder. - */ - // TODO disabled to unlink model from ui - // public void printObstacleMap() { - // PrintWriter printToFile = null; - // try { - // CabinViewPart.makeDirectory(); - // printToFile = new PrintWriter(CabinViewPart.getFilePath() - // + "obstaclemap.txt"); - // for (int i = 0; i < dimensions.getY(); i++) { - // for (int j = 0; j < dimensions.getX(); j++) { - // printToFile.print(getValueAtPoint(j, i) + "\t"); - // } - // printToFile.println(); - // } - // } catch (FileNotFoundException e) { waypoints = new ArrayList(); /** @@ -118,7 +121,7 @@ public boolean contains(int x, int y) { } /** - * + * Invert. */ public void invert() { @@ -138,10 +141,13 @@ public void invert() { } /** - * + * Cut to point. + * * @param path + * the path * @param point - * @return + * the point + * @return the path */ public Path cutToPoint(Path path, Vector point) { /* get the last node */ @@ -156,10 +162,30 @@ public Path cutToPoint(Path path, Vector point) { } i++; } catch (IndexOutOfBoundsException e) { + e.printStackTrace(); break; } } return newPath; } + /** + * Gets the cost. + * + * @return the cost + * @throws ArithmeticException the arithmetic exception + */ + public int getCost() throws ArithmeticException { + + int cost = 0; + for (Node node : waypoints) { + cost += node.getCostFromStart(); + } + if (cost < 0) { + throw new ArithmeticException( + "Path cost is smaller than zero! -> " + cost); + } else { + return cost; + } + } } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SimulationHandler.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SimulationHandler.java index a22b0010..2c3cfe7f 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SimulationHandler.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SimulationHandler.java @@ -7,6 +7,8 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.eclipse.emf.common.util.EList; @@ -16,70 +18,136 @@ import net.bhl.cdt.paxelerate.model.Seat; import net.bhl.cdt.paxelerate.model.agent.Agent; import net.bhl.cdt.paxelerate.model.agent.AgentFunctions; +import net.bhl.cdt.paxelerate.util.math.DecimalHelper; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; import net.bhl.cdt.paxelerate.util.time.StopWatch; import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; +import net.bhl.cdt.paxelerate.util.toOpenCDT.OS; import net.bhl.cdt.paxelerate.util.toOpenCDT.ProgressHandler; /** * This class runs and handles the a star algorithm an simulation. * - * @author marc.engelmann + * @author marc.engelmann, michael.schmidt + * @version 1.0 + * @since 0.5 * */ public class SimulationHandler { + + /** The cabin. */ private static Cabin cabin; + + /** The simulation done. */ private static Boolean simulationDone = false; + + /** The areamap handler. */ + private static AreamapHandler areamaphandler; + + /* Lists & Maps */ + + /** The way making list. */ private static ArrayList finishedList = new ArrayList(), activeList = new ArrayList(), waymakingList = new ArrayList(); - private static HashMap lastDoorRelease = new HashMap(); + /** The agent list. */ - private static AreaMap areamap; - private static CostMap costmap; - private static ArrayList agentList = new ArrayList(); + private static List agentList = new ArrayList(); + + /** The access pending. */ private static HashMap accessPending = new HashMap(); - private static StopWatch watch = new StopWatch(); + + /* ************ */ + + /** The watch. */ + private static StopWatch master_boarding_time = new StopWatch(); + + /** The dimensions. */ private Vector dimensions; + /** The scale. */ + private static int scale = 1; + + /** The simulation loop index. */ + private static int simulationLoopIndex; + + /** + * Gets the simulation loop index. + * + * @return the simulation loop index + */ + public static int getSimulationLoopIndex() { + return simulationLoopIndex; + } + + /** The Constant SHOW_AREAMAP_ANIMATION. */ public static final boolean SHOW_AREAMAP_ANIMATION = true; + /** The progress. */ private static ProgressHandler progress; - private static int progressValue = 0; - private static int percent = 0; + + /** The costmaps. */ + private static Map costmaps = new HashMap<>(); + + /** The progress value. */ + private static int percent = 0, progressvalue = 0; /** * This method constructs the RunAStar algorithm. - * - * @param obstaclemap - * is the obstacle map - * @param dimensions - * is the dimension vector - * @param cabin - * is the cabin + * + * @param dimensions is the dimension vector + * @param cabin is the cabin + * @param simulationLoopIndex the simulation loop index */ - public SimulationHandler(Vector dimensions, Cabin cabin) { + public SimulationHandler(Vector dimensions, Cabin cabin, + int simulationLoopIndex) { this.dimensions = dimensions; + this.simulationLoopIndex = simulationLoopIndex; Log.add(this, "Cabin initializing..."); - areamap = new AreaMap(this.dimensions, cabin); + areamaphandler = new AreamapHandler(this.dimensions, cabin); SimulationHandler.cabin = cabin; + scale = cabin.getSimulationSettings().getScale(); run(); } + /** + * Gets the number of seated passengers. + * + * @return the number of seated passengers + */ public static int getNumberOfSeatedPassengers() { return finishedList.size(); } + /** + * Adds the to waymaking list. + * + * @param pax + * the pax + */ public static void addToWaymakingList(Passenger pax) { waymakingList.add(pax); } + /** + * Removes the from waymaking list. + * + * @param pax + * the pax + */ public static void removeFromWaymakingList(Passenger pax) { waymakingList.remove(pax); } + /** + * Waymaking in range. + * + * @param pax + * the pax + * @return true, if successful + */ public static boolean waymakingInRange(Passenger pax) { for (Passenger pass : waymakingList) { if (Math.abs(pass.getPositionY() - pax.getPositionY()) < 10) { @@ -94,10 +162,17 @@ public static boolean waymakingInRange(Passenger pax) { * * @return the area map */ - public static AreaMap getMap() { - return areamap; + public synchronized static Areamap getMap() { + return areamaphandler.getAreamap(); } + /** + * Gets the agent by passenger. + * + * @param pax + * the pax + * @return the agent by passenger + */ public static synchronized Agent getAgentByPassenger(Passenger pax) { for (Agent agent : agentList) { if (agent.getPassenger().getId() == pax.getId()) { @@ -108,23 +183,20 @@ public static synchronized Agent getAgentByPassenger(Passenger pax) { } /** - * This method sets the value for simulationDone. - * - * @param bool - * is the boolean + * Gets the cabin. + * + * @return the cabin */ - public static void setSimulationDone(Boolean bool) { - simulationDone = bool; - } - public static Cabin getCabin() { return cabin; } - public static CostMap getCostMap() { - return costmap; - } - + /** + * Removes the passenger. + * + * @param pax + * the pax + */ public static synchronized void removePassenger(Passenger pax) { Agent agent = getAgentByPassenger(pax); agent.remove(); @@ -139,35 +211,53 @@ public static Boolean isSimulationDone() { return simulationDone; } - public static ArrayList getAgentList() { + /** + * Sets the simulation status. + * + * @param status the new simulation status + */ + public static void setSimulationStatus(boolean status) { + simulationDone = status; + } + + /** + * Gets the agent list. + * + * @return the agent list + */ + public static List getAgentList() { return agentList; } + /** + * Reset. + */ public static synchronized void reset() { + + stopSimulation(); + cabin = null; + areamaphandler = null; simulationDone = false; finishedList.clear(); activeList.clear(); - - areamap = null; - costmap = null; + waymakingList.clear(); agentList.clear(); accessPending.clear(); - watch.reset(); - + master_boarding_time.reset(); progress = null; - progressValue = 0; - percent = 0; System.out.println("Simulation Handler resetted!"); } /** * This method signals that a passengers has found his seat. This is done by * adding him to the finishedList ArrayList element. - * + * * @param passenger * is the passenger + * @param setSeated + * the set seated */ public static synchronized void setPassengerSeated(Passenger passenger, boolean setSeated) { @@ -178,43 +268,45 @@ public static synchronized void setPassengerSeated(Passenger passenger, } else { finishedList.remove(passenger); } - if (finishedList.size() >= (cabin.getPassengers().size() - 1)) { - setSimulationDone(true); + if (finishedList.size() == cabin.getPassengers().size()) { + simulationDone = true; + + /* stop the boarding time when the last passenger is seated */ + master_boarding_time.stop(); + + System.out.println("Simulation done!"); } } /** - * This method returns the passenger locations. - * - * @return This is done by submitting the whole cabin. + * Launch waymaking agent. + * + * @param pax + * the pax + * @param myself + * the myself */ - public synchronized Cabin getPassengerLocations() { - return cabin; - } - public static synchronized void launchWaymakingAgent(Passenger pax, Passenger myself) { - Seat seat = pax.getSeatRef(); + Seat seat = pax.getSeat(); int offset = 5; Vector start = new Vector2D(seat.getXPosition() - 2, - seat.getYPosition() + seat.getYDimension() / 2, - cabin.getScale()); + seat.getYPosition() + seat.getYDimension() / 2, scale); - if (pax.getSeatRef().getXPosition() < pax.getDoor().getXPosition()) { + if (pax.getSeat().getXPosition() < pax.getDoor().getXPosition()) { offset = -(offset + 2); System.out.println("offset mirrored"); } - Vector goal = new Vector2D( - seat.getXPosition() + offset * cabin.getScale(), - cabin.getYDimension() / 2.0, cabin.getScale()); + Vector goal = new Vector2D(seat.getXPosition() + offset * scale, + cabin.getYDimension() / 2.0, scale); Agent agent = new Agent(pax, start, goal, - SimulationHandler.getCostMap(), Agent.AgentMode.MAKE_WAY, - myself); + getAgentByPassenger(myself).getCostMap(), + Agent.AgentMode.MAKE_WAY, myself); agent.findNewPath(); agent.start(); pax.setNumberOfMakeWayOperations( @@ -226,25 +318,20 @@ public static synchronized void launchWaymakingAgent(Passenger pax, } /** - * - * @param agentList - */ - public static synchronized void setAgentList(ArrayList agentList) { - SimulationHandler.agentList = agentList; - } - - /** - * - * @return + * Gets the active passengers. + * + * @return the active passengers */ - public static synchronized int getNumberOfPassengersInCabin() { + public static synchronized int getActivePassengers() { return activeList.size(); } /** - * + * Cabin access granted. + * * @param pax - * @return + * the pax + * @return true, if successful */ public synchronized static boolean CabinAccessGranted(Passenger pax) { @@ -252,7 +339,7 @@ public synchronized static boolean CabinAccessGranted(Passenger pax) { /* add the passenger to the waiting list of the specific door */ if (!waitingList.contains(pax)) { - pax.getDoor().getWaitingPassengers().add(pax); + waitingList.add(pax); } if (pax.getId() == waitingList.get(0).getId()) { @@ -260,111 +347,142 @@ public synchronized static boolean CabinAccessGranted(Passenger pax) { /* check if doorway is clear. */ if (!AgentFunctions.doorwayBlocked(pax)) { - /* check if time has passed since releasing last one */ - if (enoughTimePassed(pax)) { - waitingList.remove(pax); - return true; - } + waitingList.remove(pax); + return true; + } } - // TODO: insert minimum delays between launches! return false; } /** - * + * Sets the passenger active. + * * @param pax - * @return + * the new passenger active */ - private static boolean enoughTimePassed(Passenger pax) { - Door door = pax.getDoor(); - if (!lastDoorRelease.containsKey(door)) { - lastDoorRelease.put(door, 0.0); - return true; + public synchronized static void setPassengerActive(Passenger pax) { + + /* + * start the master_boarding_time when the first passenger is set active + */ + + if (activeList.isEmpty() && finishedList.isEmpty()) { + master_boarding_time.start(); } - // TODO: Do not use a static time stamp but consider the simulation - // speed! - double time = watch.getElapsedTimeTens(); - if (Math.abs(lastDoorRelease.get(door) - time) > (AStarHelper.time(0.15) - / 1000.0)) { - lastDoorRelease.put(door, time); - return true; + if (!AStarHelper.PassengerAlreadyInList(pax, activeList)) { + activeList.add(pax); } - return false; } /** - * - * @param pax + * Gets the master boarding time. + * + * @return the master boarding time */ - public synchronized static void setPassengerActive(Passenger pax) { - - if (!AStarHelper.PassengerAlreadyInList(pax, activeList)) { - activeList.add(pax); - } + public static StopWatch getMasterBoardingTime() { + return master_boarding_time; } /** * This method executes the path finding simulation of the agents. */ public void run() { - watch.start(); - costmap = null; - Boolean doItOnce = true; + /* + * Every active door needs its own CostMap.java for path calculations! + * The CostMap.java objects are stored in the HashMap.java and can be + * accessed by the ID of the corresponding door. + */ + for (Door door : cabin.getDoors()) { + + /* check if the door is active */ + if (door.isIsActive()) { + + /* get the 2D position of the door object */ + Vector doorPosition = new Vector2D( + (door.getXPosition() + door.getWidth() / 2), 0, scale); + + /* generate a new cost map */ + Costmap costmap = new Costmap(dimensions, doorPosition, + areamaphandler.getAreamap(), null, false); + + /* add it to the list of CostMaps */ + costmaps.put(door.getId(), costmap); + } + } + + /* loop through all passengers and create their respective agent */ for (Passenger passenger : cabin.getPassengers()) { - Seat seat = passenger.getSeatRef(); + + /* get objects assigned to the passenger */ + Seat seat = passenger.getSeat(); Door door = passenger.getDoor(); + + /* + * create the start location - this is the position of the door + * which the passenger will use to board the plane + */ Vector start = new Vector2D( - (door.getXPosition() + door.getWidth() / 2), 0, - cabin.getScale()); + (door.getXPosition() + door.getWidth() / 2), 0, scale); + /* + * create the goal location. this is the position of the passengers + * seat. The goal is one "PIXEL" in front of the center of the seat. + */ Vector goal = new Vector2D((seat.getXPosition()) - 1, - seat.getYPosition() + seat.getYDimension() / 2, - cabin.getScale()); - - if (doItOnce) { - /* This line generates a costmap which is used for all agents */ - costmap = new CostMap(dimensions, start, areamap, null, false); - costmap.saveMapToFile(); - doItOnce = false; - } + seat.getYPosition() + seat.getYDimension() / 2, scale); - Agent agent = new Agent(passenger, start, goal, costmap, - Agent.AgentMode.GO_TO_SEAT, null); + /* + * Create an agent object for path finding purposes. The cost map is + * loaded from the list of cost maps accordingly + */ + Agent agent = new Agent(passenger, start, goal, + costmaps.get(door.getId()), Agent.AgentMode.GO_TO_SEAT, + null); - // list of all agents + /* add the agent to the list */ agentList.add(agent); } - javax.swing.SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - progress = new ProgressHandler(agentList.size()); - while (progressValue < agentList.size() - 1) { - progress.reportProgress(progressValue); - percent = percentage(progressValue, agentList.size()); - - // TODO: real progress indications for calculation of - // cost map could be implemented! - - if (percent < 10) { - progress.updateText( - "Initializing Path finding algorithms ..."); - } else if (percent < 30) { - progress.updateText("Creating the agent objects ..."); - } else if (percent < 90) { - progress.updateText( - "Calculating the paths for every passenger ..."); - } else { - progress.updateText("Finishing calculations ..."); + if (OS.isWindows() && !cabin.getSimulationSettings().isSimulateWithoutUI()) { + javax.swing.SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + progress = new ProgressHandler(agentList.size()); + while (progressvalue < agentList.size() - 1) { + progress.reportProgress(progressvalue); + + percent = DecimalHelper.percentage(progressvalue, + agentList.size()); + + // TODO: real progress indications for calculation of + // cost map could be implemented! + + if (percent < 10) { + progress.updateText( + "Initializing Path finding algorithms ..."); + } else if (percent < 30) { + progress.updateText( + "Creating the agent objects ..."); + } else if (percent < 90) { + progress.updateText( + "Calculating the paths for every passenger ..."); + } else { + progress.updateText("Finishing calculations ..."); + } } + progress.done(); } - progress.done(); - } - }); + }); + } else if (OS.isMac()) { + // TODO: implement eclipse progress bar + Log.add(this, "Initializing Path finding algorithms ..."); + Log.add(this, "Creating the agent objects ..."); + Log.add(this, "Calculating the paths for every passenger ..."); + } /* First generate all paths ... */ for (Agent agent : agentList) { @@ -375,14 +493,15 @@ public void run() { /* Warn if no path can be found */ } catch (NullPointerException e) { - System.out.println("Passenger " + agent.getPassenger().getId() - + " for Seat " - + agent.getPassenger().getSeatRef().getName() - + " can not find a path to the seat!"); + e.printStackTrace(); + System.out.println("Passenger " + agent.getPassenger().getName() + + " can not find a path to the seat at " + + agent.getGoal().getX() + " / " + + agent.getGoal().getY()); } /* return information to the progress bar */ - progressValue++; + progressvalue++; } /* ... then start the simulations simultaneously */ @@ -392,15 +511,66 @@ public void run() { } } - private int percentage(double now, double max) { - return (int) ((now / max) * 100.0); + /** + * Stop simulation. + */ + public static void stopSimulation() { + for (Agent agent : agentList) { + agent.getThread().interrupt(); + /*try { + agent.getThread().join(); + } catch (InterruptedException e) { + e.printStackTrace(); + }*/ + agent.resetAgent(); + //if (agent.getThread().isInterrupted()) + // agent = null; + } + } + + /** + * Gets the areamap handler. + * + * @return the areamap handler + */ + public static AreamapHandler getAreamapHandler() { + return areamaphandler; + } + + /** + * Gets the used costmaps. + * + * @return the used costmaps + */ + public static Map getUsedCostmaps() { + return costmaps; } - - public void stopSimulation() { - // TODO - // This is just a quick fix + + /** + * Gets the number waymaking skipped. + * + * @return the number waymaking skipped + */ + public static int getNumberWaymakingSkipped() { + int numberSkipped = 0; for (Agent agent : agentList) { - agent.getThread().stop(); + numberSkipped = numberSkipped + agent.getNumberWayMakingSkipped(); + } + return numberSkipped; + } + + /** + * Gets the number waymaking completed. + * + * @return the number waymaking completed + */ + public static int getNumberWaymakingCompleted() { + int numberCompleted = 0; + for (Passenger pax : finishedList) { + numberCompleted = numberCompleted + + pax.getNumberOfMakeWayOperations(); } + return numberCompleted; } + } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SortedNodeList.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SortedNodeList.java index 1b94e29b..dec82224 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SortedNodeList.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/astar/SortedNodeList.java @@ -12,10 +12,13 @@ * This class is a sorted node list. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class SortedNodeList { + /** The list. */ private ArrayList list = new ArrayList(); /** @@ -66,9 +69,9 @@ public int size() { /** * This method checks if a specific node is already in the list. - * - * @param n - * the node which is checked + * + * @param n the node which is checked + * @return true, if successful */ public boolean contains(Node n) { return list.contains(n); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/BusinessClassImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/BusinessClassImpl.java deleted file mode 100644 index e9880e5e..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/BusinessClassImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.BusinessClass; -import net.bhl.cdt.paxelerate.model.CabinPackage; - -/** - * - * An implementation of the model object 'Business Class'. - * - * - * @generated - */ -public class BusinessClassImpl extends TravelClassImpl implements BusinessClass { - /** - * - * - * @generated - */ - protected BusinessClassImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.BUSINESS_CLASS; - } - -} //BusinessClassImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinFactoryImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinFactoryImpl.java index e2f9a04f..ccc17b55 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinFactoryImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinFactoryImpl.java @@ -17,6 +17,7 @@ * @generated */ public class CabinFactoryImpl extends EFactoryImpl implements CabinFactory { + /** * Creates the default factory implementation. * @@ -48,18 +49,18 @@ public CabinFactoryImpl() { /** * - * - * @generated + * . + * + * @param eClass the e class + * @return the e object + * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case CabinPackage.CABIN: return createCabin(); case CabinPackage.ROW: return createRow(); - case CabinPackage.BUSINESS_CLASS: return createBusinessClass(); - case CabinPackage.FIRST_CLASS: return createFirstClass(); - case CabinPackage.ECONOMY_CLASS: return createEconomyClass(); - case CabinPackage.PREMIUM_ECONOMY_CLASS: return createPremiumEconomyClass(); + case CabinPackage.TRAVEL_CLASS: return createTravelClass(); case CabinPackage.SEAT: return createSeat(); case CabinPackage.PASSENGER: return createPassenger(); case CabinPackage.CREW_MEMBER: return createCrewMember(); @@ -68,9 +69,7 @@ public EObject create(EClass eClass) { case CabinPackage.STAIRWAY: return createStairway(); case CabinPackage.CURTAIN: return createCurtain(); case CabinPackage.STOWAGE: return createStowage(); - case CabinPackage.MAIN_DOOR: return createMainDoor(); - case CabinPackage.EMERGENCY_EXIT: return createEmergencyExit(); - case CabinPackage.STANDARD_DOOR: return createStandardDoor(); + case CabinPackage.DOOR: return createDoor(); case CabinPackage.SIMULATION_PROPERTIES: return createSimulationProperties(); case CabinPackage.LUGGAGE_PROPERTIES: return createLuggageProperties(); case CabinPackage.SIMULATION_RESULT: return createSimulationResult(); @@ -82,8 +81,12 @@ public EObject create(EClass eClass) { /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the object + * @generated */ @Override public Object createFromString(EDataType eDataType, String initialValue) { @@ -104,6 +107,10 @@ public Object createFromString(EDataType eDataType, String initialValue) { return createTravelOptionFromString(eDataType, initialValue); case CabinPackage.OBJECT_OPTION: return createObjectOptionFromString(eDataType, initialValue); + case CabinPackage.DOOR_OPTION: + return createDoorOptionFromString(eDataType, initialValue); + case CabinPackage.LAYOUT_CONCEPT: + return createLayoutConceptFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -111,8 +118,12 @@ public Object createFromString(EDataType eDataType, String initialValue) { /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ @Override public String convertToString(EDataType eDataType, Object instanceValue) { @@ -133,6 +144,10 @@ public String convertToString(EDataType eDataType, Object instanceValue) { return convertTravelOptionToString(eDataType, instanceValue); case CabinPackage.OBJECT_OPTION: return convertObjectOptionToString(eDataType, instanceValue); + case CabinPackage.DOOR_OPTION: + return convertDoorOptionToString(eDataType, instanceValue); + case CabinPackage.LAYOUT_CONCEPT: + return convertLayoutConceptToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -140,8 +155,10 @@ public String convertToString(EDataType eDataType, Object instanceValue) { /** * - * - * @generated + * . + * + * @return the cabin + * @generated */ public Cabin createCabin() { CabinImpl cabin = new CabinImpl(); @@ -150,8 +167,10 @@ public Cabin createCabin() { /** * - * - * @generated + * . + * + * @return the row + * @generated */ public Row createRow() { RowImpl row = new RowImpl(); @@ -160,48 +179,22 @@ public Row createRow() { /** * - * - * @generated - */ - public BusinessClass createBusinessClass() { - BusinessClassImpl businessClass = new BusinessClassImpl(); - return businessClass; - } - - /** - * - * - * @generated - */ - public FirstClass createFirstClass() { - FirstClassImpl firstClass = new FirstClassImpl(); - return firstClass; - } - - /** - * - * - * @generated + * . + * + * @return the travel class + * @generated */ - public EconomyClass createEconomyClass() { - EconomyClassImpl economyClass = new EconomyClassImpl(); - return economyClass; + public TravelClass createTravelClass() { + TravelClassImpl travelClass = new TravelClassImpl(); + return travelClass; } /** * - * - * @generated - */ - public PremiumEconomyClass createPremiumEconomyClass() { - PremiumEconomyClassImpl premiumEconomyClass = new PremiumEconomyClassImpl(); - return premiumEconomyClass; - } - - /** - * - * - * @generated + * . + * + * @return the seat + * @generated */ public Seat createSeat() { SeatImpl seat = new SeatImpl(); @@ -210,8 +203,10 @@ public Seat createSeat() { /** * - * - * @generated + * . + * + * @return the passenger + * @generated */ public Passenger createPassenger() { PassengerImpl passenger = new PassengerImpl(); @@ -220,8 +215,10 @@ public Passenger createPassenger() { /** * - * - * @generated + * . + * + * @return the crew member + * @generated */ public CrewMember createCrewMember() { CrewMemberImpl crewMember = new CrewMemberImpl(); @@ -230,8 +227,10 @@ public CrewMember createCrewMember() { /** * - * - * @generated + * . + * + * @return the lavatory + * @generated */ public Lavatory createLavatory() { LavatoryImpl lavatory = new LavatoryImpl(); @@ -240,8 +239,10 @@ public Lavatory createLavatory() { /** * - * - * @generated + * . + * + * @return the galley + * @generated */ public Galley createGalley() { GalleyImpl galley = new GalleyImpl(); @@ -250,8 +251,10 @@ public Galley createGalley() { /** * - * - * @generated + * . + * + * @return the stairway + * @generated */ public Stairway createStairway() { StairwayImpl stairway = new StairwayImpl(); @@ -260,8 +263,10 @@ public Stairway createStairway() { /** * - * - * @generated + * . + * + * @return the curtain + * @generated */ public Curtain createCurtain() { CurtainImpl curtain = new CurtainImpl(); @@ -270,8 +275,10 @@ public Curtain createCurtain() { /** * - * - * @generated + * . + * + * @return the stowage + * @generated */ public Stowage createStowage() { StowageImpl stowage = new StowageImpl(); @@ -280,38 +287,22 @@ public Stowage createStowage() { /** * - * - * @generated - */ - public MainDoor createMainDoor() { - MainDoorImpl mainDoor = new MainDoorImpl(); - return mainDoor; - } - - /** - * - * - * @generated + * . + * + * @return the door + * @generated */ - public EmergencyExit createEmergencyExit() { - EmergencyExitImpl emergencyExit = new EmergencyExitImpl(); - return emergencyExit; + public Door createDoor() { + DoorImpl door = new DoorImpl(); + return door; } /** * - * - * @generated - */ - public StandardDoor createStandardDoor() { - StandardDoorImpl standardDoor = new StandardDoorImpl(); - return standardDoor; - } - - /** - * - * - * @generated + * . + * + * @return the simulation properties + * @generated */ public SimulationProperties createSimulationProperties() { SimulationPropertiesImpl simulationProperties = new SimulationPropertiesImpl(); @@ -320,8 +311,10 @@ public SimulationProperties createSimulationProperties() { /** * - * - * @generated + * . + * + * @return the luggage properties + * @generated */ public LuggageProperties createLuggageProperties() { LuggagePropertiesImpl luggageProperties = new LuggagePropertiesImpl(); @@ -330,8 +323,10 @@ public LuggageProperties createLuggageProperties() { /** * - * - * @generated + * . + * + * @return the simulation result + * @generated */ public SimulationResult createSimulationResult() { SimulationResultImpl simulationResult = new SimulationResultImpl(); @@ -340,8 +335,10 @@ public SimulationResult createSimulationResult() { /** * - * - * @generated + * . + * + * @return the passenger properties + * @generated */ public PassengerProperties createPassengerProperties() { PassengerPropertiesImpl passengerProperties = new PassengerPropertiesImpl(); @@ -350,8 +347,12 @@ public PassengerProperties createPassengerProperties() { /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the stairway direction + * @generated */ public StairwayDirection createStairwayDirectionFromString(EDataType eDataType, String initialValue) { StairwayDirection result = StairwayDirection.get(initialValue); @@ -361,8 +362,12 @@ public StairwayDirection createStairwayDirectionFromString(EDataType eDataType, /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertStairwayDirectionToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -370,8 +375,12 @@ public String convertStairwayDirectionToString(EDataType eDataType, Object insta /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the aircraft type + * @generated */ public AircraftType createAircraftTypeFromString(EDataType eDataType, String initialValue) { AircraftType result = AircraftType.get(initialValue); @@ -381,8 +390,12 @@ public AircraftType createAircraftTypeFromString(EDataType eDataType, String ini /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertAircraftTypeToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -390,8 +403,12 @@ public String convertAircraftTypeToString(EDataType eDataType, Object instanceVa /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the passenger mood + * @generated */ public PassengerMood createPassengerMoodFromString(EDataType eDataType, String initialValue) { PassengerMood result = PassengerMood.get(initialValue); @@ -401,8 +418,12 @@ public PassengerMood createPassengerMoodFromString(EDataType eDataType, String i /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertPassengerMoodToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -410,8 +431,12 @@ public String convertPassengerMoodToString(EDataType eDataType, Object instanceV /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the luggage size + * @generated */ public LuggageSize createLuggageSizeFromString(EDataType eDataType, String initialValue) { LuggageSize result = LuggageSize.get(initialValue); @@ -421,8 +446,12 @@ public LuggageSize createLuggageSizeFromString(EDataType eDataType, String initi /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertLuggageSizeToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -430,8 +459,12 @@ public String convertLuggageSizeToString(EDataType eDataType, Object instanceVal /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the sorting style + * @generated */ public SortingStyle createSortingStyleFromString(EDataType eDataType, String initialValue) { SortingStyle result = SortingStyle.get(initialValue); @@ -441,8 +474,12 @@ public SortingStyle createSortingStyleFromString(EDataType eDataType, String ini /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertSortingStyleToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -450,8 +487,12 @@ public String convertSortingStyleToString(EDataType eDataType, Object instanceVa /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the travel option + * @generated */ public TravelOption createTravelOptionFromString(EDataType eDataType, String initialValue) { TravelOption result = TravelOption.get(initialValue); @@ -461,8 +502,12 @@ public TravelOption createTravelOptionFromString(EDataType eDataType, String ini /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertTravelOptionToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); @@ -470,8 +515,12 @@ public String convertTravelOptionToString(EDataType eDataType, Object instanceVa /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the object option + * @generated */ public ObjectOption createObjectOptionFromString(EDataType eDataType, String initialValue) { ObjectOption result = ObjectOption.get(initialValue); @@ -481,20 +530,52 @@ public ObjectOption createObjectOptionFromString(EDataType eDataType, String ini /** * - * - * @generated + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated */ public String convertObjectOptionToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } + /** + * + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the door option + * @generated + */ + public DoorOption createDoorOptionFromString(EDataType eDataType, String initialValue) { + DoorOption result = DoorOption.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated + */ + public String convertDoorOptionToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + /** * * * @generated */ - public Sex createSexFromString(EDataType eDataType, String initialValue) { - Sex result = Sex.get(initialValue); + public LayoutConcept createLayoutConceptFromString(EDataType eDataType, String initialValue) { + LayoutConcept result = LayoutConcept.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } @@ -504,14 +585,44 @@ public Sex createSexFromString(EDataType eDataType, String initialValue) { * * @generated */ + public String convertLayoutConceptToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * . + * + * @param eDataType the e data type + * @param initialValue the initial value + * @return the sex + * @generated + */ + public Sex createSexFromString(EDataType eDataType, String initialValue) { + Sex result = Sex.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * . + * + * @param eDataType the e data type + * @param instanceValue the instance value + * @return the string + * @generated + */ public String convertSexToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } /** * - * - * @generated + * . + * + * @return the cabin package + * @generated */ public CabinPackage getCabinPackage() { return (CabinPackage)getEPackage(); @@ -519,9 +630,11 @@ public CabinPackage getCabinPackage() { /** * - * - * @deprecated - * @generated + * . + * + * @return the package + * @deprecated + * @generated */ @Deprecated public static CabinPackage getPackage() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinImpl.java index 037fce02..1e4a67ea 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinImpl.java @@ -23,6 +23,7 @@ import net.bhl.cdt.paxelerate.model.Lavatory; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.SimulationProperties; +import net.bhl.cdt.paxelerate.model.SimulationResult; import net.bhl.cdt.paxelerate.model.Stairway; import net.bhl.cdt.paxelerate.model.Stowage; import net.bhl.cdt.paxelerate.model.TravelClass; @@ -38,9 +39,10 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getYDimension YDimension}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getRowNonexistent Row Nonexistent}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getAisleWidth Aisle Width}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getFramesPerSecond Frames Per Second}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getNumberOfDecks Number Of Decks}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getAircraftType Aircraft Type}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getSimulationSettings Simulation Settings}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getSimulationResults Simulation Results}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getClasses Classes}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getDoors Doors}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getLavatories Lavatories}
  • @@ -49,10 +51,6 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getCurtains Curtains}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getStowages Stowages}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getPassengers Passengers}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getScale Scale}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getAircraftType Aircraft Type}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#isUsePresetSettings Use Preset Settings}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.CabinImpl#getSpeedFactor Speed Factor}
  • * * * @generated @@ -125,43 +123,42 @@ public class CabinImpl extends NamedElementImpl implements Cabin { */ protected int aisleWidth = AISLE_WIDTH_EDEFAULT; /** - * The default value of the '{@link #getFramesPerSecond() Frames Per Second}' attribute. + * The default value of the '{@link #getNumberOfDecks() Number Of Decks}' attribute. * - * @see #getFramesPerSecond() + * @see #getNumberOfDecks() * @generated * @ordered */ - protected static final int FRAMES_PER_SECOND_EDEFAULT = 5; + protected static final int NUMBER_OF_DECKS_EDEFAULT = 1; /** - * The cached value of the '{@link #getFramesPerSecond() Frames Per Second}' attribute. + * The cached value of the '{@link #getNumberOfDecks() Number Of Decks}' attribute. * - * @see #getFramesPerSecond() + * @see #getNumberOfDecks() * @generated * @ordered */ - protected int framesPerSecond = FRAMES_PER_SECOND_EDEFAULT; + protected int numberOfDecks = NUMBER_OF_DECKS_EDEFAULT; /** - * The default value of the '{@link #getNumberOfDecks() Number Of Decks}' attribute. + * The default value of the '{@link #getAircraftType() Aircraft Type}' attribute. * - * @see #getNumberOfDecks() + * @see #getAircraftType() * @generated * @ordered */ - protected static final int NUMBER_OF_DECKS_EDEFAULT = 1; + protected static final AircraftType AIRCRAFT_TYPE_EDEFAULT = AircraftType.NARROWBODY; /** - * The cached value of the '{@link #getNumberOfDecks() Number Of Decks}' attribute. - * - * @see #getNumberOfDecks() + * The cached value of the '{@link #getAircraftType() Aircraft Type}' attribute. + * + * @see #getAircraftType() * @generated * @ordered */ - protected int numberOfDecks = NUMBER_OF_DECKS_EDEFAULT; + protected AircraftType aircraftType = AIRCRAFT_TYPE_EDEFAULT; /** - * The cached value of the '{@link #getSimulationSettings() Simulation Settings}' reference. + * The cached value of the '{@link #getSimulationSettings() Simulation Settings}' containment reference. * * @see #getSimulationSettings() @@ -169,6 +166,15 @@ public class CabinImpl extends NamedElementImpl implements Cabin { * @ordered */ protected SimulationProperties simulationSettings; + /** + * The cached value of the '{@link #getSimulationResults() Simulation Results}' containment reference. + * + * + * @see #getSimulationResults() + * @generated + * @ordered + */ + protected SimulationResult simulationResults; /** * The cached value of the '{@link #getClasses() Classes}' containment reference list. * @@ -233,85 +239,21 @@ public class CabinImpl extends NamedElementImpl implements Cabin { * @ordered */ protected EList passengers; - /** - * The default value of the '{@link #getScale() Scale}' attribute. - * - * @see #getScale() - * @generated - * @ordered - */ - protected static final int SCALE_EDEFAULT = 10; - /** - * The cached value of the '{@link #getScale() Scale}' attribute. - * - * @see #getScale() - * @generated - * @ordered - */ - protected int scale = SCALE_EDEFAULT; - /** - * The default value of the '{@link #getAircraftType() Aircraft Type}' attribute. - * - * @see #getAircraftType() - * @generated - * @ordered - */ - protected static final AircraftType AIRCRAFT_TYPE_EDEFAULT = AircraftType.REGIONAL; - /** - * The cached value of the '{@link #getAircraftType() Aircraft Type}' attribute. - * - * @see #getAircraftType() - * @generated - * @ordered - */ - protected AircraftType aircraftType = AIRCRAFT_TYPE_EDEFAULT; - /** - * The default value of the '{@link #isUsePresetSettings() Use Preset Settings}' attribute. - * - * @see #isUsePresetSettings() - * @generated - * @ordered - */ - protected static final boolean USE_PRESET_SETTINGS_EDEFAULT = false; - /** - * The cached value of the '{@link #isUsePresetSettings() Use Preset Settings}' attribute. - * - * @see #isUsePresetSettings() - * @generated - * @ordered - */ - protected boolean usePresetSettings = USE_PRESET_SETTINGS_EDEFAULT; - /** - * The default value of the '{@link #getSpeedFactor() Speed Factor}' attribute. - * - * @see #getSpeedFactor() - * @generated - * @ordered - */ - protected static final int SPEED_FACTOR_EDEFAULT = 0; - /** - * The cached value of the '{@link #getSpeedFactor() Speed Factor}' attribute. - * - * @see #getSpeedFactor() - * @generated - * @ordered - */ - protected int speedFactor = SPEED_FACTOR_EDEFAULT; /** - * - * @generated + * . + * + * @generated */ protected CabinImpl() { super(); } /** - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -319,8 +261,10 @@ protected EClass eStaticClass() { } /** - * - * @generated + * . + * + * @return the x dimension + * @generated */ @Override public int getXDimension() { @@ -328,8 +272,10 @@ public int getXDimension() { } /** - * - * @generated + * . + * + * @param newXDimension the new x dimension + * @generated */ @Override public void setXDimension(int newXDimension) { @@ -340,8 +286,10 @@ public void setXDimension(int newXDimension) { } /** - * - * @generated + * . + * + * @return the y dimension + * @generated */ @Override public int getYDimension() { @@ -349,8 +297,10 @@ public int getYDimension() { } /** - * - * @generated + * . + * + * @param newYDimension the new y dimension + * @generated */ @Override public void setYDimension(int newYDimension) { @@ -361,8 +311,10 @@ public void setYDimension(int newYDimension) { } /** - * - * @generated + * . + * + * @return the doors + * @generated */ @Override public EList getDoors() { @@ -373,8 +325,10 @@ public EList getDoors() { } /** - * - * @generated + * . + * + * @return the lavatories + * @generated */ @Override public EList getLavatories() { @@ -385,8 +339,10 @@ public EList getLavatories() { } /** - * - * @generated + * . + * + * @return the galleys + * @generated */ @Override public EList getGalleys() { @@ -397,8 +353,10 @@ public EList getGalleys() { } /** - * - * @generated + * . + * + * @return the stairways + * @generated */ @Override public EList getStairways() { @@ -409,8 +367,10 @@ public EList getStairways() { } /** - * - * @generated + * . + * + * @return the curtains + * @generated */ @Override public EList getCurtains() { @@ -421,8 +381,10 @@ public EList getCurtains() { } /** - * - * @generated + * . + * + * @return the stowages + * @generated */ @Override public EList getStowages() { @@ -433,62 +395,67 @@ public EList getStowages() { } /** - * - * @generated - */ - @Override - public int getScale() { - return scale; - } - - /** - * - * @generated + * . + * + * @return the passengers + * @generated */ @Override - public void setScale(int newScale) { - int oldScale = scale; - scale = newScale; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SCALE, oldScale, scale)); + public EList getPassengers() { + if (passengers == null) { + passengers = new EObjectContainmentEList(Passenger.class, this, CabinPackage.CABIN__PASSENGERS); + } + return passengers; } /** - * + * + * * @generated */ - @Override - public int getFramesPerSecond() { - return framesPerSecond; + public SimulationResult getSimulationResults() { + return simulationResults; } /** - * + * + * * @generated */ - @Override - public void setFramesPerSecond(int newFramesPerSecond) { - int oldFramesPerSecond = framesPerSecond; - framesPerSecond = newFramesPerSecond; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__FRAMES_PER_SECOND, oldFramesPerSecond, framesPerSecond)); + public NotificationChain basicSetSimulationResults(SimulationResult newSimulationResults, NotificationChain msgs) { + SimulationResult oldSimulationResults = simulationResults; + simulationResults = newSimulationResults; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SIMULATION_RESULTS, oldSimulationResults, newSimulationResults); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; } /** - * + * + * * @generated */ - @Override - public EList getPassengers() { - if (passengers == null) { - passengers = new EObjectContainmentEList(Passenger.class, this, CabinPackage.CABIN__PASSENGERS); + public void setSimulationResults(SimulationResult newSimulationResults) { + if (newSimulationResults != simulationResults) { + NotificationChain msgs = null; + if (simulationResults != null) + msgs = ((InternalEObject)simulationResults).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CabinPackage.CABIN__SIMULATION_RESULTS, null, msgs); + if (newSimulationResults != null) + msgs = ((InternalEObject)newSimulationResults).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CabinPackage.CABIN__SIMULATION_RESULTS, null, msgs); + msgs = basicSetSimulationResults(newSimulationResults, msgs); + if (msgs != null) msgs.dispatch(); } - return passengers; + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SIMULATION_RESULTS, newSimulationResults, newSimulationResults)); } /** - * - * @generated + * . + * + * @return the number of decks + * @generated */ @Override public int getNumberOfDecks() { @@ -496,8 +463,10 @@ public int getNumberOfDecks() { } /** - * - * @generated + * . + * + * @param newNumberOfDecks the new number of decks + * @generated */ @Override public void setNumberOfDecks(int newNumberOfDecks) { @@ -508,8 +477,10 @@ public void setNumberOfDecks(int newNumberOfDecks) { } /** - * - * @generated + * . + * + * @return the aircraft type + * @generated */ @Override public AircraftType getAircraftType() { @@ -517,8 +488,10 @@ public AircraftType getAircraftType() { } /** - * - * @generated + * . + * + * @param newAircraftType the new aircraft type + * @generated */ @Override public void setAircraftType(AircraftType newAircraftType) { @@ -529,88 +502,58 @@ public void setAircraftType(AircraftType newAircraftType) { } /** - * - * @generated - */ - @Override - public boolean isUsePresetSettings() { - return usePresetSettings; - } - - /** - * - * @generated - */ - @Override - public void setUsePresetSettings(boolean newUsePresetSettings) { - boolean oldUsePresetSettings = usePresetSettings; - usePresetSettings = newUsePresetSettings; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__USE_PRESET_SETTINGS, oldUsePresetSettings, usePresetSettings)); - } - - /** - * - * @generated - */ - @Override - public int getSpeedFactor() { - return speedFactor; - } - - /** - * - * @generated - */ - @Override - public void setSpeedFactor(int newSpeedFactor) { - int oldSpeedFactor = speedFactor; - speedFactor = newSpeedFactor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SPEED_FACTOR, oldSpeedFactor, speedFactor)); - } - - /** - * - * @generated + * . + * + * @return the simulation settings + * @generated */ @Override public SimulationProperties getSimulationSettings() { - if (simulationSettings != null && simulationSettings.eIsProxy()) { - InternalEObject oldSimulationSettings = (InternalEObject)simulationSettings; - simulationSettings = (SimulationProperties)eResolveProxy(oldSimulationSettings); - if (simulationSettings != oldSimulationSettings) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CabinPackage.CABIN__SIMULATION_SETTINGS, oldSimulationSettings, simulationSettings)); - } - } return simulationSettings; } /** - * + * + * * @generated */ - public SimulationProperties basicGetSimulationSettings() { - return simulationSettings; + public NotificationChain basicSetSimulationSettings(SimulationProperties newSimulationSettings, NotificationChain msgs) { + SimulationProperties oldSimulationSettings = simulationSettings; + simulationSettings = newSimulationSettings; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SIMULATION_SETTINGS, oldSimulationSettings, newSimulationSettings); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; } /** - * - * @generated + * . + * + * @param newSimulationSettings the new simulation settings + * @generated */ @Override public void setSimulationSettings( SimulationProperties newSimulationSettings) { - SimulationProperties oldSimulationSettings = simulationSettings; - simulationSettings = newSimulationSettings; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SIMULATION_SETTINGS, oldSimulationSettings, simulationSettings)); + if (newSimulationSettings != simulationSettings) { + NotificationChain msgs = null; + if (simulationSettings != null) + msgs = ((InternalEObject)simulationSettings).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CabinPackage.CABIN__SIMULATION_SETTINGS, null, msgs); + if (newSimulationSettings != null) + msgs = ((InternalEObject)newSimulationSettings).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CabinPackage.CABIN__SIMULATION_SETTINGS, null, msgs); + msgs = basicSetSimulationSettings(newSimulationSettings, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.CABIN__SIMULATION_SETTINGS, newSimulationSettings, newSimulationSettings)); } /** - * - * @generated + * . + * + * @return the classes + * @generated */ @Override public EList getClasses() { @@ -621,8 +564,10 @@ public EList getClasses() { } /** - * - * @generated + * . + * + * @return the row nonexistent + * @generated */ @Override public int getRowNonexistent() { @@ -630,8 +575,10 @@ public int getRowNonexistent() { } /** - * - * @generated + * . + * + * @param newRowNonexistent the new row nonexistent + * @generated */ @Override public void setRowNonexistent(int newRowNonexistent) { @@ -642,8 +589,10 @@ public void setRowNonexistent(int newRowNonexistent) { } /** - * - * @generated + * . + * + * @return the aisle width + * @generated */ @Override public int getAisleWidth() { @@ -651,8 +600,10 @@ public int getAisleWidth() { } /** - * - * @generated + * . + * + * @param newAisleWidth the new aisle width + * @generated */ @Override public void setAisleWidth(int newAisleWidth) { @@ -663,13 +614,22 @@ public void setAisleWidth(int newAisleWidth) { } /** - * - * @generated + * . + * + * @param otherEnd the other end + * @param featureID the feature id + * @param msgs the msgs + * @return the notification chain + * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { + case CabinPackage.CABIN__SIMULATION_SETTINGS: + return basicSetSimulationSettings(null, msgs); + case CabinPackage.CABIN__SIMULATION_RESULTS: + return basicSetSimulationResults(null, msgs); case CabinPackage.CABIN__CLASSES: return ((InternalEList)getClasses()).basicRemove(otherEnd, msgs); case CabinPackage.CABIN__DOORS: @@ -691,8 +651,13 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -705,13 +670,14 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getRowNonexistent(); case CabinPackage.CABIN__AISLE_WIDTH: return getAisleWidth(); - case CabinPackage.CABIN__FRAMES_PER_SECOND: - return getFramesPerSecond(); case CabinPackage.CABIN__NUMBER_OF_DECKS: return getNumberOfDecks(); + case CabinPackage.CABIN__AIRCRAFT_TYPE: + return getAircraftType(); case CabinPackage.CABIN__SIMULATION_SETTINGS: - if (resolve) return getSimulationSettings(); - return basicGetSimulationSettings(); + return getSimulationSettings(); + case CabinPackage.CABIN__SIMULATION_RESULTS: + return getSimulationResults(); case CabinPackage.CABIN__CLASSES: return getClasses(); case CabinPackage.CABIN__DOORS: @@ -728,21 +694,16 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getStowages(); case CabinPackage.CABIN__PASSENGERS: return getPassengers(); - case CabinPackage.CABIN__SCALE: - return getScale(); - case CabinPackage.CABIN__AIRCRAFT_TYPE: - return getAircraftType(); - case CabinPackage.CABIN__USE_PRESET_SETTINGS: - return isUsePresetSettings(); - case CabinPackage.CABIN__SPEED_FACTOR: - return getSpeedFactor(); } return super.eGet(featureID, resolve, coreType); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @SuppressWarnings("unchecked") @Override @@ -760,15 +721,18 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.CABIN__AISLE_WIDTH: setAisleWidth((Integer)newValue); return; - case CabinPackage.CABIN__FRAMES_PER_SECOND: - setFramesPerSecond((Integer)newValue); - return; case CabinPackage.CABIN__NUMBER_OF_DECKS: setNumberOfDecks((Integer)newValue); return; + case CabinPackage.CABIN__AIRCRAFT_TYPE: + setAircraftType((AircraftType)newValue); + return; case CabinPackage.CABIN__SIMULATION_SETTINGS: setSimulationSettings((SimulationProperties)newValue); return; + case CabinPackage.CABIN__SIMULATION_RESULTS: + setSimulationResults((SimulationResult)newValue); + return; case CabinPackage.CABIN__CLASSES: getClasses().clear(); getClasses().addAll((Collection)newValue); @@ -801,25 +765,15 @@ public void eSet(int featureID, Object newValue) { getPassengers().clear(); getPassengers().addAll((Collection)newValue); return; - case CabinPackage.CABIN__SCALE: - setScale((Integer)newValue); - return; - case CabinPackage.CABIN__AIRCRAFT_TYPE: - setAircraftType((AircraftType)newValue); - return; - case CabinPackage.CABIN__USE_PRESET_SETTINGS: - setUsePresetSettings((Boolean)newValue); - return; - case CabinPackage.CABIN__SPEED_FACTOR: - setSpeedFactor((Integer)newValue); - return; } super.eSet(featureID, newValue); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -836,15 +790,18 @@ public void eUnset(int featureID) { case CabinPackage.CABIN__AISLE_WIDTH: setAisleWidth(AISLE_WIDTH_EDEFAULT); return; - case CabinPackage.CABIN__FRAMES_PER_SECOND: - setFramesPerSecond(FRAMES_PER_SECOND_EDEFAULT); - return; case CabinPackage.CABIN__NUMBER_OF_DECKS: setNumberOfDecks(NUMBER_OF_DECKS_EDEFAULT); return; + case CabinPackage.CABIN__AIRCRAFT_TYPE: + setAircraftType(AIRCRAFT_TYPE_EDEFAULT); + return; case CabinPackage.CABIN__SIMULATION_SETTINGS: setSimulationSettings((SimulationProperties)null); return; + case CabinPackage.CABIN__SIMULATION_RESULTS: + setSimulationResults((SimulationResult)null); + return; case CabinPackage.CABIN__CLASSES: getClasses().clear(); return; @@ -869,25 +826,16 @@ public void eUnset(int featureID) { case CabinPackage.CABIN__PASSENGERS: getPassengers().clear(); return; - case CabinPackage.CABIN__SCALE: - setScale(SCALE_EDEFAULT); - return; - case CabinPackage.CABIN__AIRCRAFT_TYPE: - setAircraftType(AIRCRAFT_TYPE_EDEFAULT); - return; - case CabinPackage.CABIN__USE_PRESET_SETTINGS: - setUsePresetSettings(USE_PRESET_SETTINGS_EDEFAULT); - return; - case CabinPackage.CABIN__SPEED_FACTOR: - setSpeedFactor(SPEED_FACTOR_EDEFAULT); - return; } super.eUnset(featureID); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -900,12 +848,14 @@ public boolean eIsSet(int featureID) { return rowNonexistent != ROW_NONEXISTENT_EDEFAULT; case CabinPackage.CABIN__AISLE_WIDTH: return aisleWidth != AISLE_WIDTH_EDEFAULT; - case CabinPackage.CABIN__FRAMES_PER_SECOND: - return framesPerSecond != FRAMES_PER_SECOND_EDEFAULT; case CabinPackage.CABIN__NUMBER_OF_DECKS: return numberOfDecks != NUMBER_OF_DECKS_EDEFAULT; + case CabinPackage.CABIN__AIRCRAFT_TYPE: + return aircraftType != AIRCRAFT_TYPE_EDEFAULT; case CabinPackage.CABIN__SIMULATION_SETTINGS: return simulationSettings != null; + case CabinPackage.CABIN__SIMULATION_RESULTS: + return simulationResults != null; case CabinPackage.CABIN__CLASSES: return classes != null && !classes.isEmpty(); case CabinPackage.CABIN__DOORS: @@ -922,21 +872,15 @@ public boolean eIsSet(int featureID) { return stowages != null && !stowages.isEmpty(); case CabinPackage.CABIN__PASSENGERS: return passengers != null && !passengers.isEmpty(); - case CabinPackage.CABIN__SCALE: - return scale != SCALE_EDEFAULT; - case CabinPackage.CABIN__AIRCRAFT_TYPE: - return aircraftType != AIRCRAFT_TYPE_EDEFAULT; - case CabinPackage.CABIN__USE_PRESET_SETTINGS: - return usePresetSettings != USE_PRESET_SETTINGS_EDEFAULT; - case CabinPackage.CABIN__SPEED_FACTOR: - return speedFactor != SPEED_FACTOR_EDEFAULT; } return super.eIsSet(featureID); } /** - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -951,18 +895,10 @@ public String toString() { result.append(rowNonexistent); result.append(", aisleWidth: "); result.append(aisleWidth); - result.append(", framesPerSecond: "); - result.append(framesPerSecond); result.append(", numberOfDecks: "); result.append(numberOfDecks); - result.append(", scale: "); - result.append(scale); result.append(", aircraftType: "); result.append(aircraftType); - result.append(", usePresetSettings: "); - result.append(usePresetSettings); - result.append(", speedFactor: "); - result.append(speedFactor); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinPackageImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinPackageImpl.java index 8bf2893d..d8f5c449 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinPackageImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CabinPackageImpl.java @@ -30,234 +30,228 @@ * @generated */ public class CabinPackageImpl extends EPackageImpl implements CabinPackage { + /** * - * - * @generated + * . + * + * @generated */ protected String packageFilename = "model.ecore"; /** * - * - * @generated + * . + * + * @generated */ private EClass cabinEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass rowEClass = null; + /** * - * - * @generated + * . + * + * @generated */ private EClass travelClassEClass = null; /** * - * - * @generated - */ - private EClass businessClassEClass = null; - - /** - * - * - * @generated - */ - private EClass firstClassEClass = null; - - /** - * - * - * @generated - */ - private EClass economyClassEClass = null; - - /** - * - * - * @generated - */ - private EClass premiumEconomyClassEClass = null; - - /** - * - * - * @generated + * . + * + * @generated */ private EClass doorEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass seatEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass passengerEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass crewMemberEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass lavatoryEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass galleyEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass stairwayEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass curtainEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass stowageEClass = null; /** * - * - * @generated - */ - private EClass mainDoorEClass = null; - - /** - * - * - * @generated - */ - private EClass emergencyExitEClass = null; - - /** - * - * - * @generated - */ - private EClass standardDoorEClass = null; - - /** - * - * - * @generated + * . + * + * @generated */ private EClass simulationPropertiesEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass luggagePropertiesEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass simulationResultEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass passengerPropertiesEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EClass physicalObjectEClass = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum stairwayDirectionEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum aircraftTypeEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum passengerMoodEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum luggageSizeEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum sortingStyleEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum travelOptionEEnum = null; /** * - * - * @generated + * . + * + * @generated */ private EEnum objectOptionEEnum = null; + /** + * + * . + * + * @generated + */ + private EEnum doorOptionEEnum = null; + /** * * * @generated */ + private EEnum layoutConceptEEnum = null; + + /** + * + * . + * + * @generated + */ private EEnum sexEEnum = null; /** @@ -281,8 +275,9 @@ private CabinPackageImpl() { /** * - * - * @generated + * . + * + * @generated */ private static boolean isInited = false; @@ -333,8 +328,10 @@ public EValidator getEValidator() { /** * - * - * @generated + * . + * + * @return the cabin + * @generated */ public EClass getCabin() { if (cabinEClass == null) { @@ -345,8 +342,10 @@ public EClass getCabin() { /** * - * - * @generated + * . + * + * @return the cabin_ x dimension + * @generated */ public EAttribute getCabin_XDimension() { return (EAttribute)getCabin().getEStructuralFeatures().get(0); @@ -354,8 +353,10 @@ public EAttribute getCabin_XDimension() { /** * - * - * @generated + * . + * + * @return the cabin_ y dimension + * @generated */ public EAttribute getCabin_YDimension() { return (EAttribute)getCabin().getEStructuralFeatures().get(1); @@ -363,74 +364,79 @@ public EAttribute getCabin_YDimension() { /** * - * - * @generated + * . + * + * @return the cabin_ doors + * @generated */ public EReference getCabin_Doors() { - return (EReference)getCabin().getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EReference getCabin_Lavatories() { return (EReference)getCabin().getEStructuralFeatures().get(9); } /** * - * - * @generated + * . + * + * @return the cabin_ lavatories + * @generated */ - public EReference getCabin_Galleys() { + public EReference getCabin_Lavatories() { return (EReference)getCabin().getEStructuralFeatures().get(10); } /** * - * - * @generated + * . + * + * @return the cabin_ galleys + * @generated */ - public EReference getCabin_Stairways() { + public EReference getCabin_Galleys() { return (EReference)getCabin().getEStructuralFeatures().get(11); } /** * - * - * @generated + * . + * + * @return the cabin_ stairways + * @generated */ - public EReference getCabin_Curtains() { + public EReference getCabin_Stairways() { return (EReference)getCabin().getEStructuralFeatures().get(12); } /** * - * - * @generated + * . + * + * @return the cabin_ curtains + * @generated */ - public EReference getCabin_Stowages() { + public EReference getCabin_Curtains() { return (EReference)getCabin().getEStructuralFeatures().get(13); } /** * - * - * @generated + * . + * + * @return the cabin_ stowages + * @generated */ - public EAttribute getCabin_Scale() { - return (EAttribute)getCabin().getEStructuralFeatures().get(15); + public EReference getCabin_Stowages() { + return (EReference)getCabin().getEStructuralFeatures().get(14); } /** * - * - * @generated + * . + * + * @return the cabin_ passengers + * @generated */ - public EAttribute getCabin_FramesPerSecond() { - return (EAttribute)getCabin().getEStructuralFeatures().get(4); + public EReference getCabin_Passengers() { + return (EReference)getCabin().getEStructuralFeatures().get(15); } /** @@ -438,50 +444,38 @@ public EAttribute getCabin_FramesPerSecond() { * * @generated */ - public EReference getCabin_Passengers() { - return (EReference)getCabin().getEStructuralFeatures().get(14); + public EReference getCabin_SimulationResults() { + return (EReference)getCabin().getEStructuralFeatures().get(7); } /** * - * - * @generated + * . + * + * @return the cabin_ number of decks + * @generated */ public EAttribute getCabin_NumberOfDecks() { - return (EAttribute)getCabin().getEStructuralFeatures().get(5); + return (EAttribute)getCabin().getEStructuralFeatures().get(4); } /** * - * - * @generated + * . + * + * @return the cabin_ aircraft type + * @generated */ public EAttribute getCabin_AircraftType() { - return (EAttribute)getCabin().getEStructuralFeatures().get(16); - } - - /** - * - * - * @generated - */ - public EAttribute getCabin_UsePresetSettings() { - return (EAttribute)getCabin().getEStructuralFeatures().get(17); - } - - /** - * - * - * @generated - */ - public EAttribute getCabin_SpeedFactor() { - return (EAttribute)getCabin().getEStructuralFeatures().get(18); + return (EAttribute)getCabin().getEStructuralFeatures().get(5); } /** * - * - * @generated + * . + * + * @return the cabin_ simulation settings + * @generated */ public EReference getCabin_SimulationSettings() { return (EReference)getCabin().getEStructuralFeatures().get(6); @@ -489,17 +483,21 @@ public EReference getCabin_SimulationSettings() { /** * - * - * @generated + * . + * + * @return the cabin_ classes + * @generated */ public EReference getCabin_Classes() { - return (EReference)getCabin().getEStructuralFeatures().get(7); + return (EReference)getCabin().getEStructuralFeatures().get(8); } /** * - * - * @generated + * . + * + * @return the cabin_ row nonexistent + * @generated */ public EAttribute getCabin_RowNonexistent() { return (EAttribute)getCabin().getEStructuralFeatures().get(2); @@ -507,8 +505,10 @@ public EAttribute getCabin_RowNonexistent() { /** * - * - * @generated + * . + * + * @return the cabin_ aisle width + * @generated */ public EAttribute getCabin_AisleWidth() { return (EAttribute)getCabin().getEStructuralFeatures().get(3); @@ -516,8 +516,10 @@ public EAttribute getCabin_AisleWidth() { /** * - * - * @generated + * . + * + * @return the row + * @generated */ public EClass getRow() { if (rowEClass == null) { @@ -528,8 +530,10 @@ public EClass getRow() { /** * - * - * @generated + * . + * + * @return the row_ seats + * @generated */ public EReference getRow_Seats() { return (EReference)getRow().getEStructuralFeatures().get(0); @@ -537,8 +541,10 @@ public EReference getRow_Seats() { /** * - * - * @generated + * . + * + * @return the row_ row number + * @generated */ public EAttribute getRow_RowNumber() { return (EAttribute)getRow().getEStructuralFeatures().get(1); @@ -546,17 +552,10 @@ public EAttribute getRow_RowNumber() { /** * - * - * @generated - */ - public EAttribute getRow_OffsetInRow() { - return (EAttribute)getRow().getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated + * . + * + * @return the travel class + * @generated */ public EClass getTravelClass() { if (travelClassEClass == null) { @@ -567,8 +566,10 @@ public EClass getTravelClass() { /** * - * - * @generated + * . + * + * @return the travel class_ rows + * @generated */ public EReference getTravelClass_Rows() { return (EReference)getTravelClass().getEStructuralFeatures().get(0); @@ -576,8 +577,10 @@ public EReference getTravelClass_Rows() { /** * - * - * @generated + * . + * + * @return the travel class_ sequence + * @generated */ public EAttribute getTravelClass_Sequence() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(1); @@ -585,8 +588,10 @@ public EAttribute getTravelClass_Sequence() { /** * - * - * @generated + * . + * + * @return the travel class_ passengers + * @generated */ public EAttribute getTravelClass_Passengers() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(2); @@ -594,8 +599,10 @@ public EAttribute getTravelClass_Passengers() { /** * - * - * @generated + * . + * + * @return the travel class_ available seats + * @generated */ public EAttribute getTravelClass_AvailableSeats() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(3); @@ -603,8 +610,10 @@ public EAttribute getTravelClass_AvailableSeats() { /** * - * - * @generated + * . + * + * @return the travel class_ seat pitch + * @generated */ public EAttribute getTravelClass_SeatPitch() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(4); @@ -612,8 +621,10 @@ public EAttribute getTravelClass_SeatPitch() { /** * - * - * @generated + * . + * + * @return the travel class_ x dimension of seats + * @generated */ public EAttribute getTravelClass_XDimensionOfSeats() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(5); @@ -621,8 +632,10 @@ public EAttribute getTravelClass_XDimensionOfSeats() { /** * - * - * @generated + * . + * + * @return the travel class_ y dimension of seats + * @generated */ public EAttribute getTravelClass_YDimensionOfSeats() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(6); @@ -630,8 +643,10 @@ public EAttribute getTravelClass_YDimensionOfSeats() { /** * - * - * @generated + * . + * + * @return the travel class_ name + * @generated */ public EAttribute getTravelClass_Name() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(7); @@ -639,8 +654,10 @@ public EAttribute getTravelClass_Name() { /** * - * - * @generated + * . + * + * @return the travel class_ row structure + * @generated */ public EAttribute getTravelClass_RowStructure() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(8); @@ -648,8 +665,10 @@ public EAttribute getTravelClass_RowStructure() { /** * - * - * @generated + * . + * + * @return the travel class_ load factor + * @generated */ public EAttribute getTravelClass_LoadFactor() { return (EAttribute)getTravelClass().getEStructuralFeatures().get(9); @@ -657,86 +676,57 @@ public EAttribute getTravelClass_LoadFactor() { /** * - * - * @generated - */ - public EOperation getTravelClass__TooManyPassengers__DiagnosticChain_Map() { - return getTravelClass().getEOperations().get(0); - } - - /** - * - * - * @generated - */ - public EOperation getTravelClass__WrongRowStructure__DiagnosticChain_Map() { - return getTravelClass().getEOperations().get(1); - } - - /** - * - * - * @generated - */ - public EClass getBusinessClass() { - if (businessClassEClass == null) { - businessClassEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(3); - } - return businessClassEClass; - } - - /** - * - * - * @generated + * . + * + * @return the travel class_ travel option + * @generated */ - public EClass getFirstClass() { - if (firstClassEClass == null) { - firstClassEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(4); - } - return firstClassEClass; + public EAttribute getTravelClass_TravelOption() { + return (EAttribute)getTravelClass().getEStructuralFeatures().get(10); } /** * - * - * @generated + * . + * + * @return the travel class__ too many passengers__ diagnostic chain_ map + * @generated */ - public EClass getEconomyClass() { - if (economyClassEClass == null) { - economyClassEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(5); - } - return economyClassEClass; + public EOperation getTravelClass__TooManyPassengers__DiagnosticChain_Map() { + return getTravelClass().getEOperations().get(0); } /** * - * - * @generated + * . + * + * @return the travel class__ wrong row structure__ diagnostic chain_ map + * @generated */ - public EClass getPremiumEconomyClass() { - if (premiumEconomyClassEClass == null) { - premiumEconomyClassEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(6); - } - return premiumEconomyClassEClass; + public EOperation getTravelClass__WrongRowStructure__DiagnosticChain_Map() { + return getTravelClass().getEOperations().get(1); } /** * - * - * @generated + * . + * + * @return the door + * @generated */ public EClass getDoor() { if (doorEClass == null) { - doorEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(16); + doorEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(12); } return doorEClass; } /** * - * - * @generated + * . + * + * @return the door_ x position + * @generated */ public EAttribute getDoor_XPosition() { return (EAttribute)getDoor().getEStructuralFeatures().get(0); @@ -744,8 +734,10 @@ public EAttribute getDoor_XPosition() { /** * - * - * @generated + * . + * + * @return the door_ on both sides + * @generated */ public EAttribute getDoor_OnBothSides() { return (EAttribute)getDoor().getEStructuralFeatures().get(1); @@ -753,8 +745,10 @@ public EAttribute getDoor_OnBothSides() { /** * - * - * @generated + * . + * + * @return the door_ width + * @generated */ public EAttribute getDoor_Width() { return (EAttribute)getDoor().getEStructuralFeatures().get(2); @@ -762,8 +756,10 @@ public EAttribute getDoor_Width() { /** * - * - * @generated + * . + * + * @return the door_ id + * @generated */ public EAttribute getDoor_Id() { return (EAttribute)getDoor().getEStructuralFeatures().get(3); @@ -771,8 +767,10 @@ public EAttribute getDoor_Id() { /** * - * - * @generated + * . + * + * @return the door_ number of simultaneous passengers + * @generated */ public EAttribute getDoor_NumberOfSimultaneousPassengers() { return (EAttribute)getDoor().getEStructuralFeatures().get(4); @@ -780,8 +778,10 @@ public EAttribute getDoor_NumberOfSimultaneousPassengers() { /** * - * - * @generated + * . + * + * @return the door_ is active + * @generated */ public EAttribute getDoor_IsActive() { return (EAttribute)getDoor().getEStructuralFeatures().get(5); @@ -789,8 +789,10 @@ public EAttribute getDoor_IsActive() { /** * - * - * @generated + * . + * + * @return the door_ waiting passengers + * @generated */ public EReference getDoor_WaitingPassengers() { return (EReference)getDoor().getEStructuralFeatures().get(6); @@ -798,20 +800,35 @@ public EReference getDoor_WaitingPassengers() { /** * - * - * @generated + * . + * + * @return the door_ door option + * @generated + */ + public EAttribute getDoor_DoorOption() { + return (EAttribute)getDoor().getEStructuralFeatures().get(7); + } + + /** + * + * . + * + * @return the seat + * @generated */ public EClass getSeat() { if (seatEClass == null) { - seatEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(7); + seatEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(3); } return seatEClass; } /** * - * - * @generated + * . + * + * @return the seat_ seat blocked + * @generated */ public EAttribute getSeat_SeatBlocked() { return (EAttribute)getSeat().getEStructuralFeatures().get(0); @@ -819,8 +836,10 @@ public EAttribute getSeat_SeatBlocked() { /** * - * - * @generated + * . + * + * @return the seat_ crew seat + * @generated */ public EAttribute getSeat_CrewSeat() { return (EAttribute)getSeat().getEStructuralFeatures().get(1); @@ -828,8 +847,10 @@ public EAttribute getSeat_CrewSeat() { /** * - * - * @generated + * . + * + * @return the seat_ letter + * @generated */ public EAttribute getSeat_Letter() { return (EAttribute)getSeat().getEStructuralFeatures().get(2); @@ -837,8 +858,10 @@ public EAttribute getSeat_Letter() { /** * - * - * @generated + * . + * + * @return the seat_ travel class + * @generated */ public EReference getSeat_TravelClass() { return (EReference)getSeat().getEStructuralFeatures().get(3); @@ -846,8 +869,10 @@ public EReference getSeat_TravelClass() { /** * - * - * @generated + * . + * + * @return the seat_ row + * @generated */ public EReference getSeat_Row() { return (EReference)getSeat().getEStructuralFeatures().get(4); @@ -855,8 +880,10 @@ public EReference getSeat_Row() { /** * - * - * @generated + * . + * + * @return the seat_ occupied + * @generated */ public EAttribute getSeat_Occupied() { return (EAttribute)getSeat().getEStructuralFeatures().get(5); @@ -864,8 +891,10 @@ public EAttribute getSeat_Occupied() { /** * - * - * @generated + * . + * + * @return the seat_ passenger + * @generated */ public EReference getSeat_Passenger() { return (EReference)getSeat().getEStructuralFeatures().get(6); @@ -876,26 +905,30 @@ public EReference getSeat_Passenger() { * * @generated */ - public EAttribute getSeat_CurrentlyFolded() { + public EAttribute getSeat_LayoutConcept() { return (EAttribute)getSeat().getEStructuralFeatures().get(7); } /** * - * - * @generated + * . + * + * @return the passenger + * @generated */ public EClass getPassenger() { if (passengerEClass == null) { - passengerEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(8); + passengerEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(4); } return passengerEClass; } /** * - * - * @generated + * . + * + * @return the passenger_ id + * @generated */ public EAttribute getPassenger_Id() { return (EAttribute)getPassenger().getEStructuralFeatures().get(0); @@ -903,8 +936,10 @@ public EAttribute getPassenger_Id() { /** * - * - * @generated + * . + * + * @return the passenger_ sex + * @generated */ public EAttribute getPassenger_Sex() { return (EAttribute)getPassenger().getEStructuralFeatures().get(1); @@ -912,17 +947,21 @@ public EAttribute getPassenger_Sex() { /** * - * - * @generated + * . + * + * @return the passenger_ seat + * @generated */ - public EAttribute getPassenger_Seat() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(6); + public EReference getPassenger_Seat() { + return (EReference)getPassenger().getEStructuralFeatures().get(9); } /** * - * - * @generated + * . + * + * @return the passenger_ name + * @generated */ public EAttribute getPassenger_Name() { return (EAttribute)getPassenger().getEStructuralFeatures().get(7); @@ -930,8 +969,10 @@ public EAttribute getPassenger_Name() { /** * - * - * @generated + * . + * + * @return the passenger_ boarding time + * @generated */ public EAttribute getPassenger_BoardingTime() { return (EAttribute)getPassenger().getEStructuralFeatures().get(8); @@ -939,17 +980,10 @@ public EAttribute getPassenger_BoardingTime() { /** * - * - * @generated - */ - public EReference getPassenger_SeatRef() { - return (EReference)getPassenger().getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated + * . + * + * @return the passenger_ width + * @generated */ public EAttribute getPassenger_Width() { return (EAttribute)getPassenger().getEStructuralFeatures().get(10); @@ -957,8 +991,10 @@ public EAttribute getPassenger_Width() { /** * - * - * @generated + * . + * + * @return the passenger_ depth + * @generated */ public EAttribute getPassenger_Depth() { return (EAttribute)getPassenger().getEStructuralFeatures().get(11); @@ -966,8 +1002,10 @@ public EAttribute getPassenger_Depth() { /** * - * - * @generated + * . + * + * @return the passenger_ orientation in degree + * @generated */ public EAttribute getPassenger_OrientationInDegree() { return (EAttribute)getPassenger().getEStructuralFeatures().get(12); @@ -975,8 +1013,10 @@ public EAttribute getPassenger_OrientationInDegree() { /** * - * - * @generated + * . + * + * @return the passenger_ position x + * @generated */ public EAttribute getPassenger_PositionX() { return (EAttribute)getPassenger().getEStructuralFeatures().get(13); @@ -984,8 +1024,10 @@ public EAttribute getPassenger_PositionX() { /** * - * - * @generated + * . + * + * @return the passenger_ position y + * @generated */ public EAttribute getPassenger_PositionY() { return (EAttribute)getPassenger().getEStructuralFeatures().get(14); @@ -993,8 +1035,10 @@ public EAttribute getPassenger_PositionY() { /** * - * - * @generated + * . + * + * @return the passenger_ is seated + * @generated */ public EAttribute getPassenger_IsSeated() { return (EAttribute)getPassenger().getEStructuralFeatures().get(15); @@ -1002,8 +1046,10 @@ public EAttribute getPassenger_IsSeated() { /** * - * - * @generated + * . + * + * @return the passenger_ walking speed + * @generated */ public EAttribute getPassenger_WalkingSpeed() { return (EAttribute)getPassenger().getEStructuralFeatures().get(16); @@ -1011,8 +1057,10 @@ public EAttribute getPassenger_WalkingSpeed() { /** * - * - * @generated + * . + * + * @return the passenger_ start boarding after delay + * @generated */ public EAttribute getPassenger_StartBoardingAfterDelay() { return (EAttribute)getPassenger().getEStructuralFeatures().get(17); @@ -1020,20 +1068,24 @@ public EAttribute getPassenger_StartBoardingAfterDelay() { /** * - * - * @generated + * . + * + * @return the passenger_ number of waits + * @generated */ public EAttribute getPassenger_NumberOfWaits() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(18); + return (EAttribute)getPassenger().getEStructuralFeatures().get(22); } /** * - * - * @generated + * . + * + * @return the passenger_ luggage stow time + * @generated */ public EAttribute getPassenger_LuggageStowTime() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(19); + return (EAttribute)getPassenger().getEStructuralFeatures().get(18); } /** @@ -1041,43 +1093,60 @@ public EAttribute getPassenger_LuggageStowTime() { * * @generated */ - public EAttribute getPassenger_LuggageStowingDistance() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(20); + public EAttribute getPassenger_LuggageStowDistance() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(19); } /** * - * - * @generated + * . + * + * @return the passenger_ travel class + * @generated */ public EReference getPassenger_TravelClass() { - return (EReference)getPassenger().getEStructuralFeatures().get(21); + return (EReference)getPassenger().getEStructuralFeatures().get(20); } /** * - * - * @generated + * . + * + * @return the passenger_ passenger mood + * @generated */ public EAttribute getPassenger_PassengerMood() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(22); + return (EAttribute)getPassenger().getEStructuralFeatures().get(21); } /** * - * - * @generated + * . + * + * @return the passenger_ number of make way operations + * @generated */ public EAttribute getPassenger_NumberOfMakeWayOperations() { return (EAttribute)getPassenger().getEStructuralFeatures().get(23); } + /** + * + * . + * + * @return the passenger_ luggage + * @generated + */ + public EAttribute getPassenger_Luggage() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(25); + } + /** * * * @generated */ - public EAttribute getPassenger_Luggage() { + public EAttribute getPassenger_DistanceWalked() { return (EAttribute)getPassenger().getEStructuralFeatures().get(24); } @@ -1086,8 +1155,8 @@ public EAttribute getPassenger_Luggage() { * * @generated */ - public EAttribute getPassenger_Height() { - return (EAttribute)getPassenger().getEStructuralFeatures().get(2); + public EAttribute getPassenger_CostOfPath() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(26); } /** @@ -1095,14 +1164,38 @@ public EAttribute getPassenger_Height() { * * @generated */ + public EAttribute getPassenger_TotalTimeWaited() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(27); + } + + /** + * + * . + * + * @return the passenger_ height + * @generated + */ + public EAttribute getPassenger_Height() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(2); + } + + /** + * + * . + * + * @return the passenger_ age + * @generated + */ public EAttribute getPassenger_Age() { return (EAttribute)getPassenger().getEStructuralFeatures().get(3); } /** * - * - * @generated + * . + * + * @return the passenger_ weight + * @generated */ public EAttribute getPassenger_Weight() { return (EAttribute)getPassenger().getEStructuralFeatures().get(4); @@ -1110,8 +1203,10 @@ public EAttribute getPassenger_Weight() { /** * - * - * @generated + * . + * + * @return the passenger_ door + * @generated */ public EReference getPassenger_Door() { return (EReference)getPassenger().getEStructuralFeatures().get(5); @@ -1119,20 +1214,35 @@ public EReference getPassenger_Door() { /** * - * - * @generated + * . + * + * @return the passenger_ seat id + * @generated + */ + public EAttribute getPassenger_SeatID() { + return (EAttribute)getPassenger().getEStructuralFeatures().get(6); + } + + /** + * + * . + * + * @return the crew member + * @generated */ public EClass getCrewMember() { if (crewMemberEClass == null) { - crewMemberEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(9); + crewMemberEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(5); } return crewMemberEClass; } /** * - * - * @generated + * . + * + * @return the crew member_ id + * @generated */ public EAttribute getCrewMember_Id() { return (EAttribute)getCrewMember().getEStructuralFeatures().get(0); @@ -1140,8 +1250,10 @@ public EAttribute getCrewMember_Id() { /** * - * - * @generated + * . + * + * @return the crew member_ seat + * @generated */ public EReference getCrewMember_Seat() { return (EReference)getCrewMember().getEStructuralFeatures().get(1); @@ -1149,44 +1261,52 @@ public EReference getCrewMember_Seat() { /** * - * - * @generated + * . + * + * @return the lavatory + * @generated */ public EClass getLavatory() { if (lavatoryEClass == null) { - lavatoryEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(11); + lavatoryEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(7); } return lavatoryEClass; } /** * - * - * @generated + * . + * + * @return the galley + * @generated */ public EClass getGalley() { if (galleyEClass == null) { - galleyEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(12); + galleyEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(8); } return galleyEClass; } /** * - * - * @generated + * . + * + * @return the stairway + * @generated */ public EClass getStairway() { if (stairwayEClass == null) { - stairwayEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(13); + stairwayEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(9); } return stairwayEClass; } /** * - * - * @generated + * . + * + * @return the stairway_ direction + * @generated */ public EAttribute getStairway_Direction() { return (EAttribute)getStairway().getEStructuralFeatures().get(0); @@ -1194,20 +1314,24 @@ public EAttribute getStairway_Direction() { /** * - * - * @generated + * . + * + * @return the curtain + * @generated */ public EClass getCurtain() { if (curtainEClass == null) { - curtainEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(14); + curtainEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(10); } return curtainEClass; } /** * - * - * @generated + * . + * + * @return the curtain_ postition after row + * @generated */ public EAttribute getCurtain_PostitionAfterRow() { return (EAttribute)getCurtain().getEStructuralFeatures().get(0); @@ -1215,8 +1339,10 @@ public EAttribute getCurtain_PostitionAfterRow() { /** * - * - * @generated + * . + * + * @return the curtain_ curtain open + * @generated */ public EAttribute getCurtain_CurtainOpen() { return (EAttribute)getCurtain().getEStructuralFeatures().get(1); @@ -1224,98 +1350,129 @@ public EAttribute getCurtain_CurtainOpen() { /** * - * - * @generated + * . + * + * @return the stowage + * @generated + */ + public EClass getStowage() { + if (stowageEClass == null) { + stowageEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(11); + } + return stowageEClass; + } + + /** + * + * . + * + * @return the simulation properties + * @generated + */ + public EClass getSimulationProperties() { + if (simulationPropertiesEClass == null) { + simulationPropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(17); + } + return simulationPropertiesEClass; + } + + /** + * + * . + * + * @return the simulation properties_ scale + * @generated */ - public EClass getStowage() { - if (stowageEClass == null) { - stowageEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(15); - } - return stowageEClass; + public EAttribute getSimulationProperties_Scale() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(5); } /** * - * - * @generated + * . + * + * @return the simulation properties_ use preset settings + * @generated */ - public EClass getMainDoor() { - if (mainDoorEClass == null) { - mainDoorEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(17); - } - return mainDoorEClass; + public EAttribute getSimulationProperties_UsePresetSettings() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(7); } /** * - * - * @generated + * . + * + * @return the simulation properties_ simulate without ui + * @generated */ - public EClass getEmergencyExit() { - if (emergencyExitEClass == null) { - emergencyExitEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(18); - } - return emergencyExitEClass; + public EAttribute getSimulationProperties_SimulateWithoutUI() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(8); } /** * - * - * @generated + * . + * + * @return the simulation properties_ number of simulation loops + * @generated */ - public EClass getStandardDoor() { - if (standardDoorEClass == null) { - standardDoorEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(19); - } - return standardDoorEClass; + public EAttribute getSimulationProperties_NumberOfSimulationLoops() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(9); } /** * - * - * @generated + * . + * + * @return the simulation properties_ results + * @generated */ - public EClass getSimulationProperties() { - if (simulationPropertiesEClass == null) { - simulationPropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(24); - } - return simulationPropertiesEClass; + public EReference getSimulationProperties_Results() { + return (EReference)getSimulationProperties().getEStructuralFeatures().get(0); } /** * - * - * @generated + * . + * + * @return the simulation properties_ sorting + * @generated */ - public EAttribute getSimulationProperties_SimulateWithoutUI() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(0); + public EAttribute getSimulationProperties_Sorting() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(14); } /** * - * - * @generated + * . + * + * @return the simulation properties_ simulation speed factor + * @generated */ - public EAttribute getSimulationProperties_NumberOfSimulationLoops() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(1); + public EAttribute getSimulationProperties_SimulationSpeedFactor() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(6); } /** * - * - * @generated + * . + * + * @return the simulation properties_ thread sleep time default + * @generated */ - public EAttribute getSimulationProperties_RandomSortBetweenLoops() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(2); + public EAttribute getSimulationProperties_ThreadSleepTimeDefault() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(15); } /** * - * - * @generated + * . + * + * @return the simulation properties_ developer mode + * @generated */ - public EAttribute getSimulationProperties_UseFoldableSeats() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(3); + public EAttribute getSimulationProperties_DeveloperMode() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(10); } /** @@ -1323,35 +1480,41 @@ public EAttribute getSimulationProperties_UseFoldableSeats() { * * @generated */ - public EAttribute getSimulationProperties_BringYourOwnSeat() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(4); + public EAttribute getSimulationProperties_SortPassengerBetweenLoops() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(13); } /** * - * - * @generated + * . + * + * @return the simulation properties_ luggage properties + * @generated */ - public EReference getSimulationProperties_Results() { - return (EReference)getSimulationProperties().getEStructuralFeatures().get(5); + public EReference getSimulationProperties_LuggageProperties() { + return (EReference)getSimulationProperties().getEStructuralFeatures().get(1); } /** * - * - * @generated + * . + * + * @return the simulation properties_ passenger properties + * @generated */ - public EAttribute getSimulationProperties_Sorting() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(6); + public EReference getSimulationProperties_PassengerProperties() { + return (EReference)getSimulationProperties().getEStructuralFeatures().get(2); } /** * - * - * @generated + * . + * + * @return the simulation properties_ passengers boarding per minute + * @generated */ - public EAttribute getSimulationProperties_SimulationSpeedFactor() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(7); + public EAttribute getSimulationProperties_PassengersBoardingPerMinute() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(3); } /** @@ -1359,8 +1522,8 @@ public EAttribute getSimulationProperties_SimulationSpeedFactor() { * * @generated */ - public EAttribute getSimulationProperties_SeatInterferenceStandingUpPassengerWaitingTime() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(8); + public EAttribute getSimulationProperties_DataExport() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(11); } /** @@ -1368,8 +1531,8 @@ public EAttribute getSimulationProperties_SeatInterferenceStandingUpPassengerWai * * @generated */ - public EAttribute getSimulationProperties_SeatInterferenceProcessTime() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(9); + public EAttribute getSimulationProperties_DisplayMap() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(12); } /** @@ -1377,8 +1540,8 @@ public EAttribute getSimulationProperties_SeatInterferenceProcessTime() { * * @generated */ - public EAttribute getSimulationProperties_ThreadSleepTimeDefault() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(10); + public EAttribute getSimulationProperties_SidewaysFoldabeSeatPopupTimeMean() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(16); } /** @@ -1386,8 +1549,8 @@ public EAttribute getSimulationProperties_ThreadSleepTimeDefault() { * * @generated */ - public EAttribute getSimulationProperties_DeveloperMode() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(11); + public EAttribute getSimulationProperties_SidewaysFoldabeSeatPopupTimeDeviation() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(17); } /** @@ -1395,8 +1558,8 @@ public EAttribute getSimulationProperties_DeveloperMode() { * * @generated */ - public EReference getSimulationProperties_LuggageProperties() { - return (EReference)getSimulationProperties().getEStructuralFeatures().get(12); + public EAttribute getSimulationProperties_LiftingSeatPanPopupTimeMean() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(18); } /** @@ -1404,8 +1567,8 @@ public EReference getSimulationProperties_LuggageProperties() { * * @generated */ - public EReference getSimulationProperties_PassengerProperties() { - return (EReference)getSimulationProperties().getEStructuralFeatures().get(13); + public EAttribute getSimulationProperties_LiftingSeatPanPopupTimeDeviation() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(19); } /** @@ -1413,18 +1576,20 @@ public EReference getSimulationProperties_PassengerProperties() { * * @generated */ - public EAttribute getSimulationProperties_PassengersBoardingPerMinute() { - return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(14); + public EAttribute getSimulationProperties_LayoutConcept() { + return (EAttribute)getSimulationProperties().getEStructuralFeatures().get(4); } /** * - * - * @generated + * . + * + * @return the luggage properties + * @generated */ public EClass getLuggageProperties() { if (luggagePropertiesEClass == null) { - luggagePropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(25); + luggagePropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(18); } return luggagePropertiesEClass; } @@ -1434,7 +1599,7 @@ public EClass getLuggageProperties() { * * @generated */ - public EAttribute getLuggageProperties_LuggageStowingDistanceFromSeatMean() { + public EAttribute getLuggageProperties_LuggageStowDistanceFromSeatMean() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(0); } @@ -1443,14 +1608,16 @@ public EAttribute getLuggageProperties_LuggageStowingDistanceFromSeatMean() { * * @generated */ - public EAttribute getLuggageProperties_LuggageStowingDistanceFromSeatDeviation() { + public EAttribute getLuggageProperties_LuggageStowDistanceFromSeatDeviation() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(1); } /** * - * - * @generated + * . + * + * @return the luggage properties_ percentage of passengers with no luggage + * @generated */ public EAttribute getLuggageProperties_PercentageOfPassengersWithNoLuggage() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(2); @@ -1458,8 +1625,10 @@ public EAttribute getLuggageProperties_PercentageOfPassengersWithNoLuggage() { /** * - * - * @generated + * . + * + * @return the luggage properties_ percentage of passengers with small luggage + * @generated */ public EAttribute getLuggageProperties_PercentageOfPassengersWithSmallLuggage() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(3); @@ -1467,8 +1636,10 @@ public EAttribute getLuggageProperties_PercentageOfPassengersWithSmallLuggage() /** * - * - * @generated + * . + * + * @return the luggage properties_ percentage of passengers with medium luggage + * @generated */ public EAttribute getLuggageProperties_PercentageOfPassengersWithMediumLuggage() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(4); @@ -1476,8 +1647,10 @@ public EAttribute getLuggageProperties_PercentageOfPassengersWithMediumLuggage() /** * - * - * @generated + * . + * + * @return the luggage properties_ percentage of passengers with big luggage + * @generated */ public EAttribute getLuggageProperties_PercentageOfPassengersWithBigLuggage() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(5); @@ -1485,8 +1658,10 @@ public EAttribute getLuggageProperties_PercentageOfPassengersWithBigLuggage() { /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger small luggage stow time mean + * @generated */ public EAttribute getLuggageProperties_PassengerSmallLuggageStowTimeMean() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(6); @@ -1494,8 +1669,10 @@ public EAttribute getLuggageProperties_PassengerSmallLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger small luggage stow time deviation + * @generated */ public EAttribute getLuggageProperties_PassengerSmallLuggageStowTimeDeviation() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(7); @@ -1503,8 +1680,10 @@ public EAttribute getLuggageProperties_PassengerSmallLuggageStowTimeDeviation() /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger medium luggage stow time mean + * @generated */ public EAttribute getLuggageProperties_PassengerMediumLuggageStowTimeMean() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(8); @@ -1512,8 +1691,10 @@ public EAttribute getLuggageProperties_PassengerMediumLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger medium luggage stow time deviation + * @generated */ public EAttribute getLuggageProperties_PassengerMediumLuggageStowTimeDeviation() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(9); @@ -1521,8 +1702,10 @@ public EAttribute getLuggageProperties_PassengerMediumLuggageStowTimeDeviation() /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger big luggage stow time mean + * @generated */ public EAttribute getLuggageProperties_PassengerBigLuggageStowTimeMean() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(10); @@ -1530,8 +1713,10 @@ public EAttribute getLuggageProperties_PassengerBigLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @return the luggage properties_ passenger big luggage stow time deviation + * @generated */ public EAttribute getLuggageProperties_PassengerBigLuggageStowTimeDeviation() { return (EAttribute)getLuggageProperties().getEStructuralFeatures().get(11); @@ -1539,20 +1724,24 @@ public EAttribute getLuggageProperties_PassengerBigLuggageStowTimeDeviation() { /** * - * - * @generated + * . + * + * @return the simulation result + * @generated */ public EClass getSimulationResult() { if (simulationResultEClass == null) { - simulationResultEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(26); + simulationResultEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(19); } return simulationResultEClass; } /** * - * - * @generated + * . + * + * @return the simulation result_ boarding time + * @generated */ public EAttribute getSimulationResult_BoardingTime() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(0); @@ -1560,8 +1749,10 @@ public EAttribute getSimulationResult_BoardingTime() { /** * - * - * @generated + * . + * + * @return the simulation result_ passengers + * @generated */ public EAttribute getSimulationResult_Passengers() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(1); @@ -1569,8 +1760,10 @@ public EAttribute getSimulationResult_Passengers() { /** * - * - * @generated + * . + * + * @return the simulation result_ name + * @generated */ public EAttribute getSimulationResult_Name() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(2); @@ -1578,8 +1771,10 @@ public EAttribute getSimulationResult_Name() { /** * - * - * @generated + * . + * + * @return the simulation result_ id + * @generated */ public EAttribute getSimulationResult_Id() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(3); @@ -1587,8 +1782,10 @@ public EAttribute getSimulationResult_Id() { /** * - * - * @generated + * . + * + * @return the simulation result_ date + * @generated */ public EAttribute getSimulationResult_Date() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(4); @@ -1596,8 +1793,10 @@ public EAttribute getSimulationResult_Date() { /** * - * - * @generated + * . + * + * @return the simulation result_ boarding time string + * @generated */ public EAttribute getSimulationResult_BoardingTimeString() { return (EAttribute)getSimulationResult().getEStructuralFeatures().get(5); @@ -1608,17 +1807,48 @@ public EAttribute getSimulationResult_BoardingTimeString() { * * @generated */ + public EAttribute getSimulationResult_WaymakingSkipped() { + return (EAttribute)getSimulationResult().getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getSimulationResult_WaymakingCompleted() { + return (EAttribute)getSimulationResult().getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getSimulationResult_LayoutConceptType() { + return (EAttribute)getSimulationResult().getEStructuralFeatures().get(8); + } + + /** + * + * . + * + * @return the passenger properties + * @generated + */ public EClass getPassengerProperties() { if (passengerPropertiesEClass == null) { - passengerPropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(29); + passengerPropertiesEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(22); } return passengerPropertiesEClass; } /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger width mean male + * @generated */ public EAttribute getPassengerProperties_PassengerWidthMeanMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(0); @@ -1626,8 +1856,10 @@ public EAttribute getPassengerProperties_PassengerWidthMeanMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger width deviation male + * @generated */ public EAttribute getPassengerProperties_PassengerWidthDeviationMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(1); @@ -1635,8 +1867,10 @@ public EAttribute getPassengerProperties_PassengerWidthDeviationMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger weight mean male + * @generated */ public EAttribute getPassengerProperties_PassengerWeightMeanMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(2); @@ -1644,8 +1878,10 @@ public EAttribute getPassengerProperties_PassengerWeightMeanMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger weight deviation male + * @generated */ public EAttribute getPassengerProperties_PassengerWeightDeviationMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(3); @@ -1653,8 +1889,10 @@ public EAttribute getPassengerProperties_PassengerWeightDeviationMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger height mean male + * @generated */ public EAttribute getPassengerProperties_PassengerHeightMeanMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(4); @@ -1662,8 +1900,10 @@ public EAttribute getPassengerProperties_PassengerHeightMeanMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger height deviation male + * @generated */ public EAttribute getPassengerProperties_PassengerHeightDeviationMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(5); @@ -1671,8 +1911,10 @@ public EAttribute getPassengerProperties_PassengerHeightDeviationMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger depth mean male + * @generated */ public EAttribute getPassengerProperties_PassengerDepthMeanMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(6); @@ -1680,8 +1922,10 @@ public EAttribute getPassengerProperties_PassengerDepthMeanMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger depth deviation male + * @generated */ public EAttribute getPassengerProperties_PassengerDepthDeviationMale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(7); @@ -1689,8 +1933,10 @@ public EAttribute getPassengerProperties_PassengerDepthDeviationMale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ percentage of women + * @generated */ public EAttribute getPassengerProperties_PercentageOfWomen() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(8); @@ -1698,8 +1944,10 @@ public EAttribute getPassengerProperties_PercentageOfWomen() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger width mean female + * @generated */ public EAttribute getPassengerProperties_PassengerWidthMeanFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(9); @@ -1707,8 +1955,10 @@ public EAttribute getPassengerProperties_PassengerWidthMeanFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger width deviation female + * @generated */ public EAttribute getPassengerProperties_PassengerWidthDeviationFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(10); @@ -1716,8 +1966,10 @@ public EAttribute getPassengerProperties_PassengerWidthDeviationFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger weight mean female + * @generated */ public EAttribute getPassengerProperties_PassengerWeightMeanFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(11); @@ -1725,8 +1977,10 @@ public EAttribute getPassengerProperties_PassengerWeightMeanFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger weight deviation female + * @generated */ public EAttribute getPassengerProperties_PassengerWeightDeviationFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(12); @@ -1734,8 +1988,10 @@ public EAttribute getPassengerProperties_PassengerWeightDeviationFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger height mean female + * @generated */ public EAttribute getPassengerProperties_PassengerHeightMeanFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(13); @@ -1743,8 +1999,10 @@ public EAttribute getPassengerProperties_PassengerHeightMeanFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger height deviation female + * @generated */ public EAttribute getPassengerProperties_PassengerHeightDeviationFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(14); @@ -1752,8 +2010,10 @@ public EAttribute getPassengerProperties_PassengerHeightDeviationFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger depth mean female + * @generated */ public EAttribute getPassengerProperties_PassengerDepthMeanFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(15); @@ -1761,8 +2021,10 @@ public EAttribute getPassengerProperties_PassengerDepthMeanFemale() { /** * - * - * @generated + * . + * + * @return the passenger properties_ passenger depth deviation female + * @generated */ public EAttribute getPassengerProperties_PassengerDepthDeviationFemale() { return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(16); @@ -1773,17 +2035,84 @@ public EAttribute getPassengerProperties_PassengerDepthDeviationFemale() { * * @generated */ + public EAttribute getPassengerProperties_PassengerAggressiveMoodShare() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(17); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_SeatInterferenceStandingUpPassengerWaitingTime() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(18); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_SeatInterferenceProcessTimeMean() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(19); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_SeatInterferenceProcessTimeDeviation() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(20); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatMean() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(21); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_SeatInterferenceProcessTimeFoldingSeatDeviation() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(22); + } + + /** + * + * + * @generated + */ + public EAttribute getPassengerProperties_PassivePassengerWaitingTimeAfterCollision() { + return (EAttribute)getPassengerProperties().getEStructuralFeatures().get(23); + } + + /** + * + * . + * + * @return the physical object + * @generated + */ public EClass getPhysicalObject() { if (physicalObjectEClass == null) { - physicalObjectEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(10); + physicalObjectEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(6); } return physicalObjectEClass; } /** * - * - * @generated + * . + * + * @return the physical object_ y position + * @generated */ public EAttribute getPhysicalObject_YPosition() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(0); @@ -1791,8 +2120,10 @@ public EAttribute getPhysicalObject_YPosition() { /** * - * - * @generated + * . + * + * @return the physical object_ x position + * @generated */ public EAttribute getPhysicalObject_XPosition() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(1); @@ -1800,8 +2131,10 @@ public EAttribute getPhysicalObject_XPosition() { /** * - * - * @generated + * . + * + * @return the physical object_ y dimension + * @generated */ public EAttribute getPhysicalObject_YDimension() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(2); @@ -1809,8 +2142,10 @@ public EAttribute getPhysicalObject_YDimension() { /** * - * - * @generated + * . + * + * @return the physical object_ x dimension + * @generated */ public EAttribute getPhysicalObject_XDimension() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(3); @@ -1818,8 +2153,10 @@ public EAttribute getPhysicalObject_XDimension() { /** * - * - * @generated + * . + * + * @return the physical object_ name + * @generated */ public EAttribute getPhysicalObject_Name() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(4); @@ -1827,8 +2164,10 @@ public EAttribute getPhysicalObject_Name() { /** * - * - * @generated + * . + * + * @return the physical object_ id + * @generated */ public EAttribute getPhysicalObject_Id() { return (EAttribute)getPhysicalObject().getEStructuralFeatures().get(5); @@ -1836,8 +2175,10 @@ public EAttribute getPhysicalObject_Id() { /** * - * - * @generated + * . + * + * @return the physical object__ out of bounds__ diagnostic chain_ map + * @generated */ public EOperation getPhysicalObject__OutOfBounds__DiagnosticChain_Map() { return getPhysicalObject().getEOperations().get(0); @@ -1845,104 +2186,148 @@ public EOperation getPhysicalObject__OutOfBounds__DiagnosticChain_Map() { /** * - * - * @generated + * . + * + * @return the stairway direction + * @generated */ public EEnum getStairwayDirection() { if (stairwayDirectionEEnum == null) { - stairwayDirectionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(21); + stairwayDirectionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(14); } return stairwayDirectionEEnum; } /** * - * - * @generated + * . + * + * @return the aircraft type + * @generated */ public EEnum getAircraftType() { if (aircraftTypeEEnum == null) { - aircraftTypeEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(22); + aircraftTypeEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(15); } return aircraftTypeEEnum; } /** * - * - * @generated + * . + * + * @return the passenger mood + * @generated */ public EEnum getPassengerMood() { if (passengerMoodEEnum == null) { - passengerMoodEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(23); + passengerMoodEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(16); } return passengerMoodEEnum; } /** * - * - * @generated + * . + * + * @return the luggage size + * @generated */ public EEnum getLuggageSize() { if (luggageSizeEEnum == null) { - luggageSizeEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(27); + luggageSizeEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(20); } return luggageSizeEEnum; } /** * - * - * @generated + * . + * + * @return the sorting style + * @generated */ public EEnum getSortingStyle() { if (sortingStyleEEnum == null) { - sortingStyleEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(28); + sortingStyleEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(21); } return sortingStyleEEnum; } /** * - * - * @generated + * . + * + * @return the travel option + * @generated */ public EEnum getTravelOption() { if (travelOptionEEnum == null) { - travelOptionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(30); + travelOptionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(23); } return travelOptionEEnum; } /** * - * - * @generated + * . + * + * @return the object option + * @generated */ public EEnum getObjectOption() { if (objectOptionEEnum == null) { - objectOptionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(31); + objectOptionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(24); } return objectOptionEEnum; } + /** + * + * . + * + * @return the door option + * @generated + */ + public EEnum getDoorOption() { + if (doorOptionEEnum == null) { + doorOptionEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(25); + } + return doorOptionEEnum; + } + /** * * * @generated */ + public EEnum getLayoutConcept() { + if (layoutConceptEEnum == null) { + layoutConceptEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(26); + } + return layoutConceptEEnum; + } + + /** + * + * . + * + * @return the sex + * @generated + */ public EEnum getSex() { if (sexEEnum == null) { - sexEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(20); + sexEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(CabinPackage.eNS_URI).getEClassifiers().get(13); } return sexEEnum; } /** * - * - * @generated + * . + * + * @return the cabin factory + * @generated */ public CabinFactory getCabinFactory() { return (CabinFactory)getEFactoryInstance(); @@ -1950,8 +2335,9 @@ public CabinFactory getCabinFactory() { /** * - * - * @generated + * . + * + * @generated */ private boolean isLoaded = false; @@ -1983,8 +2369,9 @@ public void loadPackage() { /** * - * - * @generated + * . + * + * @generated */ private boolean isFixed = false; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CrewMemberImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CrewMemberImpl.java index 73f8ef6b..3baaa3f3 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CrewMemberImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CrewMemberImpl.java @@ -59,8 +59,9 @@ public class CrewMemberImpl extends MinimalEObjectImpl.Container implements Crew /** * - * - * @generated + * . + * + * @generated */ protected CrewMemberImpl() { super(); @@ -68,8 +69,10 @@ protected CrewMemberImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -78,8 +81,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the id + * @generated */ public int getId() { return id; @@ -87,8 +92,10 @@ public int getId() { /** * - * - * @generated + * . + * + * @param newId the new id + * @generated */ public void setId(int newId) { int oldId = id; @@ -99,8 +106,10 @@ public void setId(int newId) { /** * - * - * @generated + * . + * + * @return the seat + * @generated */ public Seat getSeat() { if (seat != null && seat.eIsProxy()) { @@ -116,8 +125,10 @@ public Seat getSeat() { /** * - * - * @generated + * . + * + * @return the seat + * @generated */ public Seat basicGetSeat() { return seat; @@ -125,8 +136,10 @@ public Seat basicGetSeat() { /** * - * - * @generated + * . + * + * @param newSeat the new seat + * @generated */ public void setSeat(Seat newSeat) { Seat oldSeat = seat; @@ -137,8 +150,13 @@ public void setSeat(Seat newSeat) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -154,8 +172,11 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -172,8 +193,10 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -190,8 +213,11 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -206,8 +232,10 @@ public boolean eIsSet(int featureID) { /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CurtainImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CurtainImpl.java index 47e2ef36..f348442e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CurtainImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/CurtainImpl.java @@ -66,8 +66,9 @@ public class CurtainImpl extends PhysicalObjectImpl implements Curtain { /** * - * - * @generated + * . + * + * @generated */ protected CurtainImpl() { super(); @@ -75,8 +76,10 @@ protected CurtainImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -85,8 +88,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the postition after row + * @generated */ public int getPostitionAfterRow() { return postitionAfterRow; @@ -94,8 +99,10 @@ public int getPostitionAfterRow() { /** * - * - * @generated + * . + * + * @param newPostitionAfterRow the new postition after row + * @generated */ public void setPostitionAfterRow(int newPostitionAfterRow) { int oldPostitionAfterRow = postitionAfterRow; @@ -106,8 +113,10 @@ public void setPostitionAfterRow(int newPostitionAfterRow) { /** * - * - * @generated + * . + * + * @return true, if is curtain open + * @generated */ public boolean isCurtainOpen() { return curtainOpen; @@ -115,8 +124,10 @@ public boolean isCurtainOpen() { /** * - * - * @generated + * . + * + * @param newCurtainOpen the new curtain open + * @generated */ public void setCurtainOpen(boolean newCurtainOpen) { boolean oldCurtainOpen = curtainOpen; @@ -127,8 +138,13 @@ public void setCurtainOpen(boolean newCurtainOpen) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -143,8 +159,11 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -161,8 +180,10 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -179,8 +200,11 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -195,8 +219,10 @@ public boolean eIsSet(int featureID) { /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/DoorImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/DoorImpl.java index 614a6116..ce6c905e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/DoorImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/DoorImpl.java @@ -13,6 +13,7 @@ import net.bhl.cdt.paxelerate.model.CabinPackage; import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.DoorOption; import net.bhl.cdt.paxelerate.model.Passenger; /** @@ -30,11 +31,12 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.DoorImpl#getNumberOfSimultaneousPassengers Number Of Simultaneous Passengers}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.DoorImpl#isIsActive Is Active}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.DoorImpl#getWaitingPassengers Waiting Passengers}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.DoorImpl#getDoorOption Door Option}
  • * * * @generated */ -public abstract class DoorImpl extends MinimalEObjectImpl.Container implements Door { +public class DoorImpl extends MinimalEObjectImpl.Container implements Door { /** * The default value of the '{@link #getXPosition() XPosition}' attribute. * @@ -166,9 +168,30 @@ public abstract class DoorImpl extends MinimalEObjectImpl.Container implements D protected EList waitingPassengers; /** + * The default value of the '{@link #getDoorOption() Door Option}' attribute. * * + * @see #getDoorOption() * @generated + * @ordered + */ + protected static final DoorOption DOOR_OPTION_EDEFAULT = DoorOption.STANDARD_DOOR; + + /** + * The cached value of the '{@link #getDoorOption() Door Option}' attribute. + * + * + * @see #getDoorOption() + * @generated + * @ordered + */ + protected DoorOption doorOption = DOOR_OPTION_EDEFAULT; + + /** + * + * . + * + * @generated */ protected DoorImpl() { super(); @@ -176,8 +199,10 @@ protected DoorImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -186,8 +211,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the x position + * @generated */ public int getXPosition() { return xPosition; @@ -195,8 +222,10 @@ public int getXPosition() { /** * - * - * @generated + * . + * + * @param newXPosition the new x position + * @generated */ public void setXPosition(int newXPosition) { int oldXPosition = xPosition; @@ -207,8 +236,10 @@ public void setXPosition(int newXPosition) { /** * - * - * @generated + * . + * + * @return true, if is on both sides + * @generated */ public boolean isOnBothSides() { return onBothSides; @@ -216,8 +247,10 @@ public boolean isOnBothSides() { /** * - * - * @generated + * . + * + * @param newOnBothSides the new on both sides + * @generated */ public void setOnBothSides(boolean newOnBothSides) { boolean oldOnBothSides = onBothSides; @@ -228,8 +261,10 @@ public void setOnBothSides(boolean newOnBothSides) { /** * - * - * @generated + * . + * + * @return the width + * @generated */ public int getWidth() { return width; @@ -237,8 +272,10 @@ public int getWidth() { /** * - * - * @generated + * . + * + * @param newWidth the new width + * @generated */ public void setWidth(int newWidth) { int oldWidth = width; @@ -249,8 +286,10 @@ public void setWidth(int newWidth) { /** * - * - * @generated + * . + * + * @return the id + * @generated */ public int getId() { return id; @@ -258,8 +297,10 @@ public int getId() { /** * - * - * @generated + * . + * + * @param newId the new id + * @generated */ public void setId(int newId) { int oldId = id; @@ -270,8 +311,10 @@ public void setId(int newId) { /** * - * - * @generated + * . + * + * @return the number of simultaneous passengers + * @generated */ public int getNumberOfSimultaneousPassengers() { return numberOfSimultaneousPassengers; @@ -279,8 +322,10 @@ public int getNumberOfSimultaneousPassengers() { /** * - * - * @generated + * . + * + * @param newNumberOfSimultaneousPassengers the new number of simultaneous passengers + * @generated */ public void setNumberOfSimultaneousPassengers(int newNumberOfSimultaneousPassengers) { int oldNumberOfSimultaneousPassengers = numberOfSimultaneousPassengers; @@ -291,8 +336,10 @@ public void setNumberOfSimultaneousPassengers(int newNumberOfSimultaneousPasseng /** * - * - * @generated + * . + * + * @return true, if is checks if is active + * @generated */ public boolean isIsActive() { return isActive; @@ -300,8 +347,10 @@ public boolean isIsActive() { /** * - * - * @generated + * . + * + * @param newIsActive the new checks if is active + * @generated */ public void setIsActive(boolean newIsActive) { boolean oldIsActive = isActive; @@ -312,8 +361,10 @@ public void setIsActive(boolean newIsActive) { /** * - * - * @generated + * . + * + * @return the waiting passengers + * @generated */ public EList getWaitingPassengers() { if (waitingPassengers == null) { @@ -324,8 +375,38 @@ public EList getWaitingPassengers() { /** * - * - * @generated + * . + * + * @return the door option + * @generated + */ + public DoorOption getDoorOption() { + return doorOption; + } + + /** + * + * . + * + * @param newDoorOption the new door option + * @generated + */ + public void setDoorOption(DoorOption newDoorOption) { + DoorOption oldDoorOption = doorOption; + doorOption = newDoorOption == null ? DOOR_OPTION_EDEFAULT : newDoorOption; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.DOOR__DOOR_OPTION, oldDoorOption, doorOption)); + } + + /** + * + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -344,14 +425,19 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return isIsActive(); case CabinPackage.DOOR__WAITING_PASSENGERS: return getWaitingPassengers(); + case CabinPackage.DOOR__DOOR_OPTION: + return getDoorOption(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @SuppressWarnings("unchecked") @Override @@ -379,14 +465,19 @@ public void eSet(int featureID, Object newValue) { getWaitingPassengers().clear(); getWaitingPassengers().addAll((Collection)newValue); return; + case CabinPackage.DOOR__DOOR_OPTION: + setDoorOption((DoorOption)newValue); + return; } super.eSet(featureID, newValue); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -412,14 +503,20 @@ public void eUnset(int featureID) { case CabinPackage.DOOR__WAITING_PASSENGERS: getWaitingPassengers().clear(); return; + case CabinPackage.DOOR__DOOR_OPTION: + setDoorOption(DOOR_OPTION_EDEFAULT); + return; } super.eUnset(featureID); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -438,14 +535,18 @@ public boolean eIsSet(int featureID) { return isActive != IS_ACTIVE_EDEFAULT; case CabinPackage.DOOR__WAITING_PASSENGERS: return waitingPassengers != null && !waitingPassengers.isEmpty(); + case CabinPackage.DOOR__DOOR_OPTION: + return doorOption != DOOR_OPTION_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -464,6 +565,8 @@ public String toString() { result.append(numberOfSimultaneousPassengers); result.append(", isActive: "); result.append(isActive); + result.append(", doorOption: "); + result.append(doorOption); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EconomyClassImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EconomyClassImpl.java deleted file mode 100644 index c0e8a19e..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EconomyClassImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.EconomyClass; - -/** - * - * An implementation of the model object 'Economy Class'. - * - * - * @generated - */ -public class EconomyClassImpl extends TravelClassImpl implements EconomyClass { - /** - * - * - * @generated - */ - protected EconomyClassImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.ECONOMY_CLASS; - } - -} //EconomyClassImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EmergencyExitImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EmergencyExitImpl.java deleted file mode 100644 index c61ba45c..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/EmergencyExitImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.EmergencyExit; - -/** - * - * An implementation of the model object 'Emergency Exit'. - * - * - * @generated - */ -public class EmergencyExitImpl extends DoorImpl implements EmergencyExit { - /** - * - * - * @generated - */ - protected EmergencyExitImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.EMERGENCY_EXIT; - } - -} //EmergencyExitImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/FirstClassImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/FirstClassImpl.java deleted file mode 100644 index 175d4cb4..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/FirstClassImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.FirstClass; - -/** - * - * An implementation of the model object 'First Class'. - * - * - * @generated - */ -public class FirstClassImpl extends TravelClassImpl implements FirstClass { - /** - * - * - * @generated - */ - protected FirstClassImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.FIRST_CLASS; - } - -} //FirstClassImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/GalleyImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/GalleyImpl.java index 88b807f7..f5045021 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/GalleyImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/GalleyImpl.java @@ -15,10 +15,12 @@ * @generated */ public class GalleyImpl extends PhysicalObjectImpl implements Galley { + /** * - * - * @generated + * . + * + * @generated */ protected GalleyImpl() { super(); @@ -26,8 +28,10 @@ protected GalleyImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LavatoryImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LavatoryImpl.java index f9262aa0..9506d820 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LavatoryImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LavatoryImpl.java @@ -15,10 +15,12 @@ * @generated */ public class LavatoryImpl extends PhysicalObjectImpl implements Lavatory { + /** * - * - * @generated + * . + * + * @generated */ protected LavatoryImpl() { super(); @@ -26,8 +28,10 @@ protected LavatoryImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LuggagePropertiesImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LuggagePropertiesImpl.java index aee95e97..c5727773 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LuggagePropertiesImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/LuggagePropertiesImpl.java @@ -20,8 +20,8 @@ * The following features are implemented: *

    *
      - *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getLuggageStowingDistanceFromSeatMean Luggage Stowing Distance From Seat Mean}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getLuggageStowingDistanceFromSeatDeviation Luggage Stowing Distance From Seat Deviation}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getLuggageStowDistanceFromSeatMean Luggage Stow Distance From Seat Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getLuggageStowDistanceFromSeatDeviation Luggage Stow Distance From Seat Deviation}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getPercentageOfPassengersWithNoLuggage Percentage Of Passengers With No Luggage}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getPercentageOfPassengersWithSmallLuggage Percentage Of Passengers With Small Luggage}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.LuggagePropertiesImpl#getPercentageOfPassengersWithMediumLuggage Percentage Of Passengers With Medium Luggage}
    • @@ -38,44 +38,44 @@ */ public class LuggagePropertiesImpl extends MinimalEObjectImpl.Container implements LuggageProperties { /** - * The default value of the '{@link #getLuggageStowingDistanceFromSeatMean() Luggage Stowing Distance From Seat Mean}' attribute. + * The default value of the '{@link #getLuggageStowDistanceFromSeatMean() Luggage Stow Distance From Seat Mean}' attribute. * * - * @see #getLuggageStowingDistanceFromSeatMean() + * @see #getLuggageStowDistanceFromSeatMean() * @generated * @ordered */ - protected static final double LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN_EDEFAULT = 80.0; + protected static final double LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN_EDEFAULT = 80.0; /** - * The cached value of the '{@link #getLuggageStowingDistanceFromSeatMean() Luggage Stowing Distance From Seat Mean}' attribute. + * The cached value of the '{@link #getLuggageStowDistanceFromSeatMean() Luggage Stow Distance From Seat Mean}' attribute. * * - * @see #getLuggageStowingDistanceFromSeatMean() + * @see #getLuggageStowDistanceFromSeatMean() * @generated * @ordered */ - protected double luggageStowingDistanceFromSeatMean = LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN_EDEFAULT; + protected double luggageStowDistanceFromSeatMean = LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN_EDEFAULT; /** - * The default value of the '{@link #getLuggageStowingDistanceFromSeatDeviation() Luggage Stowing Distance From Seat Deviation}' attribute. + * The default value of the '{@link #getLuggageStowDistanceFromSeatDeviation() Luggage Stow Distance From Seat Deviation}' attribute. * * - * @see #getLuggageStowingDistanceFromSeatDeviation() + * @see #getLuggageStowDistanceFromSeatDeviation() * @generated * @ordered */ - protected static final double LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT = 10.0; + protected static final double LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT = 10.0; /** - * The cached value of the '{@link #getLuggageStowingDistanceFromSeatDeviation() Luggage Stowing Distance From Seat Deviation}' attribute. + * The cached value of the '{@link #getLuggageStowDistanceFromSeatDeviation() Luggage Stow Distance From Seat Deviation}' attribute. * * - * @see #getLuggageStowingDistanceFromSeatDeviation() + * @see #getLuggageStowDistanceFromSeatDeviation() * @generated * @ordered */ - protected double luggageStowingDistanceFromSeatDeviation = LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT; + protected double luggageStowDistanceFromSeatDeviation = LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT; /** * The default value of the '{@link #getPercentageOfPassengersWithNoLuggage() Percentage Of Passengers With No Luggage}' attribute. @@ -85,7 +85,7 @@ public class LuggagePropertiesImpl extends MinimalEObjectImpl.Container implemen * @generated * @ordered */ - protected static final double PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE_EDEFAULT = 0.0; + protected static final double PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE_EDEFAULT = 100.0; /** * The cached value of the '{@link #getPercentageOfPassengersWithNoLuggage() Percentage Of Passengers With No Luggage}' attribute. @@ -279,8 +279,9 @@ public class LuggagePropertiesImpl extends MinimalEObjectImpl.Container implemen /** * - * - * @generated + * . + * + * @generated */ protected LuggagePropertiesImpl() { super(); @@ -288,8 +289,10 @@ protected LuggagePropertiesImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -301,8 +304,8 @@ protected EClass eStaticClass() { * * @generated */ - public double getLuggageStowingDistanceFromSeatMean() { - return luggageStowingDistanceFromSeatMean; + public double getLuggageStowDistanceFromSeatMean() { + return luggageStowDistanceFromSeatMean; } /** @@ -310,11 +313,11 @@ public double getLuggageStowingDistanceFromSeatMean() { * * @generated */ - public void setLuggageStowingDistanceFromSeatMean(double newLuggageStowingDistanceFromSeatMean) { - double oldLuggageStowingDistanceFromSeatMean = luggageStowingDistanceFromSeatMean; - luggageStowingDistanceFromSeatMean = newLuggageStowingDistanceFromSeatMean; + public void setLuggageStowDistanceFromSeatMean(double newLuggageStowDistanceFromSeatMean) { + double oldLuggageStowDistanceFromSeatMean = luggageStowDistanceFromSeatMean; + luggageStowDistanceFromSeatMean = newLuggageStowDistanceFromSeatMean; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN, oldLuggageStowingDistanceFromSeatMean, luggageStowingDistanceFromSeatMean)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN, oldLuggageStowDistanceFromSeatMean, luggageStowDistanceFromSeatMean)); } /** @@ -322,8 +325,8 @@ public void setLuggageStowingDistanceFromSeatMean(double newLuggageStowingDistan * * @generated */ - public double getLuggageStowingDistanceFromSeatDeviation() { - return luggageStowingDistanceFromSeatDeviation; + public double getLuggageStowDistanceFromSeatDeviation() { + return luggageStowDistanceFromSeatDeviation; } /** @@ -331,17 +334,19 @@ public double getLuggageStowingDistanceFromSeatDeviation() { * * @generated */ - public void setLuggageStowingDistanceFromSeatDeviation(double newLuggageStowingDistanceFromSeatDeviation) { - double oldLuggageStowingDistanceFromSeatDeviation = luggageStowingDistanceFromSeatDeviation; - luggageStowingDistanceFromSeatDeviation = newLuggageStowingDistanceFromSeatDeviation; + public void setLuggageStowDistanceFromSeatDeviation(double newLuggageStowDistanceFromSeatDeviation) { + double oldLuggageStowDistanceFromSeatDeviation = luggageStowDistanceFromSeatDeviation; + luggageStowDistanceFromSeatDeviation = newLuggageStowDistanceFromSeatDeviation; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION, oldLuggageStowingDistanceFromSeatDeviation, luggageStowingDistanceFromSeatDeviation)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION, oldLuggageStowDistanceFromSeatDeviation, luggageStowDistanceFromSeatDeviation)); } /** * - * - * @generated + * . + * + * @return the percentage of passengers with no luggage + * @generated */ public double getPercentageOfPassengersWithNoLuggage() { return percentageOfPassengersWithNoLuggage; @@ -349,8 +354,10 @@ public double getPercentageOfPassengersWithNoLuggage() { /** * - * - * @generated + * . + * + * @param newPercentageOfPassengersWithNoLuggage the new percentage of passengers with no luggage + * @generated */ public void setPercentageOfPassengersWithNoLuggage(double newPercentageOfPassengersWithNoLuggage) { double oldPercentageOfPassengersWithNoLuggage = percentageOfPassengersWithNoLuggage; @@ -361,8 +368,10 @@ public void setPercentageOfPassengersWithNoLuggage(double newPercentageOfPasseng /** * - * - * @generated + * . + * + * @return the percentage of passengers with small luggage + * @generated */ public double getPercentageOfPassengersWithSmallLuggage() { return percentageOfPassengersWithSmallLuggage; @@ -370,8 +379,10 @@ public double getPercentageOfPassengersWithSmallLuggage() { /** * - * - * @generated + * . + * + * @param newPercentageOfPassengersWithSmallLuggage the new percentage of passengers with small luggage + * @generated */ public void setPercentageOfPassengersWithSmallLuggage(double newPercentageOfPassengersWithSmallLuggage) { double oldPercentageOfPassengersWithSmallLuggage = percentageOfPassengersWithSmallLuggage; @@ -382,8 +393,10 @@ public void setPercentageOfPassengersWithSmallLuggage(double newPercentageOfPass /** * - * - * @generated + * . + * + * @return the percentage of passengers with medium luggage + * @generated */ public double getPercentageOfPassengersWithMediumLuggage() { return percentageOfPassengersWithMediumLuggage; @@ -391,8 +404,10 @@ public double getPercentageOfPassengersWithMediumLuggage() { /** * - * - * @generated + * . + * + * @param newPercentageOfPassengersWithMediumLuggage the new percentage of passengers with medium luggage + * @generated */ public void setPercentageOfPassengersWithMediumLuggage(double newPercentageOfPassengersWithMediumLuggage) { double oldPercentageOfPassengersWithMediumLuggage = percentageOfPassengersWithMediumLuggage; @@ -403,8 +418,10 @@ public void setPercentageOfPassengersWithMediumLuggage(double newPercentageOfPas /** * - * - * @generated + * . + * + * @return the percentage of passengers with big luggage + * @generated */ public double getPercentageOfPassengersWithBigLuggage() { return percentageOfPassengersWithBigLuggage; @@ -412,8 +429,10 @@ public double getPercentageOfPassengersWithBigLuggage() { /** * - * - * @generated + * . + * + * @param newPercentageOfPassengersWithBigLuggage the new percentage of passengers with big luggage + * @generated */ public void setPercentageOfPassengersWithBigLuggage(double newPercentageOfPassengersWithBigLuggage) { double oldPercentageOfPassengersWithBigLuggage = percentageOfPassengersWithBigLuggage; @@ -424,8 +443,10 @@ public void setPercentageOfPassengersWithBigLuggage(double newPercentageOfPassen /** * - * - * @generated + * . + * + * @return the passenger small luggage stow time mean + * @generated */ public double getPassengerSmallLuggageStowTimeMean() { return passengerSmallLuggageStowTimeMean; @@ -433,8 +454,10 @@ public double getPassengerSmallLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @param newPassengerSmallLuggageStowTimeMean the new passenger small luggage stow time mean + * @generated */ public void setPassengerSmallLuggageStowTimeMean(double newPassengerSmallLuggageStowTimeMean) { double oldPassengerSmallLuggageStowTimeMean = passengerSmallLuggageStowTimeMean; @@ -445,8 +468,10 @@ public void setPassengerSmallLuggageStowTimeMean(double newPassengerSmallLuggage /** * - * - * @generated + * . + * + * @return the passenger small luggage stow time deviation + * @generated */ public double getPassengerSmallLuggageStowTimeDeviation() { return passengerSmallLuggageStowTimeDeviation; @@ -454,8 +479,10 @@ public double getPassengerSmallLuggageStowTimeDeviation() { /** * - * - * @generated + * . + * + * @param newPassengerSmallLuggageStowTimeDeviation the new passenger small luggage stow time deviation + * @generated */ public void setPassengerSmallLuggageStowTimeDeviation(double newPassengerSmallLuggageStowTimeDeviation) { double oldPassengerSmallLuggageStowTimeDeviation = passengerSmallLuggageStowTimeDeviation; @@ -466,8 +493,10 @@ public void setPassengerSmallLuggageStowTimeDeviation(double newPassengerSmallLu /** * - * - * @generated + * . + * + * @return the passenger medium luggage stow time mean + * @generated */ public double getPassengerMediumLuggageStowTimeMean() { return passengerMediumLuggageStowTimeMean; @@ -475,8 +504,10 @@ public double getPassengerMediumLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @param newPassengerMediumLuggageStowTimeMean the new passenger medium luggage stow time mean + * @generated */ public void setPassengerMediumLuggageStowTimeMean(double newPassengerMediumLuggageStowTimeMean) { double oldPassengerMediumLuggageStowTimeMean = passengerMediumLuggageStowTimeMean; @@ -487,8 +518,10 @@ public void setPassengerMediumLuggageStowTimeMean(double newPassengerMediumLugga /** * - * - * @generated + * . + * + * @return the passenger medium luggage stow time deviation + * @generated */ public double getPassengerMediumLuggageStowTimeDeviation() { return passengerMediumLuggageStowTimeDeviation; @@ -496,8 +529,10 @@ public double getPassengerMediumLuggageStowTimeDeviation() { /** * - * - * @generated + * . + * + * @param newPassengerMediumLuggageStowTimeDeviation the new passenger medium luggage stow time deviation + * @generated */ public void setPassengerMediumLuggageStowTimeDeviation(double newPassengerMediumLuggageStowTimeDeviation) { double oldPassengerMediumLuggageStowTimeDeviation = passengerMediumLuggageStowTimeDeviation; @@ -508,8 +543,10 @@ public void setPassengerMediumLuggageStowTimeDeviation(double newPassengerMedium /** * - * - * @generated + * . + * + * @return the passenger big luggage stow time mean + * @generated */ public double getPassengerBigLuggageStowTimeMean() { return passengerBigLuggageStowTimeMean; @@ -517,8 +554,10 @@ public double getPassengerBigLuggageStowTimeMean() { /** * - * - * @generated + * . + * + * @param newPassengerBigLuggageStowTimeMean the new passenger big luggage stow time mean + * @generated */ public void setPassengerBigLuggageStowTimeMean(double newPassengerBigLuggageStowTimeMean) { double oldPassengerBigLuggageStowTimeMean = passengerBigLuggageStowTimeMean; @@ -529,8 +568,10 @@ public void setPassengerBigLuggageStowTimeMean(double newPassengerBigLuggageStow /** * - * - * @generated + * . + * + * @return the passenger big luggage stow time deviation + * @generated */ public double getPassengerBigLuggageStowTimeDeviation() { return passengerBigLuggageStowTimeDeviation; @@ -538,8 +579,10 @@ public double getPassengerBigLuggageStowTimeDeviation() { /** * - * - * @generated + * . + * + * @param newPassengerBigLuggageStowTimeDeviation the new passenger big luggage stow time deviation + * @generated */ public void setPassengerBigLuggageStowTimeDeviation(double newPassengerBigLuggageStowTimeDeviation) { double oldPassengerBigLuggageStowTimeDeviation = passengerBigLuggageStowTimeDeviation; @@ -550,16 +593,21 @@ public void setPassengerBigLuggageStowTimeDeviation(double newPassengerBigLuggag /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN: - return getLuggageStowingDistanceFromSeatMean(); - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION: - return getLuggageStowingDistanceFromSeatDeviation(); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN: + return getLuggageStowDistanceFromSeatMean(); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION: + return getLuggageStowDistanceFromSeatDeviation(); case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE: return getPercentageOfPassengersWithNoLuggage(); case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_SMALL_LUGGAGE: @@ -586,17 +634,20 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN: - setLuggageStowingDistanceFromSeatMean((Double)newValue); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN: + setLuggageStowDistanceFromSeatMean((Double)newValue); return; - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION: - setLuggageStowingDistanceFromSeatDeviation((Double)newValue); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION: + setLuggageStowDistanceFromSeatDeviation((Double)newValue); return; case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE: setPercentageOfPassengersWithNoLuggage((Double)newValue); @@ -634,17 +685,19 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN: - setLuggageStowingDistanceFromSeatMean(LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN_EDEFAULT); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN: + setLuggageStowDistanceFromSeatMean(LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN_EDEFAULT); return; - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION: - setLuggageStowingDistanceFromSeatDeviation(LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT); + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION: + setLuggageStowDistanceFromSeatDeviation(LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT); return; case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE: setPercentageOfPassengersWithNoLuggage(PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE_EDEFAULT); @@ -682,16 +735,19 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN: - return luggageStowingDistanceFromSeatMean != LUGGAGE_STOWING_DISTANCE_FROM_SEAT_MEAN_EDEFAULT; - case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION: - return luggageStowingDistanceFromSeatDeviation != LUGGAGE_STOWING_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT; + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN: + return luggageStowDistanceFromSeatMean != LUGGAGE_STOW_DISTANCE_FROM_SEAT_MEAN_EDEFAULT; + case CabinPackage.LUGGAGE_PROPERTIES__LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION: + return luggageStowDistanceFromSeatDeviation != LUGGAGE_STOW_DISTANCE_FROM_SEAT_DEVIATION_EDEFAULT; case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE: return percentageOfPassengersWithNoLuggage != PERCENTAGE_OF_PASSENGERS_WITH_NO_LUGGAGE_EDEFAULT; case CabinPackage.LUGGAGE_PROPERTIES__PERCENTAGE_OF_PASSENGERS_WITH_SMALL_LUGGAGE: @@ -718,18 +774,20 @@ public boolean eIsSet(int featureID) { /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (luggageStowingDistanceFromSeatMean: "); - result.append(luggageStowingDistanceFromSeatMean); - result.append(", luggageStowingDistanceFromSeatDeviation: "); - result.append(luggageStowingDistanceFromSeatDeviation); + result.append(" (luggageStowDistanceFromSeatMean: "); + result.append(luggageStowDistanceFromSeatMean); + result.append(", luggageStowDistanceFromSeatDeviation: "); + result.append(luggageStowDistanceFromSeatDeviation); result.append(", percentageOfPassengersWithNoLuggage: "); result.append(percentageOfPassengersWithNoLuggage); result.append(", percentageOfPassengersWithSmallLuggage: "); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/MainDoorImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/MainDoorImpl.java deleted file mode 100644 index 610a1184..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/MainDoorImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.MainDoor; - -/** - * - * An implementation of the model object 'Main Door'. - * - * - * @generated - */ -public class MainDoorImpl extends DoorImpl implements MainDoor { - /** - * - * - * @generated - */ - protected MainDoorImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.MAIN_DOOR; - } - -} //MainDoorImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerImpl.java index 11130312..2b37bcf6 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerImpl.java @@ -30,10 +30,10 @@ *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getAge Age}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getWeight Weight}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getDoor Door}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getSeat Seat}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getSeatID Seat ID}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getName Name}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getBoardingTime Boarding Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getSeatRef Seat Ref}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getSeat Seat}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getWidth Width}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getDepth Depth}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getOrientationInDegree Orientation In Degree}
    • @@ -42,13 +42,16 @@ *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#isIsSeated Is Seated}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getWalkingSpeed Walking Speed}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getStartBoardingAfterDelay Start Boarding After Delay}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getNumberOfWaits Number Of Waits}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getLuggageStowTime Luggage Stow Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getLuggageStowingDistance Luggage Stowing Distance}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getLuggageStowDistance Luggage Stow Distance}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getTravelClass Travel Class}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getPassengerMood Passenger Mood}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getNumberOfWaits Number Of Waits}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getNumberOfMakeWayOperations Number Of Make Way Operations}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getDistanceWalked Distance Walked}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getLuggage Luggage}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getCostOfPath Cost Of Path}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.PassengerImpl#getTotalTimeWaited Total Time Waited}
    • *
    * * @generated @@ -161,22 +164,24 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements protected Door door; /** - * The default value of the '{@link #getSeat() Seat}' attribute. - * - * @see #getSeat() + * The default value of the '{@link #getSeatID() Seat ID}' attribute. + * + * + * @see #getSeatID() * @generated * @ordered */ - protected static final int SEAT_EDEFAULT = 0; + protected static final int SEAT_ID_EDEFAULT = 0; /** - * The cached value of the '{@link #getSeat() Seat}' attribute. - * - * @see #getSeat() + * The cached value of the '{@link #getSeatID() Seat ID}' attribute. + * + * + * @see #getSeatID() * @generated * @ordered */ - protected int seat = SEAT_EDEFAULT; + protected int seatID = SEAT_ID_EDEFAULT; /** * The default value of the '{@link #getName() Name}' attribute. @@ -204,7 +209,7 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements * @generated * @ordered */ - protected static final int BOARDING_TIME_EDEFAULT = 0; + protected static final double BOARDING_TIME_EDEFAULT = 0.0; /** * The cached value of the '{@link #getBoardingTime() Boarding Time}' attribute. @@ -214,16 +219,16 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements * @generated * @ordered */ - protected int boardingTime = BOARDING_TIME_EDEFAULT; + protected double boardingTime = BOARDING_TIME_EDEFAULT; /** - * The cached value of the '{@link #getSeatRef() Seat Ref}' reference. + * The cached value of the '{@link #getSeat() Seat}' reference. * - * @see #getSeatRef() + * @see #getSeat() * @generated * @ordered */ - protected Seat seatRef; + protected Seat seat; /** * The default value of the '{@link #getWidth() Width}' attribute. @@ -375,26 +380,6 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements */ protected double startBoardingAfterDelay = START_BOARDING_AFTER_DELAY_EDEFAULT; - /** - * The default value of the '{@link #getNumberOfWaits() Number Of Waits}' attribute. - * - * @see #getNumberOfWaits() - * @generated - * @ordered - */ - protected static final int NUMBER_OF_WAITS_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getNumberOfWaits() Number Of Waits}' attribute. - * - * @see #getNumberOfWaits() - * @generated - * @ordered - */ - protected int numberOfWaits = NUMBER_OF_WAITS_EDEFAULT; - /** * The default value of the '{@link #getLuggageStowTime() Luggage Stow Time}' attribute. * * - * @see #getLuggageStowingDistance() + * @see #getLuggageStowDistance() * @generated * @ordered */ - protected static final double LUGGAGE_STOWING_DISTANCE_EDEFAULT = 0.0; + protected static final double LUGGAGE_STOW_DISTANCE_EDEFAULT = 0.0; /** - * The cached value of the '{@link #getLuggageStowingDistance() Luggage Stowing Distance}' attribute. + * The cached value of the '{@link #getLuggageStowDistance() Luggage Stow Distance}' attribute. * * - * @see #getLuggageStowingDistance() + * @see #getLuggageStowDistance() * @generated * @ordered */ - protected double luggageStowingDistance = LUGGAGE_STOWING_DISTANCE_EDEFAULT; + protected double luggageStowDistance = LUGGAGE_STOW_DISTANCE_EDEFAULT; /** * The cached value of the '{@link #getTravelClass() Travel Class}' reference. @@ -452,7 +437,7 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements * @generated * @ordered */ - protected static final PassengerMood PASSENGER_MOOD_EDEFAULT = PassengerMood.AGRESSIVE; + protected static final PassengerMood PASSENGER_MOOD_EDEFAULT = PassengerMood.AGGRESSIVE; /** * The cached value of the '{@link #getPassengerMood() Passenger Mood}' attribute. @@ -464,6 +449,26 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements */ protected PassengerMood passengerMood = PASSENGER_MOOD_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfWaits() Number Of Waits}' attribute. + * + * @see #getNumberOfWaits() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_WAITS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getNumberOfWaits() Number Of Waits}' attribute. + * + * @see #getNumberOfWaits() + * @generated + * @ordered + */ + protected int numberOfWaits = NUMBER_OF_WAITS_EDEFAULT; + /** * The default value of the '{@link #getNumberOfMakeWayOperations() Number Of Make Way Operations}' attribute. * @@ -484,6 +489,26 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements */ protected int numberOfMakeWayOperations = NUMBER_OF_MAKE_WAY_OPERATIONS_EDEFAULT; + /** + * The default value of the '{@link #getDistanceWalked() Distance Walked}' attribute. + * + * + * @see #getDistanceWalked() + * @generated + * @ordered + */ + protected static final int DISTANCE_WALKED_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getDistanceWalked() Distance Walked}' attribute. + * + * + * @see #getDistanceWalked() + * @generated + * @ordered + */ + protected int distanceWalked = DISTANCE_WALKED_EDEFAULT; + /** * The default value of the '{@link #getLuggage() Luggage}' attribute. * @@ -505,16 +530,59 @@ public class PassengerImpl extends MinimalEObjectImpl.Container implements protected LuggageSize luggage = LUGGAGE_EDEFAULT; /** - * + * The default value of the '{@link #getCostOfPath() Cost Of Path}' attribute. + * + * + * @see #getCostOfPath() + * @generated + * @ordered + */ + protected static final int COST_OF_PATH_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getCostOfPath() Cost Of Path}' attribute. + * + * + * @see #getCostOfPath() + * @generated + * @ordered + */ + protected int costOfPath = COST_OF_PATH_EDEFAULT; + + /** + * The default value of the '{@link #getTotalTimeWaited() Total Time Waited}' attribute. + * + * + * @see #getTotalTimeWaited() * @generated + * @ordered + */ + protected static final double TOTAL_TIME_WAITED_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getTotalTimeWaited() Total Time Waited}' attribute. + * + * + * @see #getTotalTimeWaited() + * @generated + * @ordered + */ + protected double totalTimeWaited = TOTAL_TIME_WAITED_EDEFAULT; + + /** + * . + * + * @generated */ protected PassengerImpl() { super(); } /** - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -522,16 +590,20 @@ protected EClass eStaticClass() { } /** - * - * @generated + * . + * + * @return the id + * @generated */ public int getId() { return id; } /** - * - * @generated + * . + * + * @param newId the new id + * @generated */ public void setId(int newId) { int oldId = id; @@ -541,16 +613,20 @@ public void setId(int newId) { } /** - * - * @generated + * . + * + * @return the sex + * @generated */ public Sex getSex() { return sex; } /** - * - * @generated + * . + * + * @param newSex the new sex + * @generated */ public void setSex(Sex newSex) { Sex oldSex = sex; @@ -560,35 +636,63 @@ public void setSex(Sex newSex) { } /** - * - * @generated + * . + * + * @return the seat + * @generated */ - public int getSeat() { + public Seat getSeat() { + if (seat != null && seat.eIsProxy()) { + InternalEObject oldSeat = (InternalEObject)seat; + seat = (Seat)eResolveProxy(oldSeat); + if (seat != oldSeat) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CabinPackage.PASSENGER__SEAT, oldSeat, seat)); + } + } return seat; } /** - * - * @generated + * + * . + * + * @return the seat + * @generated */ - public void setSeat(int newSeat) { - int oldSeat = seat; + public Seat basicGetSeat() { + return seat; + } + + /** + * + * . + * + * @param newSeat the new seat + * @generated + */ + public void setSeat(Seat newSeat) { + Seat oldSeat = seat; seat = newSeat; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__SEAT, oldSeat, seat)); } /** - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; } /** - * - * @generated + * . + * + * @param newName the new name + * @generated */ public void setName(String newName) { String oldName = name; @@ -598,70 +702,42 @@ public void setName(String newName) { } /** - * - * @generated + * . + * + * @return the boarding time + * @generated */ - public int getBoardingTime() { + public double getBoardingTime() { return boardingTime; } /** - * + * + * * @generated */ - public void setBoardingTime(int newBoardingTime) { - int oldBoardingTime = boardingTime; + public void setBoardingTime(double newBoardingTime) { + double oldBoardingTime = boardingTime; boardingTime = newBoardingTime; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__BOARDING_TIME, oldBoardingTime, boardingTime)); } /** - * - * @generated - */ - public Seat getSeatRef() { - if (seatRef != null && seatRef.eIsProxy()) { - InternalEObject oldSeatRef = (InternalEObject)seatRef; - seatRef = (Seat)eResolveProxy(oldSeatRef); - if (seatRef != oldSeatRef) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, CabinPackage.PASSENGER__SEAT_REF, oldSeatRef, seatRef)); - } - } - return seatRef; - } - - /** - * - * @generated - */ - public Seat basicGetSeatRef() { - return seatRef; - } - - /** - * - * @generated - */ - public void setSeatRef(Seat newSeatRef) { - Seat oldSeatRef = seatRef; - seatRef = newSeatRef; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__SEAT_REF, oldSeatRef, seatRef)); - } - - /** - * - * @generated + * . + * + * @return the width + * @generated */ public int getWidth() { return width; } /** - * - * @generated + * . + * + * @param newWidth the new width + * @generated */ public void setWidth(int newWidth) { int oldWidth = width; @@ -671,16 +747,20 @@ public void setWidth(int newWidth) { } /** - * - * @generated + * . + * + * @return the depth + * @generated */ public int getDepth() { return depth; } /** - * - * @generated + * . + * + * @param newDepth the new depth + * @generated */ public void setDepth(int newDepth) { int oldDepth = depth; @@ -690,16 +770,20 @@ public void setDepth(int newDepth) { } /** - * - * @generated + * . + * + * @return the orientation in degree + * @generated */ public double getOrientationInDegree() { return orientationInDegree; } /** - * - * @generated + * . + * + * @param newOrientationInDegree the new orientation in degree + * @generated */ public void setOrientationInDegree( double newOrientationInDegree) { @@ -710,16 +794,20 @@ public void setOrientationInDegree( } /** - * - * @generated + * . + * + * @return the position x + * @generated */ public double getPositionX() { return positionX; } /** - * - * @generated + * . + * + * @param newPositionX the new position x + * @generated */ public void setPositionX(double newPositionX) { double oldPositionX = positionX; @@ -729,16 +817,20 @@ public void setPositionX(double newPositionX) { } /** - * - * @generated + * . + * + * @return the position y + * @generated */ public double getPositionY() { return positionY; } /** - * - * @generated + * . + * + * @param newPositionY the new position y + * @generated */ public void setPositionY(double newPositionY) { double oldPositionY = positionY; @@ -748,16 +840,20 @@ public void setPositionY(double newPositionY) { } /** - * - * @generated + * . + * + * @return true, if is checks if is seated + * @generated */ public boolean isIsSeated() { return isSeated; } /** - * - * @generated + * . + * + * @param newIsSeated the new checks if is seated + * @generated */ public void setIsSeated(boolean newIsSeated) { boolean oldIsSeated = isSeated; @@ -767,16 +863,20 @@ public void setIsSeated(boolean newIsSeated) { } /** - * - * @generated + * . + * + * @return the walking speed + * @generated */ public double getWalkingSpeed() { return walkingSpeed; } /** - * - * @generated + * . + * + * @param newWalkingSpeed the new walking speed + * @generated */ public void setWalkingSpeed(double newWalkingSpeed) { double oldWalkingSpeed = walkingSpeed; @@ -786,16 +886,20 @@ public void setWalkingSpeed(double newWalkingSpeed) { } /** - * - * @generated + * . + * + * @return the start boarding after delay + * @generated */ public double getStartBoardingAfterDelay() { return startBoardingAfterDelay; } /** - * - * @generated + * . + * + * @param newStartBoardingAfterDelay the new start boarding after delay + * @generated */ public void setStartBoardingAfterDelay(double newStartBoardingAfterDelay) { double oldStartBoardingAfterDelay = startBoardingAfterDelay; @@ -805,16 +909,20 @@ public void setStartBoardingAfterDelay(double newStartBoardingAfterDelay) { } /** - * - * @generated + * . + * + * @return the number of waits + * @generated */ public int getNumberOfWaits() { return numberOfWaits; } /** - * - * @generated + * . + * + * @param newNumberOfWaits the new number of waits + * @generated */ public void setNumberOfWaits(int newNumberOfWaits) { int oldNumberOfWaits = numberOfWaits; @@ -824,16 +932,20 @@ public void setNumberOfWaits(int newNumberOfWaits) { } /** - * - * @generated + * . + * + * @return the luggage stow time + * @generated */ public double getLuggageStowTime() { return luggageStowTime; } /** - * - * @generated + * . + * + * @param newLuggageStowTime the new luggage stow time + * @generated */ public void setLuggageStowTime(double newLuggageStowTime) { double oldLuggageStowTime = luggageStowTime; @@ -847,8 +959,8 @@ public void setLuggageStowTime(double newLuggageStowTime) { * * @generated */ - public double getLuggageStowingDistance() { - return luggageStowingDistance; + public double getLuggageStowDistance() { + return luggageStowDistance; } /** @@ -856,16 +968,18 @@ public double getLuggageStowingDistance() { * * @generated */ - public void setLuggageStowingDistance(double newLuggageStowingDistance) { - double oldLuggageStowingDistance = luggageStowingDistance; - luggageStowingDistance = newLuggageStowingDistance; + public void setLuggageStowDistance(double newLuggageStowDistance) { + double oldLuggageStowDistance = luggageStowDistance; + luggageStowDistance = newLuggageStowDistance; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE, oldLuggageStowingDistance, luggageStowingDistance)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE, oldLuggageStowDistance, luggageStowDistance)); } /** - * - * @generated + * . + * + * @return the travel class + * @generated */ public TravelClass getTravelClass() { if (travelClass != null && travelClass.eIsProxy()) { @@ -880,16 +994,20 @@ public TravelClass getTravelClass() { } /** - * - * @generated + * . + * + * @return the travel class + * @generated */ public TravelClass basicGetTravelClass() { return travelClass; } /** - * - * @generated + * . + * + * @param newTravelClass the new travel class + * @generated */ public void setTravelClass(TravelClass newTravelClass) { TravelClass oldTravelClass = travelClass; @@ -899,16 +1017,20 @@ public void setTravelClass(TravelClass newTravelClass) { } /** - * - * @generated + * . + * + * @return the passenger mood + * @generated */ public PassengerMood getPassengerMood() { return passengerMood; } /** - * - * @generated + * . + * + * @param newPassengerMood the new passenger mood + * @generated */ public void setPassengerMood(PassengerMood newPassengerMood) { PassengerMood oldPassengerMood = passengerMood; @@ -919,8 +1041,10 @@ public void setPassengerMood(PassengerMood newPassengerMood) { /** * - * - * @generated + * . + * + * @return the number of make way operations + * @generated */ public int getNumberOfMakeWayOperations() { return numberOfMakeWayOperations; @@ -928,8 +1052,10 @@ public int getNumberOfMakeWayOperations() { /** * - * - * @generated + * . + * + * @param newNumberOfMakeWayOperations the new number of make way operations + * @generated */ public void setNumberOfMakeWayOperations(int newNumberOfMakeWayOperations) { int oldNumberOfMakeWayOperations = numberOfMakeWayOperations; @@ -940,8 +1066,10 @@ public void setNumberOfMakeWayOperations(int newNumberOfMakeWayOperations) { /** * - * - * @generated + * . + * + * @return the luggage + * @generated */ public LuggageSize getLuggage() { return luggage; @@ -949,8 +1077,10 @@ public LuggageSize getLuggage() { /** * - * - * @generated + * . + * + * @param newLuggage the new luggage + * @generated */ public void setLuggage(LuggageSize newLuggage) { LuggageSize oldLuggage = luggage; @@ -960,16 +1090,83 @@ public void setLuggage(LuggageSize newLuggage) { } /** - * + * + * + * @generated + */ + public int getDistanceWalked() { + return distanceWalked; + } + + /** + * + * + * @generated + */ + public void setDistanceWalked(int newDistanceWalked) { + int oldDistanceWalked = distanceWalked; + distanceWalked = newDistanceWalked; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__DISTANCE_WALKED, oldDistanceWalked, distanceWalked)); + } + + /** + * + * * @generated */ + public int getCostOfPath() { + return costOfPath; + } + + /** + * + * + * @generated + */ + public void setCostOfPath(int newCostOfPath) { + int oldCostOfPath = costOfPath; + costOfPath = newCostOfPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__COST_OF_PATH, oldCostOfPath, costOfPath)); + } + + /** + * + * + * @generated + */ + public double getTotalTimeWaited() { + return totalTimeWaited; + } + + /** + * + * + * @generated + */ + public void setTotalTimeWaited(double newTotalTimeWaited) { + double oldTotalTimeWaited = totalTimeWaited; + totalTimeWaited = newTotalTimeWaited; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__TOTAL_TIME_WAITED, oldTotalTimeWaited, totalTimeWaited)); + } + + /** + * . + * + * @return the height + * @generated + */ public int getHeight() { return height; } /** - * - * @generated + * . + * + * @param newHeight the new height + * @generated */ public void setHeight(int newHeight) { int oldHeight = height; @@ -979,16 +1176,20 @@ public void setHeight(int newHeight) { } /** - * - * @generated + * . + * + * @return the age + * @generated */ public int getAge() { return age; } /** - * - * @generated + * . + * + * @param newAge the new age + * @generated */ public void setAge(int newAge) { int oldAge = age; @@ -998,16 +1199,20 @@ public void setAge(int newAge) { } /** - * - * @generated + * . + * + * @return the weight + * @generated */ public int getWeight() { return weight; } /** - * - * @generated + * . + * + * @param newWeight the new weight + * @generated */ public void setWeight(int newWeight) { int oldWeight = weight; @@ -1017,8 +1222,10 @@ public void setWeight(int newWeight) { } /** - * - * @generated + * . + * + * @return the door + * @generated */ public Door getDoor() { if (door != null && door.eIsProxy()) { @@ -1033,16 +1240,20 @@ public Door getDoor() { } /** - * - * @generated + * . + * + * @return the door + * @generated */ public Door basicGetDoor() { return door; } /** - * - * @generated + * . + * + * @param newDoor the new door + * @generated */ public void setDoor(Door newDoor) { Door oldDoor = door; @@ -1052,8 +1263,38 @@ public void setDoor(Door newDoor) { } /** - * - * @generated + * + * . + * + * @return the seat id + * @generated + */ + public int getSeatID() { + return seatID; + } + + /** + * + * . + * + * @param newSeatID the new seat id + * @generated + */ + public void setSeatID(int newSeatID) { + int oldSeatID = seatID; + seatID = newSeatID; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER__SEAT_ID, oldSeatID, seatID)); + } + + /** + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -1071,15 +1312,15 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { case CabinPackage.PASSENGER__DOOR: if (resolve) return getDoor(); return basicGetDoor(); - case CabinPackage.PASSENGER__SEAT: - return getSeat(); + case CabinPackage.PASSENGER__SEAT_ID: + return getSeatID(); case CabinPackage.PASSENGER__NAME: return getName(); case CabinPackage.PASSENGER__BOARDING_TIME: return getBoardingTime(); - case CabinPackage.PASSENGER__SEAT_REF: - if (resolve) return getSeatRef(); - return basicGetSeatRef(); + case CabinPackage.PASSENGER__SEAT: + if (resolve) return getSeat(); + return basicGetSeat(); case CabinPackage.PASSENGER__WIDTH: return getWidth(); case CabinPackage.PASSENGER__DEPTH: @@ -1096,28 +1337,37 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getWalkingSpeed(); case CabinPackage.PASSENGER__START_BOARDING_AFTER_DELAY: return getStartBoardingAfterDelay(); - case CabinPackage.PASSENGER__NUMBER_OF_WAITS: - return getNumberOfWaits(); case CabinPackage.PASSENGER__LUGGAGE_STOW_TIME: return getLuggageStowTime(); - case CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE: - return getLuggageStowingDistance(); + case CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE: + return getLuggageStowDistance(); case CabinPackage.PASSENGER__TRAVEL_CLASS: if (resolve) return getTravelClass(); return basicGetTravelClass(); case CabinPackage.PASSENGER__PASSENGER_MOOD: return getPassengerMood(); + case CabinPackage.PASSENGER__NUMBER_OF_WAITS: + return getNumberOfWaits(); case CabinPackage.PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS: return getNumberOfMakeWayOperations(); + case CabinPackage.PASSENGER__DISTANCE_WALKED: + return getDistanceWalked(); case CabinPackage.PASSENGER__LUGGAGE: return getLuggage(); + case CabinPackage.PASSENGER__COST_OF_PATH: + return getCostOfPath(); + case CabinPackage.PASSENGER__TOTAL_TIME_WAITED: + return getTotalTimeWaited(); } return super.eGet(featureID, resolve, coreType); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -1140,17 +1390,17 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.PASSENGER__DOOR: setDoor((Door)newValue); return; - case CabinPackage.PASSENGER__SEAT: - setSeat((Integer)newValue); + case CabinPackage.PASSENGER__SEAT_ID: + setSeatID((Integer)newValue); return; case CabinPackage.PASSENGER__NAME: setName((String)newValue); return; case CabinPackage.PASSENGER__BOARDING_TIME: - setBoardingTime((Integer)newValue); + setBoardingTime((Double)newValue); return; - case CabinPackage.PASSENGER__SEAT_REF: - setSeatRef((Seat)newValue); + case CabinPackage.PASSENGER__SEAT: + setSeat((Seat)newValue); return; case CabinPackage.PASSENGER__WIDTH: setWidth((Integer)newValue); @@ -1176,14 +1426,11 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.PASSENGER__START_BOARDING_AFTER_DELAY: setStartBoardingAfterDelay((Double)newValue); return; - case CabinPackage.PASSENGER__NUMBER_OF_WAITS: - setNumberOfWaits((Integer)newValue); - return; case CabinPackage.PASSENGER__LUGGAGE_STOW_TIME: setLuggageStowTime((Double)newValue); return; - case CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE: - setLuggageStowingDistance((Double)newValue); + case CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE: + setLuggageStowDistance((Double)newValue); return; case CabinPackage.PASSENGER__TRAVEL_CLASS: setTravelClass((TravelClass)newValue); @@ -1191,19 +1438,33 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.PASSENGER__PASSENGER_MOOD: setPassengerMood((PassengerMood)newValue); return; + case CabinPackage.PASSENGER__NUMBER_OF_WAITS: + setNumberOfWaits((Integer)newValue); + return; case CabinPackage.PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS: setNumberOfMakeWayOperations((Integer)newValue); return; + case CabinPackage.PASSENGER__DISTANCE_WALKED: + setDistanceWalked((Integer)newValue); + return; case CabinPackage.PASSENGER__LUGGAGE: setLuggage((LuggageSize)newValue); return; + case CabinPackage.PASSENGER__COST_OF_PATH: + setCostOfPath((Integer)newValue); + return; + case CabinPackage.PASSENGER__TOTAL_TIME_WAITED: + setTotalTimeWaited((Double)newValue); + return; } super.eSet(featureID, newValue); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -1226,8 +1487,8 @@ public void eUnset(int featureID) { case CabinPackage.PASSENGER__DOOR: setDoor((Door)null); return; - case CabinPackage.PASSENGER__SEAT: - setSeat(SEAT_EDEFAULT); + case CabinPackage.PASSENGER__SEAT_ID: + setSeatID(SEAT_ID_EDEFAULT); return; case CabinPackage.PASSENGER__NAME: setName(NAME_EDEFAULT); @@ -1235,8 +1496,8 @@ public void eUnset(int featureID) { case CabinPackage.PASSENGER__BOARDING_TIME: setBoardingTime(BOARDING_TIME_EDEFAULT); return; - case CabinPackage.PASSENGER__SEAT_REF: - setSeatRef((Seat)null); + case CabinPackage.PASSENGER__SEAT: + setSeat((Seat)null); return; case CabinPackage.PASSENGER__WIDTH: setWidth(WIDTH_EDEFAULT); @@ -1262,14 +1523,11 @@ public void eUnset(int featureID) { case CabinPackage.PASSENGER__START_BOARDING_AFTER_DELAY: setStartBoardingAfterDelay(START_BOARDING_AFTER_DELAY_EDEFAULT); return; - case CabinPackage.PASSENGER__NUMBER_OF_WAITS: - setNumberOfWaits(NUMBER_OF_WAITS_EDEFAULT); - return; case CabinPackage.PASSENGER__LUGGAGE_STOW_TIME: setLuggageStowTime(LUGGAGE_STOW_TIME_EDEFAULT); return; - case CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE: - setLuggageStowingDistance(LUGGAGE_STOWING_DISTANCE_EDEFAULT); + case CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE: + setLuggageStowDistance(LUGGAGE_STOW_DISTANCE_EDEFAULT); return; case CabinPackage.PASSENGER__TRAVEL_CLASS: setTravelClass((TravelClass)null); @@ -1277,19 +1535,34 @@ public void eUnset(int featureID) { case CabinPackage.PASSENGER__PASSENGER_MOOD: setPassengerMood(PASSENGER_MOOD_EDEFAULT); return; + case CabinPackage.PASSENGER__NUMBER_OF_WAITS: + setNumberOfWaits(NUMBER_OF_WAITS_EDEFAULT); + return; case CabinPackage.PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS: setNumberOfMakeWayOperations(NUMBER_OF_MAKE_WAY_OPERATIONS_EDEFAULT); return; + case CabinPackage.PASSENGER__DISTANCE_WALKED: + setDistanceWalked(DISTANCE_WALKED_EDEFAULT); + return; case CabinPackage.PASSENGER__LUGGAGE: setLuggage(LUGGAGE_EDEFAULT); return; + case CabinPackage.PASSENGER__COST_OF_PATH: + setCostOfPath(COST_OF_PATH_EDEFAULT); + return; + case CabinPackage.PASSENGER__TOTAL_TIME_WAITED: + setTotalTimeWaited(TOTAL_TIME_WAITED_EDEFAULT); + return; } super.eUnset(featureID); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -1306,14 +1579,14 @@ public boolean eIsSet(int featureID) { return weight != WEIGHT_EDEFAULT; case CabinPackage.PASSENGER__DOOR: return door != null; - case CabinPackage.PASSENGER__SEAT: - return seat != SEAT_EDEFAULT; + case CabinPackage.PASSENGER__SEAT_ID: + return seatID != SEAT_ID_EDEFAULT; case CabinPackage.PASSENGER__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case CabinPackage.PASSENGER__BOARDING_TIME: return boardingTime != BOARDING_TIME_EDEFAULT; - case CabinPackage.PASSENGER__SEAT_REF: - return seatRef != null; + case CabinPackage.PASSENGER__SEAT: + return seat != null; case CabinPackage.PASSENGER__WIDTH: return width != WIDTH_EDEFAULT; case CabinPackage.PASSENGER__DEPTH: @@ -1330,27 +1603,35 @@ public boolean eIsSet(int featureID) { return walkingSpeed != WALKING_SPEED_EDEFAULT; case CabinPackage.PASSENGER__START_BOARDING_AFTER_DELAY: return startBoardingAfterDelay != START_BOARDING_AFTER_DELAY_EDEFAULT; - case CabinPackage.PASSENGER__NUMBER_OF_WAITS: - return numberOfWaits != NUMBER_OF_WAITS_EDEFAULT; case CabinPackage.PASSENGER__LUGGAGE_STOW_TIME: return luggageStowTime != LUGGAGE_STOW_TIME_EDEFAULT; - case CabinPackage.PASSENGER__LUGGAGE_STOWING_DISTANCE: - return luggageStowingDistance != LUGGAGE_STOWING_DISTANCE_EDEFAULT; + case CabinPackage.PASSENGER__LUGGAGE_STOW_DISTANCE: + return luggageStowDistance != LUGGAGE_STOW_DISTANCE_EDEFAULT; case CabinPackage.PASSENGER__TRAVEL_CLASS: return travelClass != null; case CabinPackage.PASSENGER__PASSENGER_MOOD: return passengerMood != PASSENGER_MOOD_EDEFAULT; + case CabinPackage.PASSENGER__NUMBER_OF_WAITS: + return numberOfWaits != NUMBER_OF_WAITS_EDEFAULT; case CabinPackage.PASSENGER__NUMBER_OF_MAKE_WAY_OPERATIONS: return numberOfMakeWayOperations != NUMBER_OF_MAKE_WAY_OPERATIONS_EDEFAULT; + case CabinPackage.PASSENGER__DISTANCE_WALKED: + return distanceWalked != DISTANCE_WALKED_EDEFAULT; case CabinPackage.PASSENGER__LUGGAGE: return luggage != LUGGAGE_EDEFAULT; + case CabinPackage.PASSENGER__COST_OF_PATH: + return costOfPath != COST_OF_PATH_EDEFAULT; + case CabinPackage.PASSENGER__TOTAL_TIME_WAITED: + return totalTimeWaited != TOTAL_TIME_WAITED_EDEFAULT; } return super.eIsSet(featureID); } /** - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -1367,8 +1648,8 @@ public String toString() { result.append(age); result.append(", weight: "); result.append(weight); - result.append(", seat: "); - result.append(seat); + result.append(", seatID: "); + result.append(seatID); result.append(", Name: "); result.append(name); result.append(", boardingTime: "); @@ -1389,18 +1670,24 @@ public String toString() { result.append(walkingSpeed); result.append(", startBoardingAfterDelay: "); result.append(startBoardingAfterDelay); - result.append(", numberOfWaits: "); - result.append(numberOfWaits); result.append(", luggageStowTime: "); result.append(luggageStowTime); - result.append(", luggageStowingDistance: "); - result.append(luggageStowingDistance); + result.append(", luggageStowDistance: "); + result.append(luggageStowDistance); result.append(", passengerMood: "); result.append(passengerMood); + result.append(", numberOfWaits: "); + result.append(numberOfWaits); result.append(", numberOfMakeWayOperations: "); result.append(numberOfMakeWayOperations); + result.append(", distanceWalked: "); + result.append(distanceWalked); result.append(", luggage: "); result.append(luggage); + result.append(", costOfPath: "); + result.append(costOfPath); + result.append(", totalTimeWaited: "); + result.append(totalTimeWaited); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerPropertiesImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerPropertiesImpl.java index 353e300b..41f1f732 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerPropertiesImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PassengerPropertiesImpl.java @@ -37,6 +37,13 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getPassengerHeightDeviationFemale Passenger Height Deviation Female}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getPassengerDepthMeanFemale Passenger Depth Mean Female}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getPassengerDepthDeviationFemale Passenger Depth Deviation Female}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getPassengerAggressiveMoodShare Passenger Aggressive Mood Share}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getSeatInterferenceProcessTimeMean Seat Interference Process Time Mean}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getSeatInterferenceProcessTimeDeviation Seat Interference Process Time Deviation}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getSeatInterferenceProcessTimeFoldingSeatMean Seat Interference Process Time Folding Seat Mean}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getSeatInterferenceProcessTimeFoldingSeatDeviation Seat Interference Process Time Folding Seat Deviation}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.PassengerPropertiesImpl#getPassivePassengerWaitingTimeAfterCollision Passive Passenger Waiting Time After Collision}
  • * * * @generated @@ -250,7 +257,7 @@ public class PassengerPropertiesImpl extends MinimalEObjectImpl.Container implem * @generated * @ordered */ - protected static final double PASSENGER_WIDTH_DEVIATION_FEMALE_EDEFAULT = 2.8; + protected static final double PASSENGER_WIDTH_DEVIATION_FEMALE_EDEFAULT = 1.0; /** * The cached value of the '{@link #getPassengerWidthDeviationFemale() Passenger Width Deviation Female}' attribute. @@ -383,9 +390,150 @@ public class PassengerPropertiesImpl extends MinimalEObjectImpl.Container implem protected double passengerDepthDeviationFemale = PASSENGER_DEPTH_DEVIATION_FEMALE_EDEFAULT; /** + * The default value of the '{@link #getPassengerAggressiveMoodShare() Passenger Aggressive Mood Share}' attribute. * * + * @see #getPassengerAggressiveMoodShare() * @generated + * @ordered + */ + protected static final int PASSENGER_AGGRESSIVE_MOOD_SHARE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getPassengerAggressiveMoodShare() Passenger Aggressive Mood Share}' attribute. + * + * + * @see #getPassengerAggressiveMoodShare() + * @generated + * @ordered + */ + protected int passengerAggressiveMoodShare = PASSENGER_AGGRESSIVE_MOOD_SHARE_EDEFAULT; + + /** + * The default value of the '{@link #getSeatInterferenceStandingUpPassengerWaitingTime() Seat Interference Standing Up Passenger Waiting Time}' attribute. + * + * + * @see #getSeatInterferenceStandingUpPassengerWaitingTime() + * @generated + * @ordered + */ + protected static final double SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT = 3.0; + + /** + * The cached value of the '{@link #getSeatInterferenceStandingUpPassengerWaitingTime() Seat Interference Standing Up Passenger Waiting Time}' attribute. + * + * + * @see #getSeatInterferenceStandingUpPassengerWaitingTime() + * @generated + * @ordered + */ + protected double seatInterferenceStandingUpPassengerWaitingTime = SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT; + + /** + * The default value of the '{@link #getSeatInterferenceProcessTimeMean() Seat Interference Process Time Mean}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeMean() + * @generated + * @ordered + */ + protected static final double SEAT_INTERFERENCE_PROCESS_TIME_MEAN_EDEFAULT = 7.0; + + /** + * The cached value of the '{@link #getSeatInterferenceProcessTimeMean() Seat Interference Process Time Mean}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeMean() + * @generated + * @ordered + */ + protected double seatInterferenceProcessTimeMean = SEAT_INTERFERENCE_PROCESS_TIME_MEAN_EDEFAULT; + + /** + * The default value of the '{@link #getSeatInterferenceProcessTimeDeviation() Seat Interference Process Time Deviation}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeDeviation() + * @generated + * @ordered + */ + protected static final double SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION_EDEFAULT = 1.5; + + /** + * The cached value of the '{@link #getSeatInterferenceProcessTimeDeviation() Seat Interference Process Time Deviation}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeDeviation() + * @generated + * @ordered + */ + protected double seatInterferenceProcessTimeDeviation = SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION_EDEFAULT; + + /** + * The default value of the '{@link #getSeatInterferenceProcessTimeFoldingSeatMean() Seat Interference Process Time Folding Seat Mean}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeFoldingSeatMean() + * @generated + * @ordered + */ + protected static final double SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN_EDEFAULT = 5.0; + + /** + * The cached value of the '{@link #getSeatInterferenceProcessTimeFoldingSeatMean() Seat Interference Process Time Folding Seat Mean}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeFoldingSeatMean() + * @generated + * @ordered + */ + protected double seatInterferenceProcessTimeFoldingSeatMean = SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN_EDEFAULT; + + /** + * The default value of the '{@link #getSeatInterferenceProcessTimeFoldingSeatDeviation() Seat Interference Process Time Folding Seat Deviation}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeFoldingSeatDeviation() + * @generated + * @ordered + */ + protected static final double SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION_EDEFAULT = 1.0; + + /** + * The cached value of the '{@link #getSeatInterferenceProcessTimeFoldingSeatDeviation() Seat Interference Process Time Folding Seat Deviation}' attribute. + * + * + * @see #getSeatInterferenceProcessTimeFoldingSeatDeviation() + * @generated + * @ordered + */ + protected double seatInterferenceProcessTimeFoldingSeatDeviation = SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION_EDEFAULT; + + /** + * The default value of the '{@link #getPassivePassengerWaitingTimeAfterCollision() Passive Passenger Waiting Time After Collision}' attribute. + * + * + * @see #getPassivePassengerWaitingTimeAfterCollision() + * @generated + * @ordered + */ + protected static final double PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION_EDEFAULT = 0.3; + + /** + * The cached value of the '{@link #getPassivePassengerWaitingTimeAfterCollision() Passive Passenger Waiting Time After Collision}' attribute. + * + * + * @see #getPassivePassengerWaitingTimeAfterCollision() + * @generated + * @ordered + */ + protected double passivePassengerWaitingTimeAfterCollision = PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION_EDEFAULT; + + /** + * + * . + * + * @generated */ protected PassengerPropertiesImpl() { super(); @@ -393,8 +541,10 @@ protected PassengerPropertiesImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -403,8 +553,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the passenger width mean male + * @generated */ public double getPassengerWidthMeanMale() { return passengerWidthMeanMale; @@ -412,8 +564,10 @@ public double getPassengerWidthMeanMale() { /** * - * - * @generated + * . + * + * @param newPassengerWidthMeanMale the new passenger width mean male + * @generated */ public void setPassengerWidthMeanMale(double newPassengerWidthMeanMale) { double oldPassengerWidthMeanMale = passengerWidthMeanMale; @@ -424,8 +578,10 @@ public void setPassengerWidthMeanMale(double newPassengerWidthMeanMale) { /** * - * - * @generated + * . + * + * @return the passenger width deviation male + * @generated */ public double getPassengerWidthDeviationMale() { return passengerWidthDeviationMale; @@ -433,8 +589,10 @@ public double getPassengerWidthDeviationMale() { /** * - * - * @generated + * . + * + * @param newPassengerWidthDeviationMale the new passenger width deviation male + * @generated */ public void setPassengerWidthDeviationMale(double newPassengerWidthDeviationMale) { double oldPassengerWidthDeviationMale = passengerWidthDeviationMale; @@ -445,8 +603,10 @@ public void setPassengerWidthDeviationMale(double newPassengerWidthDeviationMale /** * - * - * @generated + * . + * + * @return the passenger weight mean male + * @generated */ public double getPassengerWeightMeanMale() { return passengerWeightMeanMale; @@ -454,8 +614,10 @@ public double getPassengerWeightMeanMale() { /** * - * - * @generated + * . + * + * @param newPassengerWeightMeanMale the new passenger weight mean male + * @generated */ public void setPassengerWeightMeanMale(double newPassengerWeightMeanMale) { double oldPassengerWeightMeanMale = passengerWeightMeanMale; @@ -466,8 +628,10 @@ public void setPassengerWeightMeanMale(double newPassengerWeightMeanMale) { /** * - * - * @generated + * . + * + * @return the passenger weight deviation male + * @generated */ public double getPassengerWeightDeviationMale() { return passengerWeightDeviationMale; @@ -475,8 +639,10 @@ public double getPassengerWeightDeviationMale() { /** * - * - * @generated + * . + * + * @param newPassengerWeightDeviationMale the new passenger weight deviation male + * @generated */ public void setPassengerWeightDeviationMale(double newPassengerWeightDeviationMale) { double oldPassengerWeightDeviationMale = passengerWeightDeviationMale; @@ -487,8 +653,10 @@ public void setPassengerWeightDeviationMale(double newPassengerWeightDeviationMa /** * - * - * @generated + * . + * + * @return the passenger height mean male + * @generated */ public double getPassengerHeightMeanMale() { return passengerHeightMeanMale; @@ -496,8 +664,10 @@ public double getPassengerHeightMeanMale() { /** * - * - * @generated + * . + * + * @param newPassengerHeightMeanMale the new passenger height mean male + * @generated */ public void setPassengerHeightMeanMale(double newPassengerHeightMeanMale) { double oldPassengerHeightMeanMale = passengerHeightMeanMale; @@ -508,8 +678,10 @@ public void setPassengerHeightMeanMale(double newPassengerHeightMeanMale) { /** * - * - * @generated + * . + * + * @return the passenger height deviation male + * @generated */ public double getPassengerHeightDeviationMale() { return passengerHeightDeviationMale; @@ -517,8 +689,10 @@ public double getPassengerHeightDeviationMale() { /** * - * - * @generated + * . + * + * @param newPassengerHeightDeviationMale the new passenger height deviation male + * @generated */ public void setPassengerHeightDeviationMale(double newPassengerHeightDeviationMale) { double oldPassengerHeightDeviationMale = passengerHeightDeviationMale; @@ -529,8 +703,10 @@ public void setPassengerHeightDeviationMale(double newPassengerHeightDeviationMa /** * - * - * @generated + * . + * + * @return the passenger depth mean male + * @generated */ public double getPassengerDepthMeanMale() { return passengerDepthMeanMale; @@ -538,8 +714,10 @@ public double getPassengerDepthMeanMale() { /** * - * - * @generated + * . + * + * @param newPassengerDepthMeanMale the new passenger depth mean male + * @generated */ public void setPassengerDepthMeanMale(double newPassengerDepthMeanMale) { double oldPassengerDepthMeanMale = passengerDepthMeanMale; @@ -550,8 +728,10 @@ public void setPassengerDepthMeanMale(double newPassengerDepthMeanMale) { /** * - * - * @generated + * . + * + * @return the passenger depth deviation male + * @generated */ public double getPassengerDepthDeviationMale() { return passengerDepthDeviationMale; @@ -559,8 +739,10 @@ public double getPassengerDepthDeviationMale() { /** * - * - * @generated + * . + * + * @param newPassengerDepthDeviationMale the new passenger depth deviation male + * @generated */ public void setPassengerDepthDeviationMale(double newPassengerDepthDeviationMale) { double oldPassengerDepthDeviationMale = passengerDepthDeviationMale; @@ -571,8 +753,10 @@ public void setPassengerDepthDeviationMale(double newPassengerDepthDeviationMale /** * - * - * @generated + * . + * + * @return the percentage of women + * @generated */ public double getPercentageOfWomen() { return percentageOfWomen; @@ -580,8 +764,10 @@ public double getPercentageOfWomen() { /** * - * - * @generated + * . + * + * @param newPercentageOfWomen the new percentage of women + * @generated */ public void setPercentageOfWomen(double newPercentageOfWomen) { double oldPercentageOfWomen = percentageOfWomen; @@ -592,8 +778,10 @@ public void setPercentageOfWomen(double newPercentageOfWomen) { /** * - * - * @generated + * . + * + * @return the passenger width mean female + * @generated */ public double getPassengerWidthMeanFemale() { return passengerWidthMeanFemale; @@ -601,8 +789,10 @@ public double getPassengerWidthMeanFemale() { /** * - * - * @generated + * . + * + * @param newPassengerWidthMeanFemale the new passenger width mean female + * @generated */ public void setPassengerWidthMeanFemale(double newPassengerWidthMeanFemale) { double oldPassengerWidthMeanFemale = passengerWidthMeanFemale; @@ -613,8 +803,10 @@ public void setPassengerWidthMeanFemale(double newPassengerWidthMeanFemale) { /** * - * - * @generated + * . + * + * @return the passenger width deviation female + * @generated */ public double getPassengerWidthDeviationFemale() { return passengerWidthDeviationFemale; @@ -622,8 +814,10 @@ public double getPassengerWidthDeviationFemale() { /** * - * - * @generated + * . + * + * @param newPassengerWidthDeviationFemale the new passenger width deviation female + * @generated */ public void setPassengerWidthDeviationFemale(double newPassengerWidthDeviationFemale) { double oldPassengerWidthDeviationFemale = passengerWidthDeviationFemale; @@ -634,8 +828,10 @@ public void setPassengerWidthDeviationFemale(double newPassengerWidthDeviationFe /** * - * - * @generated + * . + * + * @return the passenger weight mean female + * @generated */ public double getPassengerWeightMeanFemale() { return passengerWeightMeanFemale; @@ -643,8 +839,10 @@ public double getPassengerWeightMeanFemale() { /** * - * - * @generated + * . + * + * @param newPassengerWeightMeanFemale the new passenger weight mean female + * @generated */ public void setPassengerWeightMeanFemale(double newPassengerWeightMeanFemale) { double oldPassengerWeightMeanFemale = passengerWeightMeanFemale; @@ -655,8 +853,10 @@ public void setPassengerWeightMeanFemale(double newPassengerWeightMeanFemale) { /** * - * - * @generated + * . + * + * @return the passenger weight deviation female + * @generated */ public double getPassengerWeightDeviationFemale() { return passengerWeightDeviationFemale; @@ -664,8 +864,10 @@ public double getPassengerWeightDeviationFemale() { /** * - * - * @generated + * . + * + * @param newPassengerWeightDeviationFemale the new passenger weight deviation female + * @generated */ public void setPassengerWeightDeviationFemale(double newPassengerWeightDeviationFemale) { double oldPassengerWeightDeviationFemale = passengerWeightDeviationFemale; @@ -676,8 +878,10 @@ public void setPassengerWeightDeviationFemale(double newPassengerWeightDeviation /** * - * - * @generated + * . + * + * @return the passenger height mean female + * @generated */ public double getPassengerHeightMeanFemale() { return passengerHeightMeanFemale; @@ -685,8 +889,10 @@ public double getPassengerHeightMeanFemale() { /** * - * - * @generated + * . + * + * @param newPassengerHeightMeanFemale the new passenger height mean female + * @generated */ public void setPassengerHeightMeanFemale(double newPassengerHeightMeanFemale) { double oldPassengerHeightMeanFemale = passengerHeightMeanFemale; @@ -697,8 +903,10 @@ public void setPassengerHeightMeanFemale(double newPassengerHeightMeanFemale) { /** * - * - * @generated + * . + * + * @return the passenger height deviation female + * @generated */ public double getPassengerHeightDeviationFemale() { return passengerHeightDeviationFemale; @@ -706,8 +914,10 @@ public double getPassengerHeightDeviationFemale() { /** * - * - * @generated + * . + * + * @param newPassengerHeightDeviationFemale the new passenger height deviation female + * @generated */ public void setPassengerHeightDeviationFemale(double newPassengerHeightDeviationFemale) { double oldPassengerHeightDeviationFemale = passengerHeightDeviationFemale; @@ -718,8 +928,10 @@ public void setPassengerHeightDeviationFemale(double newPassengerHeightDeviation /** * - * - * @generated + * . + * + * @return the passenger depth mean female + * @generated */ public int getPassengerDepthMeanFemale() { return passengerDepthMeanFemale; @@ -727,8 +939,10 @@ public int getPassengerDepthMeanFemale() { /** * - * - * @generated + * . + * + * @param newPassengerDepthMeanFemale the new passenger depth mean female + * @generated */ public void setPassengerDepthMeanFemale(int newPassengerDepthMeanFemale) { int oldPassengerDepthMeanFemale = passengerDepthMeanFemale; @@ -739,8 +953,10 @@ public void setPassengerDepthMeanFemale(int newPassengerDepthMeanFemale) { /** * - * - * @generated + * . + * + * @return the passenger depth deviation female + * @generated */ public double getPassengerDepthDeviationFemale() { return passengerDepthDeviationFemale; @@ -748,8 +964,10 @@ public double getPassengerDepthDeviationFemale() { /** * - * - * @generated + * . + * + * @param newPassengerDepthDeviationFemale the new passenger depth deviation female + * @generated */ public void setPassengerDepthDeviationFemale(double newPassengerDepthDeviationFemale) { double oldPassengerDepthDeviationFemale = passengerDepthDeviationFemale; @@ -763,6 +981,158 @@ public void setPassengerDepthDeviationFemale(double newPassengerDepthDeviationFe * * @generated */ + public int getPassengerAggressiveMoodShare() { + return passengerAggressiveMoodShare; + } + + /** + * + * + * @generated + */ + public void setPassengerAggressiveMoodShare(int newPassengerAggressiveMoodShare) { + int oldPassengerAggressiveMoodShare = passengerAggressiveMoodShare; + passengerAggressiveMoodShare = newPassengerAggressiveMoodShare; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE, oldPassengerAggressiveMoodShare, passengerAggressiveMoodShare)); + } + + /** + * + * + * @generated + */ + public double getSeatInterferenceStandingUpPassengerWaitingTime() { + return seatInterferenceStandingUpPassengerWaitingTime; + } + + /** + * + * + * @generated + */ + public void setSeatInterferenceStandingUpPassengerWaitingTime(double newSeatInterferenceStandingUpPassengerWaitingTime) { + double oldSeatInterferenceStandingUpPassengerWaitingTime = seatInterferenceStandingUpPassengerWaitingTime; + seatInterferenceStandingUpPassengerWaitingTime = newSeatInterferenceStandingUpPassengerWaitingTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME, oldSeatInterferenceStandingUpPassengerWaitingTime, seatInterferenceStandingUpPassengerWaitingTime)); + } + + /** + * + * + * @generated + */ + public double getSeatInterferenceProcessTimeMean() { + return seatInterferenceProcessTimeMean; + } + + /** + * + * + * @generated + */ + public void setSeatInterferenceProcessTimeMean(double newSeatInterferenceProcessTimeMean) { + double oldSeatInterferenceProcessTimeMean = seatInterferenceProcessTimeMean; + seatInterferenceProcessTimeMean = newSeatInterferenceProcessTimeMean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN, oldSeatInterferenceProcessTimeMean, seatInterferenceProcessTimeMean)); + } + + /** + * + * + * @generated + */ + public double getSeatInterferenceProcessTimeDeviation() { + return seatInterferenceProcessTimeDeviation; + } + + /** + * + * + * @generated + */ + public void setSeatInterferenceProcessTimeDeviation(double newSeatInterferenceProcessTimeDeviation) { + double oldSeatInterferenceProcessTimeDeviation = seatInterferenceProcessTimeDeviation; + seatInterferenceProcessTimeDeviation = newSeatInterferenceProcessTimeDeviation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION, oldSeatInterferenceProcessTimeDeviation, seatInterferenceProcessTimeDeviation)); + } + + /** + * + * + * @generated + */ + public double getSeatInterferenceProcessTimeFoldingSeatMean() { + return seatInterferenceProcessTimeFoldingSeatMean; + } + + /** + * + * + * @generated + */ + public void setSeatInterferenceProcessTimeFoldingSeatMean(double newSeatInterferenceProcessTimeFoldingSeatMean) { + double oldSeatInterferenceProcessTimeFoldingSeatMean = seatInterferenceProcessTimeFoldingSeatMean; + seatInterferenceProcessTimeFoldingSeatMean = newSeatInterferenceProcessTimeFoldingSeatMean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN, oldSeatInterferenceProcessTimeFoldingSeatMean, seatInterferenceProcessTimeFoldingSeatMean)); + } + + /** + * + * + * @generated + */ + public double getSeatInterferenceProcessTimeFoldingSeatDeviation() { + return seatInterferenceProcessTimeFoldingSeatDeviation; + } + + /** + * + * + * @generated + */ + public void setSeatInterferenceProcessTimeFoldingSeatDeviation(double newSeatInterferenceProcessTimeFoldingSeatDeviation) { + double oldSeatInterferenceProcessTimeFoldingSeatDeviation = seatInterferenceProcessTimeFoldingSeatDeviation; + seatInterferenceProcessTimeFoldingSeatDeviation = newSeatInterferenceProcessTimeFoldingSeatDeviation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION, oldSeatInterferenceProcessTimeFoldingSeatDeviation, seatInterferenceProcessTimeFoldingSeatDeviation)); + } + + /** + * + * + * @generated + */ + public double getPassivePassengerWaitingTimeAfterCollision() { + return passivePassengerWaitingTimeAfterCollision; + } + + /** + * + * + * @generated + */ + public void setPassivePassengerWaitingTimeAfterCollision(double newPassivePassengerWaitingTimeAfterCollision) { + double oldPassivePassengerWaitingTimeAfterCollision = passivePassengerWaitingTimeAfterCollision; + passivePassengerWaitingTimeAfterCollision = newPassivePassengerWaitingTimeAfterCollision; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION, oldPassivePassengerWaitingTimeAfterCollision, passivePassengerWaitingTimeAfterCollision)); + } + + /** + * + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { @@ -800,14 +1170,31 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getPassengerDepthMeanFemale(); case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE: return getPassengerDepthDeviationFemale(); + case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE: + return getPassengerAggressiveMoodShare(); + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: + return getSeatInterferenceStandingUpPassengerWaitingTime(); + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN: + return getSeatInterferenceProcessTimeMean(); + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION: + return getSeatInterferenceProcessTimeDeviation(); + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN: + return getSeatInterferenceProcessTimeFoldingSeatMean(); + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION: + return getSeatInterferenceProcessTimeFoldingSeatDeviation(); + case CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION: + return getPassivePassengerWaitingTimeAfterCollision(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -863,14 +1250,37 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE: setPassengerDepthDeviationFemale((Double)newValue); return; + case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE: + setPassengerAggressiveMoodShare((Integer)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: + setSeatInterferenceStandingUpPassengerWaitingTime((Double)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN: + setSeatInterferenceProcessTimeMean((Double)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION: + setSeatInterferenceProcessTimeDeviation((Double)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN: + setSeatInterferenceProcessTimeFoldingSeatMean((Double)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION: + setSeatInterferenceProcessTimeFoldingSeatDeviation((Double)newValue); + return; + case CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION: + setPassivePassengerWaitingTimeAfterCollision((Double)newValue); + return; } super.eSet(featureID, newValue); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -926,14 +1336,38 @@ public void eUnset(int featureID) { case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE: setPassengerDepthDeviationFemale(PASSENGER_DEPTH_DEVIATION_FEMALE_EDEFAULT); return; + case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE: + setPassengerAggressiveMoodShare(PASSENGER_AGGRESSIVE_MOOD_SHARE_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: + setSeatInterferenceStandingUpPassengerWaitingTime(SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN: + setSeatInterferenceProcessTimeMean(SEAT_INTERFERENCE_PROCESS_TIME_MEAN_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION: + setSeatInterferenceProcessTimeDeviation(SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN: + setSeatInterferenceProcessTimeFoldingSeatMean(SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION: + setSeatInterferenceProcessTimeFoldingSeatDeviation(SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION_EDEFAULT); + return; + case CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION: + setPassivePassengerWaitingTimeAfterCollision(PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION_EDEFAULT); + return; } super.eUnset(featureID); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -972,14 +1406,30 @@ public boolean eIsSet(int featureID) { return passengerDepthMeanFemale != PASSENGER_DEPTH_MEAN_FEMALE_EDEFAULT; case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_DEPTH_DEVIATION_FEMALE: return passengerDepthDeviationFemale != PASSENGER_DEPTH_DEVIATION_FEMALE_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__PASSENGER_AGGRESSIVE_MOOD_SHARE: + return passengerAggressiveMoodShare != PASSENGER_AGGRESSIVE_MOOD_SHARE_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: + return seatInterferenceStandingUpPassengerWaitingTime != SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_MEAN: + return seatInterferenceProcessTimeMean != SEAT_INTERFERENCE_PROCESS_TIME_MEAN_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION: + return seatInterferenceProcessTimeDeviation != SEAT_INTERFERENCE_PROCESS_TIME_DEVIATION_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN: + return seatInterferenceProcessTimeFoldingSeatMean != SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_MEAN_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION: + return seatInterferenceProcessTimeFoldingSeatDeviation != SEAT_INTERFERENCE_PROCESS_TIME_FOLDING_SEAT_DEVIATION_EDEFAULT; + case CabinPackage.PASSENGER_PROPERTIES__PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION: + return passivePassengerWaitingTimeAfterCollision != PASSIVE_PASSENGER_WAITING_TIME_AFTER_COLLISION_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -1020,6 +1470,20 @@ public String toString() { result.append(passengerDepthMeanFemale); result.append(", passengerDepthDeviationFemale: "); result.append(passengerDepthDeviationFemale); + result.append(", passengerAggressiveMoodShare: "); + result.append(passengerAggressiveMoodShare); + result.append(", seatInterferenceStandingUpPassengerWaitingTime: "); + result.append(seatInterferenceStandingUpPassengerWaitingTime); + result.append(", seatInterferenceProcessTimeMean: "); + result.append(seatInterferenceProcessTimeMean); + result.append(", seatInterferenceProcessTimeDeviation: "); + result.append(seatInterferenceProcessTimeDeviation); + result.append(", seatInterferenceProcessTimeFoldingSeatMean: "); + result.append(seatInterferenceProcessTimeFoldingSeatMean); + result.append(", seatInterferenceProcessTimeFoldingSeatDeviation: "); + result.append(seatInterferenceProcessTimeFoldingSeatDeviation); + result.append(", passivePassengerWaitingTimeAfterCollision: "); + result.append(passivePassengerWaitingTimeAfterCollision); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PhysicalObjectImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PhysicalObjectImpl.java index 7ca8384d..eaecf7b0 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PhysicalObjectImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PhysicalObjectImpl.java @@ -155,16 +155,19 @@ public abstract class PhysicalObjectImpl extends MinimalEObjectImpl.Container im protected int id = ID_EDEFAULT; /** - * - * @generated + * . + * + * @generated */ protected PhysicalObjectImpl() { super(); } /** - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -173,8 +176,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the y position + * @generated */ public int getYPosition() { return yPosition; @@ -182,8 +187,10 @@ public int getYPosition() { /** * - * - * @generated + * . + * + * @param newYPosition the new y position + * @generated */ public void setYPosition(int newYPosition) { int oldYPosition = yPosition; @@ -194,8 +201,10 @@ public void setYPosition(int newYPosition) { /** * - * - * @generated + * . + * + * @return the x position + * @generated */ public int getXPosition() { return xPosition; @@ -203,8 +212,10 @@ public int getXPosition() { /** * - * - * @generated + * . + * + * @param newXPosition the new x position + * @generated */ public void setXPosition(int newXPosition) { int oldXPosition = xPosition; @@ -215,8 +226,10 @@ public void setXPosition(int newXPosition) { /** * - * - * @generated + * . + * + * @return the y dimension + * @generated */ public int getYDimension() { return yDimension; @@ -224,8 +237,10 @@ public int getYDimension() { /** * - * - * @generated + * . + * + * @param newYDimension the new y dimension + * @generated */ public void setYDimension(int newYDimension) { int oldYDimension = yDimension; @@ -236,8 +251,10 @@ public void setYDimension(int newYDimension) { /** * - * - * @generated + * . + * + * @return the x dimension + * @generated */ public int getXDimension() { return xDimension; @@ -245,8 +262,10 @@ public int getXDimension() { /** * - * - * @generated + * . + * + * @param newXDimension the new x dimension + * @generated */ public void setXDimension(int newXDimension) { int oldXDimension = xDimension; @@ -256,16 +275,20 @@ public void setXDimension(int newXDimension) { } /** - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; } /** - * - * @generated + * . + * + * @param newName the new name + * @generated */ public void setName(String newName) { String oldName = name; @@ -275,16 +298,20 @@ public void setName(String newName) { } /** - * - * @generated + * . + * + * @return the id + * @generated */ public int getId() { return id; } /** - * - * @generated + * . + * + * @param newId the new id + * @generated */ public void setId(int newId) { int oldId = id; @@ -294,16 +321,14 @@ public void setId(int newId) { } /** - * - * + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful * @generated NOT */ public boolean outOfBounds(DiagnosticChain chain, Map context) { - // TODO: implement this method - // -> specify the condition that violates the invariant - // -> verify the details of the diagnostic, including severity and - // message - // Ensure that you remove @generated or mark it @generated NOT int width = 10000; int length = 50000; @@ -360,8 +385,13 @@ public boolean outOfBounds(DiagnosticChain chain, Map context) { } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -383,8 +413,11 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -412,8 +445,10 @@ public void eSet(int featureID, Object newValue) { } /** - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -441,8 +476,11 @@ public void eUnset(int featureID) { } /** - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -464,8 +502,13 @@ public boolean eIsSet(int featureID) { } /** - * - * @generated + * . + * + * @param operationID the operation id + * @param arguments the arguments + * @return the object + * @throws InvocationTargetException the invocation target exception + * @generated */ @Override public Object eInvoke(int operationID, EList arguments) @@ -478,8 +521,10 @@ public Object eInvoke(int operationID, EList arguments) } /** - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PremiumEconomyClassImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PremiumEconomyClassImpl.java deleted file mode 100644 index f39fcb59..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/PremiumEconomyClassImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; - -/** - * - * An implementation of the model object 'Premium Economy Class'. - * - * - * @generated - */ -public class PremiumEconomyClassImpl extends TravelClassImpl implements PremiumEconomyClass { - /** - * - * - * @generated - */ - protected PremiumEconomyClassImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.PREMIUM_ECONOMY_CLASS; - } - -} //PremiumEconomyClassImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/RowImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/RowImpl.java index 5270971c..0a91db41 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/RowImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/RowImpl.java @@ -28,7 +28,6 @@ *
      *
    • {@link net.bhl.cdt.paxelerate.model.impl.RowImpl#getSeats Seats}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.RowImpl#getRowNumber Row Number}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.RowImpl#isOffsetInRow Offset In Row}
    • *
    * * @generated @@ -65,29 +64,10 @@ public class RowImpl extends MinimalEObjectImpl.Container implements Row { protected int rowNumber = ROW_NUMBER_EDEFAULT; /** - * The default value of the '{@link #isOffsetInRow() Offset In Row}' attribute. * - * - * @see #isOffsetInRow() - * @generated - * @ordered - */ - protected static final boolean OFFSET_IN_ROW_EDEFAULT = false; - - /** - * The cached value of the '{@link #isOffsetInRow() Offset In Row}' attribute. - * - * - * @see #isOffsetInRow() - * @generated - * @ordered - */ - protected boolean offsetInRow = OFFSET_IN_ROW_EDEFAULT; - - /** - * - * - * @generated + * . + * + * @generated */ protected RowImpl() { super(); @@ -95,8 +75,10 @@ protected RowImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -105,8 +87,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the seats + * @generated */ public EList getSeats() { if (seats == null) { @@ -117,8 +101,10 @@ public EList getSeats() { /** * - * - * @generated + * . + * + * @return the row number + * @generated */ public int getRowNumber() { return rowNumber; @@ -126,8 +112,10 @@ public int getRowNumber() { /** * - * - * @generated + * . + * + * @param newRowNumber the new row number + * @generated */ public void setRowNumber(int newRowNumber) { int oldRowNumber = rowNumber; @@ -138,29 +126,13 @@ public void setRowNumber(int newRowNumber) { /** * - * - * @generated - */ - public boolean isOffsetInRow() { - return offsetInRow; - } - - /** - * - * - * @generated - */ - public void setOffsetInRow(boolean newOffsetInRow) { - boolean oldOffsetInRow = offsetInRow; - offsetInRow = newOffsetInRow; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.ROW__OFFSET_IN_ROW, oldOffsetInRow, offsetInRow)); - } - - /** - * - * - * @generated + * . + * + * @param otherEnd the other end + * @param featureID the feature id + * @param msgs the msgs + * @return the notification chain + * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { @@ -173,8 +145,13 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -183,16 +160,17 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getSeats(); case CabinPackage.ROW__ROW_NUMBER: return getRowNumber(); - case CabinPackage.ROW__OFFSET_IN_ROW: - return isOffsetInRow(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @SuppressWarnings("unchecked") @Override @@ -205,17 +183,16 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.ROW__ROW_NUMBER: setRowNumber((Integer)newValue); return; - case CabinPackage.ROW__OFFSET_IN_ROW: - setOffsetInRow((Boolean)newValue); - return; } super.eSet(featureID, newValue); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -226,17 +203,17 @@ public void eUnset(int featureID) { case CabinPackage.ROW__ROW_NUMBER: setRowNumber(ROW_NUMBER_EDEFAULT); return; - case CabinPackage.ROW__OFFSET_IN_ROW: - setOffsetInRow(OFFSET_IN_ROW_EDEFAULT); - return; } super.eUnset(featureID); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -245,16 +222,16 @@ public boolean eIsSet(int featureID) { return seats != null && !seats.isEmpty(); case CabinPackage.ROW__ROW_NUMBER: return rowNumber != ROW_NUMBER_EDEFAULT; - case CabinPackage.ROW__OFFSET_IN_ROW: - return offsetInRow != OFFSET_IN_ROW_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -263,8 +240,6 @@ public String toString() { StringBuffer result = new StringBuffer(super.toString()); result.append(" (rowNumber: "); result.append(rowNumber); - result.append(", offsetInRow: "); - result.append(offsetInRow); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SeatImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SeatImpl.java index b97261b4..15644602 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SeatImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SeatImpl.java @@ -8,6 +8,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; import net.bhl.cdt.paxelerate.model.CabinPackage; +import net.bhl.cdt.paxelerate.model.LayoutConcept; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.Row; import net.bhl.cdt.paxelerate.model.Seat; @@ -28,7 +29,7 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.SeatImpl#getRow Row}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.SeatImpl#isOccupied Occupied}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.SeatImpl#getPassenger Passenger}
  • - *
  • {@link net.bhl.cdt.paxelerate.model.impl.SeatImpl#isCurrentlyFolded Currently Folded}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.SeatImpl#getLayoutConcept Layout Concept}
  • * * * @generated @@ -145,29 +146,30 @@ public class SeatImpl extends PhysicalObjectImpl implements Seat { protected Passenger passenger; /** - * The default value of the '{@link #isCurrentlyFolded() Currently Folded}' attribute. + * The default value of the '{@link #getLayoutConcept() Layout Concept}' attribute. * * - * @see #isCurrentlyFolded() + * @see #getLayoutConcept() * @generated * @ordered */ - protected static final boolean CURRENTLY_FOLDED_EDEFAULT = false; + protected static final LayoutConcept LAYOUT_CONCEPT_EDEFAULT = LayoutConcept.DEFAULT; /** - * The cached value of the '{@link #isCurrentlyFolded() Currently Folded}' attribute. + * The cached value of the '{@link #getLayoutConcept() Layout Concept}' attribute. * * - * @see #isCurrentlyFolded() + * @see #getLayoutConcept() * @generated * @ordered */ - protected boolean currentlyFolded = CURRENTLY_FOLDED_EDEFAULT; + protected LayoutConcept layoutConcept = LAYOUT_CONCEPT_EDEFAULT; /** * - * - * @generated + * . + * + * @generated */ protected SeatImpl() { super(); @@ -175,8 +177,10 @@ protected SeatImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -185,8 +189,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return true, if is seat blocked + * @generated */ public boolean isSeatBlocked() { return seatBlocked; @@ -194,8 +200,10 @@ public boolean isSeatBlocked() { /** * - * - * @generated + * . + * + * @param newSeatBlocked the new seat blocked + * @generated */ public void setSeatBlocked(boolean newSeatBlocked) { boolean oldSeatBlocked = seatBlocked; @@ -206,8 +214,10 @@ public void setSeatBlocked(boolean newSeatBlocked) { /** * - * - * @generated + * . + * + * @return true, if is crew seat + * @generated */ public boolean isCrewSeat() { return crewSeat; @@ -215,8 +225,10 @@ public boolean isCrewSeat() { /** * - * - * @generated + * . + * + * @param newCrewSeat the new crew seat + * @generated */ public void setCrewSeat(boolean newCrewSeat) { boolean oldCrewSeat = crewSeat; @@ -227,8 +239,10 @@ public void setCrewSeat(boolean newCrewSeat) { /** * - * - * @generated + * . + * + * @return the letter + * @generated */ public String getLetter() { return letter; @@ -236,8 +250,10 @@ public String getLetter() { /** * - * - * @generated + * . + * + * @param newLetter the new letter + * @generated */ public void setLetter(String newLetter) { String oldLetter = letter; @@ -248,8 +264,10 @@ public void setLetter(String newLetter) { /** * - * - * @generated + * . + * + * @return the travel class + * @generated */ public TravelClass getTravelClass() { if (travelClass != null && travelClass.eIsProxy()) { @@ -265,8 +283,10 @@ public TravelClass getTravelClass() { /** * - * - * @generated + * . + * + * @return the travel class + * @generated */ public TravelClass basicGetTravelClass() { return travelClass; @@ -274,8 +294,10 @@ public TravelClass basicGetTravelClass() { /** * - * - * @generated + * . + * + * @param newTravelClass the new travel class + * @generated */ public void setTravelClass(TravelClass newTravelClass) { TravelClass oldTravelClass = travelClass; @@ -286,8 +308,10 @@ public void setTravelClass(TravelClass newTravelClass) { /** * - * - * @generated + * . + * + * @return the row + * @generated */ public Row getRow() { if (row != null && row.eIsProxy()) { @@ -303,8 +327,10 @@ public Row getRow() { /** * - * - * @generated + * . + * + * @return the row + * @generated */ public Row basicGetRow() { return row; @@ -312,8 +338,10 @@ public Row basicGetRow() { /** * - * - * @generated + * . + * + * @param newRow the new row + * @generated */ public void setRow(Row newRow) { Row oldRow = row; @@ -324,8 +352,10 @@ public void setRow(Row newRow) { /** * - * - * @generated + * . + * + * @return true, if is occupied + * @generated */ public boolean isOccupied() { return occupied; @@ -333,8 +363,10 @@ public boolean isOccupied() { /** * - * - * @generated + * . + * + * @param newOccupied the new occupied + * @generated */ public void setOccupied(boolean newOccupied) { boolean oldOccupied = occupied; @@ -345,8 +377,10 @@ public void setOccupied(boolean newOccupied) { /** * - * - * @generated + * . + * + * @return the passenger + * @generated */ public Passenger getPassenger() { if (passenger != null && passenger.eIsProxy()) { @@ -362,8 +396,10 @@ public Passenger getPassenger() { /** * - * - * @generated + * . + * + * @return the passenger + * @generated */ public Passenger basicGetPassenger() { return passenger; @@ -371,8 +407,10 @@ public Passenger basicGetPassenger() { /** * - * - * @generated + * . + * + * @param newPassenger the new passenger + * @generated */ public void setPassenger(Passenger newPassenger) { Passenger oldPassenger = passenger; @@ -386,8 +424,8 @@ public void setPassenger(Passenger newPassenger) { * * @generated */ - public boolean isCurrentlyFolded() { - return currentlyFolded; + public LayoutConcept getLayoutConcept() { + return layoutConcept; } /** @@ -395,17 +433,22 @@ public boolean isCurrentlyFolded() { * * @generated */ - public void setCurrentlyFolded(boolean newCurrentlyFolded) { - boolean oldCurrentlyFolded = currentlyFolded; - currentlyFolded = newCurrentlyFolded; + public void setLayoutConcept(LayoutConcept newLayoutConcept) { + LayoutConcept oldLayoutConcept = layoutConcept; + layoutConcept = newLayoutConcept == null ? LAYOUT_CONCEPT_EDEFAULT : newLayoutConcept; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SEAT__CURRENTLY_FOLDED, oldCurrentlyFolded, currentlyFolded)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SEAT__LAYOUT_CONCEPT, oldLayoutConcept, layoutConcept)); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -427,16 +470,19 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { case CabinPackage.SEAT__PASSENGER: if (resolve) return getPassenger(); return basicGetPassenger(); - case CabinPackage.SEAT__CURRENTLY_FOLDED: - return isCurrentlyFolded(); + case CabinPackage.SEAT__LAYOUT_CONCEPT: + return getLayoutConcept(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -462,8 +508,8 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.SEAT__PASSENGER: setPassenger((Passenger)newValue); return; - case CabinPackage.SEAT__CURRENTLY_FOLDED: - setCurrentlyFolded((Boolean)newValue); + case CabinPackage.SEAT__LAYOUT_CONCEPT: + setLayoutConcept((LayoutConcept)newValue); return; } super.eSet(featureID, newValue); @@ -471,8 +517,10 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -498,8 +546,8 @@ public void eUnset(int featureID) { case CabinPackage.SEAT__PASSENGER: setPassenger((Passenger)null); return; - case CabinPackage.SEAT__CURRENTLY_FOLDED: - setCurrentlyFolded(CURRENTLY_FOLDED_EDEFAULT); + case CabinPackage.SEAT__LAYOUT_CONCEPT: + setLayoutConcept(LAYOUT_CONCEPT_EDEFAULT); return; } super.eUnset(featureID); @@ -507,8 +555,11 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -527,16 +578,18 @@ public boolean eIsSet(int featureID) { return occupied != OCCUPIED_EDEFAULT; case CabinPackage.SEAT__PASSENGER: return passenger != null; - case CabinPackage.SEAT__CURRENTLY_FOLDED: - return currentlyFolded != CURRENTLY_FOLDED_EDEFAULT; + case CabinPackage.SEAT__LAYOUT_CONCEPT: + return layoutConcept != LAYOUT_CONCEPT_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -551,8 +604,8 @@ public String toString() { result.append(letter); result.append(", occupied: "); result.append(occupied); - result.append(", currentlyFolded: "); - result.append(currentlyFolded); + result.append(", layoutConcept: "); + result.append(layoutConcept); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationPropertiesImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationPropertiesImpl.java index a714a157..58c9c5ab 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationPropertiesImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationPropertiesImpl.java @@ -13,6 +13,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectResolvingEList; import net.bhl.cdt.paxelerate.model.CabinPackage; +import net.bhl.cdt.paxelerate.model.LayoutConcept; import net.bhl.cdt.paxelerate.model.LuggageProperties; import net.bhl.cdt.paxelerate.model.PassengerProperties; import net.bhl.cdt.paxelerate.model.SimulationProperties; @@ -27,520 +28,593 @@ * The following features are implemented: *

    *
      - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isSimulateWithoutUI Simulate Without UI}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getNumberOfSimulationLoops Number Of Simulation Loops}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isRandomSortBetweenLoops Random Sort Between Loops}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isUseFoldableSeats Use Foldable Seats}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isBringYourOwnSeat Bring Your Own Seat}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getResults Results}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSorting Sorting}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSimulationSpeedFactor Simulation Speed Factor}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSeatInterferenceStandingUpPassengerWaitingTime Seat Interference Standing Up Passenger Waiting Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSeatInterferenceProcessTime Seat Interference Process Time}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getThreadSleepTimeDefault Thread Sleep Time Default}
    • - *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isDeveloperMode Developer Mode}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getLuggageProperties Luggage Properties}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getPassengerProperties Passenger Properties}
    • *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getPassengersBoardingPerMinute Passengers Boarding Per Minute}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getLayoutConcept Layout Concept}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getScale Scale}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSimulationSpeedFactor Simulation Speed Factor}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isUsePresetSettings Use Preset Settings}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isSimulateWithoutUI Simulate Without UI}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getNumberOfSimulationLoops Number Of Simulation Loops}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isDeveloperMode Developer Mode}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isDataExport Data Export}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isDisplayMap Display Map}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#isSortPassengerBetweenLoops Sort Passenger Between Loops}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSorting Sorting}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getThreadSleepTimeDefault Thread Sleep Time Default}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSidewaysFoldabeSeatPopupTimeMean Sideways Foldabe Seat Popup Time Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getSidewaysFoldabeSeatPopupTimeDeviation Sideways Foldabe Seat Popup Time Deviation}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getLiftingSeatPanPopupTimeMean Lifting Seat Pan Popup Time Mean}
    • + *
    • {@link net.bhl.cdt.paxelerate.model.impl.SimulationPropertiesImpl#getLiftingSeatPanPopupTimeDeviation Lifting Seat Pan Popup Time Deviation}
    • *
    * * @generated */ public class SimulationPropertiesImpl extends MinimalEObjectImpl.Container implements SimulationProperties { /** - * The default value of the '{@link #isSimulateWithoutUI() Simulate Without UI}' attribute. + * The cached value of the '{@link #getResults() Results}' reference list. * * - * @see #isSimulateWithoutUI() + * @see #getResults() * @generated * @ordered */ - protected static final boolean SIMULATE_WITHOUT_UI_EDEFAULT = false; + protected EList results; /** - * The cached value of the '{@link #isSimulateWithoutUI() Simulate Without UI}' attribute. + * The cached value of the '{@link #getLuggageProperties() Luggage Properties}' containment reference. * * - * @see #isSimulateWithoutUI() + * @see #getLuggageProperties() * @generated * @ordered */ - protected boolean simulateWithoutUI = SIMULATE_WITHOUT_UI_EDEFAULT; + protected LuggageProperties luggageProperties; /** - * The default value of the '{@link #getNumberOfSimulationLoops() Number Of Simulation Loops}' attribute. + * The cached value of the '{@link #getPassengerProperties() Passenger Properties}' containment reference. * * - * @see #getNumberOfSimulationLoops() + * @see #getPassengerProperties() * @generated * @ordered */ - protected static final int NUMBER_OF_SIMULATION_LOOPS_EDEFAULT = 1; + protected PassengerProperties passengerProperties; /** - * The cached value of the '{@link #getNumberOfSimulationLoops() Number Of Simulation Loops}' attribute. + * The default value of the '{@link #getPassengersBoardingPerMinute() Passengers Boarding Per Minute}' attribute. * * - * @see #getNumberOfSimulationLoops() + * @see #getPassengersBoardingPerMinute() * @generated * @ordered */ - protected int numberOfSimulationLoops = NUMBER_OF_SIMULATION_LOOPS_EDEFAULT; + protected static final double PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT = 18.0; /** - * The default value of the '{@link #isRandomSortBetweenLoops() Random Sort Between Loops}' attribute. + * The cached value of the '{@link #getPassengersBoardingPerMinute() Passengers Boarding Per Minute}' attribute. * * - * @see #isRandomSortBetweenLoops() + * @see #getPassengersBoardingPerMinute() * @generated * @ordered */ - protected static final boolean RANDOM_SORT_BETWEEN_LOOPS_EDEFAULT = true; + protected double passengersBoardingPerMinute = PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT; /** - * The cached value of the '{@link #isRandomSortBetweenLoops() Random Sort Between Loops}' attribute. + * The default value of the '{@link #getLayoutConcept() Layout Concept}' attribute. * * - * @see #isRandomSortBetweenLoops() + * @see #getLayoutConcept() * @generated * @ordered */ - protected boolean randomSortBetweenLoops = RANDOM_SORT_BETWEEN_LOOPS_EDEFAULT; + protected static final LayoutConcept LAYOUT_CONCEPT_EDEFAULT = LayoutConcept.DEFAULT; /** - * The default value of the '{@link #isUseFoldableSeats() Use Foldable Seats}' attribute. + * The cached value of the '{@link #getLayoutConcept() Layout Concept}' attribute. * * - * @see #isUseFoldableSeats() + * @see #getLayoutConcept() * @generated * @ordered */ - protected static final boolean USE_FOLDABLE_SEATS_EDEFAULT = false; + protected LayoutConcept layoutConcept = LAYOUT_CONCEPT_EDEFAULT; /** - * The cached value of the '{@link #isUseFoldableSeats() Use Foldable Seats}' attribute. + * The default value of the '{@link #getScale() Scale}' attribute. * * - * @see #isUseFoldableSeats() + * @see #getScale() * @generated * @ordered */ - protected boolean useFoldableSeats = USE_FOLDABLE_SEATS_EDEFAULT; + protected static final int SCALE_EDEFAULT = 10; /** - * The default value of the '{@link #isBringYourOwnSeat() Bring Your Own Seat}' attribute. + * The cached value of the '{@link #getScale() Scale}' attribute. * * - * @see #isBringYourOwnSeat() + * @see #getScale() * @generated * @ordered */ - protected static final boolean BRING_YOUR_OWN_SEAT_EDEFAULT = false; + protected int scale = SCALE_EDEFAULT; /** - * The cached value of the '{@link #isBringYourOwnSeat() Bring Your Own Seat}' attribute. + * The default value of the '{@link #getSimulationSpeedFactor() Simulation Speed Factor}' attribute. * * - * @see #isBringYourOwnSeat() + * @see #getSimulationSpeedFactor() * @generated * @ordered */ - protected boolean bringYourOwnSeat = BRING_YOUR_OWN_SEAT_EDEFAULT; + protected static final int SIMULATION_SPEED_FACTOR_EDEFAULT = 5; /** - * The cached value of the '{@link #getResults() Results}' reference list. + * The cached value of the '{@link #getSimulationSpeedFactor() Simulation Speed Factor}' attribute. * * - * @see #getResults() + * @see #getSimulationSpeedFactor() * @generated * @ordered */ - protected EList results; + protected int simulationSpeedFactor = SIMULATION_SPEED_FACTOR_EDEFAULT; /** - * The default value of the '{@link #getSorting() Sorting}' attribute. + * The default value of the '{@link #isUsePresetSettings() Use Preset Settings}' attribute. * * - * @see #getSorting() + * @see #isUsePresetSettings() * @generated * @ordered */ - protected static final SortingStyle SORTING_EDEFAULT = SortingStyle.RANDOM; + protected static final boolean USE_PRESET_SETTINGS_EDEFAULT = false; /** - * The cached value of the '{@link #getSorting() Sorting}' attribute. + * The cached value of the '{@link #isUsePresetSettings() Use Preset Settings}' attribute. * * - * @see #getSorting() + * @see #isUsePresetSettings() * @generated * @ordered */ - protected SortingStyle sorting = SORTING_EDEFAULT; + protected boolean usePresetSettings = USE_PRESET_SETTINGS_EDEFAULT; /** - * The default value of the '{@link #getSimulationSpeedFactor() Simulation Speed Factor}' attribute. + * The default value of the '{@link #isSimulateWithoutUI() Simulate Without UI}' attribute. * * - * @see #getSimulationSpeedFactor() + * @see #isSimulateWithoutUI() * @generated * @ordered */ - protected static final int SIMULATION_SPEED_FACTOR_EDEFAULT = 10; + protected static final boolean SIMULATE_WITHOUT_UI_EDEFAULT = false; /** - * The cached value of the '{@link #getSimulationSpeedFactor() Simulation Speed Factor}' attribute. + * The cached value of the '{@link #isSimulateWithoutUI() Simulate Without UI}' attribute. * * - * @see #getSimulationSpeedFactor() + * @see #isSimulateWithoutUI() * @generated * @ordered */ - protected int simulationSpeedFactor = SIMULATION_SPEED_FACTOR_EDEFAULT; + protected boolean simulateWithoutUI = SIMULATE_WITHOUT_UI_EDEFAULT; /** - * The default value of the '{@link #getSeatInterferenceStandingUpPassengerWaitingTime() Seat Interference Standing Up Passenger Waiting Time}' attribute. + * The default value of the '{@link #getNumberOfSimulationLoops() Number Of Simulation Loops}' attribute. * * - * @see #getSeatInterferenceStandingUpPassengerWaitingTime() + * @see #getNumberOfSimulationLoops() * @generated * @ordered */ - protected static final int SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT = 3; + protected static final int NUMBER_OF_SIMULATION_LOOPS_EDEFAULT = 1; /** - * The cached value of the '{@link #getSeatInterferenceStandingUpPassengerWaitingTime() Seat Interference Standing Up Passenger Waiting Time}' attribute. + * The cached value of the '{@link #getNumberOfSimulationLoops() Number Of Simulation Loops}' attribute. * * - * @see #getSeatInterferenceStandingUpPassengerWaitingTime() + * @see #getNumberOfSimulationLoops() * @generated * @ordered */ - protected int seatInterferenceStandingUpPassengerWaitingTime = SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT; + protected int numberOfSimulationLoops = NUMBER_OF_SIMULATION_LOOPS_EDEFAULT; /** - * The default value of the '{@link #getSeatInterferenceProcessTime() Seat Interference Process Time}' attribute. + * The default value of the '{@link #isDeveloperMode() Developer Mode}' attribute. * * - * @see #getSeatInterferenceProcessTime() + * @see #isDeveloperMode() * @generated * @ordered */ - protected static final int SEAT_INTERFERENCE_PROCESS_TIME_EDEFAULT = 7; + protected static final boolean DEVELOPER_MODE_EDEFAULT = true; /** - * The cached value of the '{@link #getSeatInterferenceProcessTime() Seat Interference Process Time}' attribute. + * The cached value of the '{@link #isDeveloperMode() Developer Mode}' attribute. * * - * @see #getSeatInterferenceProcessTime() + * @see #isDeveloperMode() * @generated * @ordered */ - protected int seatInterferenceProcessTime = SEAT_INTERFERENCE_PROCESS_TIME_EDEFAULT; + protected boolean developerMode = DEVELOPER_MODE_EDEFAULT; /** - * The default value of the '{@link #getThreadSleepTimeDefault() Thread Sleep Time Default}' attribute. + * The default value of the '{@link #isDataExport() Data Export}' attribute. * * - * @see #getThreadSleepTimeDefault() + * @see #isDataExport() * @generated * @ordered */ - protected static final int THREAD_SLEEP_TIME_DEFAULT_EDEFAULT = 10; + protected static final boolean DATA_EXPORT_EDEFAULT = true; /** - * The cached value of the '{@link #getThreadSleepTimeDefault() Thread Sleep Time Default}' attribute. + * The cached value of the '{@link #isDataExport() Data Export}' attribute. * * - * @see #getThreadSleepTimeDefault() + * @see #isDataExport() * @generated * @ordered */ - protected int threadSleepTimeDefault = THREAD_SLEEP_TIME_DEFAULT_EDEFAULT; + protected boolean dataExport = DATA_EXPORT_EDEFAULT; /** - * The default value of the '{@link #isDeveloperMode() Developer Mode}' attribute. + * The default value of the '{@link #isDisplayMap() Display Map}' attribute. * * - * @see #isDeveloperMode() + * @see #isDisplayMap() * @generated * @ordered */ - protected static final boolean DEVELOPER_MODE_EDEFAULT = false; + protected static final boolean DISPLAY_MAP_EDEFAULT = false; /** - * The cached value of the '{@link #isDeveloperMode() Developer Mode}' attribute. + * The cached value of the '{@link #isDisplayMap() Display Map}' attribute. * * - * @see #isDeveloperMode() + * @see #isDisplayMap() * @generated * @ordered */ - protected boolean developerMode = DEVELOPER_MODE_EDEFAULT; + protected boolean displayMap = DISPLAY_MAP_EDEFAULT; /** - * The cached value of the '{@link #getLuggageProperties() Luggage Properties}' containment reference. + * The default value of the '{@link #isSortPassengerBetweenLoops() Sort Passenger Between Loops}' attribute. * * - * @see #getLuggageProperties() + * @see #isSortPassengerBetweenLoops() * @generated * @ordered */ - protected LuggageProperties luggageProperties; + protected static final boolean SORT_PASSENGER_BETWEEN_LOOPS_EDEFAULT = true; /** - * The cached value of the '{@link #getPassengerProperties() Passenger Properties}' containment reference. + * The cached value of the '{@link #isSortPassengerBetweenLoops() Sort Passenger Between Loops}' attribute. * * - * @see #getPassengerProperties() + * @see #isSortPassengerBetweenLoops() * @generated * @ordered */ - protected PassengerProperties passengerProperties; + protected boolean sortPassengerBetweenLoops = SORT_PASSENGER_BETWEEN_LOOPS_EDEFAULT; /** - * The default value of the '{@link #getPassengersBoardingPerMinute() Passengers Boarding Per Minute}' attribute. + * The default value of the '{@link #getSorting() Sorting}' attribute. * * - * @see #getPassengersBoardingPerMinute() + * @see #getSorting() * @generated * @ordered */ - protected static final double PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT = 18.0; + protected static final SortingStyle SORTING_EDEFAULT = SortingStyle.RANDOM; /** - * The cached value of the '{@link #getPassengersBoardingPerMinute() Passengers Boarding Per Minute}' attribute. + * The cached value of the '{@link #getSorting() Sorting}' attribute. * * - * @see #getPassengersBoardingPerMinute() + * @see #getSorting() * @generated * @ordered */ - protected double passengersBoardingPerMinute = PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT; + protected SortingStyle sorting = SORTING_EDEFAULT; /** + * The default value of the '{@link #getThreadSleepTimeDefault() Thread Sleep Time Default}' attribute. * * + * @see #getThreadSleepTimeDefault() * @generated + * @ordered */ - protected SimulationPropertiesImpl() { - super(); - } + protected static final int THREAD_SLEEP_TIME_DEFAULT_EDEFAULT = 10; /** + * The cached value of the '{@link #getThreadSleepTimeDefault() Thread Sleep Time Default}' attribute. * * + * @see #getThreadSleepTimeDefault() * @generated + * @ordered */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.SIMULATION_PROPERTIES; - } + protected int threadSleepTimeDefault = THREAD_SLEEP_TIME_DEFAULT_EDEFAULT; /** + * The default value of the '{@link #getSidewaysFoldabeSeatPopupTimeMean() Sideways Foldabe Seat Popup Time Mean}' attribute. * * + * @see #getSidewaysFoldabeSeatPopupTimeMean() * @generated + * @ordered */ - public boolean isSimulateWithoutUI() { - return simulateWithoutUI; - } + protected static final double SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN_EDEFAULT = 5.0; /** + * The cached value of the '{@link #getSidewaysFoldabeSeatPopupTimeMean() Sideways Foldabe Seat Popup Time Mean}' attribute. * * + * @see #getSidewaysFoldabeSeatPopupTimeMean() * @generated + * @ordered */ - public void setSimulateWithoutUI(boolean newSimulateWithoutUI) { - boolean oldSimulateWithoutUI = simulateWithoutUI; - simulateWithoutUI = newSimulateWithoutUI; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI, oldSimulateWithoutUI, simulateWithoutUI)); - } + protected double sidewaysFoldabeSeatPopupTimeMean = SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN_EDEFAULT; /** + * The default value of the '{@link #getSidewaysFoldabeSeatPopupTimeDeviation() Sideways Foldabe Seat Popup Time Deviation}' attribute. * * + * @see #getSidewaysFoldabeSeatPopupTimeDeviation() * @generated + * @ordered */ - public int getNumberOfSimulationLoops() { - return numberOfSimulationLoops; - } + protected static final double SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION_EDEFAULT = 1.0; /** + * The cached value of the '{@link #getSidewaysFoldabeSeatPopupTimeDeviation() Sideways Foldabe Seat Popup Time Deviation}' attribute. * * + * @see #getSidewaysFoldabeSeatPopupTimeDeviation() * @generated + * @ordered */ - public void setNumberOfSimulationLoops(int newNumberOfSimulationLoops) { - int oldNumberOfSimulationLoops = numberOfSimulationLoops; - numberOfSimulationLoops = newNumberOfSimulationLoops; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS, oldNumberOfSimulationLoops, numberOfSimulationLoops)); - } + protected double sidewaysFoldabeSeatPopupTimeDeviation = SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION_EDEFAULT; /** + * The default value of the '{@link #getLiftingSeatPanPopupTimeMean() Lifting Seat Pan Popup Time Mean}' attribute. * * + * @see #getLiftingSeatPanPopupTimeMean() * @generated + * @ordered */ - public boolean isRandomSortBetweenLoops() { - return randomSortBetweenLoops; - } + protected static final double LIFTING_SEAT_PAN_POPUP_TIME_MEAN_EDEFAULT = 2.0; /** + * The cached value of the '{@link #getLiftingSeatPanPopupTimeMean() Lifting Seat Pan Popup Time Mean}' attribute. * * + * @see #getLiftingSeatPanPopupTimeMean() * @generated + * @ordered */ - public void setRandomSortBetweenLoops(boolean newRandomSortBetweenLoops) { - boolean oldRandomSortBetweenLoops = randomSortBetweenLoops; - randomSortBetweenLoops = newRandomSortBetweenLoops; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS, oldRandomSortBetweenLoops, randomSortBetweenLoops)); - } + protected double liftingSeatPanPopupTimeMean = LIFTING_SEAT_PAN_POPUP_TIME_MEAN_EDEFAULT; /** + * The default value of the '{@link #getLiftingSeatPanPopupTimeDeviation() Lifting Seat Pan Popup Time Deviation}' attribute. * * + * @see #getLiftingSeatPanPopupTimeDeviation() * @generated + * @ordered */ - public boolean isUseFoldableSeats() { - return useFoldableSeats; - } + protected static final double LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION_EDEFAULT = 0.5; /** + * The cached value of the '{@link #getLiftingSeatPanPopupTimeDeviation() Lifting Seat Pan Popup Time Deviation}' attribute. * * + * @see #getLiftingSeatPanPopupTimeDeviation() * @generated + * @ordered */ - public void setUseFoldableSeats(boolean newUseFoldableSeats) { - boolean oldUseFoldableSeats = useFoldableSeats; - useFoldableSeats = newUseFoldableSeats; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS, oldUseFoldableSeats, useFoldableSeats)); + protected double liftingSeatPanPopupTimeDeviation = LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION_EDEFAULT; + + /** + * + * . + * + * @generated + */ + protected SimulationPropertiesImpl() { + super(); } /** * - * - * @generated + * . + * + * @return the e class + * @generated + */ + @Override + protected EClass eStaticClass() { + return CabinPackage.Literals.SIMULATION_PROPERTIES; + } + + /** + * + * . + * + * @return the scale + * @generated */ - public boolean isBringYourOwnSeat() { - return bringYourOwnSeat; + public int getScale() { + return scale; } /** * - * - * @generated + * . + * + * @param newScale the new scale + * @generated */ - public void setBringYourOwnSeat(boolean newBringYourOwnSeat) { - boolean oldBringYourOwnSeat = bringYourOwnSeat; - bringYourOwnSeat = newBringYourOwnSeat; + public void setScale(int newScale) { + int oldScale = scale; + scale = newScale; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT, oldBringYourOwnSeat, bringYourOwnSeat)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SCALE, oldScale, scale)); } /** * - * - * @generated + * . + * + * @return true, if is use preset settings + * @generated */ - public EList getResults() { - if (results == null) { - results = new EObjectResolvingEList(SimulationResult.class, this, CabinPackage.SIMULATION_PROPERTIES__RESULTS); - } - return results; + public boolean isUsePresetSettings() { + return usePresetSettings; } /** * - * - * @generated + * . + * + * @param newUsePresetSettings the new use preset settings + * @generated */ - public SortingStyle getSorting() { - return sorting; + public void setUsePresetSettings(boolean newUsePresetSettings) { + boolean oldUsePresetSettings = usePresetSettings; + usePresetSettings = newUsePresetSettings; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS, oldUsePresetSettings, usePresetSettings)); } /** * - * - * @generated + * . + * + * @return true, if is simulate without ui + * @generated */ - public void setSorting(SortingStyle newSorting) { - SortingStyle oldSorting = sorting; - sorting = newSorting == null ? SORTING_EDEFAULT : newSorting; + public boolean isSimulateWithoutUI() { + return simulateWithoutUI; + } + + /** + * + * . + * + * @param newSimulateWithoutUI the new simulate without ui + * @generated + */ + public void setSimulateWithoutUI(boolean newSimulateWithoutUI) { + boolean oldSimulateWithoutUI = simulateWithoutUI; + simulateWithoutUI = newSimulateWithoutUI; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SORTING, oldSorting, sorting)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI, oldSimulateWithoutUI, simulateWithoutUI)); } /** * - * - * @generated + * . + * + * @return the number of simulation loops + * @generated */ - public int getSimulationSpeedFactor() { - return simulationSpeedFactor; + public int getNumberOfSimulationLoops() { + return numberOfSimulationLoops; } /** * - * - * @generated + * . + * + * @param newNumberOfSimulationLoops the new number of simulation loops + * @generated */ - public void setSimulationSpeedFactor(int newSimulationSpeedFactor) { - int oldSimulationSpeedFactor = simulationSpeedFactor; - simulationSpeedFactor = newSimulationSpeedFactor; + public void setNumberOfSimulationLoops(int newNumberOfSimulationLoops) { + int oldNumberOfSimulationLoops = numberOfSimulationLoops; + numberOfSimulationLoops = newNumberOfSimulationLoops; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR, oldSimulationSpeedFactor, simulationSpeedFactor)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS, oldNumberOfSimulationLoops, numberOfSimulationLoops)); } /** * - * - * @generated + * . + * + * @return the results + * @generated */ - public int getSeatInterferenceStandingUpPassengerWaitingTime() { - return seatInterferenceStandingUpPassengerWaitingTime; + public EList getResults() { + if (results == null) { + results = new EObjectResolvingEList(SimulationResult.class, this, CabinPackage.SIMULATION_PROPERTIES__RESULTS); + } + return results; } /** * - * - * @generated + * . + * + * @return the sorting + * @generated + */ + public SortingStyle getSorting() { + return sorting; + } + + /** + * + * . + * + * @param newSorting the new sorting + * @generated */ - public void setSeatInterferenceStandingUpPassengerWaitingTime(int newSeatInterferenceStandingUpPassengerWaitingTime) { - int oldSeatInterferenceStandingUpPassengerWaitingTime = seatInterferenceStandingUpPassengerWaitingTime; - seatInterferenceStandingUpPassengerWaitingTime = newSeatInterferenceStandingUpPassengerWaitingTime; + public void setSorting(SortingStyle newSorting) { + SortingStyle oldSorting = sorting; + sorting = newSorting == null ? SORTING_EDEFAULT : newSorting; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME, oldSeatInterferenceStandingUpPassengerWaitingTime, seatInterferenceStandingUpPassengerWaitingTime)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SORTING, oldSorting, sorting)); } /** * - * - * @generated + * . + * + * @return the simulation speed factor + * @generated */ - public int getSeatInterferenceProcessTime() { - return seatInterferenceProcessTime; + public int getSimulationSpeedFactor() { + return simulationSpeedFactor; } /** * - * - * @generated + * . + * + * @param newSimulationSpeedFactor the new simulation speed factor + * @generated */ - public void setSeatInterferenceProcessTime(int newSeatInterferenceProcessTime) { - int oldSeatInterferenceProcessTime = seatInterferenceProcessTime; - seatInterferenceProcessTime = newSeatInterferenceProcessTime; + public void setSimulationSpeedFactor(int newSimulationSpeedFactor) { + int oldSimulationSpeedFactor = simulationSpeedFactor; + simulationSpeedFactor = newSimulationSpeedFactor; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME, oldSeatInterferenceProcessTime, seatInterferenceProcessTime)); + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR, oldSimulationSpeedFactor, simulationSpeedFactor)); } /** * - * - * @generated + * . + * + * @return the thread sleep time default + * @generated */ public int getThreadSleepTimeDefault() { return threadSleepTimeDefault; @@ -548,8 +622,10 @@ public int getThreadSleepTimeDefault() { /** * - * - * @generated + * . + * + * @param newThreadSleepTimeDefault the new thread sleep time default + * @generated */ public void setThreadSleepTimeDefault(int newThreadSleepTimeDefault) { int oldThreadSleepTimeDefault = threadSleepTimeDefault; @@ -560,8 +636,10 @@ public void setThreadSleepTimeDefault(int newThreadSleepTimeDefault) { /** * - * - * @generated + * . + * + * @return true, if is developer mode + * @generated */ public boolean isDeveloperMode() { return developerMode; @@ -569,8 +647,10 @@ public boolean isDeveloperMode() { /** * - * - * @generated + * . + * + * @param newDeveloperMode the new developer mode + * @generated */ public void setDeveloperMode(boolean newDeveloperMode) { boolean oldDeveloperMode = developerMode; @@ -584,8 +664,8 @@ public void setDeveloperMode(boolean newDeveloperMode) { * * @generated */ - public LuggageProperties getLuggageProperties() { - return luggageProperties; + public boolean isSortPassengerBetweenLoops() { + return sortPassengerBetweenLoops; } /** @@ -593,9 +673,36 @@ public LuggageProperties getLuggageProperties() { * * @generated */ - public NotificationChain basicSetLuggageProperties(LuggageProperties newLuggageProperties, NotificationChain msgs) { - LuggageProperties oldLuggageProperties = luggageProperties; - luggageProperties = newLuggageProperties; + public void setSortPassengerBetweenLoops(boolean newSortPassengerBetweenLoops) { + boolean oldSortPassengerBetweenLoops = sortPassengerBetweenLoops; + sortPassengerBetweenLoops = newSortPassengerBetweenLoops; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS, oldSortPassengerBetweenLoops, sortPassengerBetweenLoops)); + } + + /** + * + * . + * + * @return the luggage properties + * @generated + */ + public LuggageProperties getLuggageProperties() { + return luggageProperties; + } + + /** + * + * . + * + * @param newLuggageProperties the new luggage properties + * @param msgs the msgs + * @return the notification chain + * @generated + */ + public NotificationChain basicSetLuggageProperties(LuggageProperties newLuggageProperties, NotificationChain msgs) { + LuggageProperties oldLuggageProperties = luggageProperties; + luggageProperties = newLuggageProperties; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES, oldLuggageProperties, newLuggageProperties); if (msgs == null) msgs = notification; else msgs.add(notification); @@ -605,8 +712,10 @@ public NotificationChain basicSetLuggageProperties(LuggageProperties newLuggageP /** * - * - * @generated + * . + * + * @param newLuggageProperties the new luggage properties + * @generated */ public void setLuggageProperties(LuggageProperties newLuggageProperties) { if (newLuggageProperties != luggageProperties) { @@ -624,8 +733,10 @@ else if (eNotificationRequired()) /** * - * - * @generated + * . + * + * @return the passenger properties + * @generated */ public PassengerProperties getPassengerProperties() { return passengerProperties; @@ -633,8 +744,12 @@ public PassengerProperties getPassengerProperties() { /** * - * - * @generated + * . + * + * @param newPassengerProperties the new passenger properties + * @param msgs the msgs + * @return the notification chain + * @generated */ public NotificationChain basicSetPassengerProperties(PassengerProperties newPassengerProperties, NotificationChain msgs) { PassengerProperties oldPassengerProperties = passengerProperties; @@ -648,8 +763,10 @@ public NotificationChain basicSetPassengerProperties(PassengerProperties newPass /** * - * - * @generated + * . + * + * @param newPassengerProperties the new passenger properties + * @generated */ public void setPassengerProperties(PassengerProperties newPassengerProperties) { if (newPassengerProperties != passengerProperties) { @@ -667,8 +784,10 @@ else if (eNotificationRequired()) /** * - * - * @generated + * . + * + * @return the passengers boarding per minute + * @generated */ public double getPassengersBoardingPerMinute() { return passengersBoardingPerMinute; @@ -676,8 +795,10 @@ public double getPassengersBoardingPerMinute() { /** * - * - * @generated + * . + * + * @param newPassengersBoardingPerMinute the new passengers boarding per minute + * @generated */ public void setPassengersBoardingPerMinute(double newPassengersBoardingPerMinute) { double oldPassengersBoardingPerMinute = passengersBoardingPerMinute; @@ -691,6 +812,158 @@ public void setPassengersBoardingPerMinute(double newPassengersBoardingPerMinute * * @generated */ + public boolean isDataExport() { + return dataExport; + } + + /** + * + * + * @generated + */ + public void setDataExport(boolean newDataExport) { + boolean oldDataExport = dataExport; + dataExport = newDataExport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT, oldDataExport, dataExport)); + } + + /** + * + * + * @generated + */ + public boolean isDisplayMap() { + return displayMap; + } + + /** + * + * + * @generated + */ + public void setDisplayMap(boolean newDisplayMap) { + boolean oldDisplayMap = displayMap; + displayMap = newDisplayMap; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP, oldDisplayMap, displayMap)); + } + + /** + * + * + * @generated + */ + public double getSidewaysFoldabeSeatPopupTimeMean() { + return sidewaysFoldabeSeatPopupTimeMean; + } + + /** + * + * + * @generated + */ + public void setSidewaysFoldabeSeatPopupTimeMean(double newSidewaysFoldabeSeatPopupTimeMean) { + double oldSidewaysFoldabeSeatPopupTimeMean = sidewaysFoldabeSeatPopupTimeMean; + sidewaysFoldabeSeatPopupTimeMean = newSidewaysFoldabeSeatPopupTimeMean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN, oldSidewaysFoldabeSeatPopupTimeMean, sidewaysFoldabeSeatPopupTimeMean)); + } + + /** + * + * + * @generated + */ + public double getSidewaysFoldabeSeatPopupTimeDeviation() { + return sidewaysFoldabeSeatPopupTimeDeviation; + } + + /** + * + * + * @generated + */ + public void setSidewaysFoldabeSeatPopupTimeDeviation(double newSidewaysFoldabeSeatPopupTimeDeviation) { + double oldSidewaysFoldabeSeatPopupTimeDeviation = sidewaysFoldabeSeatPopupTimeDeviation; + sidewaysFoldabeSeatPopupTimeDeviation = newSidewaysFoldabeSeatPopupTimeDeviation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION, oldSidewaysFoldabeSeatPopupTimeDeviation, sidewaysFoldabeSeatPopupTimeDeviation)); + } + + /** + * + * + * @generated + */ + public double getLiftingSeatPanPopupTimeMean() { + return liftingSeatPanPopupTimeMean; + } + + /** + * + * + * @generated + */ + public void setLiftingSeatPanPopupTimeMean(double newLiftingSeatPanPopupTimeMean) { + double oldLiftingSeatPanPopupTimeMean = liftingSeatPanPopupTimeMean; + liftingSeatPanPopupTimeMean = newLiftingSeatPanPopupTimeMean; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN, oldLiftingSeatPanPopupTimeMean, liftingSeatPanPopupTimeMean)); + } + + /** + * + * + * @generated + */ + public double getLiftingSeatPanPopupTimeDeviation() { + return liftingSeatPanPopupTimeDeviation; + } + + /** + * + * + * @generated + */ + public void setLiftingSeatPanPopupTimeDeviation(double newLiftingSeatPanPopupTimeDeviation) { + double oldLiftingSeatPanPopupTimeDeviation = liftingSeatPanPopupTimeDeviation; + liftingSeatPanPopupTimeDeviation = newLiftingSeatPanPopupTimeDeviation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION, oldLiftingSeatPanPopupTimeDeviation, liftingSeatPanPopupTimeDeviation)); + } + + /** + * + * + * @generated + */ + public LayoutConcept getLayoutConcept() { + return layoutConcept; + } + + /** + * + * + * @generated + */ + public void setLayoutConcept(LayoutConcept newLayoutConcept) { + LayoutConcept oldLayoutConcept = layoutConcept; + layoutConcept = newLayoutConcept == null ? LAYOUT_CONCEPT_EDEFAULT : newLayoutConcept; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT, oldLayoutConcept, layoutConcept)); + } + + /** + * + * . + * + * @param otherEnd the other end + * @param featureID the feature id + * @param msgs the msgs + * @return the notification chain + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { @@ -704,100 +977,133 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: - return isSimulateWithoutUI(); - case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: - return getNumberOfSimulationLoops(); - case CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS: - return isRandomSortBetweenLoops(); - case CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS: - return isUseFoldableSeats(); - case CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT: - return isBringYourOwnSeat(); case CabinPackage.SIMULATION_PROPERTIES__RESULTS: return getResults(); - case CabinPackage.SIMULATION_PROPERTIES__SORTING: - return getSorting(); - case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: - return getSimulationSpeedFactor(); - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: - return getSeatInterferenceStandingUpPassengerWaitingTime(); - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME: - return getSeatInterferenceProcessTime(); - case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: - return getThreadSleepTimeDefault(); - case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: - return isDeveloperMode(); case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: return getLuggageProperties(); case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: return getPassengerProperties(); case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: return getPassengersBoardingPerMinute(); + case CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT: + return getLayoutConcept(); + case CabinPackage.SIMULATION_PROPERTIES__SCALE: + return getScale(); + case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: + return getSimulationSpeedFactor(); + case CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS: + return isUsePresetSettings(); + case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: + return isSimulateWithoutUI(); + case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: + return getNumberOfSimulationLoops(); + case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: + return isDeveloperMode(); + case CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT: + return isDataExport(); + case CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP: + return isDisplayMap(); + case CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS: + return isSortPassengerBetweenLoops(); + case CabinPackage.SIMULATION_PROPERTIES__SORTING: + return getSorting(); + case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: + return getThreadSleepTimeDefault(); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN: + return getSidewaysFoldabeSeatPopupTimeMean(); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION: + return getSidewaysFoldabeSeatPopupTimeDeviation(); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN: + return getLiftingSeatPanPopupTimeMean(); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION: + return getLiftingSeatPanPopupTimeDeviation(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case CabinPackage.SIMULATION_PROPERTIES__RESULTS: + getResults().clear(); + getResults().addAll((Collection)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: + setLuggageProperties((LuggageProperties)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: + setPassengerProperties((PassengerProperties)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: + setPassengersBoardingPerMinute((Double)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT: + setLayoutConcept((LayoutConcept)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__SCALE: + setScale((Integer)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: + setSimulationSpeedFactor((Integer)newValue); + return; + case CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS: + setUsePresetSettings((Boolean)newValue); + return; case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: setSimulateWithoutUI((Boolean)newValue); return; case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: setNumberOfSimulationLoops((Integer)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS: - setRandomSortBetweenLoops((Boolean)newValue); + case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: + setDeveloperMode((Boolean)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS: - setUseFoldableSeats((Boolean)newValue); + case CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT: + setDataExport((Boolean)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT: - setBringYourOwnSeat((Boolean)newValue); + case CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP: + setDisplayMap((Boolean)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__RESULTS: - getResults().clear(); - getResults().addAll((Collection)newValue); + case CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS: + setSortPassengerBetweenLoops((Boolean)newValue); return; case CabinPackage.SIMULATION_PROPERTIES__SORTING: setSorting((SortingStyle)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: - setSimulationSpeedFactor((Integer)newValue); - return; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: - setSeatInterferenceStandingUpPassengerWaitingTime((Integer)newValue); - return; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME: - setSeatInterferenceProcessTime((Integer)newValue); - return; case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: setThreadSleepTimeDefault((Integer)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: - setDeveloperMode((Boolean)newValue); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN: + setSidewaysFoldabeSeatPopupTimeMean((Double)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: - setLuggageProperties((LuggageProperties)newValue); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION: + setSidewaysFoldabeSeatPopupTimeDeviation((Double)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: - setPassengerProperties((PassengerProperties)newValue); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN: + setLiftingSeatPanPopupTimeMean((Double)newValue); return; - case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: - setPassengersBoardingPerMinute((Double)newValue); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION: + setLiftingSeatPanPopupTimeDeviation((Double)newValue); return; } super.eSet(featureID, newValue); @@ -805,56 +1111,73 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { + case CabinPackage.SIMULATION_PROPERTIES__RESULTS: + getResults().clear(); + return; + case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: + setLuggageProperties((LuggageProperties)null); + return; + case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: + setPassengerProperties((PassengerProperties)null); + return; + case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: + setPassengersBoardingPerMinute(PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT); + return; + case CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT: + setLayoutConcept(LAYOUT_CONCEPT_EDEFAULT); + return; + case CabinPackage.SIMULATION_PROPERTIES__SCALE: + setScale(SCALE_EDEFAULT); + return; + case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: + setSimulationSpeedFactor(SIMULATION_SPEED_FACTOR_EDEFAULT); + return; + case CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS: + setUsePresetSettings(USE_PRESET_SETTINGS_EDEFAULT); + return; case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: setSimulateWithoutUI(SIMULATE_WITHOUT_UI_EDEFAULT); return; case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: setNumberOfSimulationLoops(NUMBER_OF_SIMULATION_LOOPS_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS: - setRandomSortBetweenLoops(RANDOM_SORT_BETWEEN_LOOPS_EDEFAULT); + case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: + setDeveloperMode(DEVELOPER_MODE_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS: - setUseFoldableSeats(USE_FOLDABLE_SEATS_EDEFAULT); + case CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT: + setDataExport(DATA_EXPORT_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT: - setBringYourOwnSeat(BRING_YOUR_OWN_SEAT_EDEFAULT); + case CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP: + setDisplayMap(DISPLAY_MAP_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__RESULTS: - getResults().clear(); + case CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS: + setSortPassengerBetweenLoops(SORT_PASSENGER_BETWEEN_LOOPS_EDEFAULT); return; case CabinPackage.SIMULATION_PROPERTIES__SORTING: setSorting(SORTING_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: - setSimulationSpeedFactor(SIMULATION_SPEED_FACTOR_EDEFAULT); - return; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: - setSeatInterferenceStandingUpPassengerWaitingTime(SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT); - return; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME: - setSeatInterferenceProcessTime(SEAT_INTERFERENCE_PROCESS_TIME_EDEFAULT); - return; case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: setThreadSleepTimeDefault(THREAD_SLEEP_TIME_DEFAULT_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: - setDeveloperMode(DEVELOPER_MODE_EDEFAULT); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN: + setSidewaysFoldabeSeatPopupTimeMean(SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: - setLuggageProperties((LuggageProperties)null); + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION: + setSidewaysFoldabeSeatPopupTimeDeviation(SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: - setPassengerProperties((PassengerProperties)null); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN: + setLiftingSeatPanPopupTimeMean(LIFTING_SEAT_PAN_POPUP_TIME_MEAN_EDEFAULT); return; - case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: - setPassengersBoardingPerMinute(PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT); + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION: + setLiftingSeatPanPopupTimeDeviation(LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION_EDEFAULT); return; } super.eUnset(featureID); @@ -862,80 +1185,105 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: - return simulateWithoutUI != SIMULATE_WITHOUT_UI_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: - return numberOfSimulationLoops != NUMBER_OF_SIMULATION_LOOPS_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__RANDOM_SORT_BETWEEN_LOOPS: - return randomSortBetweenLoops != RANDOM_SORT_BETWEEN_LOOPS_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__USE_FOLDABLE_SEATS: - return useFoldableSeats != USE_FOLDABLE_SEATS_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__BRING_YOUR_OWN_SEAT: - return bringYourOwnSeat != BRING_YOUR_OWN_SEAT_EDEFAULT; case CabinPackage.SIMULATION_PROPERTIES__RESULTS: return results != null && !results.isEmpty(); - case CabinPackage.SIMULATION_PROPERTIES__SORTING: - return sorting != SORTING_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: - return simulationSpeedFactor != SIMULATION_SPEED_FACTOR_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME: - return seatInterferenceStandingUpPassengerWaitingTime != SEAT_INTERFERENCE_STANDING_UP_PASSENGER_WAITING_TIME_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__SEAT_INTERFERENCE_PROCESS_TIME: - return seatInterferenceProcessTime != SEAT_INTERFERENCE_PROCESS_TIME_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: - return threadSleepTimeDefault != THREAD_SLEEP_TIME_DEFAULT_EDEFAULT; - case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: - return developerMode != DEVELOPER_MODE_EDEFAULT; case CabinPackage.SIMULATION_PROPERTIES__LUGGAGE_PROPERTIES: return luggageProperties != null; case CabinPackage.SIMULATION_PROPERTIES__PASSENGER_PROPERTIES: return passengerProperties != null; case CabinPackage.SIMULATION_PROPERTIES__PASSENGERS_BOARDING_PER_MINUTE: return passengersBoardingPerMinute != PASSENGERS_BOARDING_PER_MINUTE_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__LAYOUT_CONCEPT: + return layoutConcept != LAYOUT_CONCEPT_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SCALE: + return scale != SCALE_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SIMULATION_SPEED_FACTOR: + return simulationSpeedFactor != SIMULATION_SPEED_FACTOR_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__USE_PRESET_SETTINGS: + return usePresetSettings != USE_PRESET_SETTINGS_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SIMULATE_WITHOUT_UI: + return simulateWithoutUI != SIMULATE_WITHOUT_UI_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__NUMBER_OF_SIMULATION_LOOPS: + return numberOfSimulationLoops != NUMBER_OF_SIMULATION_LOOPS_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__DEVELOPER_MODE: + return developerMode != DEVELOPER_MODE_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__DATA_EXPORT: + return dataExport != DATA_EXPORT_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__DISPLAY_MAP: + return displayMap != DISPLAY_MAP_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SORT_PASSENGER_BETWEEN_LOOPS: + return sortPassengerBetweenLoops != SORT_PASSENGER_BETWEEN_LOOPS_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SORTING: + return sorting != SORTING_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__THREAD_SLEEP_TIME_DEFAULT: + return threadSleepTimeDefault != THREAD_SLEEP_TIME_DEFAULT_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN: + return sidewaysFoldabeSeatPopupTimeMean != SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_MEAN_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION: + return sidewaysFoldabeSeatPopupTimeDeviation != SIDEWAYS_FOLDABE_SEAT_POPUP_TIME_DEVIATION_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_MEAN: + return liftingSeatPanPopupTimeMean != LIFTING_SEAT_PAN_POPUP_TIME_MEAN_EDEFAULT; + case CabinPackage.SIMULATION_PROPERTIES__LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION: + return liftingSeatPanPopupTimeDeviation != LIFTING_SEAT_PAN_POPUP_TIME_DEVIATION_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (simulateWithoutUI: "); + result.append(" (passengersBoardingPerMinute: "); + result.append(passengersBoardingPerMinute); + result.append(", layoutConcept: "); + result.append(layoutConcept); + result.append(", scale: "); + result.append(scale); + result.append(", simulationSpeedFactor: "); + result.append(simulationSpeedFactor); + result.append(", usePresetSettings: "); + result.append(usePresetSettings); + result.append(", simulateWithoutUI: "); result.append(simulateWithoutUI); result.append(", numberOfSimulationLoops: "); result.append(numberOfSimulationLoops); - result.append(", randomSortBetweenLoops: "); - result.append(randomSortBetweenLoops); - result.append(", useFoldableSeats: "); - result.append(useFoldableSeats); - result.append(", bringYourOwnSeat: "); - result.append(bringYourOwnSeat); + result.append(", developerMode: "); + result.append(developerMode); + result.append(", dataExport: "); + result.append(dataExport); + result.append(", displayMap: "); + result.append(displayMap); + result.append(", sortPassengerBetweenLoops: "); + result.append(sortPassengerBetweenLoops); result.append(", sorting: "); result.append(sorting); - result.append(", simulationSpeedFactor: "); - result.append(simulationSpeedFactor); - result.append(", seatInterferenceStandingUpPassengerWaitingTime: "); - result.append(seatInterferenceStandingUpPassengerWaitingTime); - result.append(", seatInterferenceProcessTime: "); - result.append(seatInterferenceProcessTime); result.append(", threadSleepTimeDefault: "); result.append(threadSleepTimeDefault); - result.append(", developerMode: "); - result.append(developerMode); - result.append(", passengersBoardingPerMinute: "); - result.append(passengersBoardingPerMinute); + result.append(", sidewaysFoldabeSeatPopupTimeMean: "); + result.append(sidewaysFoldabeSeatPopupTimeMean); + result.append(", sidewaysFoldabeSeatPopupTimeDeviation: "); + result.append(sidewaysFoldabeSeatPopupTimeDeviation); + result.append(", liftingSeatPanPopupTimeMean: "); + result.append(liftingSeatPanPopupTimeMean); + result.append(", liftingSeatPanPopupTimeDeviation: "); + result.append(liftingSeatPanPopupTimeDeviation); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationResultImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationResultImpl.java index ef8562d9..34e96da1 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationResultImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/SimulationResultImpl.java @@ -10,6 +10,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import net.bhl.cdt.paxelerate.model.CabinPackage; +import net.bhl.cdt.paxelerate.model.LayoutConcept; import net.bhl.cdt.paxelerate.model.SimulationResult; /** @@ -26,6 +27,9 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getId Id}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getDate Date}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getBoardingTimeString Boarding Time String}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getWaymakingSkipped Waymaking Skipped}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getWaymakingCompleted Waymaking Completed}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.SimulationResultImpl#getLayoutConceptType Layout Concept Type}
  • * * * @generated @@ -152,9 +156,70 @@ public class SimulationResultImpl extends MinimalEObjectImpl.Container implement protected String boardingTimeString = BOARDING_TIME_STRING_EDEFAULT; /** + * The default value of the '{@link #getWaymakingSkipped() Waymaking Skipped}' attribute. * * + * @see #getWaymakingSkipped() * @generated + * @ordered + */ + protected static final int WAYMAKING_SKIPPED_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getWaymakingSkipped() Waymaking Skipped}' attribute. + * + * + * @see #getWaymakingSkipped() + * @generated + * @ordered + */ + protected int waymakingSkipped = WAYMAKING_SKIPPED_EDEFAULT; + + /** + * The default value of the '{@link #getWaymakingCompleted() Waymaking Completed}' attribute. + * + * + * @see #getWaymakingCompleted() + * @generated + * @ordered + */ + protected static final int WAYMAKING_COMPLETED_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getWaymakingCompleted() Waymaking Completed}' attribute. + * + * + * @see #getWaymakingCompleted() + * @generated + * @ordered + */ + protected int waymakingCompleted = WAYMAKING_COMPLETED_EDEFAULT; + + /** + * The default value of the '{@link #getLayoutConceptType() Layout Concept Type}' attribute. + * + * + * @see #getLayoutConceptType() + * @generated + * @ordered + */ + protected static final LayoutConcept LAYOUT_CONCEPT_TYPE_EDEFAULT = LayoutConcept.DEFAULT; + + /** + * The cached value of the '{@link #getLayoutConceptType() Layout Concept Type}' attribute. + * + * + * @see #getLayoutConceptType() + * @generated + * @ordered + */ + protected LayoutConcept layoutConceptType = LAYOUT_CONCEPT_TYPE_EDEFAULT; + + /** + * + * . + * + * @generated */ protected SimulationResultImpl() { super(); @@ -162,8 +227,10 @@ protected SimulationResultImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -172,8 +239,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the boarding time + * @generated */ public double getBoardingTime() { return boardingTime; @@ -181,8 +250,10 @@ public double getBoardingTime() { /** * - * - * @generated + * . + * + * @param newBoardingTime the new boarding time + * @generated */ public void setBoardingTime(double newBoardingTime) { double oldBoardingTime = boardingTime; @@ -193,8 +264,10 @@ public void setBoardingTime(double newBoardingTime) { /** * - * - * @generated + * . + * + * @return the passengers + * @generated */ public int getPassengers() { return passengers; @@ -202,8 +275,10 @@ public int getPassengers() { /** * - * - * @generated + * . + * + * @param newPassengers the new passengers + * @generated */ public void setPassengers(int newPassengers) { int oldPassengers = passengers; @@ -214,8 +289,10 @@ public void setPassengers(int newPassengers) { /** * - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; @@ -223,8 +300,10 @@ public String getName() { /** * - * - * @generated + * . + * + * @param newName the new name + * @generated */ public void setName(String newName) { String oldName = name; @@ -235,8 +314,10 @@ public void setName(String newName) { /** * - * - * @generated + * . + * + * @return the id + * @generated */ public int getId() { return id; @@ -244,8 +325,10 @@ public int getId() { /** * - * - * @generated + * . + * + * @param newId the new id + * @generated */ public void setId(int newId) { int oldId = id; @@ -256,8 +339,10 @@ public void setId(int newId) { /** * - * - * @generated + * . + * + * @return the date + * @generated */ public Date getDate() { return date; @@ -265,8 +350,10 @@ public Date getDate() { /** * - * - * @generated + * . + * + * @param newDate the new date + * @generated */ public void setDate(Date newDate) { Date oldDate = date; @@ -277,8 +364,10 @@ public void setDate(Date newDate) { /** * - * - * @generated + * . + * + * @return the boarding time string + * @generated */ public String getBoardingTimeString() { return boardingTimeString; @@ -286,8 +375,10 @@ public String getBoardingTimeString() { /** * - * - * @generated + * . + * + * @param newBoardingTimeString the new boarding time string + * @generated */ public void setBoardingTimeString(String newBoardingTimeString) { String oldBoardingTimeString = boardingTimeString; @@ -301,6 +392,74 @@ public void setBoardingTimeString(String newBoardingTimeString) { * * @generated */ + public int getWaymakingSkipped() { + return waymakingSkipped; + } + + /** + * + * + * @generated + */ + public void setWaymakingSkipped(int newWaymakingSkipped) { + int oldWaymakingSkipped = waymakingSkipped; + waymakingSkipped = newWaymakingSkipped; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED, oldWaymakingSkipped, waymakingSkipped)); + } + + /** + * + * + * @generated + */ + public int getWaymakingCompleted() { + return waymakingCompleted; + } + + /** + * + * + * @generated + */ + public void setWaymakingCompleted(int newWaymakingCompleted) { + int oldWaymakingCompleted = waymakingCompleted; + waymakingCompleted = newWaymakingCompleted; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED, oldWaymakingCompleted, waymakingCompleted)); + } + + /** + * + * + * @generated + */ + public LayoutConcept getLayoutConceptType() { + return layoutConceptType; + } + + /** + * + * + * @generated + */ + public void setLayoutConceptType(LayoutConcept newLayoutConceptType) { + LayoutConcept oldLayoutConceptType = layoutConceptType; + layoutConceptType = newLayoutConceptType == null ? LAYOUT_CONCEPT_TYPE_EDEFAULT : newLayoutConceptType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE, oldLayoutConceptType, layoutConceptType)); + } + + /** + * + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { @@ -316,14 +475,23 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getDate(); case CabinPackage.SIMULATION_RESULT__BOARDING_TIME_STRING: return getBoardingTimeString(); + case CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED: + return getWaymakingSkipped(); + case CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED: + return getWaymakingCompleted(); + case CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE: + return getLayoutConceptType(); } return super.eGet(featureID, resolve, coreType); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -346,14 +514,25 @@ public void eSet(int featureID, Object newValue) { case CabinPackage.SIMULATION_RESULT__BOARDING_TIME_STRING: setBoardingTimeString((String)newValue); return; + case CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED: + setWaymakingSkipped((Integer)newValue); + return; + case CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED: + setWaymakingCompleted((Integer)newValue); + return; + case CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE: + setLayoutConceptType((LayoutConcept)newValue); + return; } super.eSet(featureID, newValue); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -376,14 +555,26 @@ public void eUnset(int featureID) { case CabinPackage.SIMULATION_RESULT__BOARDING_TIME_STRING: setBoardingTimeString(BOARDING_TIME_STRING_EDEFAULT); return; + case CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED: + setWaymakingSkipped(WAYMAKING_SKIPPED_EDEFAULT); + return; + case CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED: + setWaymakingCompleted(WAYMAKING_COMPLETED_EDEFAULT); + return; + case CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE: + setLayoutConceptType(LAYOUT_CONCEPT_TYPE_EDEFAULT); + return; } super.eUnset(featureID); } /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -400,14 +591,22 @@ public boolean eIsSet(int featureID) { return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date); case CabinPackage.SIMULATION_RESULT__BOARDING_TIME_STRING: return BOARDING_TIME_STRING_EDEFAULT == null ? boardingTimeString != null : !BOARDING_TIME_STRING_EDEFAULT.equals(boardingTimeString); + case CabinPackage.SIMULATION_RESULT__WAYMAKING_SKIPPED: + return waymakingSkipped != WAYMAKING_SKIPPED_EDEFAULT; + case CabinPackage.SIMULATION_RESULT__WAYMAKING_COMPLETED: + return waymakingCompleted != WAYMAKING_COMPLETED_EDEFAULT; + case CabinPackage.SIMULATION_RESULT__LAYOUT_CONCEPT_TYPE: + return layoutConceptType != LAYOUT_CONCEPT_TYPE_EDEFAULT; } return super.eIsSet(featureID); } /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -426,6 +625,12 @@ public String toString() { result.append(date); result.append(", boardingTimeString: "); result.append(boardingTimeString); + result.append(", waymakingSkipped: "); + result.append(waymakingSkipped); + result.append(", waymakingCompleted: "); + result.append(waymakingCompleted); + result.append(", layoutConceptType: "); + result.append(layoutConceptType); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StairwayImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StairwayImpl.java index bb4a2040..aed2f260 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StairwayImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StairwayImpl.java @@ -46,8 +46,9 @@ public class StairwayImpl extends PhysicalObjectImpl implements Stairway { /** * - * - * @generated + * . + * + * @generated */ protected StairwayImpl() { super(); @@ -55,8 +56,10 @@ protected StairwayImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -65,8 +68,10 @@ protected EClass eStaticClass() { /** * - * - * @generated + * . + * + * @return the direction + * @generated */ public StairwayDirection getDirection() { return direction; @@ -74,8 +79,10 @@ public StairwayDirection getDirection() { /** * - * - * @generated + * . + * + * @param newDirection the new direction + * @generated */ public void setDirection(StairwayDirection newDirection) { StairwayDirection oldDirection = direction; @@ -86,8 +93,13 @@ public void setDirection(StairwayDirection newDirection) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -100,8 +112,11 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @Override public void eSet(int featureID, Object newValue) { @@ -115,8 +130,10 @@ public void eSet(int featureID, Object newValue) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -130,8 +147,11 @@ public void eUnset(int featureID) { /** * - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -144,8 +164,10 @@ public boolean eIsSet(int featureID) { /** * - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StandardDoorImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StandardDoorImpl.java deleted file mode 100644 index 5781c48a..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StandardDoorImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package net.bhl.cdt.paxelerate.model.impl; - -import org.eclipse.emf.ecore.EClass; - -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.StandardDoor; - -/** - * - * An implementation of the model object 'Standard Door'. - * - * - * @generated - */ -public class StandardDoorImpl extends DoorImpl implements StandardDoor { - /** - * - * - * @generated - */ - protected StandardDoorImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return CabinPackage.Literals.STANDARD_DOOR; - } - -} //StandardDoorImpl diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StowageImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StowageImpl.java index ec353406..784a99f6 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StowageImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/StowageImpl.java @@ -15,10 +15,12 @@ * @generated */ public class StowageImpl extends PhysicalObjectImpl implements Stowage { + /** * - * - * @generated + * . + * + * @generated */ protected StowageImpl() { super(); @@ -26,8 +28,10 @@ protected StowageImpl() { /** * - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/TravelClassImpl.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/TravelClassImpl.java index 4aeec8df..6f1919bf 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/TravelClassImpl.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/TravelClassImpl.java @@ -22,6 +22,7 @@ import net.bhl.cdt.paxelerate.model.CabinPackage; import net.bhl.cdt.paxelerate.model.Row; import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.model.TravelOption; import net.bhl.cdt.paxelerate.model.util.CabinValidator; import net.bhl.cdt.paxelerate.util.input.InputChecker; @@ -42,11 +43,12 @@ *
  • {@link net.bhl.cdt.paxelerate.model.impl.TravelClassImpl#getName Name}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.TravelClassImpl#getRowStructure Row Structure}
  • *
  • {@link net.bhl.cdt.paxelerate.model.impl.TravelClassImpl#getLoadFactor Load Factor}
  • + *
  • {@link net.bhl.cdt.paxelerate.model.impl.TravelClassImpl#getTravelOption Travel Option}
  • * * * @generated */ -public abstract class TravelClassImpl extends MinimalEObjectImpl.Container implements +public class TravelClassImpl extends MinimalEObjectImpl.Container implements TravelClass { /** * The cached value of the '{@link #getRows() Rows}' containment reference list. @@ -217,7 +219,7 @@ public abstract class TravelClassImpl extends MinimalEObjectImpl.Container imple * @generated * @ordered */ - protected static final int LOAD_FACTOR_EDEFAULT = 0; + protected static final double LOAD_FACTOR_EDEFAULT = 0.0; /** * The cached value of the '{@link #getLoadFactor() Load Factor}' attribute. @@ -227,19 +229,42 @@ public abstract class TravelClassImpl extends MinimalEObjectImpl.Container imple * @generated * @ordered */ - protected int loadFactor = LOAD_FACTOR_EDEFAULT; + protected double loadFactor = LOAD_FACTOR_EDEFAULT; /** - * + * The default value of the '{@link #getTravelOption() Travel Option}' attribute. + * + * + * @see #getTravelOption() * @generated + * @ordered + */ + protected static final TravelOption TRAVEL_OPTION_EDEFAULT = TravelOption.ECONOMY_CLASS; + + /** + * The cached value of the '{@link #getTravelOption() Travel Option}' attribute. + * + * + * @see #getTravelOption() + * @generated + * @ordered + */ + protected TravelOption travelOption = TRAVEL_OPTION_EDEFAULT; + + /** + * . + * + * @generated */ protected TravelClassImpl() { super(); } /** - * - * @generated + * . + * + * @return the e class + * @generated */ @Override protected EClass eStaticClass() { @@ -247,8 +272,10 @@ protected EClass eStaticClass() { } /** - * - * @generated + * . + * + * @return the rows + * @generated */ public EList getRows() { if (rows == null) { @@ -258,16 +285,20 @@ public EList getRows() { } /** - * - * @generated + * . + * + * @return the sequence + * @generated */ public int getSequence() { return sequence; } /** - * - * @generated + * . + * + * @param newSequence the new sequence + * @generated */ public void setSequence(int newSequence) { int oldSequence = sequence; @@ -277,16 +308,20 @@ public void setSequence(int newSequence) { } /** - * - * @generated + * . + * + * @return the passengers + * @generated */ public int getPassengers() { return passengers; } /** - * - * @generated + * . + * + * @param newPassengers the new passengers + * @generated */ public void setPassengers(int newPassengers) { int oldPassengers = passengers; @@ -296,16 +331,20 @@ public void setPassengers(int newPassengers) { } /** - * - * @generated + * . + * + * @return the available seats + * @generated */ public int getAvailableSeats() { return availableSeats; } /** - * - * @generated + * . + * + * @param newAvailableSeats the new available seats + * @generated */ public void setAvailableSeats(int newAvailableSeats) { int oldAvailableSeats = availableSeats; @@ -315,16 +354,20 @@ public void setAvailableSeats(int newAvailableSeats) { } /** - * - * @generated + * . + * + * @return the seat pitch + * @generated */ public int getSeatPitch() { return seatPitch; } /** - * - * @generated + * . + * + * @param newSeatPitch the new seat pitch + * @generated */ public void setSeatPitch(int newSeatPitch) { int oldSeatPitch = seatPitch; @@ -335,8 +378,10 @@ public void setSeatPitch(int newSeatPitch) { /** * - * - * @generated + * . + * + * @return the x dimension of seats + * @generated */ public int getXDimensionOfSeats() { return xDimensionOfSeats; @@ -344,8 +389,10 @@ public int getXDimensionOfSeats() { /** * - * - * @generated + * . + * + * @param newXDimensionOfSeats the new x dimension of seats + * @generated */ public void setXDimensionOfSeats(int newXDimensionOfSeats) { int oldXDimensionOfSeats = xDimensionOfSeats; @@ -356,8 +403,10 @@ public void setXDimensionOfSeats(int newXDimensionOfSeats) { /** * - * - * @generated + * . + * + * @return the y dimension of seats + * @generated */ public int getYDimensionOfSeats() { return yDimensionOfSeats; @@ -365,8 +414,10 @@ public int getYDimensionOfSeats() { /** * - * - * @generated + * . + * + * @param newYDimensionOfSeats the new y dimension of seats + * @generated */ public void setYDimensionOfSeats(int newYDimensionOfSeats) { int oldYDimensionOfSeats = yDimensionOfSeats; @@ -376,16 +427,20 @@ public void setYDimensionOfSeats(int newYDimensionOfSeats) { } /** - * - * @generated + * . + * + * @return the name + * @generated */ public String getName() { return name; } /** - * - * @generated + * . + * + * @param newName the new name + * @generated */ public void setName(String newName) { String oldName = name; @@ -395,16 +450,20 @@ public void setName(String newName) { } /** - * - * @generated + * . + * + * @return the row structure + * @generated */ public String getRowStructure() { return rowStructure; } /** - * - * @generated + * . + * + * @param newRowStructure the new row structure + * @generated */ public void setRowStructure(String newRowStructure) { String oldRowStructure = rowStructure; @@ -415,37 +474,63 @@ public void setRowStructure(String newRowStructure) { /** * - * - * @generated + * . + * + * @return the load factor + * @generated */ - public int getLoadFactor() { + public double getLoadFactor() { return loadFactor; } /** * - * - * @generated + * . + * + * @param newLoadFactor the new load factor + * @generated */ - public void setLoadFactor(int newLoadFactor) { - int oldLoadFactor = loadFactor; + public void setLoadFactor(double newLoadFactor) { + double oldLoadFactor = loadFactor; loadFactor = newLoadFactor; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.TRAVEL_CLASS__LOAD_FACTOR, oldLoadFactor, loadFactor)); } /** - * - * + * + * . + * + * @return the travel option + * @generated + */ + public TravelOption getTravelOption() { + return travelOption; + } + + /** + * + * . + * + * @param newTravelOption the new travel option + * @generated + */ + public void setTravelOption(TravelOption newTravelOption) { + TravelOption oldTravelOption = travelOption; + travelOption = newTravelOption == null ? TRAVEL_OPTION_EDEFAULT : newTravelOption; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION, oldTravelOption, travelOption)); + } + + /** + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful * @generated NOT */ public boolean tooManyPassengers(DiagnosticChain chain, Map context) { - // TODO: implement this method - // -> specify the condition that violates the invariant - // -> verify the details of the diagnostic, including severity and - // message - // Ensure that you remove @generated or mark it @generated NOT - if (getAvailableSeats() < getPassengers()) { if (chain != null) { chain.add(new BasicDiagnostic(Diagnostic.ERROR, @@ -463,16 +548,14 @@ public boolean tooManyPassengers(DiagnosticChain chain, Map context) { } /** - * - * + * . + * + * @param chain the chain + * @param context the context + * @return true, if successful * @generated NOT */ public boolean wrongRowStructure(DiagnosticChain chain, Map context) { - // TODO: implement this method - // -> specify the condition that violates the invariant - // -> verify the details of the diagnostic, including severity and - // message - // Ensure that you remove @generated or mark it @generated NOT if (!InputChecker.noIssuesDetected(getRowStructure())) { if (chain != null) { chain.add(new BasicDiagnostic(Diagnostic.ERROR, @@ -490,8 +573,13 @@ public boolean wrongRowStructure(DiagnosticChain chain, Map context) { } /** - * - * @generated + * . + * + * @param otherEnd the other end + * @param featureID the feature id + * @param msgs the msgs + * @return the notification chain + * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, @@ -504,8 +592,13 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param resolve the resolve + * @param coreType the core type + * @return the object + * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { @@ -530,13 +623,18 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getRowStructure(); case CabinPackage.TRAVEL_CLASS__LOAD_FACTOR: return getLoadFactor(); + case CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION: + return getTravelOption(); } return super.eGet(featureID, resolve, coreType); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @param newValue the new value + * @generated */ @SuppressWarnings("unchecked") @Override @@ -571,15 +669,20 @@ public void eSet(int featureID, Object newValue) { setRowStructure((String)newValue); return; case CabinPackage.TRAVEL_CLASS__LOAD_FACTOR: - setLoadFactor((Integer)newValue); + setLoadFactor((Double)newValue); + return; + case CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION: + setTravelOption((TravelOption)newValue); return; } super.eSet(featureID, newValue); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @generated */ @Override public void eUnset(int featureID) { @@ -614,13 +717,19 @@ public void eUnset(int featureID) { case CabinPackage.TRAVEL_CLASS__LOAD_FACTOR: setLoadFactor(LOAD_FACTOR_EDEFAULT); return; + case CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION: + setTravelOption(TRAVEL_OPTION_EDEFAULT); + return; } super.eUnset(featureID); } /** - * - * @generated + * . + * + * @param featureID the feature id + * @return true, if successful + * @generated */ @Override public boolean eIsSet(int featureID) { @@ -645,13 +754,20 @@ public boolean eIsSet(int featureID) { return ROW_STRUCTURE_EDEFAULT == null ? rowStructure != null : !ROW_STRUCTURE_EDEFAULT.equals(rowStructure); case CabinPackage.TRAVEL_CLASS__LOAD_FACTOR: return loadFactor != LOAD_FACTOR_EDEFAULT; + case CabinPackage.TRAVEL_CLASS__TRAVEL_OPTION: + return travelOption != TRAVEL_OPTION_EDEFAULT; } return super.eIsSet(featureID); } /** - * - * @generated + * . + * + * @param operationID the operation id + * @param arguments the arguments + * @return the object + * @throws InvocationTargetException the invocation target exception + * @generated */ @Override public Object eInvoke(int operationID, EList arguments) @@ -666,8 +782,10 @@ public Object eInvoke(int operationID, EList arguments) } /** - * - * @generated + * . + * + * @return the string + * @generated */ @Override public String toString() { @@ -692,6 +810,8 @@ public String toString() { result.append(rowStructure); result.append(", loadFactor: "); result.append(loadFactor); + result.append(", travelOption: "); + result.append(travelOption); result.append(')'); return result.toString(); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/model.ecore b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/model.ecore index ee0c97da..a4b59a57 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/model.ecore +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/impl/model.ecore @@ -9,12 +9,14 @@ - + + eType="#//SimulationProperties" containment="true"/> + - - - -
    - - + @@ -80,13 +75,11 @@ defaultValueLiteral="Placeholder String"/> - + - - - - @@ -96,8 +89,8 @@ - + @@ -106,12 +99,11 @@ - + - - + + @@ -123,19 +115,24 @@ defaultValueLiteral="2.0"/> - - + + + + + @@ -169,7 +166,7 @@ - + @@ -180,10 +177,9 @@ defaultValueLiteral="true"/> + - - - @@ -198,33 +194,12 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="100"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/> + + + @@ -300,7 +310,7 @@ + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="1"/> + + + + + + + @@ -328,4 +352,15 @@ + + + + + + + + + + + diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Observer.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Observer.java index 4d364144..9797ba4e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Observer.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Observer.java @@ -7,12 +7,22 @@ /** - * TODO: Description + * TODO: Description. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public abstract class Observer { + /** The observed subject. */ Subject observedSubject; + /** + * Update. + * + * @param i the i + */ public abstract void update(int i); } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Subject.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Subject.java index 6c04520b..f7267ce0 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Subject.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/observer/Subject.java @@ -7,22 +7,32 @@ /** * TODO: Description + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ import java.util.ArrayList; import java.util.List; +/** + * The Class Subject. + */ public class Subject { + + /** The observers. */ private List observers = new ArrayList(); /** - * TODO: Description + * TODO: Description. */ public Subject() { } /** - * TODO: Description + * TODO: Description. + * + * @param o the o */ public void subscribe(Observer o) { @@ -31,7 +41,9 @@ public void subscribe(Observer o) } /** - * TODO: Description + * TODO: Description. + * + * @param o the o */ public void unsubscribe(Observer o) { @@ -39,7 +51,9 @@ public void unsubscribe(Observer o) } /** - * TODO: Description + * TODO: Description. + * + * @param i the i */ public void notifyObservers(int i){ for (Observer o : observers) { diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/AgeStorage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/AgeStorage.java index 3a030266..d4ee193a 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/AgeStorage.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/AgeStorage.java @@ -8,28 +8,49 @@ import net.bhl.cdt.paxelerate.model.Sex; +/** + * The Class AgeStorage. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class AgeStorage { + /** The ages total. */ private int[] agesMale = new int[100], agesFemale = new int[100], agesTotal = new int[100]; + /** The minimum age total. */ private int minimumAgeMale = Integer.MAX_VALUE, minimumAgeFemale = Integer.MAX_VALUE, minimumAgeTotal = Integer.MAX_VALUE; + /** The maximum age total. */ private int maximumAgeMale = 0, maximumAgeFemale = 0, maximumAgeTotal = 0; + /** The age sum total. */ private int ageSumTotal = 0; + /** The number of age values total. */ private int numberOfAgeValuesTotal = 0; + /** The average age total. */ private double averageAgeTotal = 0; + /** The maximum amount of one age total. */ private int maximumAmountOfOneAgeMale = 0, maximumAmountOfOneAgeFemale = 0, maximumAmountOfOneAgeTotal; + /** The minimum amount of one age female. */ private int minimumAmountOfOneAgeMale = 0, minimumAmountOfOneAgeFemale = 0; + /** + * Adds the value. + * + * @param sex the sex + * @param age the age + */ public void addValue(Sex sex, int age) { if (sex == Sex.MALE) { agesMale[age] += 1; @@ -50,6 +71,12 @@ public void addValue(Sex sex, int age) { numberOfAgeValuesTotal++; } + /** + * Update maximum age. + * + * @param sex the sex + * @param age the age + */ public void updateMaximumAge(Sex sex, int age) { if (sex == Sex.MALE) { maximumAgeMale = Math.max(maximumAgeMale, age); @@ -60,6 +87,11 @@ public void updateMaximumAge(Sex sex, int age) { } } + /** + * Update average age. + * + * @param sex the sex + */ public void updateAverageAge(Sex sex) { if (sex == null) { averageAgeTotal = (double) ageSumTotal @@ -69,6 +101,12 @@ public void updateAverageAge(Sex sex) { } } + /** + * Update minimum age. + * + * @param sex the sex + * @param age the age + */ public void updateMinimumAge(Sex sex, int age) { if (sex == Sex.MALE) { minimumAgeMale = Math.min(minimumAgeMale, age); @@ -79,6 +117,9 @@ public void updateMinimumAge(Sex sex, int age) { } } + /** + * Update maximum amount. + */ public void updateMaximumAmount() { for (int ageAmount : agesMale) { @@ -95,6 +136,12 @@ public void updateMaximumAmount() { } } + /** + * Gets the data. + * + * @param sex the sex + * @return the data + */ public int[] getData(Sex sex) { if (sex == null) { return agesTotal; @@ -106,6 +153,12 @@ public int[] getData(Sex sex) { } } + /** + * Gets the average age. + * + * @param sex the sex + * @return the average age + */ public double getAverageAge(Sex sex) { updateAverageAge(sex); @@ -119,6 +172,12 @@ public double getAverageAge(Sex sex) { } + /** + * Gets the minimum age. + * + * @param sex the sex + * @return the minimum age + */ public int getMinimumAge(Sex sex) { if (sex == null) { return minimumAgeTotal; @@ -130,6 +189,12 @@ public int getMinimumAge(Sex sex) { } } + /** + * Gets the maximum age. + * + * @param sex the sex + * @return the maximum age + */ public int getMaximumAge(Sex sex) { if (sex == null) { return maximumAgeTotal; @@ -141,6 +206,12 @@ public int getMaximumAge(Sex sex) { } } + /** + * Gets the maximum amount. + * + * @param sex the sex + * @return the maximum amount + */ public int getMaximumAmount(Sex sex) { updateMaximumAmount(); @@ -154,6 +225,9 @@ public int getMaximumAmount(Sex sex) { } } + /** + * Clear. + */ public void clear() { agesMale = new int[100]; agesFemale = new int[100]; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/DistributionStorage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/DistributionStorage.java index 366077fc..da77da02 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/DistributionStorage.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/DistributionStorage.java @@ -8,28 +8,49 @@ import net.bhl.cdt.paxelerate.model.Sex; +/** + * The Class DistributionStorage. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class DistributionStorage { + /** The ages total. */ private int[] agesMale = new int[100], agesFemale = new int[100], agesTotal = new int[100]; + /** The minimum age total. */ private int minimumAgeMale = Integer.MAX_VALUE, minimumAgeFemale = Integer.MAX_VALUE, minimumAgeTotal = Integer.MAX_VALUE; + /** The maximum age total. */ private int maximumAgeMale = 0, maximumAgeFemale = 0, maximumAgeTotal = 0; + /** The age sum total. */ private int ageSumTotal = 0; + /** The number of age values total. */ private int numberOfAgeValuesTotal = 0; + /** The average age total. */ private double averageAgeTotal = 0; + /** The maximum amount of one age total. */ private int maximumAmountOfOneAgeMale = 0, maximumAmountOfOneAgeFemale = 0, maximumAmountOfOneAgeTotal; + /** The minimum amount of one age female. */ private int minimumAmountOfOneAgeMale = 0, minimumAmountOfOneAgeFemale = 0; + /** + * Adds the value. + * + * @param sex the sex + * @param age the age + */ public void addValue(Sex sex, int age) { if (sex == Sex.MALE) { agesMale[age] += 1; @@ -50,6 +71,12 @@ public void addValue(Sex sex, int age) { numberOfAgeValuesTotal++; } + /** + * Update maximum age. + * + * @param sex the sex + * @param age the age + */ public void updateMaximumAge(Sex sex, int age) { if (sex == Sex.MALE) { maximumAgeMale = Math.max(maximumAgeMale, age); @@ -60,6 +87,11 @@ public void updateMaximumAge(Sex sex, int age) { } } + /** + * Update average age. + * + * @param sex the sex + */ public void updateAverageAge(Sex sex) { if (sex == null) { averageAgeTotal = (double) ageSumTotal @@ -69,6 +101,12 @@ public void updateAverageAge(Sex sex) { } } + /** + * Update minimum age. + * + * @param sex the sex + * @param age the age + */ public void updateMinimumAge(Sex sex, int age) { if (sex == Sex.MALE) { minimumAgeMale = Math.min(minimumAgeMale, age); @@ -79,6 +117,9 @@ public void updateMinimumAge(Sex sex, int age) { } } + /** + * Update maximum amount. + */ public void updateMaximumAmount() { for (int ageAmount : agesMale) { @@ -95,6 +136,12 @@ public void updateMaximumAmount() { } } + /** + * Gets the data. + * + * @param sex the sex + * @return the data + */ public int[] getData(Sex sex) { if (sex == null) { return agesTotal; @@ -106,6 +153,12 @@ public int[] getData(Sex sex) { } } + /** + * Gets the average age. + * + * @param sex the sex + * @return the average age + */ public double getAverageAge(Sex sex) { updateAverageAge(sex); @@ -119,6 +172,12 @@ public double getAverageAge(Sex sex) { } + /** + * Gets the minimum age. + * + * @param sex the sex + * @return the minimum age + */ public int getMinimumAge(Sex sex) { if (sex == null) { return minimumAgeTotal; @@ -130,6 +189,12 @@ public int getMinimumAge(Sex sex) { } } + /** + * Gets the maximum age. + * + * @param sex the sex + * @return the maximum age + */ public int getMaximumAge(Sex sex) { if (sex == null) { return maximumAgeTotal; @@ -141,6 +206,12 @@ public int getMaximumAge(Sex sex) { } } + /** + * Gets the maximum amount. + * + * @param sex the sex + * @return the maximum amount + */ public int getMaximumAmount(Sex sex) { updateMaximumAmount(); @@ -154,6 +225,9 @@ public int getMaximumAmount(Sex sex) { } } + /** + * Clear. + */ public void clear() { agesMale = new int[100]; agesFemale = new int[100]; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/Exporter.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/Exporter.java deleted file mode 100644 index f30ca30d..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/Exporter.java +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************/ -package net.bhl.cdt.paxelerate.model.storage; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; -import java.text.DecimalFormat; -import java.util.ArrayList; - -import net.bhl.cdt.paxelerate.model.Sex; -import net.bhl.cdt.paxelerate.model.astar.AreaMap; -import net.bhl.cdt.paxelerate.model.astar.Node; - -@Deprecated -public class Exporter { - - private static final String FOLDER_NAME = "paxelerate", FILE_PATH = System - .getProperty("user.home") + "/Documents/" + FOLDER_NAME + "/"; - - public static boolean generateHeatmapFile(String filename, AreaMap areamap) { - try { - - // Create a path before creating the file! - File dir = new File(FILE_PATH); - dir.mkdir(); - - FileWriter writer = new FileWriter(FILE_PATH + filename + ".xls"); - for (ArrayList nodeList : areamap.getNodes()) { - for (Node node : nodeList) { - writer.append("" + node.getNumberOfOccupations()); - writer.append("\t"); - } - writer.append("\n"); - } - - writer.flush(); - writer.close(); - return true; - - } catch (FileNotFoundException e) { - return false; - } catch (IOException e) { - return false; - } - } - - public static boolean generateInterruptmapFile(String filename, - AreaMap areamap) { - - try { - // Create a path before creating the file! - File dir = new File(FILE_PATH); - dir.mkdir(); - FileWriter writer = new FileWriter(FILE_PATH + filename + ".xls"); - for (ArrayList nodeList : areamap.getNodes()) { - for (Node node : nodeList) { - writer.append("" + node.getNumberOfInterrupts()); - writer.append("\t"); - } - writer.append("\n"); - } - - writer.flush(); - writer.close(); - return true; - - } catch (FileNotFoundException e) { - return false; - } catch (IOException e) { - return false; - } - } - - static void generateDistributionFile(String sFileName, - GaussianStorage weight, GaussianStorage height, - GaussianStorage depth, GaussianStorage width, AgeStorage age, - LuggageStorage luggage, int[] pax) { - - try { - - // Create a path before creating the file! - File dir = new File(FILE_PATH); - dir.mkdir(); - - FileWriter writer = new FileWriter(FILE_PATH + sFileName + ".xls"); - - writeHeadline(writer); - writeGaussian(writer, weight, "Weight"); - writeGaussian(writer, height, "Height"); - writeGaussian(writer, depth, "Depth"); - writeGaussian(writer, width, "Width"); - - writer.flush(); - writer.close(); - - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - private static void writeHeadline(FileWriter writer) throws IOException, - FileNotFoundException { - writer.append("Type"); - writer.append('\t'); - writer.append("Maximum Value F"); - writer.append('\t'); - writer.append("Maximum Value M"); - writer.append('\t'); - writer.append("Minimum Value F"); - writer.append('\t'); - writer.append("Minimum Value M"); - writer.append('\t'); - writer.append("Average Value F"); - writer.append('\t'); - writer.append("Average Value M"); - writer.append('\t'); - writer.append("Sum Value F"); - writer.append('\t'); - writer.append("Sum Value M"); - writer.append('\t'); - writer.append("Amount Value F"); - writer.append('\t'); - writer.append("Amount Value M"); - writer.append('\n'); - } - - private static void writeGaussian(FileWriter writer, - GaussianStorage storage, String name) throws IOException, - FileNotFoundException { - writer.append(name); - writer.append('\t'); - writer.append(str(storage.getMaximum(Sex.FEMALE))); - writer.append('\t'); - writer.append(str(storage.getMaximum(Sex.MALE))); - writer.append('\t'); - writer.append(str(storage.getMinimum(Sex.FEMALE))); - writer.append('\t'); - writer.append(str(storage.getMinimum(Sex.MALE))); - writer.append('\t'); - writer.append(str(storage.getAverage(Sex.FEMALE))); - writer.append('\t'); - writer.append(str(storage.getAverage(Sex.MALE))); - writer.append('\t'); - writer.append(str(storage.getSum(Sex.FEMALE))); - writer.append('\t'); - writer.append(str(storage.getSum(Sex.MALE))); - writer.append('\t'); - writer.append(str(storage.getAmount(Sex.FEMALE))); - writer.append('\t'); - writer.append(str(storage.getAmount(Sex.MALE))); - writer.append('\n'); - } - - private static String str(double value) { - DecimalFormat df = new DecimalFormat("#.##"); - return df.format(value); - } -} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/GaussianStorage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/GaussianStorage.java index 4d567380..49c3988e 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/GaussianStorage.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/GaussianStorage.java @@ -8,29 +8,58 @@ import net.bhl.cdt.paxelerate.model.Sex; import net.bhl.cdt.paxelerate.model.storage.StorageHandler.StoreType; +/** + * The Class GaussianStorage. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class GaussianStorage { + /** The number male. */ private int numberFemale = 0, numberMale = 0; + /** The average male. */ private double averageFemale = 0, averageMale = 0; + /** The maximum male. */ private double maximumFemale = 0, maximumMale = 0; + /** The minimum male. */ private double minimumFemale = Integer.MAX_VALUE, minimumMale = Integer.MAX_VALUE; + /** The sum male. */ private double sumFemale = 0, sumMale = 0; + /** The type. */ private final StoreType type; + /** + * Instantiates a new gaussian storage. + * + * @param type the type + */ public GaussianStorage(StoreType type) { this.type = type; } + /** + * Gets the store type. + * + * @return the store type + */ public StoreType getStoreType() { return type; } + /** + * Adds the value. + * + * @param sex the sex + * @param value the value + */ public void addValue(Sex sex, double value) { if (sex == Sex.MALE) { numberMale++; @@ -45,12 +74,21 @@ public void addValue(Sex sex, double value) { updateMaximum(sex, value); } + /** + * Update average. + */ private void updateAverage() { averageMale = sumMale / (double) numberMale; averageFemale = sumFemale / (double) numberFemale; } + /** + * Update minimum. + * + * @param sex the sex + * @param value the value + */ private void updateMinimum(Sex sex, double value) { if (sex == Sex.MALE) { minimumMale = Math.min(value, minimumMale); @@ -59,6 +97,12 @@ private void updateMinimum(Sex sex, double value) { } } + /** + * Update maximum. + * + * @param sex the sex + * @param value the value + */ private void updateMaximum(Sex sex, double value) { if (sex == Sex.MALE) { maximumMale = Math.max(maximumMale, value); @@ -68,6 +112,12 @@ private void updateMaximum(Sex sex, double value) { } + /** + * Gets the maximum. + * + * @param sex the sex + * @return the maximum + */ public double getMaximum(Sex sex) { if (sex == Sex.MALE) { return maximumMale; @@ -76,6 +126,12 @@ public double getMaximum(Sex sex) { } } + /** + * Gets the minimum. + * + * @param sex the sex + * @return the minimum + */ public double getMinimum(Sex sex) { if (sex == Sex.MALE) { return minimumMale; @@ -84,6 +140,12 @@ public double getMinimum(Sex sex) { } } + /** + * Gets the average. + * + * @param sex the sex + * @return the average + */ public double getAverage(Sex sex) { if (sex == Sex.MALE) { return averageMale; @@ -92,6 +154,12 @@ public double getAverage(Sex sex) { } } + /** + * Gets the sum. + * + * @param sex the sex + * @return the sum + */ public double getSum(Sex sex) { if (sex == Sex.MALE) { return sumMale; @@ -100,6 +168,12 @@ public double getSum(Sex sex) { } } + /** + * Gets the amount. + * + * @param sex the sex + * @return the amount + */ public double getAmount(Sex sex) { if (sex == Sex.MALE) { return numberMale; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/LuggageStorage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/LuggageStorage.java index a95d499b..eabf62a1 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/LuggageStorage.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/LuggageStorage.java @@ -7,15 +7,31 @@ import net.bhl.cdt.paxelerate.model.LuggageSize; +/** + * The Class LuggageStorage. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class LuggageStorage { + /** The big luggage count. */ private int counter = 0, noLuggageCount = 0, smallLuggageCount = 0, mediumLuggageCount = 0, bigLuggageCount = 0; + /** + * Instantiates a new luggage storage. + */ public LuggageStorage() { } + /** + * Adds the value. + * + * @param size the size + */ public void addValue(LuggageSize size) { counter++; @@ -36,6 +52,12 @@ public void addValue(LuggageSize size) { } } + /** + * Gets the luggage count. + * + * @param size the size + * @return the luggage count + */ public int getLuggageCount(LuggageSize size) { switch (size) { default: @@ -52,6 +74,12 @@ public int getLuggageCount(LuggageSize size) { } } + /** + * Gets the luggage percentage. + * + * @param size the size + * @return the luggage percentage + */ public double getLuggagePercentage(LuggageSize size) { try { switch (size) { @@ -68,10 +96,16 @@ public double getLuggagePercentage(LuggageSize size) { return bigLuggageCount / (double) counter; } } catch (ArithmeticException e) { + e.printStackTrace(); return 0; } } + /** + * Gets the amount. + * + * @return the amount + */ public int getAmount() { return counter; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/MoodStorage.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/MoodStorage.java new file mode 100644 index 00000000..cf2bc174 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/MoodStorage.java @@ -0,0 +1,93 @@ +package net.bhl.cdt.paxelerate.model.storage; + +import net.bhl.cdt.paxelerate.model.PassengerMood; + +/** + * The Class MoodStorage. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + * + */ +public class MoodStorage { + + /** The passive count. */ + private int counter = 0, aggressiveCount = 0, passiveCount = 0; + + /** + * Instantiates a new mood storage. + */ + public MoodStorage() { + + } + + /** + * Adds the value. + * + * @param type the type + */ + public void addValue(PassengerMood type) { + counter++; + + switch (type) { + default: + passiveCount++; + break; + case AGGRESSIVE: + aggressiveCount++; + break; + case PASSIVE: + passiveCount++; + break; + + } + + } + + /** + * Gets the mood count. + * + * @param type the type + * @return the mood count + */ + public int getMoodCount(PassengerMood type) { + switch (type) { + default: + return passiveCount; + + case PASSIVE: + return passiveCount; + + case AGGRESSIVE: + return aggressiveCount; + + } + } + + /** + * Gets the mood percentage. + * + * @param type the type + * @return the mood percentage + */ + public double getMoodPercentage(PassengerMood type) { + try { + switch (type) { + default: + return passiveCount / (double) counter; + + case PASSIVE: + return passiveCount / (double) counter; + + case AGGRESSIVE: + return aggressiveCount / (double) counter; + + } + } catch (ArithmeticException e) { + e.printStackTrace(); + return 0; + } + } + +} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/StorageHandler.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/StorageHandler.java index 8f466fe8..52b24b80 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/StorageHandler.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/storage/StorageHandler.java @@ -8,23 +8,46 @@ import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.Sex; +/** + * The Class StorageHandler. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class StorageHandler { + /** The width store. */ GaussianStorage weightStore = new GaussianStorage(StoreType.WEIGHT), heightStore = new GaussianStorage(StoreType.HEIGHT), depthStore = new GaussianStorage(StoreType.DEPTH), widthStore = new GaussianStorage(StoreType.WIDTH); + /** The age store. */ AgeStorage ageStore = new AgeStorage(); + + /** The mood store. */ + MoodStorage moodStore = new MoodStorage(); + /** The luggage store. */ LuggageStorage luggageStore = new LuggageStorage(); + /** The number of passengers. */ int[] numberOfPassengers = { 0, 0, 0 }; // total, male, female + /** + * Instantiates a new storage handler. + */ public StorageHandler() { } + /** + * Adds the passenger. + * + * @param pax + * the pax + */ public void addPassenger(Passenger pax) { weightStore.addValue(pax.getSex(), pax.getWeight()); @@ -33,6 +56,7 @@ public void addPassenger(Passenger pax) { widthStore.addValue(pax.getSex(), pax.getWidth()); luggageStore.addValue(pax.getLuggage()); ageStore.addValue(pax.getSex(), pax.getAge()); + moodStore.addValue(pax.getPassengerMood()); numberOfPassengers[0] += 1; if (pax.getSex() == Sex.MALE) { @@ -42,12 +66,32 @@ public void addPassenger(Passenger pax) { } if (numberOfPassengers[0] > 179) { - Exporter.generateDistributionFile("export", weightStore, heightStore, - depthStore, widthStore, ageStore, luggageStore, - numberOfPassengers); + /* + * Exporter.generateDistributionFile("export", weightStore, + * heightStore, depthStore, widthStore, ageStore, luggageStore, + * numberOfPassengers) + */; } } + /** + * Gets the storage data. + * + * @return the storage data + */ + public Object[] getStorageData() { + Object[] storageData = { weightStore, heightStore, depthStore, + widthStore, ageStore, luggageStore, numberOfPassengers, moodStore }; + return storageData; + } + + /** + * Gets the store. + * + * @param type + * the type + * @return the store + */ public GaussianStorage getStore(StoreType type) { switch (type) { case WEIGHT: { @@ -67,10 +111,22 @@ public GaussianStorage getStore(StoreType type) { } } + /** + * Gets the luggage store. + * + * @return the luggage store + */ public LuggageStorage getLuggageStore() { return luggageStore; } + /** + * Gets the percentage of passengers. + * + * @param sex + * the sex + * @return the percentage of passengers + */ public double getPercentageOfPassengers(Sex sex) { if (sex == Sex.MALE) { return (double) numberOfPassengers[1] @@ -81,20 +137,56 @@ public double getPercentageOfPassengers(Sex sex) { } } + /** + * Gets the age store. + * + * @return the age store + */ public AgeStorage getAgeStore() { return ageStore; } + + /** + * Gets the mood store. + * + * @return the mood store + */ + public MoodStorage getMoodStore() { + return moodStore; + } + + /** + * The Enum StoreType. + */ public enum StoreType { - WEIGHT, HEIGHT, WIDTH, DEPTH, AGE + + /** The weight. */ + WEIGHT, + /** The height. */ + HEIGHT, + /** The width. */ + WIDTH, + /** The depth. */ + DEPTH, + /** The age. */ + AGE, + + /** The mood. */ + /* mood */ + MOOD } + /** + * Clear. + */ public void clear() { weightStore = new GaussianStorage(StoreType.WEIGHT); heightStore = new GaussianStorage(StoreType.HEIGHT); depthStore = new GaussianStorage(StoreType.DEPTH); widthStore = new GaussianStorage(StoreType.WIDTH); ageStore = new AgeStorage(); + moodStore = new MoodStorage(); luggageStore = new LuggageStorage(); numberOfPassengers = new int[3]; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinAdapterFactory.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinAdapterFactory.java index 35b4290d..80d7ccd3 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinAdapterFactory.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinAdapterFactory.java @@ -9,29 +9,6 @@ import net.bhl.cdt.model.NamedElement; import net.bhl.cdt.paxelerate.model.*; -import net.bhl.cdt.paxelerate.model.BusinessClass; -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.CrewMember; -import net.bhl.cdt.paxelerate.model.Curtain; -import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.EconomyClass; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.Galley; -import net.bhl.cdt.paxelerate.model.Lavatory; -import net.bhl.cdt.paxelerate.model.MainDoor; -import net.bhl.cdt.paxelerate.model.Passenger; -import net.bhl.cdt.paxelerate.model.PhysicalObject; -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; -import net.bhl.cdt.paxelerate.model.Row; -import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.SimulationProperties; -import net.bhl.cdt.paxelerate.model.SimulationResult; -import net.bhl.cdt.paxelerate.model.Stairway; -import net.bhl.cdt.paxelerate.model.StandardDoor; -import net.bhl.cdt.paxelerate.model.Stowage; -import net.bhl.cdt.paxelerate.model.TravelClass; /** * @@ -102,22 +79,6 @@ public Adapter caseTravelClass(TravelClass object) { return createTravelClassAdapter(); } @Override - public Adapter caseBusinessClass(BusinessClass object) { - return createBusinessClassAdapter(); - } - @Override - public Adapter caseFirstClass(FirstClass object) { - return createFirstClassAdapter(); - } - @Override - public Adapter caseEconomyClass(EconomyClass object) { - return createEconomyClassAdapter(); - } - @Override - public Adapter casePremiumEconomyClass(PremiumEconomyClass object) { - return createPremiumEconomyClassAdapter(); - } - @Override public Adapter caseSeat(Seat object) { return createSeatAdapter(); } @@ -158,18 +119,6 @@ public Adapter caseDoor(Door object) { return createDoorAdapter(); } @Override - public Adapter caseMainDoor(MainDoor object) { - return createMainDoorAdapter(); - } - @Override - public Adapter caseEmergencyExit(EmergencyExit object) { - return createEmergencyExitAdapter(); - } - @Override - public Adapter caseStandardDoor(StandardDoor object) { - return createStandardDoorAdapter(); - } - @Override public Adapter caseSimulationProperties(SimulationProperties object) { return createSimulationPropertiesAdapter(); } @@ -251,62 +200,6 @@ public Adapter createTravelClassAdapter() { return null; } - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.BusinessClass Business Class}'. - * - * 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 net.bhl.cdt.paxelerate.model.BusinessClass - * @generated - */ - public Adapter createBusinessClassAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.FirstClass First Class}'. - * - * 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 net.bhl.cdt.paxelerate.model.FirstClass - * @generated - */ - public Adapter createFirstClassAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.EconomyClass Economy Class}'. - * - * 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 net.bhl.cdt.paxelerate.model.EconomyClass - * @generated - */ - public Adapter createEconomyClassAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.PremiumEconomyClass Premium Economy Class}'. - * - * 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 net.bhl.cdt.paxelerate.model.PremiumEconomyClass - * @generated - */ - public Adapter createPremiumEconomyClassAdapter() { - return null; - } - /** * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.Door Door}'. * @@ -433,48 +326,6 @@ public Adapter createStowageAdapter() { return null; } - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.MainDoor Main Door}'. - * - * 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 net.bhl.cdt.paxelerate.model.MainDoor - * @generated - */ - public Adapter createMainDoorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.EmergencyExit Emergency Exit}'. - * - * 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 net.bhl.cdt.paxelerate.model.EmergencyExit - * @generated - */ - public Adapter createEmergencyExitAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.StandardDoor Standard Door}'. - * - * 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 net.bhl.cdt.paxelerate.model.StandardDoor - * @generated - */ - public Adapter createStandardDoorAdapter() { - return null; - } - /** * Creates a new adapter for an object of class '{@link net.bhl.cdt.paxelerate.model.SimulationProperties Simulation Properties}'. * diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinGenerator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinGenerator.java new file mode 100644 index 00000000..c5555d87 --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinGenerator.java @@ -0,0 +1,447 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package net.bhl.cdt.paxelerate.model.util; + +import java.util.ArrayList; +import java.util.Arrays; + +import org.apache.commons.lang.StringUtils; + +import net.bhl.cdt.model.util.ModelHelper; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.CabinFactory; +import net.bhl.cdt.paxelerate.model.Curtain; +import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.DoorOption; +import net.bhl.cdt.paxelerate.model.Galley; +import net.bhl.cdt.paxelerate.model.Lavatory; +import net.bhl.cdt.paxelerate.model.ObjectOption; +import net.bhl.cdt.paxelerate.model.PhysicalObject; +import net.bhl.cdt.paxelerate.model.Row; +import net.bhl.cdt.paxelerate.model.Seat; +import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.model.TravelOption; +import net.bhl.cdt.paxelerate.util.input.InputChecker; +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; +import net.bhl.cdt.paxelerate.util.string.StringHelper; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * This class contains all constructors for the different elements of the cabin. + * You can construct every single part of cabin on its own. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * @see GenerateCabinCommand.java for implementation example. + */ +public class CabinGenerator { + + /** The cabin. */ + private Cabin cabin; + + /** The number of aisles. */ + private int globalSeatPositionY, globalSeatPositionX, seats, abreast, + seatPitch, seatHelper, passengers, numberOfAisles; + + /** The seat dimensions. */ + private Vector seatDimensions = new Vector2D(0, 0); + + /** The tc. */ + private TravelClass tc; + + /** The row parts int. */ + private ArrayList rowPartsInt; + + /** The do it once. */ + boolean doItOnce = true; + + /** The seat structure. */ + private String seatStructure = "1-1"; + + /** + * This method is the constructor of this class. + * + * @param cabin + * the cabin element + */ + public CabinGenerator(Cabin cabin) { + this.cabin = cabin; + rowPartsInt = new ArrayList(); + globalSeatPositionY = 0; + globalSeatPositionX = 50; + seatStructure = "3-3"; + } + + /** + * Returns the cabin. + * + * @return the cabin that was created within this class. + */ + public Cabin getCabin() { + return cabin; + } + + /** + * This method clears all objects from the cabin object excluding the + * passenger classes. These are removed in a later step. + */ + public void clearCabin() { + cabin.getClasses().clear(); + cabin.getDoors().clear(); + cabin.getLavatories().clear(); + cabin.getGalleys().clear(); + cabin.getCurtains().clear(); + cabin.getStairways().clear(); + cabin.getStowages().clear(); + cabin.getPassengers().clear(); + } + + /** + * Load the class settings depending on type. + * + * NOTE: This only works if there is just one existing class per class type. + * + * @param travelOption + * the subclass + */ + public void switchSettings(TravelOption travelOption) { + + tc = CabinFactory.eINSTANCE.createTravelClass(); + tc.setTravelOption(travelOption); + + switch (travelOption) { + case PREMIUM_ECONOMY_CLASS: + + seats = 24; + seatStructure = "3-3"; + seatDimensions = new Vector2D(60, 50); + seatPitch = 85; + passengers = 1; + break; + + case BUSINESS_CLASS: + + seats = 8; + seatStructure = "2-2"; + seatDimensions = new Vector2D(80, 72); + seatPitch = 90; + passengers = 1; + break; + + case FIRST_CLASS: + + seats = 2; + seatStructure = "1-1"; + seatDimensions = new Vector2D(120, 100); + seatPitch = 100; + passengers = 1; + break; + + case ECONOMY_CLASS: + + seats = 72; + seatStructure = "3-3"; + seatDimensions = new Vector2D(60, 50); + seatPitch = 80; + passengers = 1; + break; + } + } + + /** + * This method splits the String into parts and reads out the information in + * it. This string has the form X-X and it is separated by the "-" operator. + * + * @param seatString + * is the string + */ + public void splitSeatString(String seatString) { + + /* + * This method checks the user input for errors and automatically + * corrects it! + */ + seatString = InputChecker.checkStructureString(seatString); + + rowPartsInt = new ArrayList(); + numberOfAisles = StringUtils.countMatches(seatString, "-"); + abreast = 0; + String[] rowParts = seatString.split("-"); + for (String str : rowParts) { + abreast += Integer.parseInt(str); + rowPartsInt.add(Integer.parseInt(str)); + } + } + + /** + * This method creates the physical objects except for seats!. + * + * @param option the option + * @param xDimension the x dimension + */ + public void createPhysicalObject(ObjectOption option, int xDimension) { + int currentPosition = 0; + splitSeatString(seatStructure); + if (doItOnce) { + if (!cabin.getClasses().isEmpty()) { + seatStructure = cabin.getClasses().get(0).getRowStructure(); + splitSeatString(seatStructure); + } else { + rowPartsInt.clear(); + rowPartsInt.addAll(Arrays.asList(3, 3)); + } + doItOnce = false; + } + + for (int k = 0; k < rowPartsInt.size(); k++) { + + PhysicalObject obj; + + switch (option) { + case LAVATORY: + obj = CabinFactory.eINSTANCE.createLavatory(); + cabin.getLavatories().add((Lavatory) obj); + obj.setName(" " + cabin.getLavatories().size() + 1); + obj.setId(cabin.getLavatories().size() + 1); + break; + + case GALLEY: + obj = CabinFactory.eINSTANCE.createGalley(); + cabin.getGalleys().add((Galley) obj); + obj.setName(" " + cabin.getGalleys().size() + 1); + obj.setId(cabin.getGalleys().size() + 1); + break; + + default: + obj = null; + break; + } + try { + obj.setXDimension(xDimension); + } catch (NullPointerException e) { + Log.add(this, "Define the seat dimensions"); + //e.printStackTrace(); + } + + + try { + obj.setXPosition(globalSeatPositionX); + obj.setYDimension(rowPartsInt.get(k) + * (tc.getYDimensionOfSeats() + seatHelper) + + seatHelper); + } catch (NullPointerException e) { + //e.printStackTrace(); + obj.setYDimension((cabin.getYDimension() + - numberOfAisles * cabin.getAisleWidth()) + / (numberOfAisles + 1)); + } + obj.setYPosition(currentPosition); + currentPosition = currentPosition + obj.getYDimension() + + cabin.getAisleWidth(); + + } + globalSeatPositionX += xDimension; + } + + /** + * This method creates a new seat. + * + * @param row is the row in which the seat should be generated + */ + public void createSeat(Row row) { + + Seat newSeat = CabinFactory.eINSTANCE.createSeat(); + row.getSeats().add(newSeat); + + newSeat.setId( + ModelHelper.getChildrenByClass(cabin, Seat.class).size() + 1); + + newSeat.setName(row.getRowNumber() + + StringHelper.toString(row.getSeats().size())); + + newSeat.setXDimension(seatDimensions.getX()); + newSeat.setYDimension(seatDimensions.getY()); + + newSeat.setLetter("" + StringHelper.toString(row.getSeats().size())); + + newSeat.setXPosition(globalSeatPositionX); + newSeat.setYPosition(globalSeatPositionY); + newSeat.setTravelClass(tc); + newSeat.setRow(row); + } + + /** + * This method creates a class and the subclasses (seats, rows, etc.). + * + * @param travelOption is the subclass + */ + public void createClass(TravelOption travelOption) { + + tc = null; + switchSettings(travelOption); + cabin.getClasses().add(tc); + splitSeatString(seatStructure); + + tc.setPassengers(passengers); + tc.setAvailableSeats(seats); + tc.setRowStructure(InputChecker.checkStructureString(seatStructure)); + + tc.setSeatPitch(seatPitch); + tc.setYDimensionOfSeats(seatDimensions.getY()); + tc.setXDimensionOfSeats(seatDimensions.getX()); + tc.setName(""); + + if (seats > 0) { + seatHelper = 0; + if ((seats % abreast) != 0) { + Log.add(this, + "Check your number of seats in " + + StringHelper + .splitCamelCase(travelOption.getName()) + + ". Could not fill all rows."); + } + + if (tc.getTravelOption() == TravelOption.FIRST_CLASS) { + globalSeatPositionX += 20; + } + + for (int i = 1; i <= seats / abreast; i++) { + globalSeatPositionY = 0; + + /** Calculate the gap between the seats **/ + if ((abreast * seatDimensions.getY() + + numberOfAisles * cabin.getAisleWidth()) <= cabin + .getYDimension()) { + + globalSeatPositionY = ((cabin.getYDimension() + - numberOfAisles * cabin.getAisleWidth() + - abreast * seatDimensions.getY()) + / (abreast + numberOfAisles + 1)); + + seatHelper = globalSeatPositionY; + + } else { + Log.add(this, "The seats in row " + i + + " do not fit into the cabin!"); + + seatHelper = 0; + globalSeatPositionY = 0; + } + /****************************************/ + + if ((globalSeatPositionY < 0)) { + seatHelper = 0; + globalSeatPositionY = 0; + Log.add(this, "The seats in row " + i + + " do not fit into the cabin!"); + } + + createRow(); + + globalSeatPositionX += seatPitch; + + } + if (!(tc.getTravelOption() == TravelOption.ECONOMY_CLASS)) { + createCurtain(true, "after " + + StringHelper.splitCamelCase(travelOption.getName())); + } + } + } + + /** + * This function creates a row and the seats in it. + */ + public void createRow() { + + Row newRow = CabinFactory.eINSTANCE.createRow(); + tc.getRows().add(newRow); + + newRow.setRowNumber( + ModelHelper.getChildrenByClass(cabin, Row.class).size()); + + for (int rowBlock : rowPartsInt) { + + for (int j = 1; j <= rowBlock; j++) { + + createSeat(newRow); + + globalSeatPositionY = globalSeatPositionY + + seatDimensions.getY() + seatHelper; + + } + globalSeatPositionY = cabin.getAisleWidth() + globalSeatPositionY + + seatHelper; + } + } + + /** + * This function creates a door. + * + * @param option the option + * @param symmetrical describes if the door will be generated on both sides + * @param id is the id of the door + * @param yPosition set it to -1 to ignore value, only important for emergency + * exit. + */ + public void createDoor(DoorOption option, boolean symmetrical, int id, + int yPosition) { + + Door door = CabinFactory.eINSTANCE.createDoor(); + + door.setDoorOption(option); + door.setId(id); + door.setOnBothSides(symmetrical); + + switch (option) { + + case EMERGENCY_EXIT: + door.setWidth(50); + door.setXPosition(yPosition); + door.setIsActive(false); + break; + + default: + door.setWidth(80); + door.setXPosition(globalSeatPositionX); + door.setIsActive(false); + globalSeatPositionX += 80; + break; + } + + cabin.getDoors().add(door); + } + + /** + * This method creates a curtain. Curtains are generated automatically in + * the class generation. + * + * @param openOrNot + * describes whether the curtain is open or not. + * @param name + * is the name of the door. + * + */ + public void createCurtain(boolean openOrNot, String name) { + int currentCurtainPosition = 0; + for (int k = 0; k < rowPartsInt.size(); k++) { + Curtain curtain = CabinFactory.eINSTANCE.createCurtain(); + cabin.getCurtains().add(curtain); + curtain.setCurtainOpen(openOrNot); + curtain.setName(name + " (Part " + (k + 1) + ")"); + curtain.setXDimension(10); + curtain.setId(cabin.getCurtains().size() + 1); + curtain.setXPosition(globalSeatPositionX + 10); + curtain.setYDimension(rowPartsInt.get(k) + * (tc.getYDimensionOfSeats() + seatHelper) + seatHelper); + curtain.setYPosition(currentCurtainPosition); + currentCurtainPosition = currentCurtainPosition + + curtain.getYDimension() + cabin.getAisleWidth(); + } + globalSeatPositionX += 40; + } +} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinSwitch.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinSwitch.java index 14f94ee9..4294fe11 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinSwitch.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinSwitch.java @@ -8,29 +8,6 @@ import net.bhl.cdt.model.NamedElement; import net.bhl.cdt.paxelerate.model.*; -import net.bhl.cdt.paxelerate.model.BusinessClass; -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.CrewMember; -import net.bhl.cdt.paxelerate.model.Curtain; -import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.EconomyClass; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.Galley; -import net.bhl.cdt.paxelerate.model.Lavatory; -import net.bhl.cdt.paxelerate.model.MainDoor; -import net.bhl.cdt.paxelerate.model.Passenger; -import net.bhl.cdt.paxelerate.model.PhysicalObject; -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; -import net.bhl.cdt.paxelerate.model.Row; -import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.SimulationProperties; -import net.bhl.cdt.paxelerate.model.SimulationResult; -import net.bhl.cdt.paxelerate.model.Stairway; -import net.bhl.cdt.paxelerate.model.StandardDoor; -import net.bhl.cdt.paxelerate.model.Stowage; -import net.bhl.cdt.paxelerate.model.TravelClass; /** * @@ -46,11 +23,13 @@ * @generated */ public class CabinSwitch extends Switch { + /** * The cached model package * - * - * @generated + * . + * + * @generated */ protected static CabinPackage modelPackage; @@ -108,34 +87,6 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } - case CabinPackage.BUSINESS_CLASS: { - BusinessClass businessClass = (BusinessClass)theEObject; - T result = caseBusinessClass(businessClass); - if (result == null) result = caseTravelClass(businessClass); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CabinPackage.FIRST_CLASS: { - FirstClass firstClass = (FirstClass)theEObject; - T result = caseFirstClass(firstClass); - if (result == null) result = caseTravelClass(firstClass); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CabinPackage.ECONOMY_CLASS: { - EconomyClass economyClass = (EconomyClass)theEObject; - T result = caseEconomyClass(economyClass); - if (result == null) result = caseTravelClass(economyClass); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CabinPackage.PREMIUM_ECONOMY_CLASS: { - PremiumEconomyClass premiumEconomyClass = (PremiumEconomyClass)theEObject; - T result = casePremiumEconomyClass(premiumEconomyClass); - if (result == null) result = caseTravelClass(premiumEconomyClass); - if (result == null) result = defaultCase(theEObject); - return result; - } case CabinPackage.SEAT: { Seat seat = (Seat)theEObject; T result = caseSeat(seat); @@ -202,27 +153,6 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } - case CabinPackage.MAIN_DOOR: { - MainDoor mainDoor = (MainDoor)theEObject; - T result = caseMainDoor(mainDoor); - if (result == null) result = caseDoor(mainDoor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CabinPackage.EMERGENCY_EXIT: { - EmergencyExit emergencyExit = (EmergencyExit)theEObject; - T result = caseEmergencyExit(emergencyExit); - if (result == null) result = caseDoor(emergencyExit); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CabinPackage.STANDARD_DOOR: { - StandardDoor standardDoor = (StandardDoor)theEObject; - T result = caseStandardDoor(standardDoor); - if (result == null) result = caseDoor(standardDoor); - if (result == null) result = defaultCase(theEObject); - return result; - } case CabinPackage.SIMULATION_PROPERTIES: { SimulationProperties simulationProperties = (SimulationProperties)theEObject; T result = caseSimulationProperties(simulationProperties); @@ -296,66 +226,6 @@ public T caseTravelClass(TravelClass object) { return null; } - /** - * Returns the result of interpreting the object as an instance of 'Business Class'. - * - * 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 'Business Class'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBusinessClass(BusinessClass object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'First Class'. - * - * 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 'First Class'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseFirstClass(FirstClass object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Economy Class'. - * - * 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 'Economy Class'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEconomyClass(EconomyClass object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Premium Economy Class'. - * - * 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 'Premium Economy Class'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePremiumEconomyClass(PremiumEconomyClass object) { - return null; - } - /** * Returns the result of interpreting the object as an instance of 'Door'. * @@ -491,51 +361,6 @@ public T caseStowage(Stowage object) { return null; } - /** - * Returns the result of interpreting the object as an instance of 'Main Door'. - * - * 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 'Main Door'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMainDoor(MainDoor object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Emergency Exit'. - * - * 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 'Emergency Exit'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEmergencyExit(EmergencyExit object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Standard Door'. - * - * 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 'Standard Door'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStandardDoor(StandardDoor object) { - return null; - } - /** * Returns the result of interpreting the object as an instance of 'Simulation Properties'. * diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinValidator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinValidator.java index fc3ebfc1..40e19d10 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinValidator.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/CabinValidator.java @@ -9,36 +9,6 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.EObjectValidator; -import net.bhl.cdt.paxelerate.model.AircraftType; -import net.bhl.cdt.paxelerate.model.BusinessClass; -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.CabinPackage; -import net.bhl.cdt.paxelerate.model.CrewMember; -import net.bhl.cdt.paxelerate.model.Curtain; -import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.EconomyClass; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.Galley; -import net.bhl.cdt.paxelerate.model.Lavatory; -import net.bhl.cdt.paxelerate.model.LuggageSize; -import net.bhl.cdt.paxelerate.model.MainDoor; -import net.bhl.cdt.paxelerate.model.Passenger; -import net.bhl.cdt.paxelerate.model.PassengerMood; -import net.bhl.cdt.paxelerate.model.PhysicalObject; -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; -import net.bhl.cdt.paxelerate.model.Row; -import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.Sex; -import net.bhl.cdt.paxelerate.model.SimulationProperties; -import net.bhl.cdt.paxelerate.model.SimulationResult; -import net.bhl.cdt.paxelerate.model.SortingStyle; -import net.bhl.cdt.paxelerate.model.Stairway; -import net.bhl.cdt.paxelerate.model.StairwayDirection; -import net.bhl.cdt.paxelerate.model.StandardDoor; -import net.bhl.cdt.paxelerate.model.Stowage; -import net.bhl.cdt.paxelerate.model.TravelClass; - /** * * The Validator for the model. @@ -47,11 +17,13 @@ * @generated */ public class CabinValidator extends EObjectValidator { + /** * The cached model package * - * - * @generated + * . + * + * @generated */ public static final CabinValidator INSTANCE = new CabinValidator(); @@ -141,14 +113,6 @@ protected boolean validate(int classifierID, Object value, DiagnosticChain diagn return validateRow((Row)value, diagnostics, context); case CabinPackage.TRAVEL_CLASS: return validateTravelClass((TravelClass)value, diagnostics, context); - case CabinPackage.BUSINESS_CLASS: - return validateBusinessClass((BusinessClass)value, diagnostics, context); - case CabinPackage.FIRST_CLASS: - return validateFirstClass((FirstClass)value, diagnostics, context); - case CabinPackage.ECONOMY_CLASS: - return validateEconomyClass((EconomyClass)value, diagnostics, context); - case CabinPackage.PREMIUM_ECONOMY_CLASS: - return validatePremiumEconomyClass((PremiumEconomyClass)value, diagnostics, context); case CabinPackage.SEAT: return validateSeat((Seat)value, diagnostics, context); case CabinPackage.PASSENGER: @@ -169,12 +133,6 @@ protected boolean validate(int classifierID, Object value, DiagnosticChain diagn return validateStowage((Stowage)value, diagnostics, context); case CabinPackage.DOOR: return validateDoor((Door)value, diagnostics, context); - case CabinPackage.MAIN_DOOR: - return validateMainDoor((MainDoor)value, diagnostics, context); - case CabinPackage.EMERGENCY_EXIT: - return validateEmergencyExit((EmergencyExit)value, diagnostics, context); - case CabinPackage.STANDARD_DOOR: - return validateStandardDoor((StandardDoor)value, diagnostics, context); case CabinPackage.SIMULATION_PROPERTIES: return validateSimulationProperties((SimulationProperties)value, diagnostics, context); case CabinPackage.LUGGAGE_PROPERTIES: @@ -199,6 +157,10 @@ protected boolean validate(int classifierID, Object value, DiagnosticChain diagn return validateTravelOption((TravelOption)value, diagnostics, context); case CabinPackage.OBJECT_OPTION: return validateObjectOption((ObjectOption)value, diagnostics, context); + case CabinPackage.DOOR_OPTION: + return validateDoorOption((DoorOption)value, diagnostics, context); + case CabinPackage.LAYOUT_CONCEPT: + return validateLayoutConcept((LayoutConcept)value, diagnostics, context); default: return true; } @@ -206,8 +168,13 @@ protected boolean validate(int classifierID, Object value, DiagnosticChain diagn /** * - * - * @generated + * . + * + * @param cabin the cabin + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateCabin(Cabin cabin, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(cabin, diagnostics, context); @@ -215,8 +182,13 @@ public boolean validateCabin(Cabin cabin, DiagnosticChain diagnostics, Map - * - * @generated + * . + * + * @param row the row + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateRow(Row row, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(row, diagnostics, context); @@ -224,8 +196,13 @@ public boolean validateRow(Row row, DiagnosticChain diagnostics, Map - * - * @generated + * . + * + * @param travelClass the travel class + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateTravelClass(TravelClass travelClass, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(travelClass, diagnostics, context)) return false; @@ -264,88 +241,13 @@ public boolean validateTravelClass_wrongRowStructure(TravelClass travelClass, Di /** * - * - * @generated - */ - public boolean validateBusinessClass(BusinessClass businessClass, DiagnosticChain diagnostics, Map context) { - if (!validate_NoCircularContainment(businessClass, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_tooManyPassengers(businessClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_wrongRowStructure(businessClass, diagnostics, context); - return result; - } - - /** - * - * - * @generated - */ - public boolean validateFirstClass(FirstClass firstClass, DiagnosticChain diagnostics, Map context) { - if (!validate_NoCircularContainment(firstClass, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_tooManyPassengers(firstClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_wrongRowStructure(firstClass, diagnostics, context); - return result; - } - - /** - * - * - * @generated - */ - public boolean validateEconomyClass(EconomyClass economyClass, DiagnosticChain diagnostics, Map context) { - if (!validate_NoCircularContainment(economyClass, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_tooManyPassengers(economyClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_wrongRowStructure(economyClass, diagnostics, context); - return result; - } - - /** - * - * - * @generated - */ - public boolean validatePremiumEconomyClass(PremiumEconomyClass premiumEconomyClass, DiagnosticChain diagnostics, Map context) { - if (!validate_NoCircularContainment(premiumEconomyClass, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_tooManyPassengers(premiumEconomyClass, diagnostics, context); - if (result || diagnostics != null) result &= validateTravelClass_wrongRowStructure(premiumEconomyClass, diagnostics, context); - return result; - } - - /** - * - * - * @generated + * . + * + * @param seat the seat + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateSeat(Seat seat, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(seat, diagnostics, context)) return false; @@ -363,8 +265,13 @@ public boolean validateSeat(Seat seat, DiagnosticChain diagnostics, Map - * - * @generated + * . + * + * @param passenger the passenger + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validatePassenger(Passenger passenger, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(passenger, diagnostics, context); @@ -372,8 +279,13 @@ public boolean validatePassenger(Passenger passenger, DiagnosticChain diagnostic /** * - * - * @generated + * . + * + * @param crewMember the crew member + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateCrewMember(CrewMember crewMember, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(crewMember, diagnostics, context); @@ -381,8 +293,13 @@ public boolean validateCrewMember(CrewMember crewMember, DiagnosticChain diagnos /** * - * - * @generated + * . + * + * @param physicalObject the physical object + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validatePhysicalObject(PhysicalObject physicalObject, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(physicalObject, diagnostics, context)) return false; @@ -410,8 +327,13 @@ public boolean validatePhysicalObject_outOfBounds(PhysicalObject physicalObject, /** * - * - * @generated + * . + * + * @param lavatory the lavatory + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateLavatory(Lavatory lavatory, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(lavatory, diagnostics, context)) return false; @@ -429,8 +351,13 @@ public boolean validateLavatory(Lavatory lavatory, DiagnosticChain diagnostics, /** * - * - * @generated + * . + * + * @param galley the galley + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateGalley(Galley galley, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(galley, diagnostics, context)) return false; @@ -448,8 +375,13 @@ public boolean validateGalley(Galley galley, DiagnosticChain diagnostics, Map - * - * @generated + * . + * + * @param stairway the stairway + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateStairway(Stairway stairway, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(stairway, diagnostics, context)) return false; @@ -467,8 +399,13 @@ public boolean validateStairway(Stairway stairway, DiagnosticChain diagnostics, /** * - * - * @generated + * . + * + * @param curtain the curtain + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateCurtain(Curtain curtain, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(curtain, diagnostics, context)) return false; @@ -486,8 +423,13 @@ public boolean validateCurtain(Curtain curtain, DiagnosticChain diagnostics, Map /** * - * - * @generated + * . + * + * @param stowage the stowage + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateStowage(Stowage stowage, DiagnosticChain diagnostics, Map context) { if (!validate_NoCircularContainment(stowage, diagnostics, context)) return false; @@ -505,8 +447,13 @@ public boolean validateStowage(Stowage stowage, DiagnosticChain diagnostics, Map /** * - * - * @generated + * . + * + * @param door the door + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateDoor(Door door, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(door, diagnostics, context); @@ -514,35 +461,13 @@ public boolean validateDoor(Door door, DiagnosticChain diagnostics, Map - * - * @generated - */ - public boolean validateMainDoor(MainDoor mainDoor, DiagnosticChain diagnostics, Map context) { - return validate_EveryDefaultConstraint(mainDoor, diagnostics, context); - } - - /** - * - * - * @generated - */ - public boolean validateEmergencyExit(EmergencyExit emergencyExit, DiagnosticChain diagnostics, Map context) { - return validate_EveryDefaultConstraint(emergencyExit, diagnostics, context); - } - - /** - * - * - * @generated - */ - public boolean validateStandardDoor(StandardDoor standardDoor, DiagnosticChain diagnostics, Map context) { - return validate_EveryDefaultConstraint(standardDoor, diagnostics, context); - } - - /** - * - * - * @generated + * . + * + * @param simulationProperties the simulation properties + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateSimulationProperties(SimulationProperties simulationProperties, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(simulationProperties, diagnostics, context); @@ -550,8 +475,13 @@ public boolean validateSimulationProperties(SimulationProperties simulationPrope /** * - * - * @generated + * . + * + * @param luggageProperties the luggage properties + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateLuggageProperties(LuggageProperties luggageProperties, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(luggageProperties, diagnostics, context); @@ -559,8 +489,13 @@ public boolean validateLuggageProperties(LuggageProperties luggageProperties, Di /** * - * - * @generated + * . + * + * @param simulationResult the simulation result + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateSimulationResult(SimulationResult simulationResult, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(simulationResult, diagnostics, context); @@ -568,8 +503,13 @@ public boolean validateSimulationResult(SimulationResult simulationResult, Diagn /** * - * - * @generated + * . + * + * @param passengerProperties the passenger properties + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validatePassengerProperties(PassengerProperties passengerProperties, DiagnosticChain diagnostics, Map context) { return validate_EveryDefaultConstraint(passengerProperties, diagnostics, context); @@ -577,8 +517,13 @@ public boolean validatePassengerProperties(PassengerProperties passengerProperti /** * - * - * @generated + * . + * + * @param sex the sex + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateSex(Sex sex, DiagnosticChain diagnostics, Map context) { return true; @@ -586,8 +531,13 @@ public boolean validateSex(Sex sex, DiagnosticChain diagnostics, Map - * - * @generated + * . + * + * @param stairwayDirection the stairway direction + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateStairwayDirection(StairwayDirection stairwayDirection, DiagnosticChain diagnostics, Map context) { return true; @@ -595,8 +545,13 @@ public boolean validateStairwayDirection(StairwayDirection stairwayDirection, Di /** * - * - * @generated + * . + * + * @param aircraftType the aircraft type + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateAircraftType(AircraftType aircraftType, DiagnosticChain diagnostics, Map context) { return true; @@ -604,8 +559,13 @@ public boolean validateAircraftType(AircraftType aircraftType, DiagnosticChain d /** * - * - * @generated + * . + * + * @param passengerMood the passenger mood + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validatePassengerMood(PassengerMood passengerMood, DiagnosticChain diagnostics, Map context) { return true; @@ -613,8 +573,13 @@ public boolean validatePassengerMood(PassengerMood passengerMood, DiagnosticChai /** * - * - * @generated + * . + * + * @param luggageSize the luggage size + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateLuggageSize(LuggageSize luggageSize, DiagnosticChain diagnostics, Map context) { return true; @@ -622,8 +587,13 @@ public boolean validateLuggageSize(LuggageSize luggageSize, DiagnosticChain diag /** * - * - * @generated + * . + * + * @param sortingStyle the sorting style + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateSortingStyle(SortingStyle sortingStyle, DiagnosticChain diagnostics, Map context) { return true; @@ -631,19 +601,52 @@ public boolean validateSortingStyle(SortingStyle sortingStyle, DiagnosticChain d /** * - * - * @generated + * . + * + * @param travelOption the travel option + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated */ public boolean validateTravelOption(TravelOption travelOption, DiagnosticChain diagnostics, Map context) { return true; } + /** + * + * . + * + * @param objectOption the object option + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated + */ + public boolean validateObjectOption(ObjectOption objectOption, DiagnosticChain diagnostics, Map context) { + return true; + } + + /** + * + * . + * + * @param doorOption the door option + * @param diagnostics the diagnostics + * @param context the context + * @return true, if successful + * @generated + */ + public boolean validateDoorOption(DoorOption doorOption, DiagnosticChain diagnostics, Map context) { + return true; + } + /** * * * @generated */ - public boolean validateObjectOption(ObjectOption objectOption, DiagnosticChain diagnostics, Map context) { + public boolean validateLayoutConcept(LayoutConcept layoutConcept, DiagnosticChain diagnostics, Map context) { return true; } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ConstructionLibrary.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ConstructionLibrary.java deleted file mode 100644 index 05674eb7..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ConstructionLibrary.java +++ /dev/null @@ -1,505 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009-2014 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package net.bhl.cdt.paxelerate.model.util; - -import java.util.ArrayList; -import java.util.Arrays; - -import org.apache.commons.lang.StringUtils; - -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.CabinFactory; -import net.bhl.cdt.paxelerate.model.Curtain; -import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.EconomyClass; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.Galley; -import net.bhl.cdt.paxelerate.model.Lavatory; -import net.bhl.cdt.paxelerate.model.MainDoor; -import net.bhl.cdt.paxelerate.model.ObjectOption; -import net.bhl.cdt.paxelerate.model.PhysicalObject; -import net.bhl.cdt.paxelerate.model.Row; -import net.bhl.cdt.paxelerate.model.Seat; -import net.bhl.cdt.paxelerate.model.Stairway; -import net.bhl.cdt.paxelerate.model.StairwayDirection; -import net.bhl.cdt.paxelerate.model.StandardDoor; -import net.bhl.cdt.paxelerate.model.TravelClass; -import net.bhl.cdt.paxelerate.model.TravelOption; -import net.bhl.cdt.paxelerate.util.input.InputChecker; -import net.bhl.cdt.paxelerate.util.math.Vector; -import net.bhl.cdt.paxelerate.util.math.Vector2D; -import net.bhl.cdt.paxelerate.util.string.StringHelper; -import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; - -/** - * This class contains all constructors for the different elements of the cabin. - * You can construct every single part of cabin on its own. - * - * @see GenerateCabinCommand.java for implementation example. - * - * @author marc.engelmann - * - */ -public class ConstructionLibrary { - private Cabin cabin; - - private int seatCount, rowCount, globalSeatPositionY, globalSeatPositionX, - seats, seatsInRow, seatPitch, seatHelper, passengers, numbAisles, - galleyCount = 1, lavatoryCount = 1, curtainCount = 1; - - private final static int DISTANCE_INCREMENT_DOOR = 20; - - private Vector seatDimensions = new Vector2D(0, 0); - - private TravelClass passengerClass; - private ArrayList rowPartsInt; - - boolean doItOnce = true; - private String seatStructure = "1-1"; - - /** - * This method is the constructor of this class. - * - * @param cabin - * the cabin element - */ - public ConstructionLibrary(Cabin cabin) { - this.cabin = cabin; - rowPartsInt = new ArrayList(); - globalSeatPositionY = 0; - globalSeatPositionX = 50; - seatStructure = "3-3"; - seatCount = 1; - rowCount = 1; - } - - /** - * Returns the cabin. - * - * @return the cabin that was created whithin this class. - */ - public Cabin getCabin() { - return cabin; - } - - /** - * This method clears all objects from the cabin object excluding the - * passenger classes. These are removed in a later step. - */ - public void clearCabin() { - cabin.getClasses().clear(); - cabin.getDoors().clear(); - cabin.getLavatories().clear(); - cabin.getGalleys().clear(); - cabin.getCurtains().clear(); - cabin.getStairways().clear(); - cabin.getStowages().clear(); - cabin.getPassengers().clear(); - } - - /** - * Load the class settings depending on type. If there already exists an - * object of the corresponding class, the values are copied over to the new - * class. This makes it possible for changes in the openCDT app during - * runtime. - * - * NOTE: This only works if there is just one existing class per class type. - * - * @param travelOption - * the subclass - * @param - * is a helper Class - */ - public void switchSettings(TravelOption travelOption) { - switch (travelOption) { - case PREMIUM_ECONOMY_CLASS: - - seats = 24; - seatStructure = "3-3"; - seatDimensions = new Vector2D(60, 50); - seatPitch = 85; - passengers = 1; - passengerClass = CabinFactory.eINSTANCE.createPremiumEconomyClass(); - break; - - case BUSINESS_CLASS: - - seats = 8; - seatStructure = "2-2"; - seatDimensions = new Vector2D(80, 72); - seatPitch = 90; - passengers = 1; - passengerClass = CabinFactory.eINSTANCE.createBusinessClass(); - break; - - case FIRST_CLASS: - - seats = 2; - seatStructure = "1-1"; - seatDimensions = new Vector2D(120, 100); - seatPitch = 100; - passengers = 1; - passengerClass = CabinFactory.eINSTANCE.createFirstClass(); - break; - - case ECONOMY_CLASS: - - seats = 72; - seatStructure = "3-3"; - seatDimensions = new Vector2D(60, 50); - seatPitch = 80; - passengers = 1; - passengerClass = CabinFactory.eINSTANCE.createEconomyClass(); - break; - } - } - - /** - * This method splits the String into parts and reads out the information in - * it. This string has the form X-X and it is separated by the "-" operator. - * - * @param seatString - * is the string - */ - public void splitSeatString(String seatString) { - - /* - * This method checks the user input for errors and automatically - * corrects it! - */ - seatString = InputChecker.checkStructureString(seatString); - - rowPartsInt = new ArrayList(); - numbAisles = StringUtils.countMatches(seatString, "-"); - seatsInRow = 0; - String[] rowParts = seatString.split("-"); - for (String str : rowParts) { - seatsInRow += Integer.parseInt(str); - rowPartsInt.add(Integer.parseInt(str)); - } - } - - /** - * This method creates the physical objects except for seats! - * - * @param physicalObjectClass - * @param xDimension - */ - public void createPhysicalObject(ObjectOption option, int xDimension) { - int currentPosition = 0; - splitSeatString(seatStructure); - if (doItOnce) { - if (!cabin.getClasses().isEmpty()) { - seatStructure = cabin.getClasses().get(0).getRowStructure(); - splitSeatString(seatStructure); - } else { - rowPartsInt.clear(); - rowPartsInt.addAll(Arrays.asList(3, 3)); - } - doItOnce = false; - } - - for (int k = 0; k < rowPartsInt.size(); k++) { - PhysicalObject physialObject = null; - switch (option) { - case LAVATORY: - physialObject = CabinFactory.eINSTANCE.createLavatory(); - cabin.getLavatories().add((Lavatory) physialObject); - physialObject.setName(" " + lavatoryCount); - physialObject.setId(lavatoryCount); - lavatoryCount++; - break; - case GALLEY: - physialObject = CabinFactory.eINSTANCE.createGalley(); - cabin.getGalleys().add((Galley) physialObject); - physialObject.setName(" " + galleyCount); - physialObject.setId(galleyCount); - galleyCount++; - break; - default: - break; - } - physialObject.setXDimension(xDimension); - physialObject.setXPosition(globalSeatPositionX); - try { - physialObject.setYDimension(rowPartsInt.get(k) - * (passengerClass.getYDimensionOfSeats() + seatHelper) - + seatHelper); - } catch (NullPointerException e) { - physialObject.setYDimension((cabin.getYDimension() - - numbAisles * cabin.getAisleWidth()) - / (numbAisles + 1)); - } - physialObject.setYPosition(currentPosition); - currentPosition = currentPosition + physialObject.getYDimension() - + cabin.getAisleWidth(); - - } - globalSeatPositionX += xDimension; - } - - /** - * This method creates a new seat. - * - * @param row - * is the row in which the seat should be generated - * @param j - * is the number of the seat in the row - */ - public void createSeat(Row row, int j) { - Seat newSeat = CabinFactory.eINSTANCE.createSeat(); - row.getSeats().add(newSeat); - newSeat.setId(seatCount); - newSeat.setName(rowCount + StringHelper.toString(j)); - newSeat.setXDimension(seatDimensions.getX()); - newSeat.setYDimension(seatDimensions.getY()); - newSeat.setLetter("" + StringHelper.toString(j)); - newSeat.setXPosition(globalSeatPositionX); - newSeat.setYPosition(globalSeatPositionY); - newSeat.setTravelClass(passengerClass); - newSeat.setRow(row); - } - - /** - * This method checks if there is a door at the current x position. If so, - * the x position is increased. - */ - // public void checkForDoor() { - // for (Door door : ModelHelper.getChildrenByClass(cabin, Door.class)) { - // if ((((door.getXPosition() + door.getWidth()) > (globalSeatPositionX - // - seatPitch)) - // && (door.getXPosition() < globalSeatPositionX)) - // || ((door.getXPosition() > globalSeatPositionX) - // && (door.getXPosition() < globalSeatPositionX - // + seatDimensions.getY()) - // || ((door.getXPosition() - // + door.getWidth() > globalSeatPositionX) - // && (door.getXPosition() < globalSeatPositionX)))) { - // globalSeatPositionX += DISTANCE_INCREMENT_DOOR; - // } - // } - // } - - /** - * This method creates a class and the subclasses (seats, rows, etc.). - * - * @param travelOption - * is the subclass - * @param - * is a helper class - */ - public void createClass(TravelOption travelOption) { - - passengerClass = null; - switchSettings(travelOption); - cabin.getClasses().add(passengerClass); - splitSeatString(seatStructure); - - passengerClass.setPassengers(passengers); - passengerClass.setAvailableSeats(seats); - passengerClass.setRowStructure( - InputChecker.checkStructureString(seatStructure)); - - passengerClass.setSeatPitch(seatPitch); - passengerClass.setYDimensionOfSeats(seatDimensions.getY()); - passengerClass.setXDimensionOfSeats(seatDimensions.getX()); - passengerClass.setName(""); - - if (seats > 0) { - seatHelper = 0; - if ((seats % seatsInRow) != 0) { - Log.add(this, - "Check your number of seats in " - + StringHelper - .splitCamelCase(travelOption.getName()) - + ". Could not fill all rows."); - } - - if (passengerClass instanceof FirstClass) { - globalSeatPositionX += 20; - } - - for (int i = 1; i <= seats / seatsInRow; i++) { - globalSeatPositionY = 0; - - /** Calculate the gap between the seats **/ - if ((seatsInRow * seatDimensions.getY() - + numbAisles * cabin.getAisleWidth()) <= cabin - .getYDimension()) { - globalSeatPositionY = ((cabin.getYDimension() - - numbAisles * cabin.getAisleWidth() - - seatsInRow * seatDimensions.getY()) - / (seatsInRow + numbAisles + 1)); - seatHelper = globalSeatPositionY; - } else { - Log.add(this, "The seats in row " + i - + " do not fit into the cabin!"); - seatHelper = 0; - globalSeatPositionY = 0; - } - /****************************************/ - - if ((globalSeatPositionY < 0)) { - seatHelper = 0; - globalSeatPositionY = 0; - Log.add(this, "The seats in row " + i - + " do not fit into the cabin!"); - } - - if (cabin.getRowNonexistent() == rowCount) { - rowCount++; - } - createRow(); - rowCount++; - globalSeatPositionX += seatPitch; - - } - if (!(passengerClass instanceof EconomyClass)) { - createCurtain(true, "after " - + StringHelper.splitCamelCase(travelOption.getName())); - } - } - } - - /** - * This function creates a row and the seats in it. - */ - public void createRow() { - Row newRow = CabinFactory.eINSTANCE.createRow(); - passengerClass.getRows().add(newRow); - newRow.setRowNumber(rowCount); - // checkForDoor(); - int seatLabelCount = 1; - for (int rowBlock : rowPartsInt) { - for (int j = 1; j <= rowBlock; j++) { - createSeat(newRow, seatLabelCount); - seatLabelCount++; - globalSeatPositionY = globalSeatPositionY - + seatDimensions.getY() + seatHelper; - seatCount++; - } - globalSeatPositionY = cabin.getAisleWidth() + globalSeatPositionY - + seatHelper; - } - } - - /** - * This function creates a door. - * - * @param typeDoor - * is the type of the door - * @param symmetrical - * describes if the door will be generated on both sides - * @param id - * is the id of the door - * @param yPosition - * set it to -1 to ignore value, only important for emergency - * exit. - * @param - * is a helper class - */ - public void createDoor(Class typeDoor, - boolean symmetrical, int id, int yPosition) { - Boolean mainDoorAlreadyExists = false; - if (!mainDoorAlreadyExists) { - for (Door testDoor : cabin.getDoors()) { - if (typeDoor.getSimpleName().equals("MainDoor") - && (testDoor instanceof MainDoor)) { - Log.add(this, "You created more than one main door!"); - mainDoorAlreadyExists = true; - } - } - } - Door newDoor = null; - if (typeDoor.getSimpleName().equals("MainDoor")) { - MainDoor mainDoor = CabinFactory.eINSTANCE.createMainDoor(); - newDoor = mainDoor; - newDoor.setWidth(80); - newDoor.setXPosition(globalSeatPositionX); - globalSeatPositionX += 80; - } else if (typeDoor.getSimpleName().equals("StandardDoor")) { - StandardDoor standardDoor = CabinFactory.eINSTANCE - .createStandardDoor(); - newDoor = standardDoor; - newDoor.setWidth(80); - newDoor.setXPosition(globalSeatPositionX); - newDoor.setIsActive(false); - globalSeatPositionX += 80; - } else { - EmergencyExit emergencyExit = CabinFactory.eINSTANCE - .createEmergencyExit(); - newDoor = emergencyExit; - newDoor.setWidth(50); - newDoor.setXPosition(yPosition); - newDoor.setIsActive(false); - if (yPosition < 0) { - Log.add(this, "Emergency Exit has a illegal yPosition."); - } - } - cabin.getDoors().add(newDoor); - newDoor.setId(id); - newDoor.setOnBothSides(symmetrical); - } - - /** - * This method creates a curtain. Curtains are generated automatically in - * the class generation. - * - * @param openOrNot - * describes whether the curtain is open or not. - * @param name - * is the name of the door. - * - */ - public void createCurtain(boolean openOrNot, String name) { - int currentCurtainPosition = 0; - for (int k = 0; k < rowPartsInt.size(); k++) { - Curtain newCurtain = CabinFactory.eINSTANCE.createCurtain(); - cabin.getCurtains().add(newCurtain); - newCurtain.setCurtainOpen(openOrNot); - newCurtain.setName(name + " (Part " + (k + 1) + ")"); - newCurtain.setXDimension(10); - newCurtain.setId(curtainCount); - newCurtain.setXPosition(globalSeatPositionX + 10); - newCurtain.setYDimension(rowPartsInt.get(k) - * (passengerClass.getYDimensionOfSeats() + seatHelper) - + seatHelper); - newCurtain.setYPosition(currentCurtainPosition); - currentCurtainPosition = currentCurtainPosition - + newCurtain.getYDimension() + cabin.getAisleWidth(); - curtainCount++; - } - globalSeatPositionX += 40; - } - - /** - * This method creates a stairway. - * - * @param direction - * is the direction of the stairway - * @param xPosition - * is the x position of the stairway - * @param yPostion - * is the y position of the stairway - * @param xDimension - * is the x dimension of the stairway - * @param yDimension - * is the y dimension of the stairway - */ - - public void createStairway(StairwayDirection direction, int xPosition, - int yPostion, int xDimension, int yDimension) { - Stairway newStairway = CabinFactory.eINSTANCE.createStairway(); - cabin.getStairways().add(newStairway); - newStairway.setYPosition(xPosition); - newStairway.setXPosition(yPostion); - newStairway.setDirection(direction); - newStairway.setYDimension(xDimension); - newStairway.setXDimension(yDimension); - } - -} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelLoader.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelLoader.java index 73e17f2c..a5649b04 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelLoader.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelLoader.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import java.util.Map; @@ -15,6 +20,8 @@ * This class is used for loading the previously stored model. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * @see EMFModelStore * */ @@ -25,7 +32,7 @@ public class EMFModelLoader { * * @return the loaded cabin is returned */ - public static Cabin loadCabin() { + public static synchronized Cabin loadCabin() { /* Register the XMI resource factory */ Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelStore.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelStore.java index a496d43c..fa716875 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelStore.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/EMFModelStore.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import java.io.IOException; @@ -18,11 +23,14 @@ * This class is used to store data locally by using the EMF Persistence API. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * @see EMFModelLoader * */ public class EMFModelStore { + /** The Constant SETTINGS_FILE. */ public final static String PATH = "PAXelerate", CABIN_FILE = "cabin", SETTINGS_FILE = "properties"; @@ -33,7 +41,7 @@ public class EMFModelStore { * @param submittedCabin * The cabin object which should be stored. */ - public static void store(Cabin submittedCabin) { + public static synchronized void store(Cabin submittedCabin) { /* The cabin object is copied for local storage first */ Cabin cabin = EcoreUtil.copy(submittedCabin); diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/POHelper.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/POHelper.java index a7a8df61..ed52c552 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/POHelper.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/POHelper.java @@ -1,49 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; +import java.util.ArrayList; import java.util.List; import net.bhl.cdt.model.util.ModelHelper; import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.Curtain; +import net.bhl.cdt.paxelerate.model.Galley; +import net.bhl.cdt.paxelerate.model.Lavatory; import net.bhl.cdt.paxelerate.model.ObjectOption; import net.bhl.cdt.paxelerate.model.PhysicalObject; import net.bhl.cdt.paxelerate.model.Seat; +import net.bhl.cdt.paxelerate.model.Stairway; +import net.bhl.cdt.paxelerate.model.Stowage; /** - * - * @author marc.engelmann + * This class is a helper class for. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ -// TODO: Implement these functions directly into Cabin.java ? // CabinImpl.java? - public class POHelper { /** + * This method returns all objects identified by a specific ObjectOption + * within the cabin object. * * @param option + * the desired option * @param cabin - * @return + * the cabin which contains the objects + * @return All requested objects */ - @SuppressWarnings("unchecked") - public static List getObjectByOption(ObjectOption option, + public static List getObjectsByOption(ObjectOption option, Cabin cabin) { + + List list = new ArrayList<>(); + switch (option) { + case GALLEY: - return (List) (Object) cabin.getGalleys(); + for (Galley galley : cabin.getGalleys()) { + list.add(galley); + } + break; + case LAVATORY: - return (List) (Object) cabin.getLavatories(); + for (Lavatory lavatory : cabin.getLavatories()) { + list.add(lavatory); + } + break; + case SEAT: - return (List) (Object) ModelHelper - .getChildrenByClass(cabin, Seat.class); + for (Seat seat : ModelHelper.getChildrenByClass(cabin, + Seat.class)) { + list.add(seat); + } + break; + case STOWAGE: - return (List) (Object) cabin.getStowages(); + for (Stowage stowage : cabin.getStowages()) { + list.add(stowage); + } + break; + case STAIRWAY: - return (List) (Object) cabin.getStairways(); + for (Stairway stairway : cabin.getStairways()) { + list.add(stairway); + } + break; + case CURTAIN: - return (List) (Object) cabin.getCurtains(); - default: - return null; + for (Curtain curtain : cabin.getCurtains()) { + list.add(curtain); + } + break; } + return list; } } diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerGenerator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerGenerator.java new file mode 100644 index 00000000..970733db --- /dev/null +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerGenerator.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package net.bhl.cdt.paxelerate.model.util; + +import java.util.Map; + +import net.bhl.cdt.model.util.ModelHelper; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.Passenger; + +/** + * The Class PassengerGenerator. + * + * @author marc.engelmann, michael.schmidt + * @version 1.1 + * @since 0.5 + */ + +public class PassengerGenerator { + + /** + * Apply delay. + * + * @param passenger + * the passenger + * @param delays + * the delays + */ + public synchronized static void applyDelay(Passenger passenger, + Map delays) { + + /* get the passengers parent cabin object */ + Cabin cabin = ModelHelper.getParent(Cabin.class, passenger); + + /* calculate the step size for the delay */ + double stepsize = 60.0 / cabin.getSimulationSettings() + .getPassengersBoardingPerMinute(); + + /* get the linked door of the passenger */ + Door door = passenger.getDoor(); + int id = door.getId(); + + /* if there is no delay before, set it to zero */ + if (delays.get(id) == null) { + delays.put(id, 0.0); + } + + /* read out the delay value of the door and assign it */ + passenger.setStartBoardingAfterDelay(delays.get(id)); + + /* increase the delay of the corresponding door */ + delays.put(id, delays.get(id) + stepsize); + } +} diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerPropertyGenerator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerPropertyGenerator.java index 6de98581..dc54378b 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerPropertyGenerator.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/PassengerPropertyGenerator.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import net.bhl.cdt.model.util.ModelHelper; @@ -12,39 +17,42 @@ import net.bhl.cdt.paxelerate.util.math.GaussOptions; import net.bhl.cdt.paxelerate.util.math.GaussianRandom; import net.bhl.cdt.paxelerate.util.math.RandomHelper; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; /** * This class is used to generate the passenger properties for each passenger * individually. Speed and age models are given. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class PassengerPropertyGenerator { - /* The current passenger */ + /** The current passenger. */ private Passenger passenger; - /* the paxSettings */ + /** The paxSettings. */ private PassengerProperties paxSettings; + + /** The luggage settings. */ private LuggageProperties luggageSettings; - /* + /** * This array contains two values, first the age of the passenger and second * the corresponding speed. - */ - // TODO take literals out of class + **/ private double[][] speedmodel = { { 5, 0.6 }, { 10, 1.18 }, { 15, 1.5 }, { 20, 1.6 }, { 25, 1.6 }, { 30, 1.55 }, { 35, 1.5 }, { 40, 1.5 }, { 45, 1.45 }, { 50, 1.42 }, { 55, 1.37 }, { 60, 1.3 }, { 65, 1.2 }, { 70, 1.05 }, { 75, 0.9 }, { 80, 0.7 } }; - /* + /** * This array contains the age distribution in the united states in 2012. * The first value of the tuple is the male, the second one the female * distribution. - */ - // TODO take literals out of class + **/ private double[][] agemodel = { { 0.0349, 0.0333 }, { 0.0374, 0.0356 }, { 0.0374, 0.0356 }, { 0.0369, 0.0349 }, { 0.0344, 0.0330 }, { 0.0348, 0.0341 }, { 0.0367, 0.0362 }, { 0.0402, 0.0405 }, @@ -53,63 +61,69 @@ public class PassengerPropertyGenerator { { 0.0139, 0.0176 }, { 0.0108, 0.0155 }, { 0.0065, 0.0111 }, { 0.0044, 0.0107 } }; + /** + * Instantiates a new passenger property generator. + * + * @param pax + * the pax + */ public PassengerPropertyGenerator(Passenger pax) { - this.passenger = pax; + passenger = pax; - this.paxSettings = ModelHelper.getParent(Cabin.class, pax) + paxSettings = ModelHelper.getParent(Cabin.class, pax) .getSimulationSettings().getPassengerProperties(); - this.luggageSettings = ModelHelper.getParent(Cabin.class, pax) + luggageSettings = ModelHelper.getParent(Cabin.class, pax) .getSimulationSettings().getLuggageProperties(); - /** At first. decide for the sex. **/ + /* At first. decide for the sex. */ passenger.setSex(switchRandomSex(paxSettings.getPercentageOfWomen())); - /** Define the mood of the passenger **/ - passenger.setPassengerMood(PassengerMood.PASSIVE); + /* Define the mood of the passenger **/ + passenger.setPassengerMood(switchRandomMood(paxSettings.getPassengerAggressiveMoodShare())); - /** Define the age according to age distribution **/ + /* Define the age according to age distribution **/ passenger.setAge(adaptAge()); - /** Define the height according to normal distribution **/ + /* Define the height according to normal distribution **/ passenger .setHeight((int) adapt(paxSettings.getPassengerHeightMeanMale(), paxSettings.getPassengerHeightDeviationMale(), paxSettings.getPassengerHeightMeanFemale(), paxSettings.getPassengerHeightDeviationFemale())); - /** Define the weight according to normal distribution **/ + /* Define the weight according to normal distribution **/ passenger .setWeight((int) adapt(paxSettings.getPassengerWeightMeanMale(), paxSettings.getPassengerWeightDeviationMale(), paxSettings.getPassengerWeightMeanFemale(), paxSettings.getPassengerWeightDeviationFemale())); - /** Define the depth according to normal distribution **/ + /* Define the depth according to normal distribution **/ passenger.setDepth((int) adapt(paxSettings.getPassengerDepthMeanMale(), paxSettings.getPassengerDepthDeviationMale(), paxSettings.getPassengerDepthMeanFemale(), paxSettings.getPassengerDepthDeviationFemale())); - /** Define the width according to normal distribution **/ + /* Define the width according to normal distribution **/ passenger.setWidth((int) adapt(paxSettings.getPassengerWidthMeanMale(), paxSettings.getPassengerWidthDeviationMale(), paxSettings.getPassengerWidthMeanFemale(), paxSettings.getPassengerWidthDeviationFemale())); - /** Define the walking speed according to age **/ + /* Define the walking speed according to age **/ passenger.setWalkingSpeed(adaptSpeed()); - /** Define the type of luggage **/ + /* Define the type of luggage **/ passenger.setLuggage(adaptLuggage()); - /** Define the luggage stow time randomly **/ + /* Define the luggage stow time randomly **/ passenger.setLuggageStowTime( DecimalHelper.round(adaptLuggageStowTime(), 2)); - /** Define the luggage distance from seat randomly **/ - passenger.setLuggageStowingDistance( + /* Define the luggage distance from seat randomly **/ + passenger.setLuggageStowDistance( DecimalHelper.round(defineLuggageStowDistance(), 2)); } @@ -129,7 +143,7 @@ public Passenger getPassenger() { * @return the speed in meters per second */ private double adaptSpeed() { - // Removed round to five. Otherwise value % 5 always = 0. + /** Removed round to five. Otherwise value % 5 always = 0. **/ int value = passenger.getAge(); int index = value % 5; if (index <= 0) { @@ -138,21 +152,25 @@ private double adaptSpeed() { return speedmodel[index - 1][1]; } + /** + * Adapt luggage. + * + * @return the luggage size + */ private LuggageSize adaptLuggage() { double[] luggagemodel = { - this.luggageSettings.getPercentageOfPassengersWithNoLuggage(), - this.luggageSettings - .getPercentageOfPassengersWithSmallLuggage(), - this.luggageSettings - .getPercentageOfPassengersWithMediumLuggage(), - this.luggageSettings - .getPercentageOfPassengersWithBigLuggage() }; - - if (luggagemodel[0] == 0 && luggagemodel[1] == 0 && luggagemodel[2] == 0 - && luggagemodel[3] == 0) { + luggageSettings.getPercentageOfPassengersWithNoLuggage(), + luggageSettings.getPercentageOfPassengersWithSmallLuggage(), + luggageSettings.getPercentageOfPassengersWithMediumLuggage(), + luggageSettings.getPercentageOfPassengersWithBigLuggage() }; + + if ((luggagemodel[0] == 0 && luggagemodel[1] == 0 + && luggagemodel[2] == 0 && luggagemodel[3] == 0) + || ((luggagemodel[0] + luggagemodel[1] + luggagemodel[2] + + luggagemodel[3]) == 0)) { luggagemodel[0] = 100; - System.out.println("CAUTION, ERROR IN LUGGAGE DISTRIBUTION."); + Log.add(this, "CAUTION, ERROR IN LUGGAGE DISTRIBUTION."); } ProbabilityMachine machine = new ProbabilityMachine(luggagemodel); @@ -178,8 +196,8 @@ private LuggageSize adaptLuggage() { /** * This function adapts a specific luggage stowing time using a Gaussian - * distribution depending on the luggage size - * + * distribution depending on the luggage size. + * * @return stowing time in s */ private double adaptLuggageStowTime() { @@ -210,16 +228,16 @@ private double adaptLuggageStowTime() { /** * This function adapts a specific luggage stowing distance using a Gaussian - * distribution - * + * distribution. + * * @return stowing distance in cm */ private double defineLuggageStowDistance() { return GaussianRandom.gaussianRandom( - luggageSettings.getLuggageStowingDistanceFromSeatMean(), + luggageSettings.getLuggageStowDistanceFromSeatMean(), GaussOptions.PERCENT_95, - luggageSettings.getLuggageStowingDistanceFromSeatDeviation()); + luggageSettings.getLuggageStowDistanceFromSeatDeviation()); } /** @@ -231,34 +249,34 @@ private double defineLuggageStowDistance() { */ private int adaptAge() { - /* This class is used for the probability calculations */ + /* This class is used for the probability calculations **/ ProbabilityMachine machine = new ProbabilityMachine(agemodel, 5); - /* Define the lower bound of the age model. */ + /* Define the lower bound of the age model. **/ machine.setLowerBound(20); - /* Define the upper bound of the age model. */ + /* Define the upper bound of the age model. **/ machine.setUpperBound(80); - /* This returns the index of the object in the age model. */ + /* This returns the index of the object in the age model. **/ int index = machine.getProbabilityValue(passenger.getSex()); /* * To translate this to an age, multiply it with 5, because each element * stands for a 5 year range. - */ + **/ int age = index * 5; if (age < 5) { age = 5; } - /* Then create a random number within the 5 year range. */ + /* Then create a random number within the 5 year range. **/ return RandomHelper.randomValue(age - 5, age); } /** - * This method takes four variables and performs the gauss distribution for + * This method takes four variables and performs the Gauss distribution for * the correct two ones. * * @param one @@ -269,7 +287,7 @@ private int adaptAge() { * is the female mean value * @param four * is the female deviation value - * @return is a gaussian random value + * @return is a Gaussian random value */ private double adapt(double one, double two, double three, double four) { return getGauss95(applySwitch(one, three), applySwitch(two, four)); @@ -291,16 +309,32 @@ private Sex switchRandomSex(double percentageOfWomen) { return Sex.MALE; } + + /** + * This method switches the mood of the passengers according to the + * probability of aggressive agents. + * + * @param percentageOfAggressiveAgents the percentage of aggressive agents + * @return returns the sex. + */ + + private PassengerMood switchRandomMood(double percentageOfAggressiveAgents) { + if (RandomHelper.randomValue(0, 100) < percentageOfAggressiveAgents) { + return PassengerMood.AGGRESSIVE; + } + return PassengerMood.PASSIVE; + + } /** - * This function performs the gaussian distribution for a specific mean and + * This function performs the Gaussian distribution for a specific mean and * deviation value. * * @param mean * the mean value * @param deviation * the deviation value - * @return a random gauss value + * @return a random Gauss value */ private double getGauss95(double mean, double deviation) { return GaussianRandom.gaussianRandom(mean, GaussOptions.PERCENT_95, diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ProbabilityMachine.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ProbabilityMachine.java index df06feae..d6e3dbb8 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ProbabilityMachine.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/ProbabilityMachine.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import net.bhl.cdt.paxelerate.model.Sex; @@ -7,32 +12,65 @@ * of each value. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class ProbabilityMachine { + /** The model. */ private double[][] model; + + /** The model2. */ private double[] model2; + + /** The value of a step. */ private int lowerBound = 0, upperBound = Integer.MAX_VALUE, valueOfAStep; + /** + * Instantiates a new probability machine. + * + * @param datamodel the datamodel + * @param stepValues the step values + */ public ProbabilityMachine(double[][] datamodel, int stepValues) { this.model = datamodel; this.valueOfAStep = stepValues; } + /** + * Instantiates a new probability machine. + * + * @param datamodel2 the datamodel2 + */ public ProbabilityMachine(double[] datamodel2) { this.model2 = datamodel2; this.valueOfAStep = 1; } + /** + * Sets the lower bound. + * + * @param value the new lower bound + */ public void setLowerBound(int value) { lowerBound = value; } + /** + * Sets the upper bound. + * + * @param value the new upper bound + */ public void setUpperBound(int value) { upperBound = value; } + /** + * Gets the probability value. + * + * @return the probability value + */ public int getProbabilityValue() { int n = model2.length; @@ -58,6 +96,12 @@ public int getProbabilityValue() { return index; } + /** + * Gets the probability value. + * + * @param sex the sex + * @return the probability value + */ public int getProbabilityValue(Sex sex) { int n = model.length; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/Rotator.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/Rotator.java index d116aa9a..d8ca23d2 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/Rotator.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/Rotator.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import net.bhl.cdt.paxelerate.util.math.Vector; @@ -7,10 +12,19 @@ * This class is used to rotate an array or part of an array. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class Rotator { + /** + * Round index to point. + * + * @param index the index + * @param radius the radius + * @return the vector + */ private static Vector RoundIndexToPoint(int index, int radius) { if (radius == 0) return new Vector2D(0, 0); @@ -113,6 +127,12 @@ private static Vector RoundIndexToPoint(int index, int radius) { // return false; // } + /** + * Rotate45. + * + * @param array the array + * @return the int[][] + */ private static int[][] rotate45(int[][] array) { int dim = Math.max(array[0].length, array.length); @@ -147,6 +167,13 @@ private static int[][] rotate45(int[][] array) { return result; } + /** + * Rotate. + * + * @param degrees the degrees + * @param array the array + * @return the int[][] + */ public static int[][] rotate(int degrees, int[][] array) { if (degrees == 0 || degrees % 45 != 0) { return null; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/SimulationResultLogger.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/SimulationResultLogger.java index 4a67b1a1..53d922ea 100644 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/SimulationResultLogger.java +++ b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/SimulationResultLogger.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package net.bhl.cdt.paxelerate.model.util; import java.text.DecimalFormat; @@ -18,22 +23,46 @@ * This class is used to handle passenger data and to analyze and export it. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class SimulationResultLogger { + /** The total pax. */ private int totalPax; + + /** The average_age. */ private double average_age; + + /** The df. */ private DecimalFormat df = new DecimalFormat("#.##"); + + /** The pax list. */ private EList paxList; + + /** The age limits. */ private Vector2D ageLimits; + /** + * Instantiates a new simulation result logger. + */ public SimulationResultLogger() { } - public void getSimulationData(Cabin cabin, int runNumber, double time) { + /** + * Gets the simulation data. + * + * @param cabin the cabin + * @param runNumber the run number + * @param time the time + * @param waymakingSkipped the waymaking skipped + * @param waymakingCompleted the waymaking completed + * @return the simulation data + */ + public void getSimulationData(Cabin cabin, int runNumber, double time, int waymakingSkipped, int waymakingCompleted) { SimulationResult result = CabinFactory.eINSTANCE .createSimulationResult(); @@ -47,10 +76,19 @@ public void getSimulationData(Cabin cabin, int runNumber, double time) { result.setName(dateFormat.format(date)); result.setDate(date); result.setBoardingTimeString(TimeHelper.toTimeOfDay(time)); + result.setWaymakingSkipped(waymakingSkipped); + result.setWaymakingCompleted(waymakingCompleted); + result.setLayoutConceptType(cabin.getSimulationSettings().getLayoutConcept()); SimulationHandler.getCabin().getSimulationSettings().getResults() .add(result); } + /** + * Gets the passenger data. + * + * @param paxList the pax list + * @return the passenger data + */ public void getPassengerData(EList paxList) { this.paxList = paxList; @@ -58,7 +96,7 @@ public void getPassengerData(EList paxList) { // passengers, their waiting times, their boarding times, their number // of interrupts, ... - // TODO: the data could be output to a text file. + // the data could be output to a text file. totalPax = paxList.size(); @@ -73,6 +111,11 @@ public void getPassengerData(EList paxList) { } + /** + * Find maxima. + * + * @return the vector2 d + */ private Vector2D findMaxima() { int max = 0; int min = Integer.MAX_VALUE; @@ -88,6 +131,9 @@ private Vector2D findMaxima() { return new Vector2D(min, max); } + /** + * Prints the passenger evaluation. + */ public void printPassengerEvaluation() { System.out @@ -105,6 +151,9 @@ public void printPassengerEvaluation() { .println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); } + /** + * Prints the simulation data. + */ public void printSimulationData() { System.out.println("~~~~~~~~~~ Simulation Results ~~~~~~~~~~~"); System.out.println(); @@ -131,6 +180,11 @@ public void printSimulationData() { } + /** + * Gets the average boarding time. + * + * @return the average boarding time + */ private double getAverageBoardingTime() { double time = 0; diff --git a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/TCHelper.java b/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/TCHelper.java deleted file mode 100644 index 35c43c8e..00000000 --- a/net.bhl.cdt.paxelerate.model/src/net/bhl/cdt/paxelerate/model/util/TCHelper.java +++ /dev/null @@ -1,89 +0,0 @@ -package net.bhl.cdt.paxelerate.model.util; - -import java.util.List; - -import net.bhl.cdt.model.util.ModelHelper; -import net.bhl.cdt.paxelerate.model.BusinessClass; -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.EconomyClass; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.PremiumEconomyClass; -import net.bhl.cdt.paxelerate.model.TravelClass; -import net.bhl.cdt.paxelerate.model.TravelOption; - -/** - * - * @author marc.engelmann - * - */ - -// TODO: Implement these functions directly into Cabin.java ? // CabinImpl.java? - -public class TCHelper { - - /** - * - * @param cabin - * @return - */ - public static List getFirstClasses(Cabin cabin) { - return ModelHelper.getChildrenByClass(cabin, FirstClass.class); - } - - /** - * - * @param cabin - * @return - */ - public static List getBusinessClasses(Cabin cabin) { - return ModelHelper.getChildrenByClass(cabin, BusinessClass.class); - } - - /** - * - * @param cabin - * @return - */ - public static List getEconomyClasses(Cabin cabin) { - return ModelHelper.getChildrenByClass(cabin, EconomyClass.class); - } - - /** - * - * @param cabin - * @return - */ - public static List getPremiumEconomyClasses( - Cabin cabin) { - return ModelHelper.getChildrenByClass(cabin, PremiumEconomyClass.class); - } - - /** - * - * @param option - * @param cabin - * @return - */ - - // TODO: make this better! - @SuppressWarnings("unchecked") - public static List getClassesByOption(TravelOption option, - Cabin cabin) { - switch (option) { - case FIRST_CLASS: - return (List) (Object) ModelHelper - .getChildrenByClass(cabin, FirstClass.class); - case BUSINESS_CLASS: - return (List) (Object) ModelHelper - .getChildrenByClass(cabin, BusinessClass.class); - case PREMIUM_ECONOMY_CLASS: - return (List) (Object) ModelHelper - .getChildrenByClass(cabin, PremiumEconomyClass.class); - case ECONOMY_CLASS: - return (List) (Object) ModelHelper - .getChildrenByClass(cabin, EconomyClass.class); - default: - return null; - } - } -} diff --git a/net.bhl.cdt.paxelerate.test/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.test/META-INF/MANIFEST.MF index ca63667d..8f5583fb 100644 --- a/net.bhl.cdt.paxelerate.test/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.test/META-INF/MANIFEST.MF @@ -2,13 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PAXelerate - Test Bundle-SymbolicName: net.bhl.cdt.paxelerate.test -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Bundle-Vendor: http://www.paxelerate.com/ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.junit, - net.bhl.cdt.paxelerate.util;bundle-version="0.6.0", - net.bhl.cdt.paxelerate.model;bundle-version="0.6.0", - net.bhl.cdt.paxelerate.ui;bundle-version="0.6.0" + net.bhl.cdt.paxelerate.util;bundle-version="0.7.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy diff --git a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/ui/commands/TestMoveObjectCommand.java b/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/ui/commands/TestMoveObjectCommand.java deleted file mode 100644 index e35d2430..00000000 --- a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/ui/commands/TestMoveObjectCommand.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************/ - -package net.bhl.cdt.paxelerate.test.ui.commands; - -import static org.junit.Assert.fail; - -import org.junit.BeforeClass; -import org.junit.Test; - -import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.MainDoor; -import net.bhl.cdt.paxelerate.model.ObjectOption; -import net.bhl.cdt.paxelerate.model.StandardDoor; -import net.bhl.cdt.paxelerate.model.TravelOption; -import net.bhl.cdt.paxelerate.model.util.ConstructionLibrary; - -/** - * Test class for MoveObjectCommand.java imported from - * net.bhl.cdt.paxelerate.ui.commands - * - * @author michael.schmidt - */ - -public class TestMoveObjectCommand { - - private static Cabin cabin; - private static ConstructionLibrary constructor; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - - cabin.setYDimension(364); - cabin.setXDimension(2460); - - /* ------- Cabin Construction starts here! --------- */ - constructor = new ConstructionLibrary(cabin); - // constructor.clearCabin(); - constructor.createDoor(EmergencyExit.class, true, 3, 935); - constructor.createDoor(EmergencyExit.class, true, 4, 1228); - constructor.createPhysicalObject(ObjectOption.LAVATORY, 100); - constructor.createDoor(MainDoor.class, true, 1, -1); - constructor.createPhysicalObject(ObjectOption.GALLEY, 100); - - /* - * Note that the classes are generated in the order that they are - * defined in in the enum - */ - for (TravelOption option : TravelOption.VALUES) { - constructor.createClass(option); - } - - constructor.createPhysicalObject(ObjectOption.GALLEY, 100); - constructor.createDoor(StandardDoor.class, true, 2, -1); - constructor.createPhysicalObject(ObjectOption.LAVATORY, 100); - cabin = constructor.getCabin(); - // cabin.setUsePresetSettings(false); - /* ------- Cabin Construction ends here! ----------- */ - } - - @Test - public void modXCoordinate() { - fail("Not yet implemented"); - } - -} diff --git a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/string/TestStringHelper.java b/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/string/TestStringHelper.java index caa5fae7..ff3e7fd7 100644 --- a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/string/TestStringHelper.java +++ b/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/string/TestStringHelper.java @@ -25,9 +25,13 @@ */ public class TestStringHelper { + /** The rand. */ // Provide random Integer generator private static Random rand = new Random(); + /** + * Checks if is integer test. + */ @Test public void isIntegerTest() { // Create and test non-Integer Strings @@ -42,6 +46,9 @@ public void isIntegerTest() { assertTrue(number + " falsely rejected as Text.", StringHelper.isInteger(number)); } + /** + * Checks if is positive integer test. + */ @Test public void isPositiveIntegerTest() { // Create and test negative Integer @@ -55,6 +62,9 @@ public void isPositiveIntegerTest() { StringHelper.isPositiveInteger(positiveInteger)); } + /** + * To string test. + */ @Test public void toStringTest() { assertNull("0 falsely converted to char.", StringHelper.toString(0)); @@ -64,6 +74,9 @@ public void toStringTest() { assertNull("27 falsely converted to char.", StringHelper.toString(27)); } + /** + * Split camel case test. + */ @Test public void splitCamelCaseTest() { String[] tests = { "lowercase", "Class", "MyClassTestTesterText", "HTML", "PDFLoader", "AString", "SimpleXMLParser", diff --git a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/time/TestTimeHelper.java b/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/time/TestTimeHelper.java index 603b63a1..eb301cfe 100644 --- a/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/time/TestTimeHelper.java +++ b/net.bhl.cdt.paxelerate.test/src/net/bhl/cdt/paxelerate/test/util/time/TestTimeHelper.java @@ -24,6 +24,11 @@ */ public class TestTimeHelper { + /** + * Gets the current time of day test. + * + * @return the current time of day test + */ @Test public void getCurrentTimeOfDayTest() { // Retrieve current date and define time of day format @@ -33,6 +38,9 @@ public void getCurrentTimeOfDayTest() { assertEquals("Wrong time format.", dateFormat.format(date), TimeHelper.getCurrentTimeOfDay()); } + /** + * To time of day test. + */ @Test public void toTimeOfDayTest() { // Maximum number of seconds in a day diff --git a/net.bhl.cdt.paxelerate.ui/.checkstyle b/net.bhl.cdt.paxelerate.ui/.checkstyle new file mode 100644 index 00000000..c8e33e1e --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/net.bhl.cdt.paxelerate.ui/.project b/net.bhl.cdt.paxelerate.ui/.project index 39ba1a82..7eda1929 100644 --- a/net.bhl.cdt.paxelerate.ui/.project +++ b/net.bhl.cdt.paxelerate.ui/.project @@ -20,9 +20,15 @@ + + net.sf.eclipsecs.core.CheckstyleBuilder + + + org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature diff --git a/net.bhl.cdt.paxelerate.ui/.settings/org.eclipse.core.resources.prefs b/net.bhl.cdt.paxelerate.ui/.settings/org.eclipse.core.resources.prefs index a3610d09..3d0262e2 100644 --- a/net.bhl.cdt.paxelerate.ui/.settings/org.eclipse.core.resources.prefs +++ b/net.bhl.cdt.paxelerate.ui/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,6 @@ eclipse.preferences.version=1 encoding//src/net/bhl/cdt/paxelerate/ui/views/CabinViewPart.java=UTF-8 +encoding//src/net/bhl/cdt/paxelerate/ui/views/HeatmapPart.java=UTF-8 +encoding//src/net/bhl/cdt/paxelerate/ui/views/PotentialViewPart.java=UTF-8 encoding//src/net/bhl/cdt/paxelerate/ui/views/PropertyViewPart.java=UTF-8 encoding//src/net/bhl/cdt/paxelerate/ui/views/SimulationView.java=UTF-8 diff --git a/net.bhl.cdt.paxelerate.ui/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.ui/META-INF/MANIFEST.MF index 6aa42eb3..0acea263 100644 --- a/net.bhl.cdt.paxelerate.ui/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.ui/META-INF/MANIFEST.MF @@ -2,23 +2,22 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PAXelerate - User Interface Bundle-SymbolicName: net.bhl.cdt.paxelerate.ui;singleton:=true -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Bundle-Activator: net.bhl.cdt.paxelerate.ui.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.swt, net.bhl.cdt.ui, - net.bhl.cdt.paxelerate.model;bundle-version="0.6.0", - net.bhl.cdt.paxelerate.util;bundle-version="0.6.0", + net.bhl.cdt.paxelerate.model;bundle-version="0.7.0", + net.bhl.cdt.paxelerate.util;bundle-version="0.7.0", org.eclipse.emf.ecp.explorereditorbridge, org.eclipse.ui.intro, javax.inject Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: net.bhl.cdt.paxelerate.ui, - net.bhl.cdt.paxelerate.ui.color, net.bhl.cdt.paxelerate.ui.commands, - net.bhl.cdt.paxelerate.ui.font, - net.bhl.cdt.paxelerate.ui.image, + net.bhl.cdt.paxelerate.ui.preferences, net.bhl.cdt.paxelerate.ui.views Bundle-Vendor: http://www.paxelerate.com/ +Import-Package: net.bhl.cdt.paxelerate.model.provider diff --git a/net.bhl.cdt.paxelerate.ui/doc/tutorial.xml b/net.bhl.cdt.paxelerate.ui/doc/tutorial.xml new file mode 100644 index 00000000..dcdafeb5 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/doc/tutorial.xml @@ -0,0 +1,59 @@ + + + + + + After a first launch of PAXelerate the welcome page will greet you. To get started, create a new project and select EMF StoreYou can start to create a new cabin layout with a right click on the aircraft project folder in the model explorer. In the context menu select New Model Element which opens a pop-up window with a selection of possible elements. The Cabin is the root element and should be created first. The remaining elements are children and can be added in the further course. The standard view dispWe are happy to receive your feedback. If you discover any bugs, please attach the log file stored in workspace/.metadata/ to your bug report. + This tutorial is based on PAXelerate release: Alpha 0.6 (03/31/2016)appy to receive your feedback. If you discover any bugs, please attach the log file stored in workspace/.metadata/ to your <a href="https://github.com/BauhausLuftfahrt/PAXelerate/issues/new" >bug report.</a>e parameter and associated values dived into Aircraft Parameters and Preferences. Additional to the Cabin element, also the Simulation Properties are supplemented. <br /> + +Using the Generate Cabin function accessible through the context menu applies a predefined algorithm to create a first layout. Further elements, such as Economy Class, Emergency Exit 3 or Lavatory 1, are generated as children of Cabin. The properties of each element are accessible with a double-click which opens another tab on the standard view. The cabin view is updated accordingly and shows you the general arrangement. der. The general perspective is composed with the model explorer on the left which contains the just created project. The property view underneath contains an overview of the passenger characteristics distribution, such as anthroprometric and luggage parameters. Right now, it is still empty since no passengers are created so far. The console view shows you a history of executed commands and lists warnings if something went wrong. The cabin view on the right will display a rendering of the current cabin layout. The standard view in the middle is currently still empty, it will contain parameters and assigned values for the selected model element. + This tutorial is based on PAXelerate release: Alpha 0.6 (02/15/2016) + + + + + Body + + + + + Body + + + + + Body + + + + + Body + + + + This tutorial is based on PAXelerate release: Alpha 0.6 (02/15/2016) + This tutorial is based on PAXelerate release: Alpha 0.5 (02/15/2016) + This tutorial is based on PAXelerate release: Alpha 0.5 (02/15/2016) + First encounter with PAXeleratedescription> + + + + You can start to create a new cabin layout with a right click on the aircraft project folder in the model explorer. In the context menu select New Model Element which opens a pop-up window with a selection of possible elements. The Cabin is the root element and should be created first. The remaining elements are children and can be added in the further course. The standard view displays now the parameter and associated values dived into Aircraft Parameters and Preferences. Additional to the Cabin element, also the Simulation Properties are supplemented. + +Using the Generate Cabin function accessible through the context menu applies a predefined algorithm to create a first layout. Further elements, such as Economy Class, Emergency Exit 3 or Lavatory 1, are generated as children of Cabin. The properties of each element are accessible with a double-click which opens another tab on the standard view. The cabin view is updated accordingly and shows you the general arrangement. + + ch of PAXelerate the welcome page will greet you. To get started, create a new project and select EMF Store as a provider. The general perspective is composed with the model explorer on the left which contains the just created project. The property view underneath contains an overview of the passenger characteristics distribution, such as anthroprometric and luggage parameters. Right now, it is still empty since no passengers are created so far. The console view shows you a history of executed commands and lists warnings if something went wrong. The cabin view on the right will display a rendering of the current cabin layout. The standard view in the middle is currently still empty, it will contain parameters and assigned values for the selected model element. title="Item"> + + Body + + + diff --git a/net.bhl.cdt.paxelerate.ui/images/about.png b/net.bhl.cdt.paxelerate.ui/images/about.png index 7dfa8171..f12ccb43 100644 Binary files a/net.bhl.cdt.paxelerate.ui/images/about.png and b/net.bhl.cdt.paxelerate.ui/images/about.png differ diff --git a/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_1.png b/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_1.png new file mode 100644 index 00000000..5486f98f Binary files /dev/null and b/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_1.png differ diff --git a/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_2.png b/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_2.png new file mode 100644 index 00000000..831973a0 Binary files /dev/null and b/net.bhl.cdt.paxelerate.ui/images/aircraft/interior/economy_seat_folded_2.png differ diff --git a/net.bhl.cdt.paxelerate.ui/images/icons/export.png b/net.bhl.cdt.paxelerate.ui/images/icons/export.png new file mode 100644 index 00000000..f18ba86c Binary files /dev/null and b/net.bhl.cdt.paxelerate.ui/images/icons/export.png differ diff --git a/net.bhl.cdt.paxelerate.ui/plugin.xml b/net.bhl.cdt.paxelerate.ui/plugin.xml index 63c0a403..ebe2b934 100644 --- a/net.bhl.cdt.paxelerate.ui/plugin.xml +++ b/net.bhl.cdt.paxelerate.ui/plugin.xml @@ -5,6 +5,7 @@ point="org.eclipse.ui.views"> + + + + + + @@ -65,6 +89,16 @@ id="net.bhl.cdt.paxelerate.ui.cloneObject" name="Clone Object"> + + + + @@ -183,6 +217,20 @@ + + + + + + + + @@ -216,6 +264,11 @@ style="push"> + + - - - - - - Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -12,20 +12,27 @@ import org.eclipse.emf.ecp.core.util.ECPFilterProvider; /** - * Filter all EPackages not associated with .cdt.paxelerate. - * Used by ExtensionPoint filter. + * Filter all EPackages not associated with .cdt.paxelerate. Used by + * ExtensionPoint filter. * - * @author David Otter, Michael Schmidt, raoul.rothfeld + * @author David Otter, michael.schmidt, raoul.rothfeld + * @version 1.0 + * @since 0.5 * */ public class DefaultFilterProvider implements ECPFilterProvider { + /* + * (non-Javadoc) + * + * @see org.eclipse.emf.ecp.core.util.ECPFilterProvider#getHiddenPackages() + */ @Override - public Set getHiddenPackages() { + public final Set getHiddenPackages() { Set relevantURIs = new HashSet(Registry.INSTANCE.keySet()); - + relevantURIs.remove("http://net.bhl.cdt.paxelerate.model/"); - + return relevantURIs; } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/WelcomePage.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/WelcomePage.java index f7d89678..4909ba9a 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/WelcomePage.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/WelcomePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -11,64 +11,66 @@ import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowData; -import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.ExpandBar; -import org.eclipse.swt.widgets.ExpandItem; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Link; -import org.eclipse.swt.widgets.Text; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.intro.IIntroPart; import org.eclipse.ui.part.IntroPart; - /** * PAXWelcome page which will be shown at the first start. * - * @author Michael Kagel, Michael Schmidt + * @author Michael Kagel, michael.schmidt + * @version 1.0 + * @since 0.6 */ public class WelcomePage extends IntroPart implements IIntroPart { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.part.IntroPart#createPartControl(org.eclipse.swt.widgets. + * Composite) + */ @Override - public void createPartControl(Composite parent) { + public final void createPartControl(final Composite parent) { Composite outerContainer = new Composite(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(); gridLayout.marginLeft = gridLayout.marginTop = gridLayout.marginRight = gridLayout.marginBottom = 10; gridLayout.verticalSpacing = 10; outerContainer.setLayout(gridLayout); - + // Welcome message Label newWelcomeLabel = new Label(outerContainer, SWT.NONE); GridData gridData = new GridData(SWT.CENTER, SWT.TOP, true, false); newWelcomeLabel.setLayoutData(gridData); newWelcomeLabel.setText("Welcome to PAXelerate - an open source passenger flow simulation framework " + "for advanced aircraft cabin layouts!"); - + // Group #1 Group group1 = new Group(outerContainer, SWT.NONE); - group1.setText("New Project"); - gridData = new GridData(SWT.CENTER, SWT.TOP, true, false); - group1.setLayoutData(gridData); - - Label label1 = new Label (group1, SWT.NONE); + group1.setText("New Project"); + gridData = new GridData(SWT.CENTER, SWT.TOP, true, false); + group1.setLayoutData(gridData); + + Label label1 = new Label(group1, SWT.NONE); label1.setText("To get started, create a new project and select EMF Store as a provider. "); - label1.setLocation(10,20); + label1.setLocation(10, 20); label1.pack(); - + Button newProjectButton = new Button(group1, SWT.PUSH); newProjectButton.setText("New Project"); newProjectButton.setLayoutData(gridData); newProjectButton.computeSize(SWT.DEFAULT, SWT.DEFAULT); - newProjectButton.setLocation(150,40); - + newProjectButton.setLocation(150, 40); + newProjectButton.addSelectionListener(new SelectionListener() { @Override - public void widgetSelected(SelectionEvent e) { + public void widgetSelected(final SelectionEvent e) { dispose(); ECPHandlerHelper.createProject(PlatformUI.getWorkbench().getDisplay().getActiveShell()); @@ -76,57 +78,71 @@ public void widgetSelected(SelectionEvent e) { } @Override - public void widgetDefaultSelected(SelectionEvent e) { + public void widgetDefaultSelected(final SelectionEvent e) { // do nothing } }); newProjectButton.pack(); group1.pack(); - - + // Group #2 Group group2 = new Group(outerContainer, SWT.NONE); - group2.setText("First encounter with PAXelerate"); - gridData = new GridData(SWT.CENTER, SWT.TOP, true, false); - group2.setLayoutData(gridData); - - Label label2 = new Label (group2, SWT.NONE); + group2.setText("First encounter with PAXelerate"); + gridData = new GridData(SWT.CENTER, SWT.TOP, true, false); + group2.setLayoutData(gridData); + + Label label2 = new Label(group2, SWT.NONE); label2.setText("1. Add a new Cabin model element with a right click on the aircraft project folder."); - label2.setLocation(20,20); + label2.setLocation(20, 20); label2.pack(); - label2 = new Label (group2, SWT.NONE); + label2 = new Label(group2, SWT.NONE); label2.setText("2 Use the Generate New Cabin function to create a first layout."); - label2.setLocation(20,40); + label2.setLocation(20, 40); label2.pack(); - label2 = new Label (group2, SWT.NONE); + label2 = new Label(group2, SWT.NONE); label2.setText("3. Add passenger with Generate Passengers"); - label2.setLocation(20,60); + label2.setLocation(20, 60); label2.pack(); - label2 = new Label (group2, SWT.NONE); + label2 = new Label(group2, SWT.NONE); label2.setText("4. And finally start the boarding simulation"); - label2.setLocation(20,80); + label2.setLocation(20, 80); label2.pack(); - label2 = new Label (group2, SWT.NONE); + label2 = new Label(group2, SWT.NONE); label2.setText("A more detailed tutorial is provided on the PAXelerate website"); - label2.setLocation(10,100); + label2.setLocation(10, 100); label2.pack(); - group2.pack(); + group2.pack(); } + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.part.IntroPart#setFocus() + */ @Override public void setFocus() { - // TODO Auto-generated method stub + // Auto-generated method stub } + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.intro.IIntroPart#standbyStateChanged(boolean) + */ @Override - public void standbyStateChanged(boolean standby) { - // TODO Auto-generated method stub + public void standbyStateChanged(final boolean standby) { + // Auto-generated method stub } + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.part.IntroPart#dispose() + */ @Override - public void dispose() { + public final void dispose() { super.dispose(); this.getIntroSite().getWorkbenchWindow().getWorkbench().getIntroManager().closeIntro(this); } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/color/ColorHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/color/ColorHelper.java deleted file mode 100644 index e2f3b652..00000000 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/color/ColorHelper.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************/ - -package net.bhl.cdt.paxelerate.ui.color; - -import java.util.Random; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Device; -import org.eclipse.swt.widgets.Display; - -/** - * Unified coloring system for Paxelerate - * - * @author marc.engelmann, raoul.rothfeld - */ -public class ColorHelper { - - /** - * The color displaying device/component - */ - private static final Device d = Display.getCurrent(); - - /** - * All Paxelerate colors - */ - public static final Color - // General colors - BLACK = new Color(d, 0, 0, 0), - GREY_DARK = new Color(d, 51, 51, 51), - GREY_LIGHT = new Color(d, 193, 193, 193), - RED = new Color(d, 255, 0, 0), - ORANGE = new Color(d, 255, 122, 0), - YELLOW = new Color(d, 255, 255, 0), - GREEN = new Color(d, 0, 255, 0), - GREEN_LIGHT = new Color(d, 122, 255, 0), - BLUE = new Color(d, 0, 0, 255), - WHITE = new Color(d, 0, 0, 0), - - // Program colors - ERROR = new Color(d, 255, 51, 51), - - // Passenger colors - PASSENGER_MALE = new Color(d, 51, 153, 255), - PASSEMGER_FEMALE = new Color(d, 255, 153, 255), - - // Luggage colors - LUGGAGE_NONE = new Color(d, 127, 112, 99), - LUGGAGE_SMALL = new Color(d, 255, 162, 76), - LUGGAGE_MEDIUM = new Color(d, 204, 97, 0), - LUGGAGE_LARGE = new Color(d, 127, 61, 0), - - // Aircraft colors - AIRCRAFT_FLOOR = new Color(d, 237, 243, 245), - AIRCRAFT_LAVATORY = new Color(d, 255, 160, 122); - - /** - * Singleton constructor for a ColorHelper instance - */ - private ColorHelper() { - } - - /** - * Returns a random color - * - * @return the random color - */ - public static Color getRandomColor() { - Random r = new Random(); - return new Color(d, r.nextInt(256), r.nextInt(256), r.nextInt(256)); - } - -} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/CloneObjectCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/CloneObjectCommand.java index 7f8c0aa1..53d08adc 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/CloneObjectCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/CloneObjectCommand.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ package net.bhl.cdt.paxelerate.ui.commands; import org.eclipse.jface.dialogs.IMessageProvider; @@ -13,20 +18,25 @@ import net.bhl.cdt.paxelerate.util.input.Input.WindowType; /** - * - * @author marc.engelmann + * The Class CloneObjectCommand. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class CloneObjectCommand extends CDTCommand { + /** The row. */ private Row row; /** - * + * Instantiates a new clone object command. + * * @param obj + * the obj */ - public CloneObjectCommand(Object obj) { + public CloneObjectCommand(final Object obj) { if (obj instanceof Row) { row = (Row) obj; @@ -38,7 +48,7 @@ public CloneObjectCommand(Object obj) { * This method executed the right click command. */ @Override - protected void doRun() { + protected final void doRun() { Input input = new Input(WindowType.CLONE_OBJECT, "Enter the number of rows you want to add (integer values).", IMessageProvider.INFORMATION); @@ -57,7 +67,7 @@ protected void doRun() { Seat newSeat = CabinFactory.eINSTANCE.createSeat(); - newSeat.setXPosition(seat.getXPosition() + travelclass.getSeatPitch()); + newSeat.setXPosition(seat.getXPosition() + seat.getXDimension() + travelclass.getSeatPitch()); newSeat.setYPosition(seat.getYPosition()); newSeat.setXDimension(seat.getXDimension()); newSeat.setYDimension(seat.getYDimension()); diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/DrawCabinCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/DrawCabinCommand.java index d1f63ae9..ae3e184a 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/DrawCabinCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/DrawCabinCommand.java @@ -6,15 +6,14 @@ package net.bhl.cdt.paxelerate.ui.commands; import java.util.ArrayList; - -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; +import java.util.HashMap; +import java.util.Map; import net.bhl.cdt.commands.CDTCommand; import net.bhl.cdt.model.util.ModelHelper; import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.CabinFactory; +import net.bhl.cdt.paxelerate.model.LayoutConcept; import net.bhl.cdt.paxelerate.model.LuggageProperties; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.PassengerProperties; @@ -23,7 +22,7 @@ import net.bhl.cdt.paxelerate.model.Seat; import net.bhl.cdt.paxelerate.model.SimulationProperties; import net.bhl.cdt.paxelerate.model.TravelClass; -import net.bhl.cdt.paxelerate.model.util.EMFModelStore; +import net.bhl.cdt.paxelerate.model.util.PassengerGenerator; import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; import net.bhl.cdt.paxelerate.ui.views.PropertyViewPart; import net.bhl.cdt.paxelerate.ui.views.ViewPartHelper; @@ -35,14 +34,23 @@ * layout of the cabin and warns the user. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class DrawCabinCommand extends CDTCommand { + /** The cabin. */ private Cabin cabin; + + /** The cabin view part. */ private CabinViewPart cabinViewPart; + + /** The property view part. */ private PropertyViewPart propertyViewPart; + + /** The error strings. */ private ArrayList errorStrings = new ArrayList(); /** @@ -51,7 +59,7 @@ public class DrawCabinCommand extends CDTCommand { * @param cabin * the cabin */ - public DrawCabinCommand(Cabin cabin) { + public DrawCabinCommand(final Cabin cabin) { this.cabin = cabin; } @@ -59,7 +67,16 @@ public DrawCabinCommand(Cabin cabin) { * This method executed the right click command. The cabin view is updated. */ @Override - protected void doRun() { + protected final void doRun() { + + int countedPax = 0; + for (TravelClass tc : cabin.getClasses()) { + countedPax += tc.getPassengers(); + } + + if (countedPax != cabin.getPassengers().size()) { + new GeneratePassengersCommand(cabin).doRun(); + } /** * Main method. @@ -70,8 +87,11 @@ protected void doRun() { SimulationProperties settings = cabin.getSimulationSettings(); if (settings == null) { + + System.out.println("no settings found!"); settings = CabinFactory.eINSTANCE.createSimulationProperties(); cabin.setSimulationSettings(settings); + } LuggageProperties luggageSettings = cabin.getSimulationSettings().getLuggageProperties(); @@ -88,13 +108,12 @@ protected void doRun() { cabin.getSimulationSettings().setPassengerProperties(paxSettings); } - double[] luggagemodel = { luggageSettings.getPercentageOfPassengersWithNoLuggage(), - luggageSettings.getPercentageOfPassengersWithSmallLuggage(), - luggageSettings.getPercentageOfPassengersWithMediumLuggage(), - luggageSettings.getPercentageOfPassengersWithBigLuggage() }; - - if ((luggagemodel[0] + luggagemodel[1] + luggagemodel[2] + luggagemodel[3]) == 0) { - cabin.getSimulationSettings().getLuggageProperties().setPercentageOfPassengersWithNoLuggage(100); + int count = 1; + for (TravelClass tc : cabin.getClasses()) { + if (tc.getName().isEmpty()) { + tc.setName(StringHelper.splitCamelCase(tc.getTravelOption().getName()) + " #" + count); + } + count++; } cabinViewPart = ViewPartHelper.getCabinView(); @@ -116,6 +135,7 @@ protected void doRun() { propertyViewPart.updateUI(cabin); } catch (NullPointerException e) { Log.add(this, "No property view is visible!"); + e.printStackTrace(); } try { @@ -123,12 +143,20 @@ protected void doRun() { Log.add(this, "Cabin view checked and updated"); } catch (NullPointerException e) { Log.add(this, "No cabin view is visible!"); + e.printStackTrace(); } /* This stores the cabin as an .XMI file into the local storage. */ - EMFModelStore.store(cabin); + // TODO: DEACTIVATED + // EMFModelStore.store(cabin); + + // HeatmapPart heatmap = ViewPartHelper.getHeatView(); + // heatmap.setCabin(cabin); } + /** + * Repair boarding class assignments. + */ private void repairBoardingClassAssignments() { int i = 1; for (TravelClass tc : cabin.getClasses()) { @@ -137,22 +165,45 @@ private void repairBoardingClassAssignments() { } } + /** + * Check foldable seats. + */ private void checkFoldableSeats() { for (Seat seat : ModelHelper.getChildrenByClass(cabin, Seat.class)) { - if (cabin.getSimulationSettings().isBringYourOwnSeat()) { - seat.setCurrentlyFolded(true); - } else if (cabin.getSimulationSettings().isUseFoldableSeats()) { - if (seat.getLetter().contains("D")) { - seat.setCurrentlyFolded(true); + + /* Bring your own seat */ + if (cabin.getSimulationSettings().getLayoutConcept() == LayoutConcept.BRING_YOUR_OWN_SEAT) { + seat.setLayoutConcept(LayoutConcept.SIDWAYS_FOLDABLE_SEAT); + + /* Sideways foldable seat */ + } else if (cabin.getSimulationSettings().getLayoutConcept() == LayoutConcept.SIDWAYS_FOLDABLE_SEAT) { + /* Aisle seats are set foldable */ + if (seat.getLetter().contains("C")) { + seat.setLayoutConcept(LayoutConcept.SIDWAYS_FOLDABLE_SEAT); + } else if (seat.getLetter().contains("D")) { + seat.setLayoutConcept(LayoutConcept.SIDWAYS_FOLDABLE_SEAT); } else { - seat.setCurrentlyFolded(false); + seat.setLayoutConcept(LayoutConcept.DEFAULT); + } + /* Lifting seat pan */ + } else if (cabin.getSimulationSettings().getLayoutConcept() == LayoutConcept.LIFTING_SEAT_PAN_SEATS) { + /* Aisle seats are set foldable */ + if (seat.getLetter().contains("C")) { + seat.setLayoutConcept(LayoutConcept.LIFTING_SEAT_PAN_SEATS); + } else if (seat.getLetter().contains("D")) { + seat.setLayoutConcept(LayoutConcept.LIFTING_SEAT_PAN_SEATS); + } else { + seat.setLayoutConcept(LayoutConcept.DEFAULT); } } else { - seat.setCurrentlyFolded(false); + seat.setLayoutConcept(LayoutConcept.DEFAULT); } } } + /** + * Update travel class properties. + */ private void updateTravelClassProperties() { for (TravelClass travelclass : cabin.getClasses()) { @@ -167,12 +218,15 @@ private void updateTravelClassProperties() { travelclass.setPassengers(numberOfPax); } else { - int loadFactor = (int) (travelclass.getPassengers() * 100.0 / travelclass.getAvailableSeats()); + double loadFactor = Math.round(travelclass.getPassengers() * 100.0 / travelclass.getAvailableSeats()); travelclass.setLoadFactor(loadFactor); } } } + /** + * Repair row assignments. + */ private void repairRowAssignments() { int i = 1; for (Row row : ModelHelper.getChildrenByClass(cabin, Row.class)) { @@ -182,24 +236,51 @@ private void repairRowAssignments() { } } + /** + * Check passenger assignments. + */ private void checkPassengerAssignments() { - double passengersPerMinute = 30; - int i = 0; + + Map delays = new HashMap<>(); + for (Passenger passenger : cabin.getPassengers()) { - Seat seat = passenger.getSeatRef(); + Seat seat = passenger.getSeat(); seat.setPassenger(passenger); - if (passenger.getSeat() != seat.getId()) { - passenger.setSeat(seat.getId()); + if (passenger.getSeatID() != seat.getId()) { + passenger.setSeatID(seat.getId()); passenger.setName(passenger.getId() + " (" + seat.getName() + ")"); } passenger.setTravelClass(ModelHelper.getParent(TravelClass.class, seat)); - passenger.setStartBoardingAfterDelay(i * 60 / passengersPerMinute); - i++; + + PassengerGenerator.applyDelay(passenger, delays); + + // TODO: CONTINUE THIS! + // LuggageProperties lugg = + // cabin.getSimulationSettings().getLuggageProperties(); + // double time = passenger.getLuggageStowTime(); + // + // switch (passenger.getLuggage()) { + // + // case BIG: + // if (time != lugg.) + // break; + // case MEDIUM: + // break; + // case SMALL: + // break; + // case NONE: + // break; + // + // } + } } + /** + * Repair seat assignments. + */ private void repairSeatAssignments() { int seatCount = 1; @@ -232,6 +313,11 @@ private void repairSeatAssignments() { System.out.println("Seat IDs reassigned."); } + /** + * Check cabin out of bounds. + * + * @return the boolean + */ private Boolean checkCabinOutOfBounds() { for (PhysicalObject object : ModelHelper.getChildrenByClass(cabin, PhysicalObject.class)) { if (object.getYPosition() < 0 || object.getXPosition() < 0 @@ -243,6 +329,9 @@ private Boolean checkCabinOutOfBounds() { return false; } + /** + * Check too many seats in row. + */ private void checkTooManySeatsInRow() { for (Row row : ModelHelper.getChildrenByClass(cabin, Row.class)) { @@ -266,6 +355,9 @@ private void checkTooManySeatsInRow() { } } + /** + * Check for construction errors. + */ private void checkForConstructionErrors() { if (checkCabinOutOfBounds()) { diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/ExportDataCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/ExportDataCommand.java new file mode 100644 index 00000000..6e9689bd --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/ExportDataCommand.java @@ -0,0 +1,413 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.commands; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.text.DecimalFormat; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.jface.dialogs.IMessageProvider; + +import net.bhl.cdt.paxelerate.model.Passenger; +import net.bhl.cdt.paxelerate.model.Sex; +import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.LuggageProperties; +import net.bhl.cdt.paxelerate.model.SimulationProperties; +import net.bhl.cdt.paxelerate.model.SimulationResult; +import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.model.storage.GaussianStorage; +import net.bhl.cdt.paxelerate.model.storage.StorageHandler; +import net.bhl.cdt.paxelerate.util.input.Input; +import net.bhl.cdt.paxelerate.util.input.Input.WindowType; +import net.bhl.cdt.paxelerate.util.output.ExcelExport; +import net.bhl.cdt.paxelerate.util.time.TimeHelper; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * This command exports important data from the EMF meta-model. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class ExportDataCommand extends CDTCommand { + + /** The cabin. */ + private Cabin cabin; + + /** The property store. */ + private StorageHandler propertyStore = new StorageHandler(); + + /** The exporter. */ + private ExcelExport exporter; + + /** + * The Enum PassengerProperty. + */ + public enum PassengerProperty { + + /** The distance walked. */ + DISTANCE_WALKED, + /** The number waits. */ + NUMBER_WAITS, + /** The time waited. */ + TIME_WAITED + } + + /** + * Instantiates a new export data command. + * + * @param cabin + * the cabin + */ + public ExportDataCommand(final Cabin cabin) { + this.cabin = cabin; + } + + /** + * Instantiates a new export data command. + * + * @param cabin + * the cabin + * @param exporter + * the exporter + */ + public ExportDataCommand(final Cabin cabin, final ExcelExport exporter) { + // super(); + this.cabin = cabin; + this.exporter = exporter; + } + + /** + * Gets the passenger data. + * + * @return the passenger data + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final boolean getPassengerData() throws IOException, FileNotFoundException { + /** Create file header **/ + exporter.addColumnElement("ID"); + exporter.addColumnElement("Sex"); + exporter.addColumnElement("Age"); + exporter.addColumnElement("Mood"); + exporter.addColumnElement("Height"); + exporter.addColumnElement("Weight"); + exporter.addColumnElement("Width"); + exporter.addColumnElement("Depth"); + exporter.addColumnElement("WalkingSpeed"); + exporter.addColumnElement("TravelClass"); + exporter.addColumnElement("Door"); + exporter.addColumnElement("SeatID"); + exporter.addColumnElement("Luggage"); + exporter.addColumnElement("LuggageStowTime"); + exporter.addColumnElement("LuggageStowDistance"); + exporter.addColumnElement("BoardingTime"); + exporter.addColumnElement("NumberOfWaits"); + exporter.addColumnElement("InitialBoardingDelay"); + exporter.addColumnElement("NumberOfWayMaking"); + exporter.addNewLine(); + + EList paxList = cabin.getPassengers(); + + for (Passenger pax : paxList) { + exporter.addColumnElement(pax.getId()); + exporter.addColumnElement(pax.getSex().toString()); + exporter.addColumnElement(pax.getAge()); + exporter.addColumnElement(pax.getPassengerMood().toString()); + exporter.addColumnElement(pax.getHeight()); + exporter.addColumnElement(pax.getWeight()); + exporter.addColumnElement(pax.getWidth()); + exporter.addColumnElement(pax.getDepth()); + exporter.addColumnElement(pax.getWalkingSpeed()); + exporter.addColumnElement(pax.getTravelClass().getTravelOption().toString()); + exporter.addColumnElement(pax.getDoor().getDoorOption().toString()); + exporter.addColumnElement(pax.getSeatID()); + exporter.addColumnElement(pax.getLuggage().toString()); + exporter.addColumnElement(pax.getLuggageStowTime()); + exporter.addColumnElement(pax.getLuggageStowDistance()); + exporter.addColumnElement(pax.getBoardingTime()); + exporter.addColumnElement(pax.getNumberOfWaits()); + exporter.addColumnElement(pax.getStartBoardingAfterDelay()); + exporter.addColumnElement(pax.getNumberOfMakeWayOperations()); + exporter.addNewLine(); + } + + return true; + } + + /** + * Gets the average of passenger property. + * + * @param property + * the property + * @return the average of passenger property + */ + public final int getAverageOfPassengerProperty(final PassengerProperty property) { + EList paxList = cabin.getPassengers(); + int number = 0; + + for (Passenger pax : paxList) { + switch (property) { + case DISTANCE_WALKED: + number = number + pax.getDistanceWalked(); + break; + case NUMBER_WAITS: + number = number + pax.getNumberOfWaits(); + break; + case TIME_WAITED: + number = (int) (number + pax.getTotalTimeWaited()); + break; + default: + break; + } + } + + return number / paxList.size(); + } + + /** + * Gets the simulation properties data. + * + * @return the simulation properties data + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final boolean getSimulationPropertiesData() throws IOException, FileNotFoundException { + + /** SimulationProperties **/ + SimulationProperties settings = cabin.getSimulationSettings(); + + exporter.addColumnElement("Scale"); + exporter.addColumnElement(settings.getScale()); + exporter.addNewLine(); + + exporter.addColumnElement("NumberOfSimulationLoops"); + exporter.addColumnElement(settings.getNumberOfSimulationLoops()); + exporter.addNewLine(); + + exporter.addColumnElement("SimulationSpeedFactor"); + exporter.addColumnElement(settings.getSimulationSpeedFactor()); + exporter.addNewLine(); + + /** General passenger properties **/ + exporter.addColumnElement("PassengersBoardingPerMinute"); + exporter.addColumnElement(settings.getPassengersBoardingPerMinute()); + exporter.addNewLine(); + + exporter.addColumnElement("SeatInterferenceProcessTimeMean"); + exporter.addColumnElement(settings.getPassengerProperties().getSeatInterferenceProcessTimeMean()); + exporter.addNewLine(); + + exporter.addColumnElement("SeatInterferenceStandingUpPassengerWaitingTime"); + exporter.addColumnElement( + settings.getPassengerProperties().getSeatInterferenceStandingUpPassengerWaitingTime()); + exporter.addNewLine(); + + exporter.addColumnElement("Sorting"); + exporter.addColumnElement(settings.getSorting().toString()); + exporter.addNewLine(); + + exporter.addColumnElement("ThreadSleepTimeDefault"); + exporter.addColumnElement(settings.getThreadSleepTimeDefault()); + exporter.addNewLine(); + + // LuggageProperties luggageSettings = + // cabin.getSimulationSettings().getLuggageProperties(); + // PassengerProperties paxSettings = + // cabin.getSimulationSettings().getPassengerProperties(); + + return true; + } + + /** + * Gets the study settings. + * + * @return the study settings + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final boolean getStudySettings() throws IOException, FileNotFoundException { + + LuggageProperties luggageSettings = cabin.getSimulationSettings().getLuggageProperties(); + EList tcList = cabin.getClasses(); + EList doorList = cabin.getDoors(); + + exporter.addColumnElement("No Luggage"); + exporter.addColumnElement("Small Luggage"); + exporter.addColumnElement("Medium Luggage"); + exporter.addColumnElement("Big Luggage"); + exporter.addColumnElement("Load Factor"); + exporter.addColumnElement("Active Door ID"); + exporter.addColumnElement("Layout Concept"); + exporter.addNewLine(); + exporter.addColumnElement(luggageSettings.getPercentageOfPassengersWithNoLuggage()); + exporter.addColumnElement(luggageSettings.getPercentageOfPassengersWithSmallLuggage()); + exporter.addColumnElement(luggageSettings.getPercentageOfPassengersWithMediumLuggage()); + exporter.addColumnElement(luggageSettings.getPercentageOfPassengersWithBigLuggage()); + for (TravelClass tc : tcList) { + exporter.addColumnElement(tc.getLoadFactor()); + } + for (Door dl : doorList) { + if (dl.isIsActive()) { + exporter.addColumnElement(dl.getId()); + } + } + exporter.addColumnElement(cabin.getSimulationSettings().getLayoutConcept().getLiteral()); + exporter.addNewLine(); + + return true; + } + + /** + * Gets the result data. + * + * @return the result data + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final boolean getResultData() throws IOException, FileNotFoundException { + + exporter.addColumnElement("Loop ID"); + exporter.addColumnElement("Passengers"); + exporter.addColumnElement("Time"); + exporter.addColumnElement("Skipped Way Making"); + exporter.addColumnElement("Completed Way Making"); + exporter.addColumnElement("Average number of waiting"); + exporter.addColumnElement("Average PAX waiting time"); + exporter.addColumnElement("Average distance walked"); + exporter.addNewLine(); + + for (SimulationResult result : cabin.getSimulationSettings().getResults()) { + exporter.addColumnElement(result.getId()); + exporter.addColumnElement(result.getPassengers()); + exporter.addColumnElement(TimeHelper.toTimeOfDay(result.getBoardingTime())); + exporter.addColumnElement(result.getWaymakingSkipped()); + exporter.addColumnElement(result.getWaymakingCompleted()); + exporter.addColumnElement(getAverageOfPassengerProperty(PassengerProperty.NUMBER_WAITS)); + exporter.addColumnElement(getAverageOfPassengerProperty(PassengerProperty.TIME_WAITED)); + exporter.addColumnElement(getAverageOfPassengerProperty(PassengerProperty.DISTANCE_WALKED)); + exporter.addNewLine(); + } + + return true; + } + + /** + * Generate distribution file. + * + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final void generateDistributionFile() throws IOException, FileNotFoundException { + + propertyStore.clear(); + for (Passenger pax : cabin.getPassengers()) { + propertyStore.addPassenger(pax); + } + Object[] storageData = propertyStore.getStorageData(); + // weightStore, heightStore, depthStore, widthStore, ageStore, + // luggageStore, numberOfPassengers + + exporter.addColumnElement("Type"); + exporter.addColumnElement("Maximum Value F"); + exporter.addColumnElement("Maximum Value M"); + exporter.addColumnElement("Minimum Value F"); + exporter.addColumnElement("Minimum Value M"); + exporter.addColumnElement("Average Value F"); + exporter.addColumnElement("Average Value M"); + exporter.addColumnElement("Sum Value F"); + exporter.addColumnElement("Sum Value M"); + exporter.addColumnElement("Amount Value F"); + exporter.addColumnElement("Amount Value F"); + exporter.addNewLine(); + + writeGaussian((GaussianStorage) storageData[0], "Weight"); + writeGaussian((GaussianStorage) storageData[1], "Height"); + writeGaussian((GaussianStorage) storageData[2], "Depth"); + writeGaussian((GaussianStorage) storageData[3], "Width"); + // writeGaussian((GaussianStorage) storageData[4], "Age"); + // writeGaussian((GaussianStorage) storageData[5], "Luggage"); + // writeGaussian((GaussianStorage) storageData[6], "Passengers"); + } + + /** + * Write gaussian. + * + * @param storage + * the storage + * @param name + * the name + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + private void writeGaussian(final GaussianStorage storage, final String name) + throws IOException, FileNotFoundException { + + exporter.addColumnElement(name); + exporter.addColumnElement(str(storage.getMaximum(Sex.FEMALE))); + exporter.addColumnElement(str(storage.getMaximum(Sex.MALE))); + exporter.addColumnElement(str(storage.getMinimum(Sex.FEMALE))); + exporter.addColumnElement(str(storage.getMinimum(Sex.MALE))); + exporter.addColumnElement(str(storage.getAverage(Sex.FEMALE))); + exporter.addColumnElement(str(storage.getAverage(Sex.MALE))); + exporter.addColumnElement(str(storage.getSum(Sex.FEMALE))); + exporter.addColumnElement(str(storage.getSum(Sex.MALE))); + exporter.addColumnElement(str(storage.getAmount(Sex.FEMALE))); + exporter.addColumnElement(str(storage.getAmount(Sex.MALE))); + exporter.addNewLine(); + } + + /** + * Str. + * + * @param value + * the value + * @return the string + */ + private static String str(final double value) { + DecimalFormat df = new DecimalFormat("#.##"); + return df.format(value); + } + + /* + * (non-Javadoc) + * + * @see net.bhl.cdt.commands.CDTCommand#doRun() + */ + @Override + protected final void doRun() { + Input input = new Input(WindowType.EXPORT_DATA, "Enter the filename.", IMessageProvider.INFORMATION); + + String fileName = input.getStringValue(); + try { + + getPassengerData(); + getSimulationPropertiesData(); + exporter.closeFile(); + } catch (IOException e) { + e.printStackTrace(); + Log.add(this, "Data export failed!"); + } + } + +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GenerateCabinCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GenerateCabinCommand.java index df1ec55a..c12714ab 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GenerateCabinCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GenerateCabinCommand.java @@ -9,12 +9,10 @@ import net.bhl.cdt.commands.CDTCommand; import net.bhl.cdt.paxelerate.model.Cabin; -import net.bhl.cdt.paxelerate.model.EmergencyExit; -import net.bhl.cdt.paxelerate.model.MainDoor; +import net.bhl.cdt.paxelerate.model.DoorOption; import net.bhl.cdt.paxelerate.model.ObjectOption; -import net.bhl.cdt.paxelerate.model.StandardDoor; import net.bhl.cdt.paxelerate.model.TravelOption; -import net.bhl.cdt.paxelerate.model.util.ConstructionLibrary; +import net.bhl.cdt.paxelerate.model.util.CabinGenerator; import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; import net.bhl.cdt.paxelerate.ui.views.ViewPartHelper; import net.bhl.cdt.paxelerate.util.input.Input; @@ -27,14 +25,14 @@ * * @author marc.engelmann * @version 1.3 + * @since 0.5 * */ public class GenerateCabinCommand extends CDTCommand { + /** The cabin. */ private Cabin cabin; - private CabinViewPart cabinViewPart; - private ConstructionLibrary constructor; /** * Creates a cabin. @@ -42,9 +40,9 @@ public class GenerateCabinCommand extends CDTCommand { * @param cabin * is the input cabin */ - public GenerateCabinCommand(Cabin cabin) { + public GenerateCabinCommand(final Cabin cabin) { this.cabin = cabin; - if (cabin.isUsePresetSettings()) { + if (cabin.getSimulationSettings().isUsePresetSettings()) { switch (cabin.getAircraftType()) { case REGIONAL: cabin.setYDimension(300); @@ -58,6 +56,8 @@ public GenerateCabinCommand(Cabin cabin) { cabin.setYDimension(650); cabin.setXDimension(4440); break; + default: + break; } } } @@ -68,10 +68,12 @@ public GenerateCabinCommand(Cabin cabin) { * command. */ @Override - protected void doRun() { + protected final void doRun() { + Log.add(this, "Initializing cabin generation ..."); - cabinViewPart = ViewPartHelper.getCabinView(); + CabinViewPart cabinViewPart = ViewPartHelper.getCabinView(); + cabinViewPart.unsyncViewer(); Input input = new Input(WindowType.GET_BOOLEAN, "Warning! The existing cabin will be deleted. Continue?", IMessageProvider.WARNING); @@ -79,36 +81,35 @@ protected void doRun() { if (input.getBooleanValue()) { /* ------- Cabin Construction starts here! --------- */ - constructor = new ConstructionLibrary(cabin); - constructor.clearCabin(); - constructor.createDoor(EmergencyExit.class, true, 3, 935); - constructor.createDoor(EmergencyExit.class, true, 4, 1228); - constructor.createPhysicalObject(ObjectOption.LAVATORY, 100); - constructor.createDoor(MainDoor.class, true, 1, -1); - constructor.createPhysicalObject(ObjectOption.GALLEY, 100); + CabinGenerator generator = new CabinGenerator(cabin); + generator.clearCabin(); + generator.createDoor(DoorOption.EMERGENCY_EXIT, true, 3, 935); + generator.createDoor(DoorOption.EMERGENCY_EXIT, true, 4, 1228); + generator.createPhysicalObject(ObjectOption.LAVATORY, 100); + generator.createDoor(DoorOption.MAIN_DOOR, true, 1, -1); + generator.createPhysicalObject(ObjectOption.GALLEY, 100); /* * Note that the classes are generated in the order that they are * defined in in the enum */ for (TravelOption option : TravelOption.VALUES) { - constructor.createClass(option); + generator.createClass(option); } - constructor.createPhysicalObject(ObjectOption.GALLEY, 100); - constructor.createDoor(StandardDoor.class, true, 2, -1); - constructor.createPhysicalObject(ObjectOption.LAVATORY, 100); - cabin = constructor.getCabin(); - cabin.setUsePresetSettings(false); + generator.createPhysicalObject(ObjectOption.GALLEY, 100); + generator.createDoor(DoorOption.STANDARD_DOOR, true, 2, -1); + generator.createPhysicalObject(ObjectOption.LAVATORY, 100); + cabin = generator.getCabin(); + cabin.getSimulationSettings().setUsePresetSettings(false); /* ------- Cabin Construction ends here! ----------- */ Log.add(this, "Cabin generation completed"); - try { - cabinViewPart.setCabin(cabin); - cabinViewPart.syncViewer(); - } catch (NullPointerException e) { - Log.add(this, "The cabin or info view is not visible."); - } + + new DrawCabinCommand(cabin).doRun(); + + cabinViewPart.syncViewer(); + } else { Log.add(this, "Cabin generation aborted"); } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GeneratePassengersCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GeneratePassengersCommand.java index 0f6c056e..90809cee 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GeneratePassengersCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/GeneratePassengersCommand.java @@ -7,11 +7,18 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.ecp.core.util.ECPUtil; +import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.swt.widgets.Display; import net.bhl.cdt.commands.CDTCommand; @@ -19,12 +26,17 @@ import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.CabinFactory; import net.bhl.cdt.paxelerate.model.Door; +import net.bhl.cdt.paxelerate.model.DoorOption; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.Seat; import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.model.util.PassengerGenerator; import net.bhl.cdt.paxelerate.model.util.PassengerPropertyGenerator; +import net.bhl.cdt.paxelerate.ui.preferences.PAXeleratePreferencePage; import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; import net.bhl.cdt.paxelerate.ui.views.ViewPartHelper; +import net.bhl.cdt.paxelerate.util.input.Input; +import net.bhl.cdt.paxelerate.util.input.Input.WindowType; import net.bhl.cdt.paxelerate.util.string.StringHelper; import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; @@ -32,15 +44,21 @@ * * This command creates the passengers. * - * @author marc.engelmann + * @author marc.engelmann, michael.schmidt * @version 1.0 + * @since 0.5 * */ public class GeneratePassengersCommand extends CDTCommand { + /** The cabin. */ private Cabin cabin; + + /** The total count. */ private int totalCount = 1; + + /** The cabinview. */ private CabinViewPart cabinview; /** @@ -49,39 +67,68 @@ public class GeneratePassengersCommand extends CDTCommand { * @param cabin * is the input parameter */ - public GeneratePassengersCommand(Cabin cabin) { + public GeneratePassengersCommand(final Cabin cabin) { this.cabin = cabin; } + /** + * Instantiates a new generate passengers command. + */ + public GeneratePassengersCommand() { + if (ECPUtil.getECPProjectManager().getProjects() != null) { + this.cabin = (Cabin) ECPUtil.getECPProjectManager() + .getProject(PAXeleratePreferencePage.DEFAULT_PROJECT_NAME).getContents().get(0); + } + } + /** * This method applies a door to a passenger. - * + * * @param pass * is the passenger to whom the door is assigned to. + * @return the door */ - private Door getDoor(Passenger pass) { + private Door getDoor(final Passenger pass) { ArrayList sdoorage = new ArrayList(); - for (Door door : cabin.getDoors()) { - if (door.isIsActive()) { - sdoorage.add(door); + if (cabin.getDoors().size() == 0) { + Log.add(this, "No doors found. Please add a least one door!"); + return null; + + } else { + for (Door door : cabin.getDoors()) { + if (door.isIsActive()) { + sdoorage.add(door); + } + } + /* Check if active doors exist */ + if (sdoorage.size() == 0) { + Log.add(this, "No active door is found. First available main door is activated."); + for (Door door : cabin.getDoors()) { + if (door.getDoorOption() == DoorOption.MAIN_DOOR) { + door.setIsActive(true); + sdoorage.add(door); + break; + } + } } - } - int seatPos = pass.getSeatRef().getXPosition(); + int seatPos = pass.getSeat().getXPosition(); - int current = Integer.MAX_VALUE; - Door bestDoor = null; + int current = Integer.MAX_VALUE; + Door bestDoor = null; - for (Door door : sdoorage) { - int diff = Math.abs(door.getXPosition() - seatPos); - if (diff < current) { - current = diff; - bestDoor = door; + for (Door door : sdoorage) { + int diff = Math.abs(door.getXPosition() - seatPos); + if (diff < current) { + current = diff; + bestDoor = door; + } } + return bestDoor; } - return bestDoor; + } /** @@ -91,11 +138,11 @@ private Door getDoor(Passenger pass) { * the passenger * @return the seat which is linked to the passenger */ - private Seat getSeat(Passenger passenger) { + private Seat getSeat(final Passenger passenger) { + for (Seat seat : ModelHelper.getChildrenByClass(cabin, Seat.class)) { - if ((!seat.equals(null)) && (seat.getId() == passenger.getSeat())) { + if ((seat.getId() == passenger.getSeatID())) { seat.setPassenger(passenger); - return seat; } } @@ -105,65 +152,71 @@ private Seat getSeat(Passenger passenger) { return null; } - private double calculateDelay(Passenger pax) { - double delay = 0; - double clocking = cabin.getSimulationSettings().getPassengersBoardingPerMinute(); - - try { - pax.getDoor().getWaitingPassengers().add(pax); - delay = (pax.getDoor().getWaitingPassengers().size() - 1) * 60.0 / clocking; - } catch (NullPointerException e) { - Log.add(this, "The cabin has no doors so far, please assign one manually!"); - } - - delay = (pax.getDoor().getWaitingPassengers().size() - 1) * 60.0 / clocking; - - return delay; - } - /** * This method generates the passengers. - * - * @param classType - * specifies in which class the passengers are generated + * + * @param tc + * the tc */ - private synchronized void generatePassengers(TravelClass tc, int numberOfPassengers, int numberOfSeats) { + private synchronized void generatePassengers(final TravelClass tc) { + + int numberOfPassengers = tc.getPassengers(); + int numberOfSeats = tc.getAvailableSeats(); if (numberOfPassengers != 0) { if (numberOfPassengers <= numberOfSeats) { int firstSeatNumber = ModelHelper.getChildrenByClass(tc, Seat.class).get(0).getId(); - // Create random list + /* Create random list */ + ArrayList randomSeatId = new ArrayList(); + for (int i = 0; i < numberOfSeats; i++) { randomSeatId.add(firstSeatNumber + i); } + Collections.shuffle(randomSeatId); + Map delays = new HashMap<>(); + for (int i = 0; i < numberOfPassengers; i++) { synchronized (this) { - Passenger passenger = CabinFactory.eINSTANCE.createPassenger(); - cabin.getPassengers().add(passenger); - - passenger.setId(totalCount); - passenger.setSeat(randomSeatId.get(i)); - passenger.setName(passenger.getId() + " (" + getSeat(passenger).getName() + ")"); - passenger.setSeatRef(getSeat(passenger)); - passenger.setTravelClass(passenger.getSeatRef().getTravelClass()); - passenger.setDoor(getDoor(passenger)); - passenger.setStartBoardingAfterDelay(calculateDelay(passenger)); - PassengerPropertyGenerator generator = new PassengerPropertyGenerator(passenger); - passenger = generator.getPassenger(); - - totalCount++; - } + try { + Passenger passenger = CabinFactory.eINSTANCE.createPassenger(); + + cabin.getPassengers().add(passenger); + + passenger.setId(totalCount); + passenger.setSeatID(randomSeatId.get(i)); + passenger.setName(passenger.getId() + " (" + getSeat(passenger).getName() + ")"); + passenger.setSeat(getSeat(passenger)); + passenger.setTravelClass(passenger.getSeat().getTravelClass()); + + if (!(getDoor(passenger) == null)) { + passenger.setDoor(getDoor(passenger)); + } else { + throw new NullPointerException(); + } + + PassengerGenerator.applyDelay(passenger, delays); + + PassengerPropertyGenerator generator = new PassengerPropertyGenerator(passenger); + passenger = generator.getPassenger(); + + totalCount++; + + } catch (ConcurrentModificationException e) { + e.printStackTrace(); + } catch (NullPointerException e) { + e.printStackTrace(); + Log.add(this, "Passenger generation aborted!"); + } + } } - Log.add(this, "successfully created " + numberOfPassengers + " passengers in " + tc.getName()); } else { - Log.add(this, "Too many passengers in " + StringHelper.splitCamelCase(tc.getName())); } } @@ -173,60 +226,94 @@ private synchronized void generatePassengers(TravelClass tc, int numberOfPasseng * This method runs the passenger generation command. */ @Override - protected void doRun() { - // Create separate thread + protected final void doRun() { + /* Create separate thread */ + Job job = new Job("Generate Passengers Thread") { @Override - protected IStatus run(IProgressMonitor monitor) { + protected IStatus run(final IProgressMonitor monitor) { Log.add(this, "Passenger generation started..."); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - cabinview = ViewPartHelper.getCabinView(); - cabinview.unsyncViewer(); - - cabin.getPassengers().clear(); - } - }); - - for (TravelClass travelclass : cabin.getClasses()) { - generatePassengers(travelclass, travelclass.getPassengers(), travelclass.getAvailableSeats()); - } - - for (Door door : cabin.getDoors()) { - door.getWaitingPassengers().clear(); - } - - // PUBLISH - Log.add(this, "Updating GUI..."); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - try { - ViewPartHelper.getPropertyView().updateUI(cabin); - } catch (NullPointerException e) { - Log.add(this, "No property view is visible!"); - } - - try { - cabinview.syncViewer(); - cabinview.setCabin(cabin); - } catch (NullPointerException e) { - Log.add(this, "Cabin View not visible!"); + if (cabin.getDoors().isEmpty()) { + new Input(WindowType.WARNING, + "You can not continue without generating and activating at least one door!", + IMessageProvider.ERROR); + Log.add(this, "Passenger generation aborted"); + return Status.CANCEL_STATUS; + } else { + + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + cabinview = ViewPartHelper.getCabinView(); + cabinview.unsyncViewer(); + + cabin.getPassengers().clear(); } + }); - Log.add(this, "Passenger generation completed"); + for (TravelClass travelclass : cabin.getClasses()) { + generatePassengers(travelclass); + } + for (Door door : cabin.getDoors()) { + door.getWaitingPassengers().clear(); } - }); - // report finished + /* PUBLISH */ + Log.add(this, "Updating GUI..."); + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + try { + ViewPartHelper.getPropertyView().updateUI(cabin); + } catch (NullPointerException e) { + Log.add(this, "No property view is visible!"); + e.printStackTrace(); + } + + try { + cabinview.syncViewer(); + cabinview.setCabin(cabin); + } catch (NullPointerException e) { + Log.add(this, "Cabin View not visible!"); + e.printStackTrace(); + } + + try { + new DrawCabinCommand(cabin).doRun(); + } catch (NullPointerException e) { + Log.add(this, "Cabin View could not be refreshed"); + e.printStackTrace(); + } + } + }); + } + /* report finished */ return Status.OK_STATUS; } }; - // Start the Job + /* report job status to console */ + job.addJobChangeListener(new JobChangeAdapter() { + public void done(final IJobChangeEvent event) { + if (event.getResult().isOK()) { + Log.add(this, "Passenger generation completed"); + } else { + Log.add(this, "Passenger generation failed!"); + } + } + }); + + /* Start the Job */ job.schedule(); + try { + /* schedule job after previous is finished */ + job.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } } } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/MoveObjectCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/MoveObjectCommand.java index 6f3e57b8..adadac31 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/MoveObjectCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/MoveObjectCommand.java @@ -26,18 +26,35 @@ * layout of the cabin and warns the user. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class MoveObjectCommand extends CDTCommand { + /** The cabin. */ private Cabin cabin; + + /** The scale vector. */ private Vector movementVector, scaleVector; + + /** The rowlist. */ private ArrayList rowlist = new ArrayList(); + + /** The seatlist. */ private ArrayList seatlist = new ArrayList(); + + /** The galleylist. */ private ArrayList galleylist = new ArrayList(); + + /** The lavatorylist. */ private ArrayList lavatorylist = new ArrayList(); + + /** The curtainlist. */ private ArrayList curtainlist = new ArrayList(); + + /** The scaling desired. */ private boolean scalingDesired = false; /** @@ -58,8 +75,9 @@ public class MoveObjectCommand extends CDTCommand { * @param curtainlist * is the list of curtain objects */ - public MoveObjectCommand(Cabin cabin, ArrayList rowlist, ArrayList seatlist, - ArrayList galleylist, ArrayList lavatorylist, ArrayList curtainlist) { + public MoveObjectCommand(final Cabin cabin, final ArrayList rowlist, final ArrayList seatlist, + final ArrayList galleylist, final ArrayList lavatorylist, + final ArrayList curtainlist) { this.rowlist = rowlist; this.seatlist = seatlist; this.galleylist = galleylist; @@ -72,7 +90,7 @@ public MoveObjectCommand(Cabin cabin, ArrayList rowlist, ArrayList se * This method executed the right click command. The cabin view is updated. */ @Override - protected void doRun() { + protected final void doRun() { /** * Main method. @@ -82,13 +100,14 @@ protected void doRun() { */ Input input = new Input(WindowType.MOVE_OBJECT, - "All values must be entered in [cm]. Please use positive and negative digits only.", IMessageProvider.INFORMATION); + "All values must be entered in [cm]. Please use positive and negative digits only.", + IMessageProvider.INFORMATION); movementVector = input.getVectorValue(); -/* scaleVector = input.getSecondVectorValue(); - if (scaleVector.getX() != 0 && scaleVector.getY() != 0) { - scalingDesired = true; - }*/ + /* + * scaleVector = input.getSecondVectorValue(); if (scaleVector.getX() != + * 0 && scaleVector.getY() != 0) { scalingDesired = true; } + */ int xMovement = movementVector.getX(); int yMovement = movementVector.getY(); @@ -100,10 +119,11 @@ protected void doRun() { for (Seat seat : compareRow.getSeats()) { seat.setYPosition(seat.getYPosition() + yMovement); seat.setXPosition(seat.getXPosition() + xMovement); -/* if (scalingDesired) { - seat.setYDimension(scaleVector.getY()); - seat.setXDimension(scaleVector.getX()); - }*/ + /* + * if (scalingDesired) { + * seat.setYDimension(scaleVector.getY()); + * seat.setXDimension(scaleVector.getX()); } + */ } } @@ -116,10 +136,11 @@ protected void doRun() { if (seat.getId() == compareSeat.getId()) { compareSeat.setYPosition(compareSeat.getYPosition() + yMovement); compareSeat.setXPosition(compareSeat.getXPosition() + xMovement); -/* if (scalingDesired) { - compareSeat.setYDimension(scaleVector.getX()); - compareSeat.setXDimension(scaleVector.getY()); - }*/ + /* + * if (scalingDesired) { + * compareSeat.setYDimension(scaleVector.getX()); + * compareSeat.setXDimension(scaleVector.getY()); } + */ } } } @@ -130,10 +151,11 @@ protected void doRun() { if (galley.getId() == compareGalley.getId()) { galley.setYPosition(galley.getYPosition() + yMovement); galley.setXPosition(galley.getXPosition() + xMovement); -/* if (scalingDesired) { - galley.setYDimension(scaleVector.getY()); - galley.setXDimension(scaleVector.getX()); - }*/ + /* + * if (scalingDesired) { + * galley.setYDimension(scaleVector.getY()); + * galley.setXDimension(scaleVector.getX()); } + */ } } } @@ -144,10 +166,11 @@ protected void doRun() { if (lavatory.getId() == compareLavatory.getId()) { compareLavatory.setYPosition(compareLavatory.getYPosition() + yMovement); compareLavatory.setXPosition(compareLavatory.getXPosition() + xMovement); -/* if (scalingDesired) { - compareLavatory.setYDimension(scaleVector.getY()); - compareLavatory.setXDimension(scaleVector.getX()); - }*/ + /* + * if (scalingDesired) { + * compareLavatory.setYDimension(scaleVector.getY()); + * compareLavatory.setXDimension(scaleVector.getX()); } + */ } } } @@ -158,10 +181,11 @@ protected void doRun() { if (curtain.getId() == compareCurtain.getId()) { compareCurtain.setYPosition(compareCurtain.getYPosition() + yMovement); compareCurtain.setXPosition(compareCurtain.getXPosition() + xMovement); -/* if (scalingDesired) { - compareCurtain.setYDimension(scaleVector.getY()); - compareCurtain.setXDimension(scaleVector.getX()); - }*/ + /* + * if (scalingDesired) { + * compareCurtain.setYDimension(scaleVector.getY()); + * compareCurtain.setXDimension(scaleVector.getX()); } + */ } } } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationCommand.java new file mode 100644 index 00000000..494916b6 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationCommand.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ + +package net.bhl.cdt.paxelerate.ui.commands; + +import org.eclipse.swt.widgets.Display; + +import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.LayoutConcept; +import net.bhl.cdt.paxelerate.model.SimulationProperties; +import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * The Class RunBatchSimulationCommand. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class RunBatchSimulationCommand extends CDTCommand { + + /** The cabin. */ + private Cabin cabin; + + /** The sim settings. */ + private SimulationProperties simSettings; + + /** + * This is the constructor method of the SimulateBoardingCommand. + * + * @param cabin + * the cabin object + */ + public RunBatchSimulationCommand(final Cabin cabin) { + // this.cabin = EcoreUtil.copy(cabin); + // this.simSettings = this.cabin.getSimulationSettings(); + this.cabin = cabin; + this.simSettings = cabin.getSimulationSettings(); + } + + /** + * This method runs the simulate boarding command. + */ + @Override + protected final void doRun() { + + Log.add(this, "Initializing batch simulation ..."); + + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + new DrawCabinCommand(cabin).doRun(); + } + }); + + // 10 50 30 10 + // 10 30 40 20 + // 0 20 30 50 + + simSettings.setSimulationSpeedFactor(10); + simSettings.setNumberOfSimulationLoops(30); + simSettings.getLuggageProperties().setPercentageOfPassengersWithNoLuggage(10); + simSettings.getLuggageProperties().setPercentageOfPassengersWithSmallLuggage(50); + simSettings.getLuggageProperties().setPercentageOfPassengersWithMediumLuggage(30); + simSettings.getLuggageProperties().setPercentageOfPassengersWithBigLuggage(10); + simSettings.setLayoutConcept(LayoutConcept.SIDWAYS_FOLDABLE_SEAT); + + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + new DrawCabinCommand(cabin).doRun(); + } + }); + // 70 - 126 + // 90 - 162 + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(127); + } + + for (int simulationLoopIndex = 1; simulationLoopIndex <= cabin.getSimulationSettings() + .getNumberOfSimulationLoops(); simulationLoopIndex++) { + + new GeneratePassengersCommand(cabin).doRun(); + new SimulateBoardingCommand(cabin).doRun(); + + } + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationMenuCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationMenuCommand.java new file mode 100644 index 00000000..929d2515 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/RunBatchSimulationMenuCommand.java @@ -0,0 +1,53 @@ +/******************************************************************************* +* Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying +* materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, +* and is available at http://www.eclipse.org/legal/epl-v10.html +***************************************************************************************/ +package net.bhl.cdt.paxelerate.ui.commands; + +import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.paxelerate.ui.helper.DefineBatchSimulationInput; +import net.bhl.cdt.paxelerate.ui.helper.ECPModelImporter; +import net.bhl.cdt.paxelerate.ui.helper.DefineBatchSimulationInput.HandLuggageCase; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * The Class RunBatchSimulationMenuCommand. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class RunBatchSimulationMenuCommand extends CDTCommand { + + /** The number of iterations. */ + private static int numberOfIterations = 10; + + /** + * This is the constructor method of the RunBatchSimulationMenuCommand. + */ + public RunBatchSimulationMenuCommand() { + + } + + /** + * This method runs the simulate boarding command. + */ + @Override + protected final void doRun() { + + Log.add(this, "Batch simulation command ..."); + + for (HandLuggageCase handLuggageCase : HandLuggageCase.values()) { + for (int loadFactorIndex = 80; loadFactorIndex <= 100; loadFactorIndex += 10) { + for (int simulationLoopIndex = 1; simulationLoopIndex <= numberOfIterations; simulationLoopIndex++) { + new ECPModelImporter().doRun(); + new DefineBatchSimulationInput(HandLuggageCase.BULKY_HL, loadFactorIndex).doRun(); + new GeneratePassengersCommand().execute(); + new SimulateBoardingCommand(simulationLoopIndex).execute(); + } + } + } + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SimulateBoardingCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SimulateBoardingCommand.java index 591110b3..887b184d 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SimulateBoardingCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SimulateBoardingCommand.java @@ -9,7 +9,8 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; -import java.util.ArrayList; +import java.io.FileNotFoundException; +import java.io.IOException; import javax.swing.JFrame; import javax.swing.SwingUtilities; @@ -17,7 +18,11 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecp.core.util.ECPUtil; import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; @@ -27,222 +32,375 @@ import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.Seat; +import net.bhl.cdt.paxelerate.model.agent.Agent.AgentMode; import net.bhl.cdt.paxelerate.model.astar.SimulationHandler; -import net.bhl.cdt.paxelerate.model.storage.Exporter; import net.bhl.cdt.paxelerate.model.util.SimulationResultLogger; +import net.bhl.cdt.paxelerate.ui.helper.MapExportHelper; +import net.bhl.cdt.paxelerate.ui.preferences.PAXeleratePreferencePage; import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; import net.bhl.cdt.paxelerate.ui.views.SimulationView; import net.bhl.cdt.paxelerate.ui.views.ViewPartHelper; import net.bhl.cdt.paxelerate.util.input.Input; import net.bhl.cdt.paxelerate.util.input.Input.WindowType; -import net.bhl.cdt.paxelerate.util.math.DecimalHelper; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; +import net.bhl.cdt.paxelerate.util.output.ExcelExport; import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; -import net.bhl.cdt.paxelerate.util.toOpenCDT.OS; /** * This command starts the boarding simulation. * - * @author marc.engelmann + * @author marc.engelmann, michael.schmidt + * @version 1.0 + * @since 0.5 */ public class SimulateBoardingCommand extends CDTCommand { + /** The cabin. */ private Cabin cabin; - private static ArrayList alreadySeatedList = new ArrayList(); + + /** The dimensions. */ + private Vector dimensions; + + /** The simulation loop. */ + private int simulationLoop; + + /** The simulation frame. */ private JFrame simulationFrame; - private SimulationHandler simulationhandler; + + /** The developer mode. */ + private boolean developerMode; /** * This is the constructor method of the SimulateBoardingCommand. * - * @param shell - * the shell where the command was triggered * @param cabin * the cabin object */ - public SimulateBoardingCommand(Cabin cabin) { + public SimulateBoardingCommand(final Cabin cabin) { this.cabin = cabin; + this.developerMode = cabin.getSimulationSettings().isDeveloperMode(); + this.simulationLoop = 1; } /** - * Returns the list with seated passengers. - * - * @return the passenger list + * This is the constructor method of the SimulateBoardingCommand. + * + * @param simulationLoop + * the simulation loop */ - public static ArrayList getSeatedPassengers() { - return alreadySeatedList; + public SimulateBoardingCommand(int simulationLoop) { + if (ECPUtil.getECPProjectManager().getProjects() != null) { + /* retrieves first model element of selected project */ + Cabin cabinModel = (Cabin) ECPUtil.getECPProjectManager() + .getProject(PAXeleratePreferencePage.DEFAULT_PROJECT_NAME).getContents().get(0); + /* saves a local copy of the cabin */ + this.cabin = EcoreUtil.copy(cabinModel); + this.developerMode = this.cabin.getSimulationSettings().isDeveloperMode(); + this.simulationLoop = simulationLoop; + + /* + * IPreferenceStore preferenceStore = + * Activator.getDefault().getPreferenceStore(); + * preferenceStore.getString(PluginPreferencesPage.FIELD_STRING_ID); + */ + } } /** - * This method runs the simulate boarding command. + * Agent sleep check. + * + * @return true, if successful + * @throws InterruptedException + * the interrupted exception + * @throws NullPointerException + * the null pointer exception */ - @Override - protected void doRun() { - // Create separate thread - Job job = new Job("Simulate Boarding Thread") { - @Override - protected IStatus run(IProgressMonitor monitor) { + private boolean agentSleepCheck() throws InterruptedException, NullPointerException { + // TODO: send UI update to ViewPart + System.out.println("sleep check"); - cabin.getSimulationSettings().setRandomSortBetweenLoops(false); + for (Passenger sleepyPassenger : cabin.getPassengers()) { - SimulationResultLogger results = new SimulationResultLogger(); + long timestamp = SimulationHandler.getAgentByPassenger(sleepyPassenger).getLastMoveTimestamp(); - DrawCabinCommand drawCom = new DrawCabinCommand(cabin); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - drawCom.doRun(); - } - }); + if (!sleepyPassenger.isIsSeated() && timestamp != 0 + && SimulationHandler.getAgentByPassenger(sleepyPassenger).getAgentMode() != AgentMode.MAKE_WAY) { + if ((System.currentTimeMillis() + - SimulationHandler.getAgentByPassenger(sleepyPassenger).getLastMoveTimestamp()) > (60 + * 1000)) { + System.out.println(sleepyPassenger.getName() + "has caused interuption!"); - CabinViewPart cabinViewPart = ViewPartHelper.getCabinView(); + Log.add(this, "SIMULATION TERMINATED! Passenger " + sleepyPassenger.getName() + " did not react."); - for (int i = 0; i < cabin.getSimulationSettings().getNumberOfSimulationLoops(); i++) { - - if (cabin.getSimulationSettings().isRandomSortBetweenLoops()) { - SortPassengersCommand sort = new SortPassengersCommand(cabin); - sort.setPropertiesManually(false, 0); - sort.doRun(); - cabin = sort.returnCabin(); - - SortPassengersCommand sort2 = new SortPassengersCommand(cabin); - int value = 0; - switch (cabin.getSimulationSettings().getSorting()) { - case RANDOM: - value = 0; - case WINDOW_TO_AISLE: - value = 3; - case REAR_TO_FRONT: - value = 1; - } - if (value != 0) { - sort2.setPropertiesManually(false, value); - sort2.doRun(); - cabin = sort2.returnCabin(); + /* records the failed simulation run */ + if (developerMode) { + SimulationResultLogger results = new SimulationResultLogger(); + results.getSimulationData(cabin, simulationLoop, 0, 0, 0); + + try { + exportResultData(); + } catch (IOException e) { + e.printStackTrace(); } } - // reset simulation in case of previous existing objects. + SimulationHandler.setSimulationStatus(true); SimulationHandler.reset(); - // reset the passenger properties. - for (Passenger passenger : cabin.getPassengers()) { - passenger.setIsSeated(false); - passenger.setBoardingTime(0); + if (!cabin.getSimulationSettings().isSimulateWithoutUI()) { + simulationFrame.dispose(); } - for (Seat seat : ModelHelper.getChildrenByClass(cabin, Seat.class)) { - seat.setOccupied(false); - } + return true; + } + } + } + Thread.sleep(50000); + return false; + } - Log.add(this, "Initializing new boarding simulation ..."); + /** + * Sort passengers. + */ + private void sortPassengers() { + // sorts the passenger according to selected method + SortPassengersCommand sort = new SortPassengersCommand(cabin); + sort.setPropertiesManually(false, 0); + sort.doRun(); + cabin = sort.returnCabin(); + + SortPassengersCommand sort2 = new SortPassengersCommand(cabin); + int value = 0; + switch (cabin.getSimulationSettings().getSorting()) { + case RANDOM: + value = 0; + break; + case WINDOW_TO_AISLE: + value = 3; + break; + case REAR_TO_FRONT: + value = 1; + break; + default: + break; + } + if (value != 0) { + sort2.setPropertiesManually(false, value); + sort2.doRun(); + cabin = sort2.returnCabin(); + } + } - if (cabin.getPassengers().isEmpty()) { - Input input = new Input(WindowType.GET_BOOLEAN, - "You did not create any passengers. Random passeners are now created.", - IMessageProvider.ERROR); - if (input.getBooleanValue()) { - GeneratePassengersCommand pax = new GeneratePassengersCommand(cabin); - pax.doRun(); - System.out.println("PAX created!"); - } - } + /** + * Export result data. + * + * @throws FileNotFoundException + * the file not found exception + * @throws IOException + * Signals that an I/O exception has occurred. + */ + private void exportResultData() throws FileNotFoundException, IOException { + + ExcelExport exporterResults = new ExcelExport(PAXeleratePreferencePage.DEFAULT_RESULT_FILE_NAME, + PAXeleratePreferencePage.DEFAULT_EXPORT_PATH); + exporterResults.createFile(); + ExportDataCommand exportDataResults = new ExportDataCommand(cabin, exporterResults); + /* print header only for first loop */ + // if(simulationLoop == 1) { + exportDataResults.getStudySettings(); + // } + exportDataResults.getResultData(); + exporterResults.closeFile(); + + /* + * if (developerMode) { // save the CostMap and ObstacleMap to the local + * file // system ExcelExport exporterCostMap = new + * ExcelExport("CostMap"); exporterCostMap.createFile(); MapExportHelper + * exportDataResults1 = new MapExportHelper(exporterCostMap); + * exportDataResults1.saveCostmapToFile(SimulationHandler. + * getUsedCostmaps(), dimensions); exporterCostMap.closeFile(); + * + * ExcelExport exporterObstacleMap = new ExcelExport("ObstacleMap"); + * exporterObstacleMap.createFile(); MapExportHelper exportData = new + * MapExportHelper(exporterObstacleMap); + * exportData.saveObstacleToFile(SimulationHandler.getMap(), + * dimensions); exporterObstacleMap.closeFile(); /* ExcelExport exporter + * = new ExcelExport("iteration" + simulationLoopIndex); + * exporter.createFile(); ExportDataCommand exportData = new + * ExportDataCommand(cabin, exporter); + * exportData.generateDistributionFile(); exportData.getPassengerData(); + * exportData.getSimulationPropertiesData(); exporter.closeFile(); + * + * } + */ + } - Vector dimensions = new Vector2D(cabin.getXDimension(), cabin.getYDimension(), cabin.getScale()); - simulationhandler = new SimulationHandler(dimensions, cabin); + /** + * This method runs the simulate boarding command. + */ + @Override + protected final void doRun() { - // Show WIP simulation view - runAreaMapWindow(); + // Create separate thread + Job job = new Job("Simulation Thread") { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. + * IProgressMonitor) + */ + @Override + protected IStatus run(final IProgressMonitor monitor) { - while (!SimulationHandler.isSimulationDone()) { - for (Passenger pax : SimulationHandler.getCabin().getPassengers()) { - if (pax.isIsSeated() && !alreadySeatedList.contains(pax)) { - alreadySeatedList.add(pax); - } - } - if (OS.isMac()) { - // cabinViewPart.submitPassengerCoordinates(cabin); - } + Log.add(this, "Initializing new simulation run " + simulationLoop); + + CabinViewPart cabinViewPart = ViewPartHelper.getCabinView(); + + /* reset simulation in case of previous existing objects. */ + SimulationHandler.reset(); + /* reset the passenger properties */ + for (Passenger passenger : cabin.getPassengers()) { + passenger.setIsSeated(false); + passenger.setBoardingTime(0); + } + /* resets seat properties */ + for (Seat seat : ModelHelper.getChildrenByClass(cabin, Seat.class)) { + seat.setOccupied(false); + } + /* sorts passengers according to selected scheme */ + if (cabin.getSimulationSettings().isSortPassengerBetweenLoops()) { + sortPassengers(); + } + + if (cabin.getPassengers().isEmpty()) { + Input input = new Input(WindowType.GET_BOOLEAN, + "You did not create any passengers. Random passeners are now created.", + IMessageProvider.ERROR); + if (input.getBooleanValue()) { + new GeneratePassengersCommand(cabin).doRun(); + Log.add(this, "PAX created!"); } - if (SimulationHandler.isSimulationDone()) { + } - /* closes the simulation view after completion */ - simulationFrame.dispose(); + dimensions = new Vector2D(cabin.getXDimension(), cabin.getYDimension(), + cabin.getSimulationSettings().getScale()); - if (Exporter.generateHeatmapFile("Heat Map", SimulationHandler.getMap())) { - Log.add(this, "Heat map saved successfully!"); - } + /* initiates a new simulation */ + new SimulationHandler(dimensions, cabin, simulationLoop); - if (Exporter.generateInterruptmapFile("Interrupt Map", SimulationHandler.getMap())) { - Log.add(this, "Interrupt map saved successfully!"); - } + /* Show WIP simulation view */ + if (!cabin.getSimulationSettings().isSimulateWithoutUI()) { + runAreaMapWindow(); + } - for (Passenger pax : ModelHelper.getChildrenByClass(simulationhandler.getPassengerLocations(), - Passenger.class)) { - if (pax.isIsSeated() && !alreadySeatedList.contains(pax)) { - alreadySeatedList.add(pax); - try { - } catch (NullPointerException e) { - Log.add(this, "Info view is not visible."); - } - } + // TODO: INSERT PAX LOCATION SUBMIT TO CABINVIEWPART + // HERE + + /* checks if an agent is in freezing mode */ + while (!SimulationHandler.isSimulationDone()) { + try { + if (agentSleepCheck()) { + return Status.CANCEL_STATUS; } + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + } + + /* closes the simulation view after completion */ + if (!cabin.getSimulationSettings().isSimulateWithoutUI()) { + simulationFrame.dispose(); + } - SimulationView.getWatch().stop(); - - - - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - Image image = cabinViewPart - .submitObstacleMap(SimulationHandler.getMap().getObstacleMap().getMap()); - cabinViewPart.printObstacleMap(image); - cabinViewPart.submitAgents(SimulationHandler.getAgentList()); - } - }); - - Log.add(this, "Boarding simulation completed"); + /* saves results to results model element */ + SimulationResultLogger results = new SimulationResultLogger(); + + results.getSimulationData(cabin, simulationLoop, + SimulationHandler.getMasterBoardingTime().getElapsedTime() + * cabin.getSimulationSettings().getSimulationSpeedFactor() / 1000, + SimulationHandler.getNumberWaymakingSkipped(), SimulationHandler.getNumberWaymakingCompleted()); + + /* data export */ + if (cabin.getSimulationSettings().isDataExport()) { + try { + exportResultData(); + } catch (IOException e) { + e.printStackTrace(); } + } - // TODO do not round results, rounding should ONLY happen - // for - // displaying (not for internal calculations) - results.getSimulationData(SimulationHandler.getCabin(), i + 1, - DecimalHelper.round((SimulationView.getWatch().getElapsedTimeSecs() - * (double) cabin.getSimulationSettings().getSimulationSpeedFactor()), 2)); + /* + * display the agent path and cost map in the Cabin UI view + */ + if (cabin.getSimulationSettings().isDisplayMap()) { + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + Image image = cabinViewPart + .submitObstacleMap(SimulationHandler.getAreamapHandler().getObstaclemap()); + cabinViewPart.printObstacleMap(image); + cabinViewPart.submitAgents(SimulationHandler.getAgentList()); + } + }); } - results.printSimulationData(); /* Clear the cache! */ cabinViewPart.clearCache(); + SimulationHandler.reset(); // PUBLISH Log.add(this, "Updating GUI..."); Display.getDefault().syncExec(new Runnable() { + @Override public void run() { } }); - // report finished + /* report finished */ return Status.OK_STATUS; } + }; - // Start the Job + /* report job status to console */ + job.addJobChangeListener(new JobChangeAdapter() { + public void done(final IJobChangeEvent event) { + if (event.getResult().isOK()) { + Log.add(this, "Simulation run completed"); + } else { + Log.add(this, "Simulation run failed!"); + } + } + }); + + /* Start the Job */ job.schedule(); + try { + /* schedule job after previous is finished */ + job.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } } + /** + * Run area map window. + */ private void runAreaMapWindow() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - simulationFrame = new JFrame("Simulation Detail View"); + simulationFrame = new JFrame("Simulation View"); SimulationView simulationView = new SimulationView(); simulationView.setAreamap(SimulationHandler.getMap()); simulationFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); @@ -252,8 +410,9 @@ public void run() { WindowListener exitListener = new WindowAdapter() { @Override - public void windowClosing(WindowEvent e) { - simulationhandler.stopSimulation(); + public void windowClosing(final WindowEvent e) { + simulationView.resetSimulationView(); + SimulationHandler.reset(); } }; simulationFrame.addWindowListener(exitListener); diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SortPassengersCommand.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SortPassengersCommand.java index 07ac304e..d37ca49a 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SortPassengersCommand.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/commands/SortPassengersCommand.java @@ -7,11 +7,14 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.jface.dialogs.IMessageProvider; +import org.eclipse.swt.widgets.Display; import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.model.util.ModelHelper; import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.Door; import net.bhl.cdt.paxelerate.model.Passenger; +import net.bhl.cdt.paxelerate.model.Row; import net.bhl.cdt.paxelerate.model.agent.AgentFunctions; import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; import net.bhl.cdt.paxelerate.ui.views.ViewPartHelper; @@ -21,131 +24,224 @@ import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; /** - * This class refreshed the cabin view without modifying anything. It checks the - * layout of the cabin and warns the user. + * This class is used for sorting the Passenger.class objects depending on + * predefined criteria. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 * */ public class SortPassengersCommand extends CDTCommand { - private static final int NUMBER_OF_LOOPS = 10; + /** The cabin. */ private Cabin cabin; - private CabinViewPart cabinViewPart; + + /** The show dialog. */ private boolean showDialog = true; + + /** The value. */ private int value = 0; - public SortPassengersCommand(Cabin cabin) { + /** The Constant INPUT_STRING. */ + private static final String INPUT_STRING = "Please choose a sorting algorithm. [0]: Random, [1]: RTF, [2]: FTR, [3]: WTA, [4]: WTA & RTF, [5]: WTA & FTR"; + + /** + * Instantiates a new sort passengers command. + * + * @param cabin + * the cabin + */ + public SortPassengersCommand(final Cabin cabin) { this.cabin = cabin; } - public void setPropertiesManually(boolean showDialog, int value) { + /** + * Sets the properties manually. + * + * @param showDialog + * the show dialog + * @param value + * the value + */ + public final void setPropertiesManually(final boolean showDialog, final int value) { this.showDialog = showDialog; this.value = value; } - public Cabin returnCabin() { + /** + * Return cabin. + * + * @return the cabin + */ + public final Cabin returnCabin() { return cabin; } + /* + * (non-Javadoc) + * + * @see net.bhl.cdt.commands.CDTCommand#doRun() + */ @Override - protected void doRun() { + protected final synchronized void doRun() { - cabinViewPart = ViewPartHelper.getCabinView(); + CabinViewPart cabinViewPart = ViewPartHelper.getCabinView(); cabinViewPart.unsyncViewer(); if (showDialog) { - Input input = new Input(WindowType.OPTIONS, - "Please choose a sorting algorithm. [0]: Random, [1]: RTF, [2]: FTR, [3]: WTA, [4]: WTA & RTF, [5]: WTA & FTR", - IMessageProvider.INFORMATION); + Input input = new Input(WindowType.OPTIONS, INPUT_STRING, IMessageProvider.INFORMATION); value = input.getIntegerValue(); } + EList paxList = cabin.getPassengers(); - System.out.println("Sorting passengers ..."); + Log.add(this, "Sorting passengers ..."); - switch (value) { + /* + * The number of loops needs to be this high because the algorithm only + * compares two neighboring elements. In order to sort an element from + * the last to the first position, there are as much iterations needed + * as there are elements in the list. + */ - // TODO: decrease number of sorting loops! + int numberOfLoops = cabin.getPassengers().size(); - // Random - case 0: + int numberOfRows = ModelHelper.getChildrenByClass(cabin, Row.class).size(); - for (int i = 0; i < paxList.size(); i++) { - Passenger pax = paxList.get(i); - paxList.move(RandomHelper.randomValue(0, paxList.size()), pax); - } + synchronized (paxList) { + switch (value) { - break; - // Rear to front (RTF) - case 1: - for (int j = 0; j < NUMBER_OF_LOOPS; j++) { - for (int i = 0; i < paxList.size() - 1; i++) { - Passenger pax1 = paxList.get(i); - Passenger pax2 = paxList.get(i + 1); - if (pax1.getSeatRef().getXPosition() < pax2.getSeatRef().getXPosition()) { - paxList.move(i, pax2); - } + // Random + case 0: + + for (int i = 0; i < numberOfLoops; i++) { + Passenger pax = paxList.get(i); + paxList.move(RandomHelper.randomValue(0, paxList.size()), pax); } - } - break; - // Front to rear (FTR) - case 2: - for (int j = 0; j < NUMBER_OF_LOOPS; j++) { - for (int i = 0; i < paxList.size() - 1; i++) { - Passenger pax1 = paxList.get(i); - Passenger pax2 = paxList.get(i + 1); - if (pax1.getSeatRef().getXPosition() > pax2.getSeatRef().getXPosition()) { - paxList.move(i, pax2); + break; + + // Rear to front (RTF) + case 1: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger pax1 = paxList.get(i); + Passenger pax2 = paxList.get(i + 1); + if (pax1.getSeat().getXPosition() < pax2.getSeat().getXPosition()) { + paxList.move(i, pax2); + } } } - } - break; - // Window to aisle (WTA) - case 3: - for (int j = 0; j < NUMBER_OF_LOOPS; j++) { - for (int i = 0; i < paxList.size() - 1; i++) { - Passenger thisPax = paxList.get(i); - Passenger otherPax = paxList.get(i + 1); - if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeatRef(), otherPax.getSeatRef())) { - paxList.move(i, otherPax); + break; + + // Front to rear (FTR) + case 2: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger pax1 = paxList.get(i); + Passenger pax2 = paxList.get(i + 1); + if (pax1.getSeat().getXPosition() > pax2.getSeat().getXPosition()) { + paxList.move(i, pax2); + } } } - } - break; - // Window to aisle and rear to front (WTA + RTF) - case 4: - for (int j = 0; j < NUMBER_OF_LOOPS; j++) { - for (int i = 0; i < paxList.size() - 1; i++) { - Passenger thisPax = paxList.get(i); - Passenger otherPax = paxList.get(i + 1); - if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeatRef(), otherPax.getSeatRef())) { - if (thisPax.getSeatRef().getXPosition() < otherPax.getSeatRef().getXPosition()) { + break; + + // Window to aisle (WTA) + case 3: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger thisPax = paxList.get(i); + Passenger otherPax = paxList.get(i + 1); + if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeat(), otherPax.getSeat())) { paxList.move(i, otherPax); } } } + break; + + // Window to aisle and rear to front (WTA + RTF) + case 4: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger thisPax = paxList.get(i); + Passenger otherPax = paxList.get(i + 1); + if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeat(), otherPax.getSeat())) { + if (thisPax.getSeat().getXPosition() < otherPax.getSeat().getXPosition()) { + paxList.move(i, otherPax); + } + } + } + } + break; + + // Window to aisle and front to rear (WTA + FTR) + case 5: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger thisPax = paxList.get(i); + Passenger otherPax = paxList.get(i + 1); + if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeat(), otherPax.getSeat())) { + if (thisPax.getSeat().getXPosition() > otherPax.getSeat().getXPosition()) { + paxList.move(i, otherPax); + } + } + } + } + break; + + // Group/block boarding: create blocks with 10 rows each and + // distribute + // the passengers randomly + case 6: + int blocks = (numberOfRows / 10); + int paxPerBlock = numberOfLoops / blocks; + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size(); i++) { + Passenger pax = paxList.get(i); + + paxList.move(RandomHelper.randomValue(0, paxList.size()), pax); + } + } + break; + + // Steffen method: window every second row left and right + case 7: + for (int j = 0; j < numberOfLoops; j++) { + for (int i = 0; i < paxList.size() - 1; i++) { + Passenger thisPax = paxList.get(i); + Passenger otherPax = paxList.get(i + 1); + if (AgentFunctions.otherSeatCloserToAisle(thisPax.getSeat(), otherPax.getSeat())) { + if (thisPax.getSeat().getXPosition() > otherPax.getSeat().getXPosition()) { + // TODO: + } + } + } + } + break; + + // Milne/Kelly method: based on number of carried bags + case 8: + // TODO + break; + + default: + Log.add(this, "Wrong Input!"); + break; } - break; - // Window to aisle and front to rear (WTA + FTR) - case 5: - // TODO - break; - default: - break; } - System.out.println("Sorting completed."); + Log.add(this, "Sorting completed."); int counter = 1; for (Passenger pax : cabin.getPassengers()) { pax.setStartBoardingAfterDelay(calculateDelay(pax)); pax.setId(counter); - pax.setName(counter + "(" + pax.getSeatRef().getName() + ")"); + pax.setName(counter + "(" + pax.getSeat().getName() + ")"); counter++; } @@ -156,14 +252,29 @@ protected void doRun() { cabinViewPart.syncViewer(); try { - cabinViewPart.setCabin(cabin); - Log.add(this, "Cabin view checked and updated"); + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + cabinViewPart.setCabin(cabin); + Log.add(this, "Cabin view checked and updated"); + } + }); + } catch (NullPointerException e) { Log.add(this, "No cabin view is visible!"); + e.printStackTrace(); } } - private double calculateDelay(Passenger pax) { + /** + * Calculate delay. + * + * @param pax + * the pax + * @return the double + */ + private synchronized double calculateDelay(final Passenger pax) { double delay = 0; double clocking = cabin.getSimulationSettings().getPassengersBoardingPerMinute(); diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ColorHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ColorHelper.java new file mode 100644 index 00000000..05b99b60 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ColorHelper.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ + +package net.bhl.cdt.paxelerate.ui.graphics; + +import java.util.Random; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Device; +import org.eclipse.swt.widgets.Display; + +/** + * Unified coloring system for Paxelerate. + * + * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 + */ +public final class ColorHelper { + + /** The color displaying device/component. */ + private static final Device disp = Display.getCurrent(); + + /** All Paxelerate colors. */ + public static final Color + // General colors + BLACK = new Color(disp, 0, 0, 0), GREY_DARK = new Color(disp, 51, 51, 51), + GREY_LIGHT = new Color(disp, 193, 193, 193), RED = new Color(disp, 255, 0, 0), + ORANGE = new Color(disp, 255, 122, 0), YELLOW = new Color(disp, 255, 255, 0), + GREEN = new Color(disp, 0, 255, 0), GREEN_LIGHT = new Color(disp, 122, 255, 0), + BLUE = new Color(disp, 0, 0, 255), WHITE = new Color(disp, 255, 255, 255), + + // Program colors + ERROR = new Color(disp, 255, 51, 51), + + // Passenger colors + PASSENGER_MALE = new Color(disp, 51, 153, 255), PASSEMGER_FEMALE = new Color(disp, 255, 153, 255), + + // Luggage colors + LUGGAGE_NONE = new Color(disp, 127, 112, 99), LUGGAGE_SMALL = new Color(disp, 255, 162, 76), + LUGGAGE_MEDIUM = new Color(disp, 204, 97, 0), LUGGAGE_LARGE = new Color(disp, 127, 61, 0), + + // Mood + MOOD_AGGRESSIVE = new Color(disp, 127, 61, 0), MODD_PASSIVE = new Color(disp, 127, 112, 99), + + // Aircraft colors + AIRCRAFT_FLOOR = new Color(disp, 237, 243, 245), AIRCRAFT_LAVATORY = new Color(disp, 255, 160, 122); + + /** + * Singleton constructor for a ColorHelper instance. + */ + private ColorHelper() { + } + + /** + * Returns a random color. + * + * @return the random color + */ + public static Color getRandomColor() { + Random r = new Random(); + return new Color(disp, r.nextInt(256), r.nextInt(256), r.nextInt(256)); + } + +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/font/FontHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/FontHelper.java similarity index 57% rename from net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/font/FontHelper.java rename to net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/FontHelper.java index 28705b2f..7eb15ee6 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/font/FontHelper.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/FontHelper.java @@ -4,7 +4,7 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ -package net.bhl.cdt.paxelerate.ui.font; +package net.bhl.cdt.paxelerate.ui.graphics; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Device; @@ -12,38 +12,33 @@ import org.eclipse.swt.widgets.Display; /** - * Unified font system for Paxelerate - * + * Unified font system for Paxelerate. + * * @author raoul.rothfeld + * @version 1.0 + * @since 0.5 */ -public class FontHelper { - - /** - * The font displaying device/component - */ - private static final Device d = Display.getCurrent(); - - /** - * Font Name - */ +public final class FontHelper { + + /** The font displaying device/component. */ + private static final Device disp = Display.getCurrent(); + + /** Font Name. */ private static final String fontName = "Helvetica Neue"; - /** - * All Paxelerate font styles - */ + /** All Paxelerate font styles. */ public static final Font - // Heading styles - HEADING1 = new Font(d, fontName, 9, SWT.BOLD), - HEADING2 = new Font(d, fontName, 9, SWT.NORMAL), - HEADING3 = new Font(d, fontName, 8, SWT.NORMAL), - + // Heading styles + HEADING1 = new Font(disp, fontName, 9, SWT.BOLD), HEADING2 = new Font(disp, fontName, 9, SWT.NORMAL), + HEADING3 = new Font(disp, fontName, 8, SWT.NORMAL), + // Paragraph styles - PARAGRAPH = new Font(d, fontName, 6, SWT.NORMAL); + PARAGRAPH = new Font(disp, fontName, 6, SWT.NORMAL); /** - * Singleton constructor for a FontHelper instance + * Singleton constructor for a FontHelper instance. */ private FontHelper() { } - + } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageHelper.java similarity index 50% rename from net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageHelper.java rename to net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageHelper.java index c9ca7c4e..2eea5f2f 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageHelper.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageHelper.java @@ -1,44 +1,51 @@ -package net.bhl.cdt.paxelerate.ui.image; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -import net.bhl.cdt.paxelerate.ui.graphics.SWTHelper; - -/** - * - * @author marc.engelmann - * - */ -public class ImageHelper { - - /** - * This method resizes an image. - * - * @param image - * the image - * @param width - * the desired width - * @param height - * the desired height - * @return the scaled image - */ - public static Image resize(Image image, int width, int height, Composite parent) { - - if (width == 0 || height == 0) { - return image; - } - - Image scaledImage = new Image(parent.getDisplay(), width, height); - - GC gc = new GC(scaledImage); - - gc = SWTHelper.getQualitySettings(gc); - - gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, width, height); - gc.dispose(); - return scaledImage; - } - -} +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.graphics; + +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; + +/** + * The Class ImageHelper. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ +public class ImageHelper { + + /** + * This method resizes an image. + * + * @param image + * the image + * @param width + * the desired width + * @param height + * the desired height + * @param parent + * the parent + * @return the scaled image + */ + public static Image resize(final Image image, final int width, final int height, final Composite parent) { + + if (width == 0 || height == 0) { + return image; + } + + Image scaledImage = new Image(parent.getDisplay(), width, height); + + GC gc = new GC(scaledImage); + + gc = SWTHelper.getQualitySettings(gc); + + gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, width, height); + gc.dispose(); + return scaledImage; + } + +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageImporter.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageImporter.java similarity index 79% rename from net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageImporter.java rename to net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageImporter.java index 9cb63205..9ada2037 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/image/ImageImporter.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/ImageImporter.java @@ -9,7 +9,7 @@ * Google, Inc. - initial API and implementation *******************************************************************************/ -package net.bhl.cdt.paxelerate.ui.image; +package net.bhl.cdt.paxelerate.ui.graphics; import java.io.FileInputStream; import java.io.IOException; @@ -22,17 +22,15 @@ import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.widgets.Display; -import net.bhl.cdt.paxelerate.ui.color.ColorHelper; - /** - * - * @author Google Inc.W + * The Class ImageImporter. * + * @author Google Inc.W */ public class ImageImporter { /** - * Protect constructor since it is a static only class + * Protect constructor since it is a static only class. */ protected ImageImporter() { } @@ -40,16 +38,18 @@ protected ImageImporter() { /** * Maps image paths to images. */ - private static Map m_imageMap = new HashMap(); + private static Map imageMap = new HashMap(); /** * Returns an {@link Image} encoded by the specified {@link InputStream}. - * + * * @param stream * the {@link InputStream} encoding the image data * @return the {@link Image} encoded by the specified input stream + * @throws IOException + * Signals that an I/O exception has occurred. */ - protected static Image getImage(InputStream stream) throws IOException { + protected static Image getImage(final InputStream stream) throws IOException { try { Display display = Display.getCurrent(); ImageData data = new ImageData(stream); @@ -69,15 +69,15 @@ protected static Image getImage(InputStream stream) throws IOException { * the path to the image file * @return the {@link Image} stored in the file at the specified path */ - public static Image getImage(String path) { - Image image = m_imageMap.get(path); + public static Image getImage(final String path) { + Image image = imageMap.get(path); if (image == null) { try { image = getImage(new FileInputStream(path)); - m_imageMap.put(path, image); + imageMap.put(path, image); } catch (Exception e) { image = getMissingImage(); - m_imageMap.put(path, image); + imageMap.put(path, image); } } return image; @@ -93,16 +93,16 @@ public static Image getImage(String path) { * the path to the image file, if starts with '/' * @return the {@link Image} stored in the file at the specified path */ - public static Image getImage(Class clazz, String path) { + public static Image getImage(final Class clazz, final String path) { String key = clazz.getName() + '|' + path; - Image image = m_imageMap.get(key); + Image image = imageMap.get(key); if (image == null) { try { image = getImage(clazz.getResourceAsStream(path)); - m_imageMap.put(key, image); + imageMap.put(key, image); } catch (Exception e) { image = getMissingImage(); - m_imageMap.put(key, image); + imageMap.put(key, image); } } return image; @@ -114,6 +114,8 @@ public static Image getImage(Class clazz, String path) { private static final int MISSING_IMAGE_SIZE = 10; /** + * Gets the missing image. + * * @return the small {@link Image} that can be used as placeholder for * missing image. */ @@ -132,9 +134,10 @@ private static Image getMissingImage() { * Dispose all of the cached {@link Image}'s. */ public static void disposeImages() { - for (Image image : m_imageMap.values()) + for (Image image : imageMap.values()) { image.dispose(); - m_imageMap.clear(); + } + imageMap.clear(); } } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/SWTHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/SWTHelper.java index 8c2212dd..8b29db2b 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/SWTHelper.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/graphics/SWTHelper.java @@ -1,17 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ package net.bhl.cdt.paxelerate.ui.graphics; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.GC; /** - * - * @author marc.engelmann + * The Class SWTHelper. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class SWTHelper { - public static GC getQualitySettings(GC gc) { + /** + * Gets the quality settings. + * + * @param gc + * the gc + * @return the quality settings + */ + public static GC getQualitySettings(final GC gc) { gc.setAntialias(SWT.ON); gc.setTextAntialias(SWT.ON); gc.setInterpolation(SWT.HIGH); diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/CloneObjectHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/CloneObjectHandler.java index d8f26d2f..212aeafe 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/CloneObjectHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/CloneObjectHandler.java @@ -1,3 +1,8 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ package net.bhl.cdt.paxelerate.ui.handlers; import org.eclipse.core.commands.AbstractHandler; @@ -10,24 +15,26 @@ import net.bhl.cdt.paxelerate.ui.commands.CloneObjectCommand; /** - * - * @author marc.engelmann + * The Class CloneObjectHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class CloneObjectHandler extends AbstractHandler { /** * Get selected Element. - * + * * @param event * Selected Element + * @return null * @throws ExecutionException * Exception - * @return null */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/DrawCabinHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/DrawCabinHandler.java index 06fc3873..dae19130 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/DrawCabinHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/DrawCabinHandler.java @@ -17,24 +17,26 @@ import net.bhl.cdt.paxelerate.ui.commands.DrawCabinCommand; /** - * - * @author marc.engelmann + * The Class DrawCabinHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class DrawCabinHandler extends AbstractHandler { /** * Get selected Element. - * + * * @param event * Selected Element + * @return null * @throws ExecutionException * Exception - * @return null */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/ExportDataHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/ExportDataHandler.java new file mode 100644 index 00000000..3a3a2380 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/ExportDataHandler.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.util.EMFModelLoader; +import net.bhl.cdt.paxelerate.ui.commands.ExportDataCommand; + +/** + * The Class ExportDataHandler. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class ExportDataHandler extends AbstractHandler { + + /** + * Get selected Element. + * + * @param event + * Selected Element + * @return null + * @throws ExecutionException + * Exception + */ + @Override + public final Object execute(final ExecutionEvent event) throws ExecutionException { + + ISelection sel = HandlerUtil.getActiveMenuSelection(event); + IStructuredSelection selection = (IStructuredSelection) sel; + + Object firstElement = null; + + if (selection == null) { + firstElement = EMFModelLoader.loadCabin(); + } else { + firstElement = selection.getFirstElement(); + } + + if (firstElement instanceof Cabin) { + new ExportDataCommand((Cabin) firstElement).execute(); + } + + return null; + } + +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GenerateCabinHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GenerateCabinHandler.java index 40c37938..d83707a2 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GenerateCabinHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GenerateCabinHandler.java @@ -17,24 +17,26 @@ import net.bhl.cdt.paxelerate.ui.commands.GenerateCabinCommand; /** - * - * @author marc.engelmann + * The Class GenerateCabinHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class GenerateCabinHandler extends AbstractHandler { /** * Get selected Element. - * + * * @param event * Selected Element + * @return null * @throws ExecutionException * Exception - * @return null */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GeneratePassengersHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GeneratePassengersHandler.java index 8c095b72..9158d667 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GeneratePassengersHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/GeneratePassengersHandler.java @@ -17,24 +17,26 @@ import net.bhl.cdt.paxelerate.ui.commands.GeneratePassengersCommand; /** - * - * @author marc.engelmann + * The Class GeneratePassengersHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class GeneratePassengersHandler extends AbstractHandler { /** * Get selected Element. - * + * * @param event * Selected Element + * @return null * @throws ExecutionException * Exception - * @return null */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/MoveObjectHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/MoveObjectHandler.java index f562e81c..96bbe9d3 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/MoveObjectHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/MoveObjectHandler.java @@ -24,31 +24,46 @@ import net.bhl.cdt.paxelerate.ui.commands.MoveObjectCommand; /** - * - * @author marc.engelmann + * The Class MoveObjectHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class MoveObjectHandler extends AbstractHandler { /** * Get selected Element. - * - * @param event - * Selected Element - * @throws ExecutionException - * Exception + * * @return null */ private Cabin cabin; + + /** The rowlist. */ private ArrayList rowlist = new ArrayList(); + + /** The seatlist. */ private ArrayList seatlist = new ArrayList(); + + /** The galleylist. */ private ArrayList galleylist = new ArrayList(); + + /** The lavatorylist. */ private ArrayList lavatorylist = new ArrayList(); + + /** The curtainlist. */ private ArrayList curtainlist = new ArrayList(); + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. + * ExecutionEvent) + */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationHandler.java new file mode 100644 index 00000000..829095f4 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationHandler.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.ui.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.util.EMFModelLoader; +import net.bhl.cdt.paxelerate.ui.commands.RunBatchSimulationCommand; + +/** + * The Class RunBatchSimulationHandler. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class RunBatchSimulationHandler extends AbstractHandler { + + /** + * Get selected Element. + * + * @param event + * Selected Element + * @return null + * @throws ExecutionException + * Exception + */ + @Override + public final Object execute(final ExecutionEvent event) throws ExecutionException { + + ISelection sel = HandlerUtil.getActiveMenuSelection(event); + IStructuredSelection selection = (IStructuredSelection) sel; + + Object firstElement = null; + + // TODO: this does not work if the cabin has not once been refreshed + // using a right click refresh. + + if (selection == null) { + firstElement = EMFModelLoader.loadCabin(); + } else { + firstElement = selection.getFirstElement(); + } + + if (firstElement instanceof Cabin) { + new RunBatchSimulationCommand((Cabin) firstElement).execute(); + } + + return null; + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationMenuHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationMenuHandler.java new file mode 100644 index 00000000..8ba888cd --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/RunBatchSimulationMenuHandler.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.ui.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import net.bhl.cdt.paxelerate.ui.commands.RunBatchSimulationMenuCommand; + +/** + * The Class RunBatchSimulationMenuHandler. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class RunBatchSimulationMenuHandler extends AbstractHandler { + + /** + * Get selected Element. + * + * @param event + * Selected Element + * @return null + * @throws ExecutionException + * Exception + */ + @Override + public final Object execute(final ExecutionEvent event) throws ExecutionException { + + new RunBatchSimulationMenuCommand().execute(); + + return null; + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SimulateBoardingHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SimulateBoardingHandler.java index bd7fd35c..af3715f9 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SimulateBoardingHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SimulateBoardingHandler.java @@ -17,24 +17,26 @@ import net.bhl.cdt.paxelerate.ui.commands.SimulateBoardingCommand; /** - * - * @author marc.engelmann + * The Class SimulateBoardingHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class SimulateBoardingHandler extends AbstractHandler { /** * Get selected Element. - * + * * @param event * Selected Element + * @return null * @throws ExecutionException * Exception - * @return null */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SortPassengersHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SortPassengersHandler.java index d3a94275..6e19ec97 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SortPassengersHandler.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/handlers/SortPassengersHandler.java @@ -16,15 +16,24 @@ import net.bhl.cdt.paxelerate.ui.commands.SortPassengersCommand; /** - * - * @author marc.engelmann + * The Class SortPassengersHandler. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class SortPassengersHandler extends AbstractHandler { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. + * ExecutionEvent) + */ @Override - public Object execute(ExecutionEvent event) throws ExecutionException { + public final Object execute(final ExecutionEvent event) throws ExecutionException { ISelection sel = HandlerUtil.getActiveMenuSelection(event); IStructuredSelection selection = (IStructuredSelection) sel; diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/DefineBatchSimulationInput.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/DefineBatchSimulationInput.java new file mode 100644 index 00000000..f1820f2c --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/DefineBatchSimulationInput.java @@ -0,0 +1,220 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.helper; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.ecp.core.util.ECPUtil; +import org.eclipse.swt.widgets.Display; + +import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.LayoutConcept; +import net.bhl.cdt.paxelerate.model.SimulationProperties; +import net.bhl.cdt.paxelerate.model.TravelClass; +import net.bhl.cdt.paxelerate.ui.commands.DrawCabinCommand; +import net.bhl.cdt.paxelerate.ui.preferences.PAXeleratePreferencePage; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * The Class DefineBatchSimulationInput. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ +public class DefineBatchSimulationInput extends CDTCommand { + + /** The cabin. */ + private Cabin cabin; + + /** The sim settings. */ + private SimulationProperties simSettings; + + /** The hand luggage study. */ + private static HandLuggageCase handLuggageStudy; + + /** + * The Enum HandLuggageCase. + */ + public static enum HandLuggageCase { + + /** The no hl. */ + NO_HL, + /** The usual hl low. */ + USUAL_HL_LOW, + /** The usual hl high. */ + USUAL_HL_HIGH, + /** The bulky hl. */ + BULKY_HL + } + + /** The load factor. */ + private int loadFactor; + + /** + * This is the constructor method of the SimulateBoardingCommand. + * + * @param handLuggageStudy + * the hand luggage study + * @param loadFactor + * the load factor + */ + public DefineBatchSimulationInput(HandLuggageCase handLuggageStudy, int loadFactor) { + try { + if (ECPUtil.getECPProjectManager().getProjects() != null) { + this.cabin = (Cabin) ECPUtil.getECPProjectManager() + .getProject(PAXeleratePreferencePage.DEFAULT_PROJECT_NAME).getContents().get(0); + this.simSettings = this.cabin.getSimulationSettings(); + this.handLuggageStudy = handLuggageStudy; + this.loadFactor = loadFactor; + } + } catch (NullPointerException e) { + Log.add(this, "Could not load model!"); + e.printStackTrace(); + } + } + + /** + * This method runs the simulate boarding command. + */ + public final void doRun() { + // Create separate thread + Job job = new Job("Define Simulation Input Thread") { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. + * IProgressMonitor) + */ + @Override + protected IStatus run(final IProgressMonitor monitor) { + + Log.add(this, "Setting study parameters ..."); + + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + new DrawCabinCommand(cabin).execute(); + } + }); + + simSettings.setSimulationSpeedFactor(2); + simSettings.setLayoutConcept(LayoutConcept.LIFTING_SEAT_PAN_SEATS); + simSettings.setSimulateWithoutUI(false); + simSettings.setSidewaysFoldabeSeatPopupTimeDeviation(0); + simSettings.setLiftingSeatPanPopupTimeDeviation(0); + simSettings.getPassengerProperties().setSeatInterferenceProcessTimeFoldingSeatDeviation(0); + simSettings.getPassengerProperties().setSeatInterferenceProcessTimeDeviation(0); + + switch (handLuggageStudy) { + case NO_HL: + simSettings.getLuggageProperties().setPercentageOfPassengersWithNoLuggage(100); + simSettings.getLuggageProperties().setPercentageOfPassengersWithSmallLuggage(0); + simSettings.getLuggageProperties().setPercentageOfPassengersWithMediumLuggage(0); + simSettings.getLuggageProperties().setPercentageOfPassengersWithBigLuggage(0); + break; + + case USUAL_HL_LOW: + simSettings.getLuggageProperties().setPercentageOfPassengersWithNoLuggage(10); + simSettings.getLuggageProperties().setPercentageOfPassengersWithSmallLuggage(50); + simSettings.getLuggageProperties().setPercentageOfPassengersWithMediumLuggage(30); + simSettings.getLuggageProperties().setPercentageOfPassengersWithBigLuggage(10); + break; + + case USUAL_HL_HIGH: + simSettings.getLuggageProperties().setPercentageOfPassengersWithNoLuggage(10); + simSettings.getLuggageProperties().setPercentageOfPassengersWithSmallLuggage(30); + simSettings.getLuggageProperties().setPercentageOfPassengersWithMediumLuggage(40); + simSettings.getLuggageProperties().setPercentageOfPassengersWithBigLuggage(20); + break; + + case BULKY_HL: + simSettings.getLuggageProperties().setPercentageOfPassengersWithNoLuggage(0); + simSettings.getLuggageProperties().setPercentageOfPassengersWithSmallLuggage(20); + simSettings.getLuggageProperties().setPercentageOfPassengersWithMediumLuggage(30); + simSettings.getLuggageProperties().setPercentageOfPassengersWithBigLuggage(50); + break; + default: + break; + } + + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + new DrawCabinCommand(cabin).execute(); + } + }); + + switch (loadFactor) { + case 60: + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(108); + } + break; + + case 70: + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(126); + } + break; + + case 80: + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(144); + } + break; + + case 90: + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(162); + } + break; + + case 100: + for (TravelClass travelclass : cabin.getClasses()) { + travelclass.setPassengers(180); + } + break; + default: + break; + } + + // report finished + return Status.OK_STATUS; + + } + }; + + /* report job status to console */ + job.addJobChangeListener(new JobChangeAdapter() { + public void done(final IJobChangeEvent event) { + if (event.getResult().isOK()) { + Log.add(this, "Simulation parameters set"); + } else { + Log.add(this, "Setting simulation parameters failed"); + } + } + }); + + /* Start the Job */ + job.schedule(); + try { + /* schedule job after previous is finished */ + job.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ECPModelImporter.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ECPModelImporter.java new file mode 100644 index 00000000..f633f2c2 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ECPModelImporter.java @@ -0,0 +1,193 @@ +/******************************************************************************* +* Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying +* materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, +* and is available at http://www.eclipse.org/legal/epl-v10.html +***************************************************************************************/ +package net.bhl.cdt.paxelerate.ui.helper; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.emf.ecp.core.ECPProject; +import org.eclipse.emf.ecp.core.ECPProvider; +import org.eclipse.emf.ecp.core.exceptions.ECPProjectWithNameExistsException; +import org.eclipse.emf.ecp.core.util.ECPUtil; +import org.eclipse.emf.edit.command.ChangeCommand; + +import net.bhl.cdt.commands.CDTCommand; +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.ui.preferences.PAXeleratePreferencePage; +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * The Class ECPModelImporter. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class ECPModelImporter extends CDTCommand { + + /** + * This is the constructor method of the ECPModelImporter. + */ + public ECPModelImporter() { + + } + + /** + * Load xmi model. + * + * @param folderName + * the folder name + * @param fileName + * the file name + * @return the cabin + * @throws ECPProjectWithNameExistsException + * the ECP project with name exists exception + */ + private Cabin loadXMIModel(final String folderName, final String fileName) + throws ECPProjectWithNameExistsException { + /* Create a resource set */ + ResourceSet resourceSet = new ResourceSetImpl(); + + /* Register the default resource factory */ + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() + .put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl()); + + /* Get the URI of the model file */ + URI uri = URI.createFileURI(folderName + fileName); + + /* Demand load the resource for this file */ + Resource resource = resourceSet.getResource(uri, true); + + /* get model elements from the resource */ + Cabin cabin = (Cabin) resource.getContents().get(0); + + return cabin; + } + + /** + * Creates the new project. + * + * @param projectName + * the project name + * @return the ECP project + * @throws ECPProjectWithNameExistsException + * the ECP project with name exists exception + */ + private ECPProject createNewProject(final String projectName) throws ECPProjectWithNameExistsException { + ECPProject refProject = ECPUtil.getECPProjectManager().createProject(getProvider(), projectName, + ECPUtil.createProperties()); + return refProject; + } + + /** + * Adds the xmi model to project. + * + * @param refProject + * the ref project + * @param cabin + * the cabin + */ + private void addXMIModelToProject(final ECPProject refProject, final Cabin cabin) { + /* add the imported xmi model to the default project */ + refProject.getEditingDomain().getCommandStack().execute(new ChangeCommand(cabin) { + @Override + protected void doExecute() { + refProject.getContents().add(cabin); + } + }); + } + + /** + * Delete existing projects. + */ + private void deleteExistingProjects() { + if (ECPUtil.getECPProjectManager().getProjects() != null) { + for (ECPProject project : ECPUtil.getECPProjectManager().getProjects()) { + project.delete(); + } + } + } + + /** + * Gets the provider. + * + * @return the provider + */ + private static ECPProvider getProvider() { + Object[] providerArray = ECPUtil.getECPProviderRegistry().getProviders().toArray(); + return (ECPProvider) providerArray[0]; + } + + /** + * This method runs the ECPModelImporter. + */ + public final void doRun() { + // Create separate thread + Job job = new Job("ECP Importer Thread") { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. + * IProgressMonitor) + */ + @Override + protected IStatus run(final IProgressMonitor monitor) { + + try { + Log.add(this, "Loading cabin from file..."); + + deleteExistingProjects(); + ECPProject project = createNewProject(PAXeleratePreferencePage.DEFAULT_PROJECT_NAME); + Cabin cabin = loadXMIModel(PAXeleratePreferencePage.DEFAULT_XMI_FOLDER, + PAXeleratePreferencePage.DEFAULT_XMI_FILE); + addXMIModelToProject(project, cabin); + // cabinModel = EcoreUtil.copy(cabin); + Log.add(this, "...cabin loaded!"); + + } catch (ECPProjectWithNameExistsException e) { + e.printStackTrace(); + } + + // report finished + return Status.OK_STATUS; + + } + + }; + + /* report job status to console */ + job.addJobChangeListener(new JobChangeAdapter() { + public void done(final IJobChangeEvent event) { + if (event.getResult().isOK()) { + Log.add(this, "ECP model import completed"); + } else { + Log.add(this, "ECP model import failed"); + } + } + }); + + /* Start the Job */ + job.schedule(); + try { + /* schedule job after previous is finished */ + job.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/MapExportHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/MapExportHelper.java new file mode 100644 index 00000000..79925c29 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/MapExportHelper.java @@ -0,0 +1,105 @@ +/** Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.helper; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Map; + +import net.bhl.cdt.paxelerate.model.astar.Areamap; +import net.bhl.cdt.paxelerate.model.astar.Costmap; +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; +import net.bhl.cdt.paxelerate.util.output.ExcelExport; + +/** + * This class exports the costmap and obstacle map. + * + * @author marc.engelmann, michael.schmidt + * @version 1.0 + * @since 0.6 + */ + +public class MapExportHelper { + + /** The default fileName. */ + private String fileName = "export"; + + /** The areamap exporter. */ + private static ExcelExport areamapExporter; + + /** + * This method saves the whole cost map in a text file to the documents + * folder. + * + * @param exporter + * the exporter + */ + + public MapExportHelper(final ExcelExport exporter) { + areamapExporter = exporter; + } + + /** + * Save costmap to file. + * + * @param map + * the map + * @param dimensions + * the dimensions + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public final void saveCostmapToFile(final Map map, final Vector dimensions) + throws IOException, FileNotFoundException { + + for (Costmap costmap : ((Map) map).values()) { + + for (int x = 0; x < dimensions.getX(); x++) { + for (int y = 0; y < dimensions.getY(); y++) { + if (costmap.getCost(new Vector2D(x, y)) == -1) { + areamapExporter.addColumnElement("X"); + } else { + areamapExporter.addColumnElement(costmap.getCost(new Vector2D(x, y))); + } + } + areamapExporter.addNewLine(); + } + + } + + } + + /** + * This method saves the whole obstacle map in a text file to the documents + * folder. + * + * @param areamap + * the areamap + * @param dimensions + * the dimensions + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + + public final void saveObstacleToFile(final Areamap areamap, final Vector dimensions) + throws IOException, FileNotFoundException { + + for (int x = 0; x < dimensions.getX(); x++) { + for (int y = 0; y < dimensions.getY(); y++) { + if (areamap.get(new Vector2D(x, y)).isObstacle()) { + areamapExporter.addColumnElement("X"); + } else { + areamapExporter.addColumnElement(areamap.get(new Vector2D(x, y)).getObstacleValue()); + } + } + areamapExporter.addNewLine(); + } + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ViewPartHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ViewPartHelper.java new file mode 100644 index 00000000..ba10832d --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/helper/ViewPartHelper.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ + +package net.bhl.cdt.paxelerate.ui.helper; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; + +/** + * The Class ViewPartHelper. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * + */ +public class ViewPartHelper { + + /** + * Gets the cabin view. + * + * @return the cabin view + */ + public static CabinViewPart getCabinView() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + IWorkbenchPage page = window.getActivePage(); + return (CabinViewPart) page.findView("net.bhl.cdt.paxelerate.ui.views.cabinview"); + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/perspective/PerspectiveFactory.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/perspective/PerspectiveFactory.java index db4606c7..ba9bc5d4 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/perspective/PerspectiveFactory.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/perspective/PerspectiveFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -12,21 +12,29 @@ import org.eclipse.ui.console.IConsoleConstants; /** - * - * @author raoul.rothfeld, Michael Schmidt + * A factory for creating Perspective objects. * + * @author raoul.rothfeld, michael.schmidt + * @version 1.0 + * @since 0.5 */ public class PerspectiveFactory implements IPerspectiveFactory { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui. + * IPageLayout) + */ @Override - public void createInitialLayout(IPageLayout layout) { + public final void createInitialLayout(final IPageLayout layout) { IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f, layout.getEditorArea()); topLeft.addView(ModelExplorerView.ID); IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.5f, "topLeft"); bottomLeft.addView("net.bhl.cdt.paxelerate.ui.propertyview"); - ; IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 0.7f, layout.getEditorArea()); right.addView("net.bhl.cdt.paxelerate.ui.views.cabinview"); diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/preferences/PAXeleratePreferencePage.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/preferences/PAXeleratePreferencePage.java new file mode 100644 index 00000000..3a3fc29f --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/preferences/PAXeleratePreferencePage.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.preferences; + +import org.eclipse.jface.preference.DirectoryFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.StringFieldEditor; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +import net.bhl.cdt.paxelerate.ui.Activator; + +/** + * This is the PreferencePage of PAXelerate. + * + * @author michael.schmidt + * @version 0.5 + * @since 0.7 + */ +public class PAXeleratePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { + + /** The Constant PROJECT_NAME_PREFERENCE. */ + // The identifiers for the preferences + public static final String PROJECT_NAME_PREFERENCE = "projectName"; + + /** The Constant XMI_FILE_PREFERENCE. */ + public static final String XMI_FILE_PREFERENCE = "xmiFile"; + + /** The Constant RESULT_FILE_NAME_PREFERENCE. */ + public static final String RESULT_FILE_NAME_PREFERENCE = "resultFile"; + + /** The Constant EXPORT_PATH_PREFERENCE. */ + public static final String EXPORT_PATH_PREFERENCE = "exportPath"; + + /** The Constant DEFAULT_PROJECT_NAME. */ + // The default values for the preferences + public static final String DEFAULT_PROJECT_NAME = "reference"; + + /** The Constant DEFAULT_XMI_FILE. */ + public static final String DEFAULT_XMI_FILE = "Reference_Cabin_v2.xmi"; + + /** The Constant DEFAULT_XMI_FOLDER. */ + public static final String DEFAULT_XMI_FOLDER = System.getProperty("user.home") + "/Documents/paxelerate/"; + + /** The Constant DEFAULT_RESULT_FILE_NAME. */ + public static final String DEFAULT_RESULT_FILE_NAME = "results_0179"; + + /** The Constant DEFAULT_EXPORT_PATH. */ + public static final String DEFAULT_EXPORT_PATH = System.getProperty("user.home") + "/Documents/paxelerate/"; + + /** + * The constructor of the PreferencePage. + */ + public PAXeleratePreferencePage() { + super(GRID); + /* Set the preference store for the preference page. */ + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + setPreferenceStore(store); + + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore() + */ + protected IPreferenceStore doGetPreferenceStore() { + return Activator.getDefault().getPreferenceStore(); + } + + /** + * This method creates the editor fields for the PAXelerate file path. + */ + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.preference.FieldEditorPreferencePage + * #createFieldEditors() + */ + @Override + public void createFieldEditors() { + // TODO: export file name costmap, obstacle map + + StringFieldEditor project = new StringFieldEditor(PROJECT_NAME_PREFERENCE, "&Default project name:", + getFieldEditorParent()); + addField(project); + + DirectoryFieldEditor xmiFile = new DirectoryFieldEditor(XMI_FILE_PREFERENCE, "&Cabin xmi file location:", + getFieldEditorParent()); + addField(xmiFile); + + StringFieldEditor resultFile = new StringFieldEditor(RESULT_FILE_NAME_PREFERENCE, "&Result file name:", + getFieldEditorParent()); + addField(resultFile); + + DirectoryFieldEditor exportPath = new DirectoryFieldEditor(EXPORT_PATH_PREFERENCE, "&Default export path:", + getFieldEditorParent()); + addField(exportPath); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) + */ + @Override + public void init(IWorkbench workbench) { + setPreferenceStore(Activator.getDefault().getPreferenceStore()); + setDescription("Default values for file names and paths"); + } + +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/BrowserSplashHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/BrowserSplashHandler.java deleted file mode 100644 index 2bdc1281..00000000 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/BrowserSplashHandler.java +++ /dev/null @@ -1,178 +0,0 @@ - -package net.bhl.cdt.paxelerate.ui.splashHandlers; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.browser.Browser; -import org.eclipse.swt.browser.ProgressEvent; -import org.eclipse.swt.browser.ProgressListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.splash.AbstractSplashHandler; - -/** - * @since 3.3 - * - */ -@Deprecated -public class BrowserSplashHandler extends AbstractSplashHandler { - - private final static String F_BROWSER_URL = "http://www.google.com"; //NON-NLS-1 - - private Browser fBrowser; - - private Button fButton; - - private boolean fClose; - - /** - * - */ - public BrowserSplashHandler() { - fBrowser = null; - fButton = null; - fClose = false; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.internal.splash.AbstractSplashHandler#init(org.eclipse.swt.widgets.Shell, - * org.eclipse.ui.IWorkbench) - */ - public void init(final Shell splash) { - // Store the shell - super.init(splash); - // Configure the shell layout - configureUISplash(); - // Create UI - createUI(); - // Create UI listeners - createUIListeners(); - // Force the UI to layout - splash.layout(true); - // Keep the splash screen visible and prevent the RCP application from - // loading until the close button is clicked. - doEventLoop(); - } - - /** - * - */ - private void doEventLoop() { - Shell splash = getSplash(); - while (fClose == false) { - if (splash.getDisplay().readAndDispatch() == false) { - splash.getDisplay().sleep(); - } - } - } - - /** - * - */ - private void createUIListeners() { - // Create the browser listeners - createUIListenersBrowser(); - // Create the button listeners - createUIListenersButton(); - } - - /** - * - */ - private void createUIListenersButton() { - fButton.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - // NO-OP - } - public void widgetSelected(SelectionEvent e) { - fClose = true; - } - }); - } - - /** - * - */ - private void createUIListenersBrowser() { - fBrowser.addProgressListener(new ProgressListener() { - public void changed(ProgressEvent event) { - // NO-OP - } - public void completed(ProgressEvent event) { - // Only show the UI when the URL is fully loaded into the - // browser - fBrowser.setVisible(true); - fButton.setVisible(true); - } - }); - } - - /** - * - */ - private void createUI() { - // Create the web browser - createUIBrowser(); - // Create the close button - createUIButton(); - } - - /** - * - */ - private void createUIButton() { - Shell splash = getSplash(); - fButton = new Button(splash, SWT.PUSH); - fButton.setText("Close"); //NON-NLS-1 - fButton.setVisible(false); - // Configure the button bounds - configureUIButtonBounds(); - // Configure layout data - GridData data = new GridData(SWT.CENTER, SWT.FILL, false, false); - data.widthHint = 80; - fButton.setLayoutData(data); - } - - /** - * - */ - private void configureUIButtonBounds() { - Shell splash = getSplash(); - - int button_x_coord = (splash.getSize().x / 2) - - (fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).x / 2); - int button_y_coord = splash.getSize().y - - fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).y; - int button_x_width = splash.getSize().x; - int button_y_width = fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).y; - - fButton.setBounds(button_x_coord, button_y_coord, button_x_width, - button_y_width); - } - - /** - * - */ - private void createUIBrowser() { - fBrowser = new Browser(getSplash(), SWT.NONE); - fBrowser.setUrl(F_BROWSER_URL); - fBrowser.setVisible(false); - // Configure layout data - GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); - fBrowser.setLayoutData(data); - } - - /** - * - */ - private void configureUISplash() { - GridLayout layout = new GridLayout(1, true); - getSplash().setLayout(layout); - } - -} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/ExtensibleSplashHandler.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/ExtensibleSplashHandler.java deleted file mode 100644 index 81c9d3e3..00000000 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/splashHandlers/ExtensibleSplashHandler.java +++ /dev/null @@ -1,309 +0,0 @@ - -package net.bhl.cdt.paxelerate.ui.splashHandlers; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.Platform; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.eclipse.ui.splash.AbstractSplashHandler; - -/** - * @since 3.3 - * - */ -@Deprecated -public class ExtensibleSplashHandler extends AbstractSplashHandler { - - private ArrayList fImageList; - - private ArrayList fTooltipList; - - private final static String F_SPLASH_EXTENSION_ID = "net.bhl.cdt.model.cabin.splashExtension"; //NON-NLS-1 - - private final static String F_ELEMENT_ICON = "icon"; //NON-NLS-1 - - private final static String F_ELEMENT_TOOLTIP = "tooltip"; //NON-NLS-1 - - private final static String F_DEFAULT_TOOLTIP = "Image"; //NON-NLS-1 - - private final static int F_IMAGE_WIDTH = 50; - - private final static int F_IMAGE_HEIGHT = 50; - - private final static int F_SPLASH_SCREEN_BEVEL = 5; - - private Composite fIconPanel; - - /** - * - */ - public ExtensibleSplashHandler() { - fImageList = new ArrayList(); - fTooltipList = new ArrayList(); - fIconPanel = null; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.splash.AbstractSplashHandler#init(org.eclipse.swt.widgets.Shell) - */ - public void init(Shell splash) { - // Store the shell - super.init(splash); - // Configure the shell layout - configureUISplash(); - // Load all splash extensions - loadSplashExtensions(); - // If no splash extensions were loaded abort the splash handler - if (hasSplashExtensions() == false) { - return; - } - // Create UI - createUI(); - // Configure the image panel bounds - configureUICompositeIconPanelBounds(); - // Enter event loop and prevent the RCP application from - // loading until all work is done - doEventLoop(); - } - - /** - * @return - */ - private boolean hasSplashExtensions() { - if (fImageList.isEmpty()) { - return false; - } else { - return true; - } - } - - /** - * - */ - private void createUI() { - // Create the icon panel - createUICompositeIconPanel(); - // Create the images - createUIImages(); - } - - /** - * - */ - private void createUIImages() { - Iterator imageIterator = fImageList.iterator(); - Iterator tooltipIterator = fTooltipList.iterator(); - int i = 1; - int columnCount = ((GridLayout)fIconPanel.getLayout()).numColumns; - // Create all the images - // Abort if we run out of columns (left-over images will not fit within - // the usable splash screen width) - while (imageIterator.hasNext() && - (i <= columnCount)) { - Image image = (Image)imageIterator.next(); - String tooltip = (String)tooltipIterator.next(); - // Create the image using a label widget - createUILabel(image, tooltip); - i++; - } - } - - /** - * @param image - * @param tooltip - */ - private void createUILabel(Image image, String tooltip) { - // Create the label (no text) - Label label = new Label(fIconPanel, SWT.NONE); - label.setImage(image); - label.setToolTipText(tooltip); - } - - /** - * - */ - private void createUICompositeIconPanel() { - Shell splash = getSplash(); - // Create the composite - fIconPanel = new Composite(splash, SWT.NONE); - // Determine the maximum number of columns that can fit on the splash - // screen. One 50x50 image per column. - int maxColumnCount = getUsableSplashScreenWidth() / F_IMAGE_WIDTH; - // Limit size to the maximum number of columns if the number of images - // exceed this amount; otherwise, use the exact number of columns - // required. - int actualColumnCount = Math.min(fImageList.size(), maxColumnCount); - // Configure the layout - GridLayout layout = new GridLayout(actualColumnCount, true); - layout.horizontalSpacing = 0; - layout.verticalSpacing = 0; - layout.marginHeight = 0; - layout.marginWidth = 0; - fIconPanel.setLayout(layout); - } - - /** - * - */ - private void configureUICompositeIconPanelBounds() { - // Determine the size of the panel and position it at the bottom-right - // of the splash screen. - Point panelSize = fIconPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); - - int x_coord = getSplash().getSize().x - F_SPLASH_SCREEN_BEVEL - panelSize.x; - int y_coord = getSplash().getSize().y - F_SPLASH_SCREEN_BEVEL - panelSize.y; - int x_width = panelSize.x; - int y_width = panelSize.y; - - fIconPanel.setBounds(x_coord, y_coord, x_width, y_width); - } - - /** - * @return - */ - private int getUsableSplashScreenWidth() { - // Splash screen width minus two graphic border bevel widths - return getSplash().getSize().x - (F_SPLASH_SCREEN_BEVEL * 2); - } - - /** - * - */ - private void loadSplashExtensions() { - // Get all splash handler extensions - IExtension[] extensions = - Platform.getExtensionRegistry().getExtensionPoint( - F_SPLASH_EXTENSION_ID).getExtensions(); - // Process all splash handler extensions - for (int i = 0; i < extensions.length; i++) { - processSplashExtension(extensions[i]); - } - } - - /** - * @param extension - */ - private void processSplashExtension(IExtension extension) { - // Get all splash handler configuration elements - IConfigurationElement[] elements = extension.getConfigurationElements(); - // Process all splash handler configuration elements - for (int j = 0; j < elements.length; j++) { - processSplashElements(elements[j]); - } - } - - /** - * @param configurationElement - */ - private void processSplashElements( - IConfigurationElement configurationElement) { - // Attribute: icon - processSplashElementIcon(configurationElement); - // Attribute: tooltip - processSplashElementTooltip(configurationElement); - } - - /** - * @param configurationElement - */ - private void processSplashElementTooltip( - IConfigurationElement configurationElement) { - // Get attribute tooltip - String tooltip = configurationElement.getAttribute(F_ELEMENT_TOOLTIP); - // If a tooltip is not defined, give it a default - if ((tooltip == null) || - (tooltip.length() == 0)) { - fTooltipList.add(F_DEFAULT_TOOLTIP); - } else { - fTooltipList.add(tooltip); - } - } - - /** - * @param configurationElement - */ - private void processSplashElementIcon( - IConfigurationElement configurationElement) { - // Get attribute icon - String iconImageFilePath = configurationElement.getAttribute(F_ELEMENT_ICON); - // Abort if an icon attribute was not specified - if ((iconImageFilePath == null) || - (iconImageFilePath.length() == 0)) { - return; - } - // Create a corresponding image descriptor - ImageDescriptor descriptor = - AbstractUIPlugin.imageDescriptorFromPlugin( - configurationElement.getNamespaceIdentifier(), - iconImageFilePath); - // Abort if no corresponding image was found - if (descriptor == null) { - return; - } - // Create the image - Image image = descriptor.createImage(); - // Abort if image creation failed - if (image == null) { - return; - } - // Abort if the image does not have dimensions of 50x50 - if ((image.getBounds().width != F_IMAGE_WIDTH) || - (image.getBounds().height != F_IMAGE_HEIGHT)) { - // Dipose of the image - image.dispose(); - return; - } - // Store the image and tooltip - fImageList.add(image); - } - - /** - * - */ - private void configureUISplash() { - // Configure layout - GridLayout layout = new GridLayout(1, true); - getSplash().setLayout(layout); - // Force shell to inherit the splash background - getSplash().setBackgroundMode(SWT.INHERIT_DEFAULT); - } - - /** - * - */ - private void doEventLoop() { - Shell splash = getSplash(); - if (splash.getDisplay().readAndDispatch() == false) { - splash.getDisplay().sleep(); - } - } - - /* (non-Javadoc) - * @see org.eclipse.ui.splash.AbstractSplashHandler#dispose() - */ - public void dispose() { - super.dispose(); - // Check to see if any images were defined - if ((fImageList == null) || - fImageList.isEmpty()) { - return; - } - // Dispose of all the images - Iterator iterator = fImageList.iterator(); - while (iterator.hasNext()) { - Image image = (Image) iterator.next(); - image.dispose(); - } - } -} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinOpener.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinOpener.java index edffbe7e..d14d9b1a 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinOpener.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinOpener.java @@ -11,15 +11,32 @@ import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.ui.commands.DrawCabinCommand; +/** + * The Class CabinOpener. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class CabinOpener extends EditorModelElementOpener { + /** + * Instantiates a new cabin opener. + */ public CabinOpener() { - // TODO Auto-generated constructor stub + // Auto-generated constructor stub } + /* + * (non-Javadoc) + * + * @see org.eclipse.emf.ecp.explorereditorbridge.internal. + * EditorModelElementOpener#openModelElement(java.lang.Object, + * org.eclipse.emf.ecp.core.ECPProject) + */ @SuppressWarnings("restriction") @Override - public void openModelElement(Object element, ECPProject ecpProject) { + public final void openModelElement(final Object element, final ECPProject ecpProject) { new DrawCabinCommand((Cabin) element).execute(); super.openModelElement(element, ecpProject); } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinViewPart.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinViewPart.java index 3ec05feb..c9f47142 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinViewPart.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/CabinViewPart.java @@ -1,12 +1,11 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package net.bhl.cdt.paxelerate.ui.views; import java.io.File; -import java.util.ArrayList; import java.util.List; import org.eclipse.emf.common.notify.Adapter; @@ -22,30 +21,25 @@ import org.eclipse.ui.part.ViewPart; import net.bhl.cdt.model.util.ModelHelper; -import net.bhl.cdt.paxelerate.model.BusinessClass; import net.bhl.cdt.paxelerate.model.Cabin; import net.bhl.cdt.paxelerate.model.CabinFactory; import net.bhl.cdt.paxelerate.model.Curtain; import net.bhl.cdt.paxelerate.model.Door; -import net.bhl.cdt.paxelerate.model.FirstClass; -import net.bhl.cdt.paxelerate.model.Galley; -import net.bhl.cdt.paxelerate.model.Lavatory; import net.bhl.cdt.paxelerate.model.ObjectOption; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.PhysicalObject; import net.bhl.cdt.paxelerate.model.Row; import net.bhl.cdt.paxelerate.model.Seat; import net.bhl.cdt.paxelerate.model.TravelClass; -import net.bhl.cdt.paxelerate.model.TravelOption; import net.bhl.cdt.paxelerate.model.agent.Agent; -import net.bhl.cdt.paxelerate.model.astar.ObstacleMap; +import net.bhl.cdt.paxelerate.model.astar.AreamapHandler; import net.bhl.cdt.paxelerate.model.astar.Path; -import net.bhl.cdt.paxelerate.model.util.TCHelper; -import net.bhl.cdt.paxelerate.ui.color.ColorHelper; -import net.bhl.cdt.paxelerate.ui.font.FontHelper; +import net.bhl.cdt.paxelerate.model.util.POHelper; +import net.bhl.cdt.paxelerate.ui.graphics.ColorHelper; +import net.bhl.cdt.paxelerate.ui.graphics.FontHelper; +import net.bhl.cdt.paxelerate.ui.graphics.ImageHelper; +import net.bhl.cdt.paxelerate.ui.graphics.ImageImporter; import net.bhl.cdt.paxelerate.ui.graphics.SWTHelper; -import net.bhl.cdt.paxelerate.ui.image.ImageHelper; -import net.bhl.cdt.paxelerate.ui.image.ImageImporter; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; @@ -54,33 +48,62 @@ * This class represents the cabin view. All graphics generation is done here. * * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public class CabinViewPart extends ViewPart { + + /** The cabin. */ private Cabin cabin; + + /** The canvas height. */ private double factor, canvasHeight; + + /** The parent. */ private Composite parent; + /** The initial boot. */ private static boolean initialBoot = true; /********************* graphical settings. *************************/ private static final int OFFSET_OF_DOOR = 0, CABIN_WIDTH_IN_PIXELS = 123, DOOR_DEPTH = 2, ICON_SIZE_IN_PIXELS = 15; + + /** The Constant PAX_SIZE. */ private static final double PAX_SIZE = 0.5; + + /** The Constant MATCH_PASSENGER_COLORS_TO_MOOD. */ private static final boolean MATCH_PASSENGER_COLORS_TO_MOOD = true; + /** The image y. */ private static int xZero = 139, yZero = 75, imageX = 400, imageY = 1000; - /*******************************************************************/ - private Image economySeat, businessSeat, firstSeat, galleyIcon, lavatoryIcon; + /** ****************************************************************. */ + + private Image economySeatDefault, economySeatBack, economySeatSide, businessSeat, firstSeat, galleyIcon, + lavatoryIcon; + + /** The canvas. */ private Canvas canvas; + + /** The cabin adapter. */ private Adapter cabinAdapter; + + /** The loader. */ private ImageLoader loader; + + /** The img. */ private static Image img; + + /** The Constant IMAGE_PATH. */ private static final String FOLDER_NAME = "paxelerate", FILE_PATH = System.getProperty("user.home") + "/.cdt/" + FOLDER_NAME + "/", IMAGE_PATH = "/images/aircraft/interior/"; + + /** The storage folder. */ private static File storageFolder = new File(FILE_PATH); + /** The scaled y. */ private int scaledX, scaledY; /** @@ -91,13 +114,15 @@ public class CabinViewPart extends ViewPart { * is the parent element */ @Override - public void createPartControl(Composite parent) { + public final void createPartControl(final Composite parent) { this.parent = parent; cabin = CabinFactory.eINSTANCE.createCabin(); factor = cabin.getYDimension() / (double) CABIN_WIDTH_IN_PIXELS; - economySeat = ImageImporter.getImage(getClass(), IMAGE_PATH + "economy_seat.png"); + economySeatDefault = ImageImporter.getImage(getClass(), IMAGE_PATH + "economy_seat.png"); + economySeatSide = ImageImporter.getImage(getClass(), IMAGE_PATH + "economy_seat_folded_2.png"); + economySeatBack = ImageImporter.getImage(getClass(), IMAGE_PATH + "economy_seat_folded_1.png"); businessSeat = ImageImporter.getImage(getClass(), IMAGE_PATH + "business_seat.png"); firstSeat = ImageImporter.getImage(getClass(), IMAGE_PATH + "first_seat.png"); galleyIcon = ImageImporter.getImage(getClass(), IMAGE_PATH + "coffee.png"); @@ -127,73 +152,33 @@ public static void makeDirectory() { try { storageFolder.mkdir(); } catch (SecurityException se) { + se.printStackTrace(); } } } /** - * - * @param obj - * @return - */ - private Image switchIcon(PhysicalObject obj) { - - if (obj instanceof Lavatory) { - return lavatoryIcon; - } else if (obj instanceof Galley) { - return galleyIcon; - } - return null; - } - - /** - * - * @return + * Gets the cabin. + * + * @return the cabin */ - public Cabin getCabin() { + public final Cabin getCabin() { return cabin; } /** - * - * @param gc - * @param obj - */ - private void drawObject(GC gc, PhysicalObject obj) { - gc.fillRectangle(get(obj, Axis.X), get(obj, Axis.Y), adapt(obj.getYDimension()), adapt(obj.getXDimension())); - gc.drawImage(switchIcon(obj), - adapt(Axis.X, - obj.getYPosition() + obj.getYDimension() / 2 - switchIcon(obj).getBounds().width / 2 * factor), - adapt(Axis.Y, obj.getXPosition() + obj.getXDimension() / 2 - - switchIcon(obj).getBounds().height / 2 * factor)); - } - - /** - * - * @author marc.engelmann + * The Enum Axis. * + * @author marc.engelmann */ private enum Axis { - X, Y, Z - } - /** - * - * @param obj - * @param dir - * @return - */ - private int get(PhysicalObject obj, Axis dir) { - switch (dir) { - case X: - return adapt(Axis.X, obj.getYPosition()); - - case Y: - return adapt(Axis.Y, obj.getXPosition()); - - default: - return 0; - } + /** The x. */ + X, + /** The y. */ + Y, + /** The z. */ + Z } /** @@ -215,16 +200,6 @@ private Image createImage() { gc.drawLine(xZero, adapt(Axis.Y, cabin.getXDimension()), adapt(Axis.X, cabin.getYDimension()), adapt(Axis.Y, cabin.getXDimension())); - for (Seat seat : ModelHelper.getChildrenByClass(cabin, Seat.class)) { - if (seat.getTravelClass() instanceof FirstClass) { - gc.drawImage(firstSeat, get(seat, Axis.X), get(seat, Axis.Y)); - } else if (seat.getTravelClass() instanceof BusinessClass) { - gc.drawImage(businessSeat, get(seat, Axis.X), get(seat, Axis.Y)); - } else { - gc.drawImage(economySeat, get(seat, Axis.X), get(seat, Axis.Y)); - } - } - for (Row row : ModelHelper.getChildrenByClass(cabin, Row.class)) { int positionY = adapt((row.getSeats().get(0).getXPosition())); int positionX = adapt((cabin.getYDimension() / 2)); @@ -244,14 +219,75 @@ private Image createImage() { adapt(door.getWidth())); } - for (Lavatory lavatory : cabin.getLavatories()) { - gc.setBackground(ColorHelper.AIRCRAFT_LAVATORY); - drawObject(gc, lavatory); - } + for (ObjectOption option : ObjectOption.VALUES) { - for (Galley galley : cabin.getGalleys()) { - gc.setBackground(ColorHelper.GREEN); - drawObject(gc, galley); + objectLoop: for (PhysicalObject obj : POHelper.getObjectsByOption(option, cabin)) { + + Image icon; + + switch (option) { + case LAVATORY: + gc.setBackground(ColorHelper.AIRCRAFT_LAVATORY); + icon = lavatoryIcon; + break; + + case GALLEY: + gc.setBackground(ColorHelper.GREEN); + icon = galleyIcon; + break; + + case SEAT: + + Seat seat = (Seat) obj; + + switch (seat.getTravelClass().getTravelOption()) { + case FIRST_CLASS: + icon = firstSeat; + break; + + case BUSINESS_CLASS: + icon = businessSeat; + break; + + default: + switch (seat.getLayoutConcept()) { + case SIDWAYS_FOLDABLE_SEAT: + icon = economySeatSide; + break; + case LIFTING_SEAT_PAN_SEATS: + icon = economySeatBack; + break; + default: + icon = economySeatDefault; + break; + } + break; + } + + gc.drawImage(icon, adapt(Axis.X, obj.getYPosition()), adapt(Axis.Y, obj.getXPosition())); + + break; + + case CURTAIN: + break objectLoop; + + default: + gc.setBackground(ColorHelper.RED); + icon = galleyIcon; + break; + } + + if (option != ObjectOption.SEAT) { + gc.fillRectangle(adapt(Axis.X, obj.getYPosition()), adapt(Axis.Y, obj.getXPosition()), + adapt(obj.getYDimension()), adapt(obj.getXDimension())); + + gc.drawImage(icon, + adapt(Axis.X, + obj.getYPosition() + obj.getYDimension() / 2 - icon.getBounds().width / 2 * factor), + adapt(Axis.Y, obj.getXPosition() + obj.getXDimension() / 2 + - icon.getBounds().height / 2 * factor)); + } + } } for (Curtain curtain : cabin.getCurtains()) { @@ -259,35 +295,38 @@ private Image createImage() { gc.fillRectangle(adapt(Axis.X, curtain.getYPosition()), adapt(Axis.Y, curtain.getXPosition()), adapt(curtain.getYDimension()), adapt(curtain.getXDimension())); } - if (!cabin.getPassengers().isEmpty()) { - for (Passenger passenger : cabin.getPassengers()) { - Seat seat = passenger.getSeatRef(); - switch (passenger.getPassengerMood()) { - case AGRESSIVE: - gc.setBackground(ColorHelper.RED); - break; - case PASSIVE: - gc.setBackground(ColorHelper.GREEN); - break; - } + for (Passenger passenger : cabin.getPassengers()) { - int yPos = seat.getYPosition(); - int xPos = seat.getXPosition(); - int yDim = seat.getYDimension(); - int xDim = seat.getXDimension(); + Seat seat = passenger.getSeat(); - if (xDim < yDim) { - gc.fillOval(adapt(Axis.X, yPos + yDim / 2 - xDim * PAX_SIZE / 2), - adapt(Axis.Y, xPos + (1 - PAX_SIZE) * xDim / 2), adapt(PAX_SIZE * xDim), - adapt(PAX_SIZE * xDim)); - } else { - gc.fillOval(adapt(Axis.X, yPos + (1 - PAX_SIZE) * yDim / 2), - adapt(Axis.Y, xPos + xDim / 2 - yDim * PAX_SIZE / 2), adapt(PAX_SIZE * yDim), - adapt(PAX_SIZE * yDim)); - } + switch (passenger.getPassengerMood()) { + case AGGRESSIVE: + gc.setBackground(ColorHelper.RED); + break; + case PASSIVE: + gc.setBackground(ColorHelper.GREEN); + break; + default: + break; + } + + int yPos = seat.getYPosition(); + int xPos = seat.getXPosition(); + int yDim = seat.getYDimension(); + int xDim = seat.getXDimension(); + + if (xDim < yDim) { + gc.fillOval(adapt(Axis.X, yPos + yDim / 2 - xDim * PAX_SIZE / 2), + adapt(Axis.Y, xPos + (1 - PAX_SIZE) * xDim / 2), adapt(PAX_SIZE * xDim), + adapt(PAX_SIZE * xDim)); + } else { + gc.fillOval(adapt(Axis.X, yPos + (1 - PAX_SIZE) * yDim / 2), + adapt(Axis.Y, xPos + xDim / 2 - yDim * PAX_SIZE / 2), adapt(PAX_SIZE * yDim), + adapt(PAX_SIZE * yDim)); } } + gc.dispose(); // Temporarily do not save image // loader = new ImageLoader(); @@ -306,13 +345,14 @@ private Image createImage() { * * @return true or false */ - public boolean isInitialBoot() { + public final boolean isInitialBoot() { return initialBoot; } /** - * - * @return + * Switch aircraft image. + * + * @return the image */ private Image switchAircraftImage() { switch (cabin.getAircraftType()) { @@ -324,19 +364,23 @@ private Image switchAircraftImage() { case NARROWBODY: return ImageImporter.getImage(getClass(), "/images/aircraft/continental.png"); + default: - Log.add(this, "There is a problem with the aircraft type definition."); - return null; + break; } + return null; } /** - * + * Resize ac. + * * @param width + * the width * @param height - * @return + * the height + * @return the image */ - private Image resizeAC(int width, int height) { + private Image resizeAC(final int width, final int height) { Image scaledImage = new Image(parent.getDisplay(), width, height); GC gc = new GC(scaledImage); @@ -349,8 +393,9 @@ private Image resizeAC(int width, int height) { } /** - * - * @return + * Try aircraft switch. + * + * @return the image */ private Image tryAircraftSwitch() { return resizeAC((int) (imageX * canvasHeight / imageY), (int) (imageY * canvasHeight / imageY)); @@ -362,7 +407,7 @@ private Image tryAircraftSwitch() { * @param cabin * is the caught cabin */ - public void setCabin(Cabin cabin) { + public final void setCabin(final Cabin cabin) { try { initialBoot = false; this.cabin = cabin; @@ -378,21 +423,21 @@ public void setCabin(Cabin cabin) { * the dimensions of the first element are used for scaling **/ - for (TravelOption option : TravelOption.VALUES) { - List list = TCHelper.getClassesByOption(option, cabin); + for (TravelClass tc : cabin.getClasses()) { - if (!list.isEmpty()) { - int dim = adapt(list.get(0).getYDimensionOfSeats()); + int dimY = adapt(tc.getYDimensionOfSeats()); + int dimX = adapt(tc.getXDimensionOfSeats()); - switch (option) { - case FIRST_CLASS: - firstSeat = ImageHelper.resize(firstSeat, dim, dim, parent); - case BUSINESS_CLASS: - businessSeat = ImageHelper.resize(businessSeat, dim, dim, parent); - case ECONOMY_CLASS: - economySeat = ImageHelper.resize(economySeat, dim, dim, parent); - default: - } + switch (tc.getTravelOption()) { + case FIRST_CLASS: + firstSeat = ImageHelper.resize(firstSeat, dimY, dimX, parent); + case BUSINESS_CLASS: + businessSeat = ImageHelper.resize(businessSeat, dimY, dimX, parent); + case ECONOMY_CLASS: + economySeatDefault = ImageHelper.resize(economySeatDefault, dimY, dimX, parent); + economySeatSide = ImageHelper.resize(economySeatSide, dimY, dimX, parent); + economySeatBack = ImageHelper.resize(economySeatBack, dimY, dimX, parent); + default: } } @@ -436,7 +481,7 @@ public void setCabin(Cabin cabin) { * This method synchronizes the cabin view with the cabin object by * listening to its change events. */ - public void syncViewer() { + public final void syncViewer() { if ((cabinAdapter != null) && (!cabin.eAdapters().contains(cabinAdapter))) { cabin.eAdapters().add(cabinAdapter); } @@ -447,7 +492,7 @@ public void syncViewer() { * This method unsyncs the Cabin view with the cabin object by removing the * event listener form the cabin object. */ - public void unsyncViewer() { + public final void unsyncViewer() { if ((cabinAdapter != null) && (cabin.eAdapters().contains(cabinAdapter))) { cabin.eAdapters().remove(cabinAdapter); @@ -461,7 +506,7 @@ public void unsyncViewer() { * is the obstacle map * @return returns the obstacle map as an image */ - public Image submitObstacleMap(final int[][] map) { + public final Image submitObstacleMap(final int[][] map) { Image image = new Image(parent.getDisplay(), imageX, imageY); final int overLapOfRect = 2; GC gc = new GC(image); @@ -470,21 +515,18 @@ public Image submitObstacleMap(final int[][] map) { gc.drawImage(img, 0, 0); gc.setAlpha(100); - for (int i = 0; i < cabin.getXDimension() / cabin.getScale(); i++) { - for (int j = 0; j < cabin.getYDimension() / cabin.getScale(); j++) { + for (int i = 0; i < cabin.getXDimension() / cabin.getSimulationSettings().getScale(); i++) { + for (int j = 0; j < cabin.getYDimension() / cabin.getSimulationSettings().getScale(); j++) { - if (map[i][j] <= ObstacleMap.getHoleValue()) { + if (map[i][j] <= AreamapHandler.HOLE_VALUE) { gc.setBackground(ColorHelper.GREEN); - } else if (map[i][j] <= ObstacleMap.getBasicValue()) { + } else if (map[i][j] <= AreamapHandler.DEFAULT_VALUE) { gc.setBackground(ColorHelper.GREEN_LIGHT); - } else if (map[i][j] < ObstacleMap.getPotentialValue()) { + } else if (map[i][j] <= AreamapHandler.GRADIENT_UPPER_BOUND) { gc.setBackground(ColorHelper.YELLOW); - } else if (map[i][j] == ObstacleMap.getPotentialValue()) { - gc.setBackground(ColorHelper.ORANGE); - } else { gc.setBackground(ColorHelper.RED); @@ -501,6 +543,7 @@ public Image submitObstacleMap(final int[][] map) { loader.save(FILE_PATH + "obstaclemap.png", SWT.IMAGE_PNG); } catch (Exception e) { Log.add(this, "The obstacle map could not be saved! Directory problem."); + e.printStackTrace(); } disposeAll(); return image; @@ -508,11 +551,11 @@ public Image submitObstacleMap(final int[][] map) { /** * This method gets the paths. - * - * @param pathList - * the list of paths + * + * @param agentList + * the agent list */ - public void submitAgents(final ArrayList agentList) { + public final void submitAgents(final List agentList) { canvas.redraw(); canvas.addPaintListener(new PaintListener() { @@ -551,7 +594,7 @@ public void paintControl(final PaintEvent e) { * @param paxCabin * the cabin object */ - public void submitPassengerCoordinates(final Cabin paxCabin) { + public final void submitPassengerCoordinates(final Cabin paxCabin) { canvas.redraw(); canvas.addPaintListener(new PaintListener() { @Override @@ -562,12 +605,14 @@ public void paintControl(final PaintEvent e) { for (Passenger passenger : paxCabin.getPassengers()) { if (MATCH_PASSENGER_COLORS_TO_MOOD) { switch (passenger.getPassengerMood()) { - case AGRESSIVE: + case AGGRESSIVE: e.gc.setBackground(ColorHelper.RED); break; case PASSIVE: e.gc.setBackground(ColorHelper.GREEN); break; + default: + break; } } else { e.gc.setBackground(ColorHelper.getRandomColor()); @@ -598,7 +643,7 @@ public void paintControl(final PaintEvent e) { * @param obstacleImage * the obstacle map image */ - public void printObstacleMap(final Image obstacleImage) { + public final void printObstacleMap(final Image obstacleImage) { canvas.redraw(); canvas.addPaintListener(new PaintListener() { @Override @@ -669,6 +714,7 @@ public void paintControl(final PaintEvent e) { disposeAll(); } catch (IllegalArgumentException e) { System.out.println("illegal argument exception!"); + e.printStackTrace(); } } @@ -676,11 +722,12 @@ public void paintControl(final PaintEvent e) { /** * NOTE: FACTORS ARE SCALED BY 100, YOU NEED TO DIVIDE IT BY 100 IN ORDER TO * GET THE REAL FACTORS. - * + * * @param passenger - * @return + * the passenger + * @return the direction vector */ - private Vector getDirectionVector(Passenger passenger) { + private Vector getDirectionVector(final Passenger passenger) { int rotation = (int) passenger.getOrientationInDegree(); int factor = 5; if (rotation == 0) { @@ -705,29 +752,35 @@ private Vector getDirectionVector(Passenger passenger) { } /** - * - * @return + * Scale. + * + * @return the double */ private double scale() { - return cabin.getScale() / factor; + return cabin.getSimulationSettings().getScale() / factor; } /** - * + * Adapt. + * * @param value - * @return + * the value + * @return the int */ - private int adapt(double value) { + private int adapt(final double value) { return (int) (value / factor); } /** - * + * Adapt. + * * @param axis + * the axis * @param value - * @return + * the value + * @return the int */ - private int adapt(Axis axis, double value) { + private int adapt(final Axis axis, final double value) { switch (axis) { case X: return xZero + (int) (value / factor); @@ -746,7 +799,7 @@ public void setFocus() { } /** - * + * Dispose all. */ private void disposeAll() { super.dispose(); @@ -755,7 +808,7 @@ private void disposeAll() { /** * This method disposes all SWT objects created with SWTResourceManager. */ - public void clearCache() { + public final void clearCache() { ImageImporter.disposeImages(); } } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/HeatmapPart.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/HeatmapPart.java new file mode 100644 index 00000000..ce09f880 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/HeatmapPart.java @@ -0,0 +1,387 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.ui.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseMoveListener; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.part.ViewPart; + +import net.bhl.cdt.paxelerate.model.Cabin; +import net.bhl.cdt.paxelerate.model.astar.AreamapHandler; +import net.bhl.cdt.paxelerate.model.astar.Costmap; +import net.bhl.cdt.paxelerate.ui.graphics.ColorHelper; +import net.bhl.cdt.paxelerate.ui.graphics.SWTHelper; +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; + +/** + * This class represents the heat map view. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ + +public class HeatmapPart extends ViewPart { + + /** The cabin. */ + private Cabin cabin; + + /** The parent. */ + private Composite parent; + + /** The canvas. */ + private Canvas canvas; + + /** The img. */ + private static Image img; + + /** The width. */ + private double width; + + /** The maphandler. */ + private AreamapHandler maphandler; + + /** The costmap. */ + private Costmap costmap; + + /** The dimensions. */ + private Vector dimensions; + + /** The mouse down. */ + private boolean mouseDown = false; + + /** + * The Enum DrawingMode. + */ + private enum DrawingMode { + + /** The floor. */ + FLOOR, + /** The hole. */ + HOLE, + /** The obstacle. */ + OBSTACLE, + /** The gradient. */ + GRADIENT; + } + + /** The mode. */ + private DrawingMode mode = DrawingMode.FLOOR; + + /** + * + * This method initializes all necessary parameters and images. + * + * @param parent + * is the parent element + */ + @Override + public final void createPartControl(final Composite parent) { + this.parent = parent; + + canvas = new Canvas(parent, SWT.DOUBLE_BUFFERED); + + canvas.addKeyListener(new org.eclipse.swt.events.KeyAdapter() { + + @Override + public void keyPressed(final KeyEvent e) { + if (e.keyCode == 49) { // 1 + mode = DrawingMode.HOLE; + } + if (e.keyCode == 50) { // 2 + mode = DrawingMode.FLOOR; + } + if (e.keyCode == 51) { // 3 + mode = DrawingMode.GRADIENT; + } + if (e.keyCode == 52) { // 4 + mode = DrawingMode.OBSTACLE; + } + + if (e.keyCode == 56) { // 8 + drawObstaclemap(); + System.out.println("obstacle map"); + } + + if (e.keyCode == 57) { // 9 + drawCostmap(); + System.out.println("cost map"); + } + + System.out.println("DrawingMode: " + mode.toString()); + }; + }); + + canvas.addMouseMoveListener(new MouseMoveListener() { + + @Override + public void mouseMove(final MouseEvent e) { + if (mouseDown) { + System.out.println(e.x + " / " + e.y); + } + + } + }); + + canvas.addMouseListener(new MouseListener() { + + @Override + public void mouseUp(final MouseEvent e) { + + mouseDown = false; + + } + + @Override + public void mouseDown(final MouseEvent e) { + + mouseDown = true; + + int value = 0; + + switch (mode) { + case FLOOR: + value = AreamapHandler.DEFAULT_VALUE; + break; + case HOLE: + value = AreamapHandler.HOLE_VALUE; + break; + case GRADIENT: + value = AreamapHandler.GRADIENT_UPPER_BOUND; + break; + case OBSTACLE: + value = Integer.MAX_VALUE; + break; + default: + break; + + } + + Vector2D position = new Vector2D(e.y / width, e.x / width); + + for (int x = position.getX() - 1; x <= position.getX() + 1; x++) { + for (int y = position.getY() - 1; y <= position.getY() + 1; y++) { + maphandler.getAreamap().get(x, y).setObstacleValue(value); + } + } + + drawObstaclemap(); + + } + + @Override + public void mouseDoubleClick(final MouseEvent e) { + + } + }); + + } + + /** + * Gets the cabin. + * + * @return the cabin + */ + public final Cabin getCabin() { + return cabin; + } + + /** + * This method catches a cabin. + * + * @param cabin + * is the caught cabin + */ + public final void setCabin(final Cabin cabin) { + + this.cabin = cabin; + + dimensions = new Vector2D(cabin.getXDimension() / cabin.getSimulationSettings().getScale(), + cabin.getYDimension() / cabin.getSimulationSettings().getScale()); + + maphandler = new AreamapHandler(dimensions, cabin); + + costmap = new Costmap(dimensions, new Vector2D(16, 0), maphandler.getAreamap(), null, false); + + drawCostmap(); + } + + /** + * Draw obstaclemap. + */ + public final void drawObstaclemap() { + + Image image = new Image(parent.getDisplay(), canvas.getBounds().width, canvas.getBounds().height); + + final double overlap = 2.5; + + GC gc = new GC(image); + + gc = SWTHelper.getQualitySettings(gc); + + gc.setAlpha(100); + + for (int i = 0; i < dimensions.getX(); i++) { + for (int j = 0; j < dimensions.getY(); j++) { + + int value = maphandler.getAreamap().get(i, j).getObstacleValue(); + + if (value <= AreamapHandler.HOLE_VALUE) { + gc.setBackground(ColorHelper.GREEN); + + } else if (value <= AreamapHandler.DEFAULT_VALUE) { + gc.setBackground(ColorHelper.GREEN_LIGHT); + + } else if (value <= AreamapHandler.GRADIENT_UPPER_BOUND) { + gc.setBackground(ColorHelper.YELLOW); + + } else { + gc.setBackground(ColorHelper.RED); + + } + + width = canvas.getBounds().height / (double) dimensions.getX(); + + gc.fillOval((int) (j * width), (int) (i * width), (int) (overlap * width), (int) (overlap * width)); + } + } + gc.setAlpha(255); + gc.dispose(); + + disposeAll(); + + img = image; + + redraw(); + } + + /** + * Draw costmap. + */ + public final void drawCostmap() { + + Image image = null; + try { + + image = new Image(parent.getDisplay(), canvas.getBounds().width, canvas.getBounds().height); + + } catch (IllegalArgumentException e) { + image = new Image(parent.getDisplay(), 10, 10); + e.printStackTrace(); + } + + final double overlap = 2.5; + + GC gc = new GC(image); + + gc = SWTHelper.getQualitySettings(gc); + + gc.setAlpha(255); + + int max = costmap.getMaximumCost(); // 424 + + double stepsize = 1022.0 / max; // 1.2 + + for (int i = 0; i < dimensions.getX(); i++) { + for (int j = 0; j < dimensions.getY(); j++) { + + int value = costmap.getCost(new Vector2D(i, j)); + + int colorValue = (int) (value * stepsize); + + // System.out.println(value + " / " + max + " -> " + + // colorValue); + + if (value == -1) { + gc.setBackground(ColorHelper.BLACK); + + } else if (colorValue <= 255) { + /* green to yellow */ + gc.setBackground(new Color(Display.getCurrent(), colorValue, 255, 0)); + + } else if (colorValue <= 511) { + /* yellow to red */ + gc.setBackground(new Color(Display.getCurrent(), 255, 511 - colorValue, 0)); + + } else if (colorValue <= 767) { + /* red to pink */ + gc.setBackground(new Color(Display.getCurrent(), 255, 0, -511 + colorValue)); + } else { + + /* pink to purple */ + gc.setBackground(new Color(Display.getCurrent(), 1022 - colorValue, 0, 255)); + } + + width = canvas.getBounds().height / (double) dimensions.getX(); + + gc.fillRectangle((int) (j * width), (int) (i * width), (int) (overlap * width), + (int) (overlap * width)); + } + } + gc.setAlpha(255); + gc.dispose(); + + disposeAll(); + + img = image; + + redraw(); + } + + /** + * This method runs the complete draw of the view. + */ + private void redraw() { + try { + canvas.redraw(); + canvas.addPaintListener(new PaintListener() { + @Override + public void paintControl(final PaintEvent e) { + + e.gc.setAlpha(255); + + e.gc = SWTHelper.getQualitySettings(e.gc); + if (img != null) { + e.gc.drawImage(img, 0, 0); + } + } + }); + + System.out.println("redraw!"); + disposeAll(); + + } catch (IllegalArgumentException e) { + System.out.println("illegal argument exception!"); + e.printStackTrace(); + + } + } + + /** * Passing the focus request to the viewer's control. */ + @Override + public void setFocus() { + // + } + + /** + * Dispose all. + */ + private void disposeAll() { + super.dispose(); + } +} diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PotentialViewPart.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PotentialViewPart.java new file mode 100644 index 00000000..6066d966 --- /dev/null +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PotentialViewPart.java @@ -0,0 +1,197 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ***************************************************************************************/ +package net.bhl.cdt.paxelerate.ui.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.Pattern; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.ui.part.ViewPart; + +import net.bhl.cdt.paxelerate.model.astar.AreamapHandler; +import net.bhl.cdt.paxelerate.ui.graphics.ColorHelper; +import net.bhl.cdt.paxelerate.ui.graphics.FontHelper; +import net.bhl.cdt.paxelerate.ui.graphics.SWTHelper; +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; + +/** + * This class represents the potential view. All graphics generation is done + * here. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * + */ + +public class PotentialViewPart extends ViewPart { + + /** The parent. */ + private Composite parent; + + /** The canvas. */ + private Canvas canvas; + + /** The dimensions. */ + private Vector dim = new Vector2D(0, 0); + + /** + * + * This method initializes all necessary parameters and images. + * + * @param parent + * is the parent element + */ + @Override + public final void createPartControl(final Composite parent) { + this.parent = parent; + canvas = new Canvas(parent, SWT.DOUBLE_BUFFERED); + + parent.addListener(SWT.Resize, new Listener() { + @Override + public void handleEvent(final Event e) { + dim.setX(parent.getSize().x); + dim.setY(parent.getSize().y); + } + }); + doTheDraw(); + } + + /** + * This method runs the complete draw of the view. + */ + private void doTheDraw() { + try { + parent.redraw(); + parent.update(); + canvas.redraw(); + + canvas.addPaintListener(new PaintListener() { + @Override + public void paintControl(final PaintEvent e) { + + int divider = 10; + + int borderTop = 20; + + int height = dim.getY() - 3 * borderTop; + + int scale = height / AreamapHandler.GRADIENT_UPPER_BOUND; + + e.gc = SWTHelper.getQualitySettings(e.gc); + + e.gc.setFont(FontHelper.HEADING3); + + e.gc.setForeground(ColorHelper.GREY_LIGHT); + e.gc.drawLine(dim.getX() / divider * 3, borderTop, (int) (dim.getX() / divider * 9.2), borderTop); + String topvalue = "" + AreamapHandler.GRADIENT_UPPER_BOUND; + e.gc.setForeground(ColorHelper.GREY_DARK); + e.gc.drawText(topvalue, (int) (dim.getX() / divider * 9.3), + borderTop - e.gc.textExtent(topvalue).y / 2); + + e.gc.setForeground(ColorHelper.GREY_LIGHT); + e.gc.drawLine(dim.getX() / divider * 5, + borderTop + height - scale * AreamapHandler.GRADIENT_LOWER_BOUND, + (int) (dim.getX() / divider * 9.2), + borderTop + height - scale * AreamapHandler.GRADIENT_LOWER_BOUND); + String lowvalue = "" + AreamapHandler.GRADIENT_LOWER_BOUND; + e.gc.setForeground(ColorHelper.GREY_DARK); + e.gc.drawText(lowvalue, (int) (dim.getX() / divider * 9.3), borderTop + height + - scale * AreamapHandler.GRADIENT_LOWER_BOUND - e.gc.textExtent(lowvalue).y / 2); + + e.gc.setForeground(ColorHelper.GREY_LIGHT); + e.gc.drawLine(dim.getX() / divider * 7, borderTop + height - scale * AreamapHandler.DEFAULT_VALUE, + (int) (dim.getX() / divider * 9.2), + borderTop + height - scale * AreamapHandler.DEFAULT_VALUE); + String defaultvalue = "" + AreamapHandler.DEFAULT_VALUE; + e.gc.setForeground(ColorHelper.GREY_DARK); + e.gc.drawText(defaultvalue, (int) (dim.getX() / divider * 9.3), borderTop + height + - scale * AreamapHandler.DEFAULT_VALUE - e.gc.textExtent(defaultvalue).y / 2); + + e.gc.setForeground(ColorHelper.GREY_LIGHT); + + e.gc.drawLine(dim.getX() / divider * 9, borderTop + height - scale * AreamapHandler.HOLE_VALUE, + (int) (dim.getX() / divider * 9.2), borderTop + height - scale * AreamapHandler.HOLE_VALUE); + String holevalue = "" + AreamapHandler.HOLE_VALUE; + e.gc.setForeground(ColorHelper.GREY_DARK); + e.gc.drawText(holevalue, (int) (dim.getX() / divider * 9.3), + borderTop + height - scale * AreamapHandler.HOLE_VALUE - e.gc.textExtent(holevalue).y / 2); + + e.gc.setForeground(ColorHelper.BLACK); + + String[] strings = { "Obstacle", "Gradient", "Default", "Aisle" }; + + e.gc.drawText(strings[0], + dim.getX() / divider + (dim.getX() / divider * 2 - e.gc.textExtent(strings[0]).x) / 2, + (int) (borderTop * 1.5) + height); + e.gc.drawText(strings[1], + dim.getX() / divider * 3 + (dim.getX() / divider * 2 - e.gc.textExtent(strings[1]).x) / 2, + (int) (borderTop * 1.5) + height); + e.gc.drawText(strings[2], + dim.getX() / divider * 5 + (dim.getX() / divider * 2 - e.gc.textExtent(strings[2]).x) / 2, + (int) (borderTop * 1.5) + height); + e.gc.drawText(strings[3], + dim.getX() / divider * 7 + (dim.getX() / divider * 2 - e.gc.textExtent(strings[3]).x) / 2, + (int) (borderTop * 1.5) + height); + + Pattern pattern = new Pattern(parent.getDisplay(), dim.getX() / divider * 3, borderTop + height, + dim.getX() / divider * 5, borderTop + height, ColorHelper.ORANGE, ColorHelper.YELLOW); + + e.gc.setBackground(ColorHelper.RED); + e.gc.fillRectangle(dim.getX() / divider, 0, dim.getX() / divider * 2, height + borderTop); + + int[] polygon = { dim.getX() / divider * 3, borderTop, dim.getX() / divider * 3, borderTop + height, + dim.getX() / divider * 5, borderTop + height, dim.getX() / divider * 5, + borderTop + height - scale * AreamapHandler.GRADIENT_LOWER_BOUND }; + + e.gc.setBackgroundPattern(pattern); + e.gc.fillPolygon(polygon); + + e.gc.setForeground(ColorHelper.GREY_DARK); + String width = "< " + AreamapHandler.GRADIENT_WIDTH * 10 + " cm >"; + e.gc.drawText(width, dim.getX() / divider * 4 - e.gc.textExtent(width).x / 2, + borderTop + height - e.gc.textExtent(width).y - 5); + + e.gc.setBackground(ColorHelper.GREEN_LIGHT); + e.gc.fillRectangle(dim.getX() / divider * 5, + borderTop + height - scale * AreamapHandler.DEFAULT_VALUE, dim.getX() / divider * 2, + scale * AreamapHandler.DEFAULT_VALUE); + + e.gc.setBackground(ColorHelper.GREEN); + + e.gc.fillRectangle(dim.getX() / divider * 7, borderTop + height - scale * AreamapHandler.HOLE_VALUE, + dim.getX() / divider * 2, scale * AreamapHandler.HOLE_VALUE); + + e.gc.setBackground(ColorHelper.WHITE); + e.gc.setForeground(ColorHelper.BLACK); + + } + }); + } catch ( + + IllegalArgumentException e) { + System.out.println("illegal argument exception!"); + e.printStackTrace(); + + } + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.part.WorkbenchPart#setFocus() + */ + @Override + public void setFocus() { + // Auto-generated method stub + + } +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PropertyViewPart.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PropertyViewPart.java index 474606f5..4f35a3e2 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PropertyViewPart.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/PropertyViewPart.java @@ -20,13 +20,14 @@ import net.bhl.cdt.paxelerate.model.CabinFactory; import net.bhl.cdt.paxelerate.model.LuggageSize; import net.bhl.cdt.paxelerate.model.Passenger; +import net.bhl.cdt.paxelerate.model.PassengerMood; import net.bhl.cdt.paxelerate.model.Sex; import net.bhl.cdt.paxelerate.model.storage.AgeStorage; import net.bhl.cdt.paxelerate.model.storage.GaussianStorage; import net.bhl.cdt.paxelerate.model.storage.StorageHandler; import net.bhl.cdt.paxelerate.model.storage.StorageHandler.StoreType; -import net.bhl.cdt.paxelerate.ui.color.ColorHelper; -import net.bhl.cdt.paxelerate.ui.font.FontHelper; +import net.bhl.cdt.paxelerate.ui.graphics.ColorHelper; +import net.bhl.cdt.paxelerate.ui.graphics.FontHelper; import net.bhl.cdt.paxelerate.ui.graphics.SWTHelper; import net.bhl.cdt.paxelerate.util.math.Vector; import net.bhl.cdt.paxelerate.util.math.Vector2D; @@ -34,26 +35,42 @@ /** * This class represents the cabin view. All graphics generation is done here. * - * @author marc.engelmann + * @author marc.engelmann, michael.schmidt * @version 1.0 + * @since 0.5 * */ public class PropertyViewPart extends ViewPart { + /** The names. */ private String[] names = { "M,", "F" }; + + /** The names. */ + private String[] moods = { "passive", "aggressive" }; + + /** The parent. */ private Composite parent; + + /** The canvas. */ private Canvas canvas; + + /** The cabin. */ private Cabin cabin; + /** The property store. */ private StorageHandler propertyStore = new StorageHandler(); - private final static int BAR_HEIGHT = 15, DEVIATION_BAR_HEIGHT = 2, ITEM_SPACE = 30, HEADER_SPACE = 20; + /** The Constant HEADER_SPACE. */ + private static final int BAR_HEIGHT = 15, DEVIATION_BAR_HEIGHT = 2, ITEM_SPACE = 30, HEADER_SPACE = 20; + /** The Constant AVG_VALUE. */ private static final double AVG_VALUE = 0.25; + /** The pos. */ private int pos = 0; + /** The dim. */ private Vector dim = new Vector2D(0, 0); /** @@ -64,14 +81,14 @@ public class PropertyViewPart extends ViewPart { * is the parent element */ @Override - public void createPartControl(final Composite parent) { + public final void createPartControl(final Composite parent) { this.parent = parent; cabin = CabinFactory.eINSTANCE.createCabin(); canvas = new Canvas(parent, SWT.DOUBLE_BUFFERED); parent.addListener(SWT.Resize, new Listener() { @Override - public void handleEvent(Event e) { + public void handleEvent(final Event e) { dim.setX(parent.getSize().x); dim.setY(parent.getSize().y); } @@ -112,19 +129,35 @@ public void paintControl(final PaintEvent e) { e.gc.setBackground(ColorHelper.PASSENGER_MALE); - e.gc.fillRectangle(0, pos, - (int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.MALE)), BAR_HEIGHT); + e.gc.fillRectangle(0, pos, (int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.MALE)), + BAR_HEIGHT); e.gc.drawText(names[0], 5, pos, true); e.gc.setBackground(ColorHelper.PASSEMGER_FEMALE); - e.gc.fillRectangle((int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.MALE)), - pos, (int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.FEMALE)), - BAR_HEIGHT); + e.gc.fillRectangle((int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.MALE)), pos, + (int) (dim.getX() * propertyStore.getPercentageOfPassengers(Sex.FEMALE)), BAR_HEIGHT); e.gc.drawText(names[1], (dim.getX()) - e.gc.textExtent(names[1]).x - 5, pos, true); - addLabel(e, propertyStore.getPercentageOfPassengers(Sex.MALE) * 100, propertyStore.getPercentageOfPassengers(Sex.MALE), LabelClass.PERCENTAGE, 0); + /* ********************************************* */ + pos += ITEM_SPACE; + addHeadline(e, "Mood"); + + double passiveShare = propertyStore.getMoodStore().getMoodPercentage(PassengerMood.PASSIVE); + double aggressiveShare = propertyStore.getMoodStore().getMoodPercentage(PassengerMood.AGGRESSIVE); + + e.gc.setBackground(ColorHelper.MODD_PASSIVE); + e.gc.fillRectangle(0, pos, (int) (dim.getX() * passiveShare), BAR_HEIGHT); + e.gc.drawText(moods[0], 5, pos, true); + + e.gc.setBackground(ColorHelper.MOOD_AGGRESSIVE); + e.gc.fillRectangle((int) (dim.getX() * passiveShare), pos, (int) (dim.getX() * (aggressiveShare)), + BAR_HEIGHT); + e.gc.drawText(moods[1], (dim.getX()) - e.gc.textExtent(moods[1]).x - 5, pos, true); + + addLabel(e, passiveShare * 100, passiveShare, LabelClass.PERCENTAGE, 0); + /* ********************************************* */ pos += ITEM_SPACE; addHeadline(e, "Luggage Distribution"); @@ -141,18 +174,15 @@ public void paintControl(final PaintEvent e) { e.gc.fillRectangle(0, pos, (int) (dim.getX() * noLug), BAR_HEIGHT); e.gc.setBackground(ColorHelper.LUGGAGE_SMALL); - e.gc.fillRectangle((int) (dim.getX() * noLug), pos, (int) (dim.getX() * smallLug), - BAR_HEIGHT); + e.gc.fillRectangle((int) (dim.getX() * noLug), pos, (int) (dim.getX() * smallLug), BAR_HEIGHT); e.gc.setBackground(ColorHelper.LUGGAGE_MEDIUM); e.gc.fillRectangle((int) (dim.getX() * noLug + dim.getX() * smallLug), pos, (int) (dim.getX() * medLug), BAR_HEIGHT); e.gc.setBackground(ColorHelper.LUGGAGE_LARGE); - e.gc.fillRectangle( - (int) (dim.getX() * noLug + dim.getX() * medLug - + dim.getX() * smallLug), - pos, (int) (dim.getX() * bigLug), BAR_HEIGHT); + e.gc.fillRectangle((int) (dim.getX() * noLug + dim.getX() * medLug + dim.getX() * smallLug), pos, + (int) (dim.getX() * bigLug), BAR_HEIGHT); addLabel(e, noLug * 100, noLug, LabelClass.PERCENTAGE, 0); addLabel(e, (noLug + smallLug) * 100, smallLug + noLug, LabelClass.PERCENTAGE, 0); @@ -180,16 +210,34 @@ public void paintControl(final PaintEvent e) { }); } catch (IllegalArgumentException e) { System.out.println("illegal argument exception!"); - + e.printStackTrace(); } } - private void addHeadline(PaintEvent e, String headline) { + /** + * Adds the headline. + * + * @param e + * the e + * @param headline + * the headline + */ + private void addHeadline(final PaintEvent e, final String headline) { e.gc.drawText(headline, 5, pos, true); pos += HEADER_SPACE; } - public void createFunctionBlock(String headline, PaintEvent e, AgeStorage store) { + /** + * Creates the function block. + * + * @param headline + * the headline + * @param e + * the e + * @param store + * the store + */ + public final void createFunctionBlock(final String headline, final PaintEvent e, final AgeStorage store) { addHeadline(e, headline); @@ -213,7 +261,24 @@ public void createFunctionBlock(String headline, PaintEvent e, AgeStorage store) addLabel(e, store.getAverageAge(null), (store.getAverageAge(null) - min) / steps, LabelClass.VALUE, -10); } - private void drawFunction(PaintEvent e, AgeStorage store, Sex sex, int steps, int min, int max) { + /** + * Draw function. + * + * @param e + * the e + * @param store + * the store + * @param sex + * the sex + * @param steps + * the steps + * @param min + * the min + * @param max + * the max + */ + private void drawFunction(final PaintEvent e, final AgeStorage store, final Sex sex, final int steps, final int min, + final int max) { int maximum = store.getMaximumAmount(sex), i = 0, x1 = 0, y1 = pos, x2 = 0, y2 = 0; if (maximum == 0) { @@ -243,7 +308,17 @@ private void drawFunction(PaintEvent e, AgeStorage store, Sex sex, int steps, in e.gc.setForeground(ColorHelper.BLACK); } - private void createDeviationBlock(String headline, PaintEvent e, GaussianStorage store) { + /** + * Creates the deviation block. + * + * @param headline + * the headline + * @param e + * the e + * @param store + * the store + */ + private void createDeviationBlock(final String headline, final PaintEvent e, final GaussianStorage store) { addHeadline(e, headline); @@ -270,7 +345,22 @@ private void createDeviationBlock(String headline, PaintEvent e, GaussianStorage store.getMinimum(Sex.FEMALE), store.getMaximum(Sex.FEMALE)); } - private void addLabel(PaintEvent e, double labelValue, double relativePosition, LabelClass labelClass, int offset) { + /** + * Adds the label. + * + * @param e + * the e + * @param labelValue + * the label value + * @param relativePosition + * the relative position + * @param labelClass + * the label class + * @param offset + * the offset + */ + private void addLabel(final PaintEvent e, final double labelValue, final double relativePosition, + final LabelClass labelClass, final int offset) { e.gc.setFont(FontHelper.PARAGRAPH); @@ -291,14 +381,28 @@ private void addLabel(PaintEvent e, double labelValue, double relativePosition, e.gc.setFont(FontHelper.HEADING3); } - private void createDeviationLine(PaintEvent e, double leftFactor, double rightFactor, double rightLabel, - double leftLabel) { + /** + * Creates the deviation line. + * + * @param e + * the e + * @param leftFactor + * the left factor + * @param rightFactor + * the right factor + * @param rightLabel + * the right label + * @param leftLabel + * the left label + */ + private void createDeviationLine(final PaintEvent e, final double leftFactor, final double rightFactor, + final double rightLabel, final double leftLabel) { e.gc.setForeground(ColorHelper.GREY_DARK); e.gc.setLineWidth(2); - e.gc.drawLine((int) (dim.getX() * leftFactor), pos + BAR_HEIGHT / 2, - (int) (dim.getX() * rightFactor), pos + BAR_HEIGHT / 2); + e.gc.drawLine((int) (dim.getX() * leftFactor), pos + BAR_HEIGHT / 2, (int) (dim.getX() * rightFactor), + pos + BAR_HEIGHT / 2); e.gc.drawLine((int) (dim.getX() * leftFactor), pos + BAR_HEIGHT / 2 - DEVIATION_BAR_HEIGHT, (int) (dim.getX() * leftFactor), pos + BAR_HEIGHT / 2 + DEVIATION_BAR_HEIGHT); e.gc.drawLine((int) (dim.getX() * rightFactor), pos + BAR_HEIGHT / 2 - DEVIATION_BAR_HEIGHT, @@ -311,12 +415,21 @@ private void createDeviationLine(PaintEvent e, double leftFactor, double rightFa e.gc.setForeground(ColorHelper.BLACK); } - public void updateUI(Cabin cabin) { + /** + * Update ui. + * + * @param cabin + * the cabin + */ + public final void updateUI(final Cabin cabin) { this.cabin = cabin; loopPassengers(); doTheDraw(); } + /** + * Loop passengers. + */ private void loopPassengers() { propertyStore.clear(); @@ -326,13 +439,25 @@ private void loopPassengers() { } } + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.part.WorkbenchPart#setFocus() + */ @Override public void setFocus() { - // TODO Auto-generated method stub + // Auto-generated method stub } + /** + * The Enum LabelClass. + */ private enum LabelClass { - PERCENTAGE, VALUE + + /** The percentage. */ + PERCENTAGE, + /** The value. */ + VALUE } } \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/SimulationView.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/SimulationView.java index d20629a2..a0cfea6c 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/SimulationView.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/SimulationView.java @@ -15,59 +15,78 @@ import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.util.ConcurrentModificationException; import javax.swing.JPanel; import net.bhl.cdt.paxelerate.model.Passenger; import net.bhl.cdt.paxelerate.model.agent.Agent; -import net.bhl.cdt.paxelerate.model.astar.AreaMap; +import net.bhl.cdt.paxelerate.model.astar.Areamap; import net.bhl.cdt.paxelerate.model.astar.Node; import net.bhl.cdt.paxelerate.model.astar.Node.Property; import net.bhl.cdt.paxelerate.model.astar.Path; import net.bhl.cdt.paxelerate.model.astar.SimulationHandler; -import net.bhl.cdt.paxelerate.util.time.StopWatch; +import net.bhl.cdt.paxelerate.util.math.DecimalHelper; import net.bhl.cdt.paxelerate.util.time.TimeHelper; import net.bhl.cdt.paxelerate.util.toOpenCDT.Screen; /** - * - * @author marc.engelmann + * The Class SimulationView. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * */ public class SimulationView extends JPanel implements MouseListener { + /** The Constant serialVersionUID. */ private static final long serialVersionUID = 2L; + + /** The Constant STEP_SIZE. */ private static final int BOX_WIDTH = 1000, BOX_HEIGHT = 300, STEP_SIZE = 2; - private AreaMap areamap; + + /** The areamap. */ + private Areamap areamap; + + /** The right button. */ private final Button leftButton, rightButton; + /** The font size. */ private int pointZero = 0, FONT_SIZE = 10; - private static StopWatch watch; + /** The cabin width. */ private static double cabinWidth; - public static StopWatch getWatch() { - return watch; - } - + /** + * Instantiates a new simulation view. + */ public SimulationView() { this.setPreferredSize(new Dimension(Screen.getWidth() - 20, BOX_HEIGHT)); - cabinWidth = SimulationHandler.getCabin().getYDimension() / (double) SimulationHandler.getCabin().getScale(); + cabinWidth = SimulationHandler.getCabin().getYDimension() + / (double) SimulationHandler.getCabin().getSimulationSettings().getScale(); + + int fps = 25; Thread gameThread = new Thread() { @Override public void run() { while (true) { - repaint(); + try { + repaint(); + + Thread.sleep(1000 / fps); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println("InterruptedException @ thread " + Thread.currentThread().getName()); + Thread.currentThread().interrupt(); + } } } }; gameThread.start(); - watch = new StopWatch(); - watch.start(); - leftButton = new Button(); rightButton = new Button(); @@ -81,7 +100,7 @@ public void run() { leftButton.addActionListener(new ActionListener() { @Override - public void actionPerformed(ActionEvent e) { + public void actionPerformed(final ActionEvent e) { if (pointZero >= STEP_SIZE) { pointZero -= STEP_SIZE; } @@ -94,7 +113,7 @@ public void actionPerformed(ActionEvent e) { rightButton.addActionListener(new ActionListener() { @Override - public void actionPerformed(ActionEvent e) { + public void actionPerformed(final ActionEvent e) { if (pointZero < areamap.getDimensions().getY() - (BOX_WIDTH / FONT_SIZE) - STEP_SIZE) { pointZero += STEP_SIZE; } @@ -105,11 +124,24 @@ public void actionPerformed(ActionEvent e) { } - public void setAreamap(AreaMap areamap) { + /** + * Sets the areamap. + * + * @param areamap + * the new areamap + */ + public final void setAreamap(final Areamap areamap) { this.areamap = areamap; } - public Color switchColor(Agent.State state) { + /** + * Switch color. + * + * @param state + * the state + * @return the color + */ + public final Color switchColor(final Agent.State state) { switch (state) { case FOLLOWING_PATH: return Color.DARK_GRAY; @@ -123,128 +155,165 @@ public Color switchColor(Agent.State state) { return Color.YELLOW; case STOWING_LUGGAGE: return Color.CYAN; + case UNFOLDING_SEAT: + return Color.MAGENTA; default: return Color.DARK_GRAY; } } + /* + * (non-Javadoc) + * + * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) + */ @Override - public void paintComponent(Graphics g) { + public final synchronized void paintComponent(final Graphics g) { - FONT_SIZE = (int) (getSize().height / cabinWidth); + try { + FONT_SIZE = (int) (getSize().height / cabinWidth); - super.paintComponent(g); + super.paintComponent(g); - g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE)); + g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE)); - for (int x = 0; x < areamap.getDimensions().getX(); x++) { - for (int y = pointZero; y < areamap.getDimensions().getY(); y++) { + for (int x = 0; x < areamap.getDimensions().getX(); x++) { + for (int y = 0; y < areamap.getDimensions().getY(); y++) { - Node node = areamap.getNodeByCoordinate(x, y); - g.setColor(Color.LIGHT_GRAY); - if (node != null && node.getTypeForPrinting() != null) { + int yInverse = areamap.getDimensions().getY() - y; - if (node.getTypeForPrinting().equals("O") || node.getTypeForPrinting().equals(" ")) { - g.setColor(switchColor( - SimulationHandler.getAgentByPassenger(node.getPassenger()).getCurrentState())); - g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE - 1)); - if (!node.isHidden()) { - g.drawString("O", x * FONT_SIZE, (y - pointZero) * FONT_SIZE); - } - } else { - g.setColor(Color.LIGHT_GRAY); - g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE)); - if (node.getTypeForPrinting() != null) { - g.drawString(node.getTypeForPrinting(), x * FONT_SIZE, (y - pointZero) * FONT_SIZE); + Node node = areamap.get(x, yInverse); + + g.setColor(Color.LIGHT_GRAY); + if (node != null && node.getTypeForPrinting() != null) { + + if (node.getTypeForPrinting().equals("O") || node.getTypeForPrinting().equals(" ")) { + g.setColor(switchColor( + SimulationHandler.getAgentByPassenger(node.getPassenger()).getCurrentState())); + g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE - 1)); + if (!node.isHidden()) { + g.drawString("O", x * FONT_SIZE, (y - pointZero) * FONT_SIZE); + } + } else { + g.setColor(Color.LIGHT_GRAY); + g.setFont(new Font("Courier New", Font.PLAIN, FONT_SIZE)); + if (node.getTypeForPrinting() != null) { + g.drawString(node.getTypeForPrinting(), x * FONT_SIZE, (y - pointZero) * FONT_SIZE); + } } } } } - } - g.setColor(Color.BLACK); + g.setColor(Color.BLACK); - g.setFont(new Font("Courier New", Font.PLAIN, 12)); - g.drawString("Real Time: " + watch.getElapsedTimeTens(), 10, 20); + g.setFont(new Font("Courier New", Font.PLAIN, 12)); + g.drawString("Real Time: " + SimulationHandler.getMasterBoardingTime().getElapsedTimeTens(), 10, 20); - double tens = watch.getElapsedTimeTens() - * SimulationHandler.getCabin().getSimulationSettings().getSimulationSpeedFactor(); + double tens = SimulationHandler.getMasterBoardingTime().getElapsedTimeTens() + * SimulationHandler.getCabin().getSimulationSettings().getSimulationSpeedFactor(); - g.drawString( - "Sim. Time: " + TimeHelper.toTimeOfDay(tens) + " >> " - + SimulationHandler.getCabin().getSimulationSettings().getSimulationSpeedFactor() + "x", - 10, 40); - g.drawString("Passengers: " + SimulationHandler.getNumberOfSeatedPassengers() + " / " - + SimulationHandler.getNumberOfPassengersInCabin() + " / " - + SimulationHandler.getCabin().getPassengers().size(), 10, 60); + g.drawString( + "Sim. Time: " + TimeHelper.toTimeOfDay(tens) + " >> " + + SimulationHandler.getCabin().getSimulationSettings().getSimulationSpeedFactor() + "x", + 10, 40); + g.drawString("Passengers: " + SimulationHandler.getNumberOfSeatedPassengers() + " / " + + SimulationHandler.getActivePassengers() + " / " + + SimulationHandler.getCabin().getPassengers().size(), 10, 60); - Point mouse = getMousePosition(); + g.drawString( + "Loop Number: " + SimulationHandler.getSimulationLoopIndex() + " / " + + SimulationHandler.getCabin().getSimulationSettings().getNumberOfSimulationLoops(), + 10, 80); - if (mouse != null) { + Point mouse = getMousePosition(); - Agent agent = null; + if (mouse != null) { - int b = mouse.x / FONT_SIZE; - int a = mouse.y / FONT_SIZE; + Agent agent = null; - Node node = areamap.getNodeByCoordinate(b, a); + int b = mouse.x / FONT_SIZE; + int a = mouse.y / FONT_SIZE; - if (node != null) { - Property property = node.getProperty(); + Node node = areamap.get(b, a); - if (property == Property.AGENT) { - agent = SimulationHandler.getAgentByPassenger(node.getPassenger()); - } + if (node != null) { + Property property = node.getProperty(); - g.setColor(Color.LIGHT_GRAY); + if (property == Property.AGENT) { + agent = SimulationHandler.getAgentByPassenger(node.getPassenger()); + } - g.fillRect(mouse.x + 10, mouse.y + 10, 250, 120); + g.setColor(Color.LIGHT_GRAY); - g.setColor(Color.BLACK); + g.fillRect(mouse.x + 10, mouse.y + 10, 250, 120); - if (node != null && agent != null) { - if (node.getProperty() == Property.AGENT) { - g.drawString("Passenger: " + node.getPassenger().getId() + ", x: " - + agent.getCurrentPosition().getX() + ", y: " + agent.getCurrentPosition().getY(), - mouse.x + 30, mouse.y + 30); - g.drawString("Seat " + node.getPassenger().getSeatRef().getName(), mouse.x + 30, mouse.y + 50); - g.drawString("State: " + agent.getCurrentState().toString(), mouse.x + 30, mouse.y + 70); - g.drawString("Mode: " + agent.getAgentMode().toString(), mouse.x + 30, mouse.y + 90); + g.setColor(Color.BLACK); - Passenger other = agent.getOtherPassengersInRowBlockingMe(); + if (node != null && agent != null) { + if (node.getProperty() == Property.AGENT) { + g.drawString("Passenger: " + node.getPassenger().getId() + ", x: " + + agent.getCurrentPosition().getX() + ", y: " + agent.getCurrentPosition().getY(), + mouse.x + 30, mouse.y + 30); + g.drawString("Seat " + node.getPassenger().getSeat().getName(), mouse.x + 30, mouse.y + 50); + g.drawString("State: " + agent.getCurrentState().toString(), mouse.x + 30, mouse.y + 70); + g.drawString("Mode: " + agent.getAgentMode().toString(), mouse.x + 30, mouse.y + 90); + + Passenger other = agent.getOtherPassengersInRowBlockingMe(); + + if (other != null) { + g.drawString("Waiting for passenger " + other.getId() + " on seat " + + other.getSeat().getName(), mouse.x + 30, mouse.y + 110); + } else { + g.drawString( + "Walked distance: " + DecimalHelper + .round(node.getPassenger().getDistanceWalked() / 100.0, 1) + " meters.", + mouse.x + 30, mouse.y + 110); + } - if (other != null) { - g.drawString("Waiting for passenger " + other.getId() + " on seat " - + other.getSeatRef().getName(), mouse.x + 30, mouse.y + 110); - } + g.setColor(Color.GRAY); + + for (Path path : agent.getPathList()) { + for (Node pathNode : path.getWaypoints()) { - g.setColor(Color.GRAY); + int x = (pathNode.getPosition().getX() - pointZero) * FONT_SIZE; + int y = (areamap.getDimensions().getY() - pathNode.getPosition().getY()) + * FONT_SIZE; - for (Path path : agent.getPathList()) { - for (Node pathNode : path.getWaypoints()) { - g.drawString("•", (pathNode.getPosition().getX() - pointZero) * FONT_SIZE, - pathNode.getPosition().getY() * FONT_SIZE); + g.drawString("•", x, y); + } } } + } else if (property != null) { + g.setColor(Color.BLACK); + g.drawString("Property: " + property.toString() + ", x: " + b + ", y: " + a, mouse.x + 30, + mouse.y + 30); } - } else if (property != null) { - g.setColor(Color.BLACK); - g.drawString("Property: " + property.toString() + ", x: " + b + ", y: " + a, mouse.x + 30, - mouse.y + 30); } } + + } catch (NullPointerException e) { + e.printStackTrace(); + } catch (ConcurrentModificationException e) { + e.printStackTrace(); } + } + /* + * (non-Javadoc) + * + * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent) + */ @Override - public void mouseClicked(MouseEvent e) { + public final void mouseClicked(final MouseEvent e) { if (getMousePosition() != null) { int a = getMousePosition().x / FONT_SIZE; int b = getMousePosition().y / FONT_SIZE; - Node node = areamap.getNodeByCoordinate(b, a); + Node node = areamap.get(b, a); if (node != null) { if (node.getProperty() == Property.AGENT && node.getPassenger() != null) { SimulationHandler.removePassenger(node.getPassenger()); @@ -254,23 +323,51 @@ public void mouseClicked(MouseEvent e) { } } + /* + * (non-Javadoc) + * + * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent) + */ @Override - public void mouseEntered(MouseEvent e) { + public void mouseEntered(final MouseEvent e) { // } + /* + * (non-Javadoc) + * + * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent) + */ @Override - public void mouseExited(MouseEvent e) { + public void mouseExited(final MouseEvent e) { // } + /* + * (non-Javadoc) + * + * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent) + */ @Override - public void mousePressed(MouseEvent e) { + public void mousePressed(final MouseEvent e) { // } + /* + * (non-Javadoc) + * + * @see + * java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent) + */ @Override - public void mouseReleased(MouseEvent e) { + public void mouseReleased(final MouseEvent e) { // } + + /** + * Reset simulation view. + */ + public final void resetSimulationView() { + areamap = null; + } } diff --git a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/ViewPartHelper.java b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/ViewPartHelper.java index 1307c6e8..d76742d3 100644 --- a/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/ViewPartHelper.java +++ b/net.bhl.cdt.paxelerate.ui/src/net/bhl/cdt/paxelerate/ui/views/ViewPartHelper.java @@ -1,39 +1,72 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************/ - -package net.bhl.cdt.paxelerate.ui.views; - -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -import net.bhl.cdt.paxelerate.ui.views.CabinViewPart; -import net.bhl.cdt.paxelerate.ui.views.PropertyViewPart; - -public class ViewPartHelper { - - public static CabinViewPart getCabinView() { - IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); - for (IWorkbenchWindow window : windows) { - IWorkbenchPage page = window.getActivePage(); - CabinViewPart found = (CabinViewPart) page.findView("net.bhl.cdt.paxelerate.ui.views.cabinview"); - if (found != null) - return found; - } - return null; - } - - public static PropertyViewPart getPropertyView() { - IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); - for (IWorkbenchWindow window : windows) { - IWorkbenchPage page = window.getActivePage(); - PropertyViewPart found = (PropertyViewPart) page.findView("net.bhl.cdt.paxelerate.ui.propertyview"); - if (found != null) - return found; - } - return null; - } -} +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ + +package net.bhl.cdt.paxelerate.ui.views; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +/** + * The Class ViewPartHelper. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ +public class ViewPartHelper { + + /** + * Gets the cabin view. + * + * @return the cabin view + */ + public static CabinViewPart getCabinView() { + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); + for (IWorkbenchWindow window : windows) { + IWorkbenchPage page = window.getActivePage(); + CabinViewPart found = (CabinViewPart) page.findView("net.bhl.cdt.paxelerate.ui.views.cabinview"); + if (found != null) { + return found; + } + } + return null; + } + + /** + * Gets the heat map view. + * + * @return the heat map view + */ + public static HeatmapPart getHeatView() { + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); + for (IWorkbenchWindow window : windows) { + IWorkbenchPage page = window.getActivePage(); + HeatmapPart found = (HeatmapPart) page.findView("net.bhl.cdt.paxelerate.ui.heatmap"); + if (found != null) { + return found; + } + } + return null; + } + + /** + * Gets the property view. + * + * @return the property view + */ + public static PropertyViewPart getPropertyView() { + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); + for (IWorkbenchWindow window : windows) { + IWorkbenchPage page = window.getActivePage(); + PropertyViewPart found = (PropertyViewPart) page.findView("net.bhl.cdt.paxelerate.ui.propertyview"); + if (found != null) { + return found; + } + } + return null; + } +} diff --git a/net.bhl.cdt.paxelerate.util/META-INF/MANIFEST.MF b/net.bhl.cdt.paxelerate.util/META-INF/MANIFEST.MF index 4bff2c59..e65be3ec 100644 --- a/net.bhl.cdt.paxelerate.util/META-INF/MANIFEST.MF +++ b/net.bhl.cdt.paxelerate.util/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PAXelerate - Util Bundle-SymbolicName: net.bhl.cdt.paxelerate.util -Bundle-Version: 0.6.0.qualifier +Bundle-Version: 0.7.0.qualifier Bundle-Activator: net.bhl.cdt.paxelerate.util.Activator Bundle-Vendor: http://www.paxelerate.com/ Require-Bundle: org.eclipse.ui, @@ -12,6 +12,7 @@ Bundle-ActivationPolicy: lazy Export-Package: net.bhl.cdt.paxelerate.util, net.bhl.cdt.paxelerate.util.input, net.bhl.cdt.paxelerate.util.math, + net.bhl.cdt.paxelerate.util.output, net.bhl.cdt.paxelerate.util.string, net.bhl.cdt.paxelerate.util.time, net.bhl.cdt.paxelerate.util.toOpenCDT diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/Activator.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/Activator.java index 12df9d5f..bafc25fe 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/Activator.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/Activator.java @@ -9,18 +9,24 @@ import org.osgi.framework.BundleContext; /** - * The activator class controls the plug-in life cycle + * The activator class controls the plug-in life cycle. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class Activator extends AbstractUIPlugin { + /** The Constant PLUGIN_ID. */ // The plug-in ID public static final String PLUGIN_ID = "net.bhl.cdt.paxelerate.util"; //$NON-NLS-1$ + /** The plugin. */ // The shared instance private static Activator plugin; /** - * The constructor + * The constructor. */ public Activator() { } @@ -48,7 +54,7 @@ public void stop(BundleContext context) throws Exception { } /** - * Returns the shared instance + * Returns the shared instance. * * @return the shared instance */ diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/Input.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/Input.java index fa444c2f..a2a79f67 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/Input.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/Input.java @@ -1,380 +1,483 @@ -/******************************************************************************* - * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying - * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************/ -package net.bhl.cdt.paxelerate.util.input; - -import org.eclipse.jface.dialogs.TitleAreaDialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; - -import net.bhl.cdt.paxelerate.util.math.Vector; -import net.bhl.cdt.paxelerate.util.math.Vector2D; -import net.bhl.cdt.paxelerate.util.string.StringHelper; - -/** - * This class generates a dialog which can get various parameters or give output - * to the user. You decide. - * - * @author marc.engelmann - * - */ -public class Input extends TitleAreaDialog { - - /** - * This class defines the different input dialog types. - * - * @author marc.engelmann - * - */ - public enum WindowType { - /** - * Access the different types using WindowType.CHOOSE_TYPE. - */ - INFORMATION, GET_STRING, GET_INTEGER, GET_VECTOR, WARNING, OPTIONS, GET_BOOLEAN, GET_TWO_VECTORS, CLONE_OBJECT, MOVE_OBJECT - } - - private WindowType windowType; - private String descriptionText, descriptionText2, descriptionText3, descriptionText4, titleString, stringValue; - private Text text, text2, text3, text4; - private int integerValue; - private Vector vectorValue, vectorValue2; - private Boolean booleanValue; - private Composite container; - private Label warningLabel; - - /** - * This method generates the input dialog. - * - * @param windowType - * is the type of the dialog. USE WindowType.(...) - * @param message - * is the message of the dialog - * @param messageType - * is the message type. USE IMessageProvider.(...) - */ - public Input(WindowType windowType, String message, int messageType) { - super(null); - - integerValue = 0; - vectorValue = new Vector2D(0, 0); - vectorValue2 = new Vector2D(0, 0); - booleanValue = false; - stringValue = ""; - - switch (windowType) { - case GET_INTEGER: - titleString = "Integer Input Required!"; - descriptionText = "value:"; - break; - case GET_BOOLEAN: - titleString = "Please confirm the following task!"; - descriptionText = "this should actually not be seen!"; - break; - case GET_VECTOR: - titleString = "Vector Input Required!"; - descriptionText = "X dimension:"; - descriptionText2 = "Y dimension:"; - break; - case GET_TWO_VECTORS: - titleString = "Vector Input Required!"; - descriptionText = "X position:"; - descriptionText2 = "Y position:"; - descriptionText3 = "X dimension:"; - descriptionText4 = "Y dimension:"; - break; - case GET_STRING: - titleString = "Text Input Required!"; - descriptionText = "text:"; - break; - case OPTIONS: - titleString = "Please choose one of the following options!"; - descriptionText = "Options:"; - break; - - case CLONE_OBJECT: - titleString = "Duplicate rows"; - descriptionText = "Number of rows"; - break; - case MOVE_OBJECT: - titleString = "Move object"; - descriptionText = "X displacement:"; - descriptionText2 = "Y displacement:"; - break; - - default: - titleString = "empty title ..."; - descriptionText = "empty description"; - break; - } - this.windowType = windowType; - super.create(); - setMessage(message, messageType); - setTitle(titleString); - this.open(); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite area = (Composite) super.createDialogArea(parent); - container = new Composite(area, SWT.NONE); - container.setLayoutData(new GridData(GridData.FILL_BOTH)); - GridLayout layout = new GridLayout(2, false); - layout.marginWidth = 10; - layout.verticalSpacing = 10; - layout.marginHeight = 10; - container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - container.setLayout(layout); - if (windowType != WindowType.GET_BOOLEAN) { - createInputField(container); - if (windowType == WindowType.GET_VECTOR || windowType == WindowType.MOVE_OBJECT) { - createAnotherInputField(container); - } - if (windowType == WindowType.GET_TWO_VECTORS) { - createAnotherInputField(container); - createThirdInputField(container); - createFourthInputField(container); - } - } - - createWarningLabel(container); - return area; - } - - private void createInputField(Composite container) { - Label label = new Label(container, SWT.NONE); - label.setText(descriptionText); - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - text = new Text(container, SWT.BORDER); - text.setText("0"); - text.setLayoutData(gridData); - - } - - private void createAnotherInputField(Composite container) { - Label label = new Label(container, SWT.NONE); - label.setText(descriptionText2); - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - text2 = new Text(container, SWT.BORDER); - text2.setText("0"); - text2.setLayoutData(gridData); - } - - private void createThirdInputField(Composite container) { - Label label = new Label(container, SWT.NONE); - label.setText(descriptionText3); - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - text3 = new Text(container, SWT.BORDER); - text3.setText("0"); - text3.setLayoutData(gridData); - } - - private void createFourthInputField(Composite container) { - Label label = new Label(container, SWT.NONE); - label.setText(descriptionText4); - GridData gridData = new GridData(); - gridData.grabExcessHorizontalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - text4 = new Text(container, SWT.BORDER); - text4.setText("0"); - text4.setLayoutData(gridData); - } - - private void createWarningLabel(Composite container) { - warningLabel = new Label(container, SWT.NONE); - warningLabel.setText("You entered a character that is not allowed here."); - warningLabel.setVisible(false); - // TODO util should not set UI - warningLabel.setForeground(new org.eclipse.swt.graphics.Color(null, 255, 0, 0)); - } - - @Override - protected Point getInitialSize() { - switch (windowType) { - case GET_BOOLEAN: - return new Point(450, 150); - case GET_TWO_VECTORS: - return new Point(450, 350); - default: - return new Point(450, 250); - } - - } - - @Override - protected boolean isResizable() { - return false; - } - - /** - * save content of the Text fields because they get disposed as soon as the - * Dialog closes. - */ - private void saveInput() { - switch (windowType) { - case GET_INTEGER: - case OPTIONS: - case CLONE_OBJECT: - integerValue = Integer.parseInt(text.getText()); - break; - case GET_STRING: - stringValue = text.getText(); - break; - case GET_VECTOR: - case MOVE_OBJECT: - vectorValue = new Vector2D(Integer.parseInt(text.getText()), Integer.parseInt(text2.getText())); - break; - case GET_TWO_VECTORS: - vectorValue = new Vector2D(Integer.parseInt(text.getText()), Integer.parseInt(text2.getText())); - vectorValue2 = new Vector2D(Integer.parseInt(text3.getText()), Integer.parseInt(text4.getText())); - break; - case GET_BOOLEAN: - booleanValue = true; - break; - default: - break; - } - } - - /** - * This method returns the stored vector. - * - * @return the vector - */ - public Vector getVectorValue() { - return vectorValue; - } - - /** - * This method returns the stored vector. - * - * @return the vector - */ - public Vector getSecondVectorValue() { - return vectorValue2; - } - - /** - * This method returns the stored integer value. - * - * @return the integer value - */ - public int getIntegerValue() { - return integerValue; - } - - public boolean getBooleanValue() { - return booleanValue; - } - - /** - * This method returns the stored string value. - * - * @return the string value - */ - public String getStringValue() { - return stringValue; - } - - /** - * This method checks if the input is ok. - * - * @return returns if input is ok - */ - public boolean inputCheckOK() { - switch (windowType) { - case CLONE_OBJECT: - case GET_INTEGER: - if (text.getText() != "") { - if (StringHelper.isInteger(text.getText())) { - return true; - } else { - warningLabel.setText("You entered a character that is not a digit."); - warningLabel.setVisible(true); - return false; - } - } else { - warningLabel.setText("Please enter a digit."); - warningLabel.setVisible(true); - return false; - } - case OPTIONS: - if (text.getText() != "") { - if (StringHelper.isInteger(text.getText())) { - return true; - } else { - warningLabel.setText("You entered a character that is not a digit."); - warningLabel.setVisible(true); - return false; - } - } else { - warningLabel.setText("Please enter a digit."); - warningLabel.setVisible(true); - return false; - } - case GET_STRING: - if (text.getText() != "") { - return true; - } else { - warningLabel.setText("Please enter a string."); - warningLabel.setVisible(true); - return false; - } - case GET_VECTOR: - case MOVE_OBJECT: - if (text.getText() != "" && text2.getText() != "") { - if (StringHelper.isInteger(text.getText()) && StringHelper.isInteger(text2.getText())) { - return true; - } else { - warningLabel.setText("One of the two values is not a digit."); - warningLabel.setVisible(true); - return false; - } - } else { - warningLabel.setText("Please enter a digit in every field."); - warningLabel.setVisible(true); - return false; - } - case GET_TWO_VECTORS: - if (text.getText() != "" && text2.getText() != "" && text3.getText() != "" && text4.getText() != "") { - if (StringHelper.isInteger(text.getText()) && StringHelper.isInteger(text2.getText()) - && StringHelper.isInteger(text3.getText()) && StringHelper.isInteger(text4.getText())) { - return true; - } else { - warningLabel.setText("One of the two values is not a digit."); - warningLabel.setVisible(true); - return false; - } - } else { - warningLabel.setText("Please enter a digit in every field."); - warningLabel.setVisible(true); - return false; - } - case GET_BOOLEAN: - return true; - default: - return true; - } - } - - @Override - protected void okPressed() { - if (inputCheckOK()) { - saveInput(); - super.okPressed(); - } - } -} +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.util.input; + +import org.eclipse.jface.dialogs.TitleAreaDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + +import net.bhl.cdt.paxelerate.util.math.Vector; +import net.bhl.cdt.paxelerate.util.math.Vector2D; +import net.bhl.cdt.paxelerate.util.string.StringHelper; + +/** + * This class generates a dialog which can get various parameters or give output + * to the user. You decide. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * + */ +public class Input extends TitleAreaDialog { + + /** + * This class defines the different input dialog types. + * + * @author marc.engelmann + * + */ + public enum WindowType { + /** + * Access the different types using WindowType.CHOOSE_TYPE. + */ + INFORMATION, + /** The get string. */ + GET_STRING, + /** The get integer. */ + GET_INTEGER, + /** The get vector. */ + GET_VECTOR, + /** The warning. */ + WARNING, + /** The options. */ + OPTIONS, + /** The get boolean. */ + GET_BOOLEAN, + /** The get two vectors. */ + GET_TWO_VECTORS, + /** The clone object. */ + CLONE_OBJECT, + /** The move object. */ + MOVE_OBJECT, + + /** The export data object *. */ + EXPORT_DATA + } + + /** The window type. */ + private WindowType windowType; + + /** The string value. */ + private String descriptionText, descriptionText2, descriptionText3, descriptionText4, titleString, stringValue; + + /** The text4. */ + private Text text, text2, text3, text4; + + /** The integer value. */ + private int integerValue; + + /** The vector value2. */ + private Vector vectorValue, vectorValue2; + + /** The boolean value. */ + private Boolean booleanValue; + + /** The container. */ + private Composite container; + + /** The warning label. */ + private Label warningLabel; + + /** + * This method generates the input dialog. + * + * @param windowType + * is the type of the dialog. USE WindowType.(...) + * @param message + * is the message of the dialog + * @param messageType + * is the message type. USE IMessageProvider.(...) + */ + public Input(WindowType windowType, String message, int messageType) { + super(null); + + integerValue = 0; + vectorValue = new Vector2D(0, 0); + vectorValue2 = new Vector2D(0, 0); + booleanValue = false; + stringValue = ""; + + switch (windowType) { + case GET_INTEGER: + titleString = "Integer Input Required!"; + descriptionText = "value:"; + break; + case GET_BOOLEAN: + titleString = "Please confirm the following task!"; + descriptionText = "this should actually not be seen!"; + break; + case GET_VECTOR: + titleString = "Vector Input Required!"; + descriptionText = "X dimension:"; + descriptionText2 = "Y dimension:"; + break; + case GET_TWO_VECTORS: + titleString = "Vector Input Required!"; + descriptionText = "X position:"; + descriptionText2 = "Y position:"; + descriptionText3 = "X dimension:"; + descriptionText4 = "Y dimension:"; + break; + case GET_STRING: + titleString = "Text Input Required!"; + descriptionText = "text:"; + break; + case OPTIONS: + titleString = "Please choose one of the following options!"; + descriptionText = "Options:"; + break; + case CLONE_OBJECT: + titleString = "Duplicate rows"; + descriptionText = "Number of rows"; + break; + case MOVE_OBJECT: + titleString = "Move object"; + descriptionText = "X displacement:"; + descriptionText2 = "Y displacement:"; + break; + case EXPORT_DATA: + titleString = "Export Data"; + descriptionText = "Filename"; + break; + + default: + titleString = "empty title ..."; + descriptionText = "empty description"; + break; + } + this.windowType = windowType; + super.create(); + setMessage(message, messageType); + setTitle(titleString); + this.open(); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse. + * swt.widgets.Composite) + */ + @Override + protected Control createDialogArea(Composite parent) { + Composite area = (Composite) super.createDialogArea(parent); + container = new Composite(area, SWT.NONE); + container.setLayoutData(new GridData(GridData.FILL_BOTH)); + GridLayout layout = new GridLayout(2, false); + layout.marginWidth = 10; + layout.verticalSpacing = 10; + layout.marginHeight = 10; + container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + container.setLayout(layout); + if (windowType != WindowType.GET_BOOLEAN) { + createInputField(container); + if (windowType == WindowType.GET_VECTOR || windowType == WindowType.MOVE_OBJECT) { + createAnotherInputField(container); + } + if (windowType == WindowType.GET_TWO_VECTORS) { + createAnotherInputField(container); + createThirdInputField(container); + createFourthInputField(container); + } + } + + createWarningLabel(container); + return area; + } + + /** + * Creates the input field. + * + * @param container + * the container + */ + private void createInputField(Composite container) { + Label label = new Label(container, SWT.NONE); + label.setText(descriptionText); + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = true; + gridData.horizontalAlignment = GridData.FILL; + text = new Text(container, SWT.BORDER); + text.setText("0"); + text.setLayoutData(gridData); + + } + + /** + * Creates the another input field. + * + * @param container + * the container + */ + private void createAnotherInputField(Composite container) { + Label label = new Label(container, SWT.NONE); + label.setText(descriptionText2); + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = true; + gridData.horizontalAlignment = GridData.FILL; + text2 = new Text(container, SWT.BORDER); + text2.setText("0"); + text2.setLayoutData(gridData); + } + + /** + * Creates the third input field. + * + * @param container + * the container + */ + private void createThirdInputField(Composite container) { + Label label = new Label(container, SWT.NONE); + label.setText(descriptionText3); + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = true; + gridData.horizontalAlignment = GridData.FILL; + text3 = new Text(container, SWT.BORDER); + text3.setText("0"); + text3.setLayoutData(gridData); + } + + /** + * Creates the fourth input field. + * + * @param container + * the container + */ + private void createFourthInputField(Composite container) { + Label label = new Label(container, SWT.NONE); + label.setText(descriptionText4); + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = true; + gridData.horizontalAlignment = GridData.FILL; + text4 = new Text(container, SWT.BORDER); + text4.setText("0"); + text4.setLayoutData(gridData); + } + + /** + * Creates the warning label. + * + * @param container + * the container + */ + private void createWarningLabel(Composite container) { + warningLabel = new Label(container, SWT.NONE); + warningLabel.setText("You entered a character that is not allowed here."); + warningLabel.setVisible(false); + // TODO util should not set UI + warningLabel.setForeground(new org.eclipse.swt.graphics.Color(null, 255, 0, 0)); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize() + */ + @Override + protected Point getInitialSize() { + switch (windowType) { + case GET_BOOLEAN: + return new Point(450, 150); + case GET_TWO_VECTORS: + return new Point(450, 350); + default: + return new Point(450, 250); + } + + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.Dialog#isResizable() + */ + @Override + protected boolean isResizable() { + return false; + } + + /** + * save content of the Text fields because they get disposed as soon as the + * Dialog closes. + */ + private void saveInput() { + switch (windowType) { + case GET_INTEGER: + case OPTIONS: + case CLONE_OBJECT: + integerValue = Integer.parseInt(text.getText()); + break; + case GET_STRING: + case EXPORT_DATA: + stringValue = text.getText(); + break; + case GET_VECTOR: + case MOVE_OBJECT: + vectorValue = new Vector2D(Integer.parseInt(text.getText()), Integer.parseInt(text2.getText())); + break; + case GET_TWO_VECTORS: + vectorValue = new Vector2D(Integer.parseInt(text.getText()), Integer.parseInt(text2.getText())); + vectorValue2 = new Vector2D(Integer.parseInt(text3.getText()), Integer.parseInt(text4.getText())); + break; + case GET_BOOLEAN: + booleanValue = true; + break; + default: + break; + } + } + + /** + * This method returns the stored vector. + * + * @return the vector + */ + public Vector getVectorValue() { + return vectorValue; + } + + /** + * This method returns the stored vector. + * + * @return the vector + */ + public Vector getSecondVectorValue() { + return vectorValue2; + } + + /** + * This method returns the stored integer value. + * + * @return the integer value + */ + public int getIntegerValue() { + return integerValue; + } + + /** + * Gets the boolean value. + * + * @return the boolean value + */ + public boolean getBooleanValue() { + return booleanValue; + } + + /** + * This method returns the stored string value. + * + * @return the string value + */ + public String getStringValue() { + return stringValue; + } + + /** + * This method checks if the input is ok. + * + * @return returns if input is ok + */ + public boolean inputCheckOK() { + switch (windowType) { + case CLONE_OBJECT: + case GET_INTEGER: + if (text.getText() != null && !text.getText().isEmpty()) { + if (StringHelper.isInteger(text.getText())) { + return true; + } else { + warningLabel.setText("You entered a character that is not a digit."); + warningLabel.setVisible(true); + return false; + } + } else { + warningLabel.setText("Please enter a digit."); + warningLabel.setVisible(true); + return false; + } + case OPTIONS: + if (text.getText() != null && !text.getText().isEmpty()) { + if (StringHelper.isInteger(text.getText())) { + return true; + } else { + warningLabel.setText("You entered a character that is not a digit."); + warningLabel.setVisible(true); + return false; + } + } else { + warningLabel.setText("Please enter a digit."); + warningLabel.setVisible(true); + return false; + } + case GET_STRING: + if (text.getText() != null && !text.getText().isEmpty()) { + return true; + } else { + warningLabel.setText("Please enter a string."); + warningLabel.setVisible(true); + return false; + } + case GET_VECTOR: + case MOVE_OBJECT: + if ((text.getText() != null && !text.getText().isEmpty()) + && (text2.getText() != null && !text2.getText().isEmpty())) { + if (StringHelper.isInteger(text.getText()) && StringHelper.isInteger(text2.getText())) { + return true; + } else { + warningLabel.setText("One of the two values is not a digit."); + warningLabel.setVisible(true); + return false; + } + } else { + warningLabel.setText("Please enter a digit in every field."); + warningLabel.setVisible(true); + return false; + } + case GET_TWO_VECTORS: + if ((text.getText() != null && !text.getText().isEmpty()) + && (text2.getText() != null && !text2.getText().isEmpty()) + && (text3.getText() != null && !text3.getText().isEmpty()) + && (text4.getText() != null && !text4.getText().isEmpty())) { + if (StringHelper.isInteger(text.getText()) && StringHelper.isInteger(text2.getText()) + && StringHelper.isInteger(text3.getText()) && StringHelper.isInteger(text4.getText())) { + return true; + } else { + warningLabel.setText("One of the two values is not a digit."); + warningLabel.setVisible(true); + return false; + } + } else { + warningLabel.setText("Please enter a digit in every field."); + warningLabel.setVisible(true); + return false; + } + case GET_BOOLEAN: + return true; + default: + return true; + } + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.Dialog#okPressed() + */ + @Override + protected void okPressed() { + if (inputCheckOK()) { + saveInput(); + super.okPressed(); + } + } +} diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/InputChecker.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/InputChecker.java index 55ca2e9c..e10a3889 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/InputChecker.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/input/InputChecker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2014 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ @@ -11,10 +11,18 @@ * This class checks user input for errors. * * @author marc.engelmann, raoul.rothfeld - * + * @version 1.0 + * @since 0.5 */ public class InputChecker { + /** + * No issues detected. + * + * @param structure + * the structure + * @return true, if successful + */ public static boolean noIssuesDetected(String structure) { if (structure.contains(" ")) { return false; @@ -42,9 +50,9 @@ public static boolean noIssuesDetected(String structure) { * @return the cleaned string */ public static String removeNonInteger(String str) { -// if (DeveloperMode.ACTIVE) { -// System.out.println("non-numeric characters detected and removed!"); -// } + // if (DeveloperMode.ACTIVE) { + // System.out.println("non-numeric characters detected and removed!"); + // } return str.replaceAll("[^0-9-]+", ""); } @@ -60,9 +68,9 @@ public static String checkStructureString(String str) { /* remove all spaces and invisible pieces */ if (str.contains(" ")) { str = str.replaceAll("\\s+", ""); -// if (DeveloperMode.ACTIVE) { -// System.out.println("spaces detected and removed!"); -// } + // if (DeveloperMode.ACTIVE) { + // System.out.println("spaces detected and removed!"); + // } } /* for cleaning purposes, the dashes are temporarily removed */ @@ -74,9 +82,10 @@ public static String checkStructureString(String str) { */ if (!StringHelper.isInteger(stringWithoutDashes)) { str = str.replaceAll("[^0-9-]+", ""); -// if (DeveloperMode.ACTIVE) { -// System.out.println("non-numeric characters detected and removed!"); -// } + // if (DeveloperMode.ACTIVE) { + // System.out.println("non-numeric characters detected and + // removed!"); + // } } /* Now this string only contains numbers! */ @@ -88,9 +97,9 @@ public static String checkStructureString(String str) { */ if (str.indexOf('-') < 0) { int numbcount = stringWithoutDashes.length(); -// if (DeveloperMode.ACTIVE) { -// System.out.println("no dash detected, inserted in the middle!"); -// } + // if (DeveloperMode.ACTIVE) { + // System.out.println("no dash detected, inserted in the middle!"); + // } str = str.substring(0, (int) (numbcount / 2)) + "-" + str.substring((int) (numbcount / 2)); } @@ -103,26 +112,27 @@ public static String checkStructureString(String str) { str = str.substring(0, str.length() - 1); } -// /* -// * if there are 2 or more dashes following on another, remove all except -// * for one. -// */ -// if (StringHelper.checkForDoubleCharacter(str)) { -// if (DeveloperMode.ACTIVE) { -// System.out.println("several dashes in a row detected and corrected"); -// } -// String helperString = ""; -// for (int i = 0; i < str.length(); i++) { -// if (i == 0) { -// helperString = "" + str.charAt(i); -// } else { -// if (str.charAt(i - 1) != str.charAt(i)) { -// helperString = helperString + str.charAt(i); -// } -// } -// } -// str = helperString; -// } + // /* + // * if there are 2 or more dashes following on another, remove all + // except + // * for one. + // */ + // if (StringHelper.checkForDoubleCharacter(str)) { + // if (DeveloperMode.ACTIVE) { + // System.out.println("several dashes in a row detected and corrected"); + // } + // String helperString = ""; + // for (int i = 0; i < str.length(); i++) { + // if (i == 0) { + // helperString = "" + str.charAt(i); + // } else { + // if (str.charAt(i - 1) != str.charAt(i)) { + // helperString = helperString + str.charAt(i); + // } + // } + // } + // str = helperString; + // } return str; } } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/DecimalHelper.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/DecimalHelper.java index 8ed58f69..bafc50dc 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/DecimalHelper.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/DecimalHelper.java @@ -4,24 +4,51 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package net.bhl.cdt.paxelerate.util.math; - + import java.math.BigDecimal; - + /** * This utility class rounds a decimal number. + * * @author www.codejava.net + * @version 1.0 + * @since 0.5 * */ public class DecimalHelper { - - protected DecimalHelper () { - + + /** + * Instantiates a new decimal helper. + */ + protected DecimalHelper() { + + } + + /** + * Round. + * + * @param value + * the value + * @param numberOfDigitsAfterDecimalPoint + * the number of digits after decimal point + * @return the double + */ + public static double round(double value, int numberOfDigitsAfterDecimalPoint) { + BigDecimal bigDecimal = new BigDecimal(value); + bigDecimal = bigDecimal.setScale(numberOfDigitsAfterDecimalPoint, BigDecimal.ROUND_HALF_UP); + return bigDecimal.doubleValue(); + } + + /** + * Percentage. + * + * @param value + * the value + * @param maximumValue + * the maximum value + * @return the int + */ + public static int percentage(double value, double maximumValue) { + return (int) ((value / maximumValue) * 100.0); } - - public static double round(double value, int numberOfDigitsAfterDecimalPoint) { - BigDecimal bigDecimal = new BigDecimal(value); - bigDecimal = bigDecimal.setScale(numberOfDigitsAfterDecimalPoint, - BigDecimal.ROUND_HALF_UP); - return bigDecimal.doubleValue(); - } } \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussOptions.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussOptions.java index 147a1221..6ef614fd 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussOptions.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussOptions.java @@ -5,15 +5,42 @@ ******************************************************************************/ package net.bhl.cdt.paxelerate.util.math; +/** + * The Enum GaussOptions. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public enum GaussOptions { - PERCENT_99(2.576), PERCENT_95(1.960), PERCENT_90(1.645), PERCENT_50(0.675); + /** The PERCEN t_99. */ + PERCENT_99(2.576), + /** The PERCEN t_95. */ + PERCENT_95(1.960), + /** The PERCEN t_90. */ + PERCENT_90(1.645), + /** The PERCEN t_50. */ + PERCENT_50(0.675); + + /** The sigma. */ private final double sigma; + /** + * Instantiates a new gauss options. + * + * @param sigma + * the sigma + */ GaussOptions(double sigma) { this.sigma = sigma; } + /** + * Gets the sigma. + * + * @return the sigma + */ public double getSigma() { return sigma; } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Gaussian.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Gaussian.java index 1a88c24d..12cb3776 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Gaussian.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Gaussian.java @@ -7,16 +7,30 @@ import java.util.ArrayList; +/** + * The Class Gaussian. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * + */ public class Gaussian { - /** - * This class is a verification class for the gauss function - */ + /** This class is a verification class for the gauss function. */ private static final int ITERATIONS = 10 ^ 9; + /** The avlist. */ static ArrayList list = new ArrayList(), avlist = new ArrayList(); + /** + * Sum up. + * + * @param listlist + * the listlist + * @return the double + */ private static double sumUp(ArrayList listlist) { double counter = 0; for (double value : listlist) { @@ -25,6 +39,9 @@ private static double sumUp(ArrayList listlist) { return counter; } + /** + * Loop. + */ private static void loop() { for (int i = 1; i <= ITERATIONS; i++) { list.add(GaussianRandom.gaussianRandom(100, GaussOptions.PERCENT_99, 5)); @@ -35,10 +52,23 @@ private static void loop() { list.clear(); } + /** + * Average. + * + * @param listit + * the listit + * @return the double + */ private static double average(ArrayList listit) { return sumUp(listit) / listit.size(); } + /** + * The main method. + * + * @param args + * the arguments + */ public static void main(String[] args) { for (int j = 0; j < 1000; j++) { loop(); diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussianRandom.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussianRandom.java index 4bd02262..302c19a9 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussianRandom.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/GaussianRandom.java @@ -7,18 +7,26 @@ import java.util.Random; +/** + * The Class GaussianRandom. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class GaussianRandom { + /** * Use this function to generate a value according to gaussian normal * distribution. - * + * * @param average * is the average value of the distribution * @param gauss * is the option you want to choose. * @param deviation * is the deviation at the chosen option. - * @return + * @return the double */ public static double gaussianRandom(double average, GaussOptions gauss, double deviation) { Random rand = new Random(); diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/MathHelper.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/MathHelper.java new file mode 100644 index 00000000..f6254b77 --- /dev/null +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/MathHelper.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.util.math; + +/** + * The Class MathHelper. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + * + */ +public abstract class MathHelper { + + /** + * This method calculates the Pythagoras distance between two vectors. + * + * @param vector1 + * the vector1 + * @param vector2 + * the vector2 + * @return the distance between the nodes + */ + public static double distanceBetween(Vector vector1, Vector vector2) { + + /* define the first element of the square root function */ + double first = Math.pow(vector2.getX() - vector1.getX(), 2); + + /* define the second element of the square root function */ + double second = Math.pow(vector2.getY() - vector1.getY(), 2); + + /* calculate the square root */ + return Math.sqrt(first + second); + } + + /** + * Perform a linear interpolation calculation. + * + * @param y2 + * the upper bound + * @param y1 + * the lower bound + * @param deltaX + * the delta x value + * @param x1 + * the given x value + * @return the calculated y value at the position x1 + */ + public static double linearInterpolation(double y2, double y1, double deltaX, double x1) { + return y2 - (y2 - y1) / deltaX * x1; + } + +} diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/RandomHelper.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/RandomHelper.java index c0178e05..58c0a7a4 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/RandomHelper.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/RandomHelper.java @@ -8,6 +8,13 @@ import java.util.ArrayList; import java.util.Random; +/** + * The Class RandomHelper. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class RandomHelper { /** * This method generates a unique random number for a specific list. diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector.java index 32b578c5..760a8b53 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2014 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ @@ -10,9 +10,11 @@ * * @author marc.engelmann * @version 1.0 + * @since 0.6 */ public abstract class Vector implements Comparable { + /** The z value. */ protected int dimensions, xValue, yValue, zValue; /** @@ -195,14 +197,21 @@ public int compareTo(Vector vector) { /** * This method compares two vectors for equality. - * - * @param the - * object being compared to the node - * + * + * @param object + * the object * @return vectors are equal or not */ - public boolean equals(Vector vec) { - return vec != null && dimensions == vec.getNumberOfDimensions() && xValue == vec.getX() && yValue == vec.getY() - && zValue == vec.getZ(); + @Override + public boolean equals(Object object) { + + if (!(object instanceof Vector)) { + return super.equals(object); + } else { + + Vector vec = (Vector) object; + return vec != null && dimensions == vec.getNumberOfDimensions() && xValue == vec.getX() + && yValue == vec.getY() && zValue == vec.getZ(); + } } } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector2D.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector2D.java index c73e3712..2d90f761 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector2D.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector2D.java @@ -6,21 +6,48 @@ package net.bhl.cdt.paxelerate.util.math; /** - * This class is a 2 dimensional subclass of the Vector - * - * @author marc.engelmann + * This class is a 2 dimensional subclass of the Vector. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class Vector2D extends Vector { + /** + * Instantiates a new vector2 d. + * + * @param x + * the x + * @param y + * the y + */ public Vector2D(int x, int y) { super(x, y); } + /** + * Instantiates a new vector2 d. + * + * @param x + * the x + * @param y + * the y + */ public Vector2D(double x, double y) { super(x, y); } + /** + * Instantiates a new vector2 d. + * + * @param x + * the x + * @param y + * the y + * @param scaling + * the scaling + */ public Vector2D(double x, double y, int scaling) { super(x, y, scaling); } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector3D.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector3D.java index 19eab953..6b29d138 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector3D.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/math/Vector3D.java @@ -6,13 +6,24 @@ package net.bhl.cdt.paxelerate.util.math; /** - * This class is a 3 dimensional subclass of the Vector - * - * @author marc.engelmann + * This class is a 3 dimensional subclass of the Vector. * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class Vector3D extends Vector { + /** + * Instantiates a new vector3 d. + * + * @param x + * the x + * @param y + * the y + * @param z + * the z + */ public Vector3D(int x, int y, int z) { super(x, y, z); } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/output/ExcelExport.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/output/ExcelExport.java new file mode 100644 index 00000000..44a78e7b --- /dev/null +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/output/ExcelExport.java @@ -0,0 +1,136 @@ +/** Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +package net.bhl.cdt.paxelerate.util.output; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; + +import net.bhl.cdt.paxelerate.util.toOpenCDT.Log; + +/** + * This command exports data from the EMF meta-model. + * + * @author michael.schmidt + * @version 1.0 + * @since 0.7 + */ + +public class ExcelExport { + + /** The writer. */ + private FileWriter writer; + + /** The file name. */ + private String fileName; + + /** The file path. */ + private Object filePath; + + /** + * Instantiates a new excel export. + * + * @param fileName + * the file name + * @param filePath + * the file path + */ + public ExcelExport(String fileName, String filePath) { + this.fileName = fileName; + this.filePath = filePath; + } + + /** + * Creates the export file. + * + * @return true, if successful + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void createFile() throws IOException, FileNotFoundException { + Log.add(this, "Start data export..."); + + File dir = new File(fileName); + dir.mkdir(); + this.writer = new FileWriter(filePath + fileName + ".xls", true); + } + + /** + * Close export file. + * + * @return true, if successful + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void closeFile() throws IOException, FileNotFoundException { + this.writer.flush(); + this.writer.close(); + + Log.add(this, "...data export complete."); + } + + /** + * Adds the column element. + * + * @param parStringValue + * the par string value + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void addColumnElement(String parStringValue) throws IOException, FileNotFoundException { + this.writer.append("" + parStringValue); + this.writer.append("\t"); + } + + /** + * Adds the column element. + * + * @param parIntValue + * the par int value + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void addColumnElement(int parIntValue) throws IOException, FileNotFoundException { + this.writer.append("" + parIntValue); + this.writer.append("\t"); + } + + /** + * Adds the column element. + * + * @param parDoubleValue + * the par double value + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void addColumnElement(double parDoubleValue) throws IOException, FileNotFoundException { + writer.append("" + parDoubleValue); + writer.append("\t"); + } + + /** + * Adds the new line. + * + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws FileNotFoundException + * the file not found exception + */ + public void addNewLine() throws IOException, FileNotFoundException { + this.writer.append("\n"); + } + +} \ No newline at end of file diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/string/StringHelper.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/string/StringHelper.java index d7b80c30..c8f65466 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/string/StringHelper.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/string/StringHelper.java @@ -1,20 +1,21 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - package net.bhl.cdt.paxelerate.util.string; /** - * - * @author marc.engelmann, raoul.rothfeld + * The Class StringHelper. * + * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public class StringHelper { /** - * Protect constructor since it is a static only class + * Protect constructor since it is a static only class. */ protected StringHelper() { } @@ -32,16 +33,19 @@ public static String splitCamelCase(String s) { } /** + * Checks if is integer. + * + * @param str + * the str + * @return true, if is integer * @see * Stackoverflow question on faster options to Integer.parseInt() - * @param str - * @return */ public static boolean isInteger(String str) { if (str.isEmpty()) return false; - + int length = str.length(), i = 0; if (str.charAt(0) == '-') { if (length == 1) { @@ -52,8 +56,8 @@ public static boolean isInteger(String str) { for (; i < length; i++) { char c = str.charAt(i); if (c < '0' || c > '9') { - if(c != '-') { - return false; + if (c != '-') { + return false; } } } @@ -61,11 +65,14 @@ public static boolean isInteger(String str) { } /** + * Checks if is positive integer. + * + * @param str + * the str + * @return true, if is positive integer * @see * Stackoverflow question on faster options to Integer.parseInt() - * @param str - * @return */ public static boolean isPositiveInteger(String str) { if (str.isEmpty()) diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/StopWatch.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/StopWatch.java index c739bc77..3e80a502 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/StopWatch.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/StopWatch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2014 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ @@ -9,10 +9,16 @@ * This class represents a stop watch. * * @author marc.engelmann + * @version 1.0 + * @since 0.5 */ public class StopWatch { + + /** The stop time. */ private long startTime, stopTime; + + /** The running. */ private boolean running; /** @@ -24,6 +30,9 @@ public StopWatch() { running = false; } + /** + * Reset. + */ public void reset() { startTime = 0; stopTime = 0; @@ -62,8 +71,9 @@ public long getElapsedTime() { } /** - * TODO - * @return + * This method returns the elapsed time in seconds. + * + * @return the elapsed time in seconds */ public double getElapsedTimeTens() { return getElapsedTime() / 1000.0; @@ -77,9 +87,9 @@ public double getElapsedTimeTens() { public long getElapsedTimeSecs() { long elapsed; if (running) { - elapsed = (int) ((System.currentTimeMillis() - startTime) / 1000); + elapsed = (System.currentTimeMillis() - startTime) / 1000; } else { - elapsed = (int) ((stopTime - startTime) / 1000); + elapsed = (stopTime - startTime) / 1000; } return elapsed; } diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/TimeHelper.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/TimeHelper.java index e3471559..ffcc0c27 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/TimeHelper.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/time/TimeHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -11,15 +11,17 @@ import java.util.Date; /** - * Supports formatting various time amounts into HH:mm:ss format - * + * Supports formatting various time amounts into HH:mm:ss format. + * * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public class TimeHelper { /** - * Formats time amount in seconds into HH:mm:ss format - * + * Formats time amount in seconds into HH:mm:ss format. + * * @param seconds * the number of seconds to be formatted * @return the converted HH:mm:ss String @@ -29,19 +31,23 @@ public static String toTimeOfDay(int seconds) { } /** - * Formats time amount in seconds into HH:mm:ss format - * + * Formats time amount in seconds into HH:mm:ss format. + * * @param seconds * the number of seconds to be formatted * @return the converted HH:mm:ss String */ public static String toTimeOfDay(double seconds) { - return TimeHelper.toTimeOfDay(Math.round(seconds)); + if (seconds >= 0 && seconds <= 86399) { + return TimeHelper.toTimeOfDay(Math.round(seconds)); + } else { + return "ERROR IN TimeHelper.java"; + } } /** - * Formats time amount in seconds into HH:mm:ss format - * + * Formats time amount in seconds into HH:mm:ss format. + * * @param seconds * the number of seconds to be formatted * @return the converted HH:mm:ss String @@ -51,8 +57,8 @@ public static String toTimeOfDay(long seconds) { } /** - * Delivers the current time in HH:mm:ss format - * + * Delivers the current time in HH:mm:ss format. + * * @return the current time as HH:mm:ss String */ public static String getCurrentTimeOfDay() { diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Log.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Log.java index e34c04f1..02a25ded 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Log.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Log.java @@ -1,9 +1,8 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ - package net.bhl.cdt.paxelerate.util.toOpenCDT; import org.eclipse.core.runtime.ILog; @@ -13,24 +12,25 @@ import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; + /** * Class to simplify logging program events * - * TODO michael.shamiyeh, shift to OpenCDT - * * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public final class Log { /** - * Enforce static use + * Enforce static use. */ private Log() { } /** - * Adds a log entry to the overall program log - * + * Adds a log entry to the overall program log. + * * @param obj * the object from which the log event is called * @param logEntry @@ -41,8 +41,8 @@ public static void add(Object obj, String logEntry) { } /** - * Adds a log entry to the overall program log - * + * Adds a log entry to the overall program log. + * * @param bundle * the bundle from which a log event is called * @param logEntry @@ -53,10 +53,11 @@ public static void add(Bundle bundle, String logEntry) { } /** - * Adds a log entry to the overall program log - * + * Adds a log entry to the overall program log. + * * @param bundleName - * the name of the superior bundle from which a log event is called + * the name of the superior bundle from which a log event is + * called * @param logEntry * the message to be recorded in the log */ diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/OS.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/OS.java index 1d52a7a8..99e13982 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/OS.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/OS.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -9,34 +9,46 @@ /** * Identification class for host's operating system. * - * TODO michael.shamiyeh, shift to OpenCDT - * * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public final class OS { /** - * OS type categorization + * OS type categorization. + * * @author raoul.rothfeld */ public enum OSType { - Windows, MacOS, Linux, Solaris, Other + + /** The Windows. */ + Windows, + /** The Mac os. */ + MacOS, + /** The Linux. */ + Linux, + /** The Solaris. */ + Solaris, + /** The Other. */ + Other } - - /** - * Set class constructor to private to enforce singleton use - */ - private OS() {} /** - * Instance variable storing the active OS type enumerator + * Set class constructor to private to enforce singleton use. */ + private OS() { + } + + /** Instance variable storing the active OS type enumerator. */ private static OSType activeOS; /** - * Private population of the OS type instance variable to one-time OS retrieval from host system - * @return active OS type enumerator + * Private population of the OS type instance variable to one-time OS + * retrieval from host system. + * * @author marc.engelmann, raoul.rothfeld + * @return active OS type enumerator */ private static OSType getActiveOS() { if (activeOS == null) { @@ -57,7 +69,8 @@ private static OSType getActiveOS() { } /** - * Retrieve active OS type + * Retrieve active OS type. + * * @return active OS type enumerator */ public static OSType getOSType() { @@ -65,7 +78,8 @@ public static OSType getOSType() { } /** - * Test if OS type is Windows + * Test if OS type is Windows. + * * @return whether OS type is Windows */ public static boolean isWindows() { @@ -73,7 +87,8 @@ public static boolean isWindows() { } /** - * Test if OS type is MacOS + * Test if OS type is MacOS. + * * @return whether OS type is MacOS */ public static boolean isMac() { @@ -81,7 +96,8 @@ public static boolean isMac() { } /** - * Test if OS type is Linux + * Test if OS type is Linux. + * * @return whether OS type is Linux */ public static boolean isUnix() { @@ -89,7 +105,8 @@ public static boolean isUnix() { } /** - * Test if OS type is Solaris + * Test if OS type is Solaris. + * * @return whether OS type is Solaris */ public static boolean isSolaris() { diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/ProgressHandler.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/ProgressHandler.java index 4ea413ba..64e18df0 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/ProgressHandler.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/ProgressHandler.java @@ -16,19 +16,48 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; +/** + * The Class ProgressHandler. + * + * @author marc.engelmann + * @version 1.0 + * @since 0.5 + */ public class ProgressHandler { + /** The display. */ private Display display; + + /** The shell. */ private Shell shell; + + /** The indicator. */ private ProgressIndicator indicator; + + /** The current. */ private int current; + + /** The label. */ private Label label; + /** + * Report progress. + * + * @param value + * the value + */ public void reportProgress(int value) { indicator.worked(result(value)); spin(display); } + /** + * Result. + * + * @param value + * the value + * @return the int + */ private int result(int value) { int difference = Math.abs(current - value); @@ -38,15 +67,30 @@ private int result(int value) { return difference; } + /** + * Done. + */ public void done() { indicator.done(); display.dispose(); } + /** + * Update text. + * + * @param text + * the text + */ public void updateText(String text) { label.setText(text); } + /** + * Instantiates a new progress handler. + * + * @param max + * the max + */ public ProgressHandler(int max) { current = 0; @@ -65,16 +109,22 @@ public ProgressHandler(int max) { label.setText("The boarding paths for the passengers are being calculated ..."); shell.open(); - + Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) ((dimension.getWidth() - shell.getSize().x) / 2); int y = (int) ((dimension.getHeight() - shell.getSize().y) / 2); shell.setLocation(x, y); - + indicator.beginTask(max); indicator.showNormal(); } + /** + * Spin. + * + * @param display + * the display + */ private static void spin(Display display) { long endTime = System.currentTimeMillis() + 10; while (System.currentTimeMillis() < endTime) diff --git a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Screen.java b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Screen.java index 1dd59e0d..2ddca842 100644 --- a/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Screen.java +++ b/net.bhl.cdt.paxelerate.util/src/net/bhl/cdt/paxelerate/util/toOpenCDT/Screen.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying + * Copyright (c) 2014-2016 Bauhaus Luftfahrt e.V.. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ @@ -7,32 +7,36 @@ package net.bhl.cdt.paxelerate.util.toOpenCDT; /** - * - * @author marc.engelmann, raoul.rothfeld + * The Class Screen. * + * @author marc.engelmann, raoul.rothfeld + * @version 1.0 + * @since 0.5 */ public class Screen { - + /** - * Protect constructor since it is a static only class + * Protect constructor since it is a static only class. */ protected Screen() { } /** - * - * @return + * Gets the width. + * + * @return the width */ public static int getWidth() { return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().width; } /** - * - * @return + * Gets the height. + * + * @return the height */ public static int getHeight() { return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().height; } - + } diff --git a/templates/Cabin_A320-200.xmi b/templates/Cabin_A320-200.xmi deleted file mode 100644 index 9da32d54..00000000 --- a/templates/Cabin_A320-200.xmi +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/Cabin_A320-200_v0.6.xmi b/templates/Cabin_A320-200_v0.6.xmi deleted file mode 100644 index 715d6617..00000000 --- a/templates/Cabin_A320-200_v0.6.xmi +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/Cabin_A320-200_v0.7.xmi b/templates/Cabin_A320-200_v0.7.xmi new file mode 100644 index 00000000..d3c96431 --- /dev/null +++ b/templates/Cabin_A320-200_v0.7.xmi @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/TestCabin_v0.6.xmi b/templates/TestCabin_v0.6.xmi deleted file mode 100644 index baec129c..00000000 --- a/templates/TestCabin_v0.6.xmi +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -