1. 04 Apr, 2019 1 commit
  2. 02 Apr, 2019 1 commit
    • Stefan Schuhbaeck's avatar
      Rework MigraionAssistant · d2b3758a
      Stefan Schuhbaeck authored
        +-- IncidentMigrationAssistant (Deprecated)
        +-- JsonMigrationAssistant
            +--using JsonTransformation Interface
      The JsonTransformation interface is implemented by in two
      different ways:
        |              implements JsonTransformation, JsonNodeExplorer
        +-- JoltTransformation --> relying on Jolt [1]
        +-- SimpleJsonTransformation --> relying on Jackson JsonNode
      The JsonTransformation interface provides a three step process
      of to transform a given scenario File were each consumes a JsonNode
      and returns the changed JsonNode.
      1) preHooks
      2) transformation
      3) postHooks
      The MigrationAssistant selects the correct implementation by
      using the JsonTransformationFactory which map a given Version
      to the corresponding implementation of some JsonTransformation.
      1. Subclass either JoltTransformation or SimpeJsonTransformation.
        (a) If JoltTransformation is used, a specialized transformation syntax
            must be used. See [1] for Doc.
        (b) If SimpleJsonTransformation is used no additional input is needed.
             The transformation is done by manually manipulating the Jackson
      2. add annotation where X.X resembles the Version label i.e. "0.8"
         @MigrationTransformation(targetVersionLabel = "X.X")
      3. add the default constructor with no arguments and the
         call super constructor passing the Version
      4. Implement initDefaultHooks() and add the pre- and postHook
         LinkedList with JsonTransformationHooks
         (a) use add[Post|Pre][First|Last] methods.
         (b) add addPostHookLast(AbstractJsonTransformation::sort) to ensure
             the right sorting order within the scenario file.
      5. (optional) overwrite any of applyPreHooks, applyTransformation,
         applyPostHooks if needed.
      6. (optional) add generic JsonNode manipulations to JsonNodeExplorer
      This interface contains useful default implementation to navigate a
      JsonNode-Tree such as:
      path(jsonNode, "some/path/within/the/json") <-- will return empty nodes
                                                  with path das not exist
      pathMustExist(jsonNode, "some/path/within/the/json") <-- will throw
      renameField(node, "release", "version")  <-- rename keys
      iteratorProcessorsByType(jsonRoot, "org...PedestrianVelocityProcessor )
        <-- returns an iterator of JsonNodes representing a
      [1]: https://github.com/bazaarvoice/joltSigned-off-by: hm-schuhba1's avatarhm-schuhba1 <stefan.schuhbaeck@hm.edu>
  3. 25 Jan, 2019 1 commit
  4. 18 Jan, 2019 1 commit
  5. 21 Dec, 2018 1 commit
  6. 20 Dec, 2018 1 commit
  7. 05 Oct, 2018 1 commit
  8. 21 Sep, 2018 1 commit
  9. 06 Sep, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      add new test for version v0.6 · cf8ef64d
      Stefan Schuhbaeck authored
      Changes for v0.6:
      * remove PedestrianOverlapDistProcessor and add functionality in
      * show overlap distance in PedestrianOverlapProcessor as a positive
      * refactor NumberOverlapsProcessor to use PedestrianOverlapProcessor
        as dependency
      * refactor MaxOverlapProcessor to use PedestrianOverlapProcessor
        as dependency
      JsonTransform Tests:
      To test transformation and manipulate Jackson's JsonNode representation
      four new Interface are included.
      * JsonNodeExplorer: Methods to travers, delete and add JsonNodes in an
        existing Json representation. Many methods will throw Exceptions if
        a path does not exist or the operation does not work. Included are
        helpers for eays path traversal (i.e. path(root, "path/to/node"))
      * TestJsonNodeExplorer: This extends the JsonNodeExplorer and overwrites
        all Methods with exceptions and insted inclueds Assertions and
        Junit test to indicate an error. Thus for example the method
        pathMustExist contains an assertion test that the path exists. This
        can be used in UnitTest as assertions.
      * TestJsonNodeHelper: Create JsonNode tree from text files
      * TestResourceHandler: Allows to load file based resources for test
        and will create backups of test files so the test enviroment can be
        resotred if a test fails. This helps in the development process.
  10. 05 Sep, 2018 1 commit
  11. 23 Aug, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      New scenario.json Version (0.5), test utils, simulation result · 6f8badd0
      Stefan Schuhbaeck authored
      New Features:
      * Graphical simulation result is displayed in a table view to show
        run-time and overlap information if the corresponding processors
        are loaded. The Simulation result dialog can be deactivated in
        the preferences.
      * PedestrianOverlapProcessor returns two values "distance", "overlaps"
        for each overlap detected. If no overlap occurs the output is empty.
        "distance": The distance between the center of the two pedestrians
        "overlaps": The amount the two pedestrian overlap
      * New version for scenario.json (0.5):
        - remove scenario/attributesSimulation/needsBoundary as it is not
        used anymore.
        - remove attributes from processor PedestrianOverlapProcessor because
        the radius of a pedestrian can be retrieved from the topography at
        run-time. This would allow to detect overlaps of different sized
        pedestrian in the future.
      * Helper interfaces for testing:
        - The TestResourceHandler interface groups all methods
        needed to retrieve backup and reset test resources between single test
        runs. All methods, except getTestDir() have default implementation
        which rely rely on relative paths on getTestDir().
        - The JsonNodeTest interface groups all methods needed to travers or
        search the Jackson JsonNode data structures. In contains methos for
        path finding and will fail the test if a path does not exist.
      * Added Test for PedestrianOverlapProcessor to check if a overlap
        of (2*r - 0.001) will always be treated as an overlap. Additional
        test are  created to ensure (2*r + 0.001) with r:= pedestrian radius,
        will never create an overlap. Only between
        [2*r - 0.001 , 2*r + 0.001] different placements of pedestrian can
        produce overlaps. Example: --,  /(45 degree) , |  represent the
        distance (2*r)
        	Case A:		Case B: 	Case: C
      	   O--O		  O 		  O
      	   			  |			   \
      	   			  O             O
        In the Case A and B no overlap is detected. In Case C an overlap
        is detected, because of rounding errors when calculating the
        distance \.
        This does not occure if the overlap is bigger than 0.001. Then in all
        three case a overlap is detected. If the distance between two
        pedestrian is 0.001 bigger than 2*r in none of the above cases an
        overlap is detected.
  12. 22 Aug, 2018 2 commits
  13. 10 Aug, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      json v0.4: add fixedSeed and simulationSeed to AttributesSimulation · 82ba9393
      Stefan Schuhbaeck authored
      * add new seed handling: By default new scenario files will be created
        with a random seed, which is written in the attribute fixedSeed.
        If the Boolean switch useFixedSeed  is set, this defined seed will
        be used within one simulation. At the start of each simulation this
        seed, or if useFixedSeed is false a newly generated one, will be used
        and persisted in the attribute simulationSeed. All generated data
        of this simulation will be written to the defined output directory
        with a copy of the current scenario file. All data generated in this
        simulation run can be reproduced with specified simulationSeed.
      * new features for VaderConsole(migrate): The migrate subcommand will
        now accept a list of files or Directories (or a mix of them) to
        perform a migration or a revert. If a path is specified the
        default behavior will only migrate the selected directory without
        traversing to the directory tree. If the --recursive or -r flag is
        set, the hole sub tree of all given directories will be converted.
        Directories or directory trees will be ignored if the directory
        contains one of the following marker files:
      * remove hard coded sc  enario files encoded as strings to allow
        testResource migration with the VadereConsole
      * ignore scenario.legacy files within testResources
      * add test for MigrationAssistant v0.3 to v0.4
  14. 08 Aug, 2018 1 commit
  15. 03 Aug, 2018 2 commits
    • Stefan Schuhbaeck's avatar
      move migration logic back to MigrationAssistant, add MigrationUtil · 8375f258
      Stefan Schuhbaeck authored
      Features (MigrationUtil):
      * create new Transformation and Identity files: This will use the
      current identity    Transformation as starting point for the new
      version. The new version string is automatically included in the new
      files. The files will be created based   on the defined naming
      convention and saved in VadereSimulator/resources
      * automate scenario migration without gui: The MigrationUtil will
      migrate   all scenario files within the specified directory and all
      child directories.
      To exclude specific sub-trees or only specific
      directories the igonoreDirs List can be expanded.
        To exclude sub-trees or specific directories without code change add
        one of the following marker-files to the directory.
        * DO_NOT_MIGRATE or .DO_NOT_MIGRATE: Ignore current directory but
          continue with existing child directories.
        * DO_NOT_MIGRATE_TREE or .DO_NOT_MIGRATE_TREE: Ignore the directories
          and the complete sub-tree.
        Use the marker files from the Tools directory. These files have a
        comment to explain for what they are used for.
        The content of the file is not used, only the file name is needed.
        These files must be added to the git cache to work.
       * automate migration revert: This will use the revert function of the
         MigrationAssistant to revert a migration if the <file-name>.legacy
         files still exist. For this to work the legacy file must be in the
         same directory as the scenario-file
    • Stefan Schuhbaeck's avatar
      add migration revert option to console, move migration logic from console code · bbe6bc97
      Stefan Schuhbaeck authored
      * add helper methods to crate backup files with suffix
      * add migration revert function to MigrationAssistant
      * move migration logic from VadereConsole back to MigrationAssistant
      * add Test for MigrationSubCommand
  16. 02 Aug, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      increase scenario file version to v0.3 · 76b46929
      Stefan Schuhbaeck authored
      * move groupSizeDistribution from AttributesCGM to AttributesSources
      * rename standardDerivation to standardDeviation in AttributesTimeCost
      * update all existing scenario files to version v0.3
  17. 27 Jul, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      refactor JoltTransformations to seperate classes. · 89572e48
      Stefan Schuhbaeck authored
      Each JoltTransformation is create as a Singletone from the abstract
      JoltTransformation class. These classes manage the transformation and
      postHook processing if needed. All resource files were renamend to
      automatically build resources names based on the current version alone.
  18. 25 Jul, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      add JoltTransformation class to allow postTransformation hooks. · 238b68b1
      Stefan Schuhbaeck authored
      This addition is needed because not all transformation can be done
      with the Jolt Transformation. Each implementation of JoltTransformation
      has a list of PostTransformHooks which will be executed in order on
      the JsonNode representation _after_ the Jolt transformation is done.
      This allows context specific transformation. If needed a postHook will
      be added in the future.
  19. 20 Jul, 2018 1 commit
  20. 26 Jan, 2018 1 commit
    • Stefan Schuhbaeck's avatar
      Create ProjectOutput to hold simulated data to reduce io · bb976657
      Stefan Schuhbaeck authored
      ProjectOutput holds a map of SimulationOutputs which were marked as
      valid. Only the scenario file is kept in memory. The trajectory file
      is only loaded once to see if it is valid but is not kept in memory.
      SimulationOutputs can be marked as dirty. If so they will not be listed
      and will be reloaded or removed with the next cleanup is done.
  21. 25 Jan, 2018 1 commit
  22. 11 Jan, 2018 1 commit
  23. 24 Sep, 2016 3 commits
  24. 22 Sep, 2016 1 commit
  25. 19 Sep, 2016 1 commit
  26. 06 Sep, 2016 1 commit
  27. 12 Aug, 2016 1 commit
  28. 11 Aug, 2016 1 commit