diff --git a/NOTICE.md b/NOTICE.md index be759cb0cc337e438b1ea7af6c34364d1f531bbb..76b5c651ca35c8a1117a9d9565146732a286e3dc 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -90,6 +90,9 @@ pthread OpenSCENARIO API (Parser) * License: Apache-2.0 +openpass/stochastics-libarary + * License: EPL 2.0 + ## Cryptography Content may contain encryption software. The country in which you are currently diff --git a/README.md b/README.md index 10e0b17dab4a4129338dd7c34c39ae18359df831..1100ed55091995a8268e6e77084244a0a3f26107 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ Converts `NET_ASAM_OPENSCENARIO::v1_3::ITransitionDynamics` object type to [mant | [Units](https://github.com/nholthaus/units) | b04d436 | 2.3.3 | MIT License | | [googletest](https://github.com/google/googletest) | f8d7d77 | 1.14.0 | BSD-3-Clause License | | [CPM](https://github.com/cpm-cmake/CPM.cmake) | 03705fc | 0.36.0 | MIT License | +| [openpass/stochastics-library](https://gitlab.eclipse.org/eclipse/openpass/stochastics-library) | 6c9dde71 | 0.11.0 | EPL 2.0 | # Issues diff --git a/doc/architecture.md b/doc/architecture.md index 60dc6ef9319096378df17d3db1b4b5f93940a871..a6d60646099c459b8d26321e5e392c0587915445 100644 --- a/doc/architecture.md +++ b/doc/architecture.md @@ -17,16 +17,13 @@ Figure 1 shows, how the engine is orchestrated: For **reading** and **validation** of an OpenSCENARIO description, the engine uses the [**OpenScenarioLib**](https://github.com/RA-Consulting-GmbH/openscenario.api.test/), publicly hosted by [RA-Consulting GmbH](https://www.rac.de/). The library interfaces over the **OpenScenario API** and is available for all current OpenSCENARIO 1.X standards. -For interfacing against an environment simulator (e.g. [openPASS::opSimulation](https://gitlab.eclipse.org/eclipse/openpass/opSimulation)), the engine uses the scenario agnostic interface definition [openPASS::MantleAPI](https://gitlab.eclipse.org/eclipse/openpass/mantle-api). +Aside of this, the engine uses several other openPASS APIs and libraries: +- [openPASS::MantleAPI](https://gitlab.eclipse.org/eclipse/openpass/mantle-api): The scenario agnostic interface definition is used to interface against the actual environment simulator, such as [openPASS::opSimulation](https://gitlab.eclipse.org/eclipse/openpass/opSimulation). In one direction, the engine implements `mantle_api::IScenarioEngine`, which allows to control the execution (e.g. `Init()` or `Step()`). -In the other direction it needs access to the `mantle_api::IEnvironment` (e.g. to setup and control entities), which needs to be implemented by the environment simulator. - -As the **MantleAPI** relies on the [nholthaus/units](https://github.com/nholthaus/units) library for physically correct representation of its properties, this dependency is also injected and used by the OpenScenarioEngine. - -The heart of the engine is a behavior tree, based on the openPASS project [openPASS::yase](https://gitlab.eclipse.org/eclipse/openpass/yase). - Its responsibility is to handle **the interaction between** conditions and actions interact according to the standard, i.e. what should be triggered when. - -The actual actions and conditions reside in the leaves of the tree. +In the other direction it needs access to the `mantle_api::IEnvironment` (e.g. to setup and control entities), implemented by the environment simulator. + > As the **MantleAPI** relies on the [nholthaus/units](https://github.com/nholthaus/units) library for physically correct representation of its properties, this dependency is also injected and used by the OpenScenarioEngine. +- [openPASS::stochastics-library](https://gitlab.eclipse.org/eclipse/openpass/stochastics-library): Responsible for generation and management of random numbers. +- [openPASS::yase](https://gitlab.eclipse.org/eclipse/openpass/yase): An agnostic behavior tree library, used to represent the interaction between conditions and actions according to the OpenScenario standard. As such it defines and controls what should be triggered when and allows to model the actions and conditions as independent leaves within the tree. The following shows an (beautified) excerpt of the such an actual behavior tree, taken from the demo example: ``` diff --git a/doc/figures/dependencies.png b/doc/figures/dependencies.png index 354edd70dd4cbb1bf40526c3f1ff3b875acd2ce8..3463e965bc1fcad03f7d23f644906da4d4af000c 100644 Binary files a/doc/figures/dependencies.png and b/doc/figures/dependencies.png differ diff --git a/doc/figures/raw/ose.drawio b/doc/figures/raw/ose.drawio index a287e35a3070dcc2401817055120792b574c1f82..4a5fde97137f05519968a51a315d6e858e870877 100644 --- a/doc/figures/raw/ose.drawio +++ b/doc/figures/raw/ose.drawio @@ -1,6 +1,6 @@ <mxfile host="65bd71144e" pages="5"> <diagram id="qdG8iX79VHu7KITj_ZMQ" name="Dependencies"> - <mxGraphModel dx="1094" dy="667" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> + <mxGraphModel dx="698" dy="537" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> <root> <mxCell id="0"/> <mxCell id="1" parent="0"/> @@ -26,7 +26,7 @@ </mxCell> </UserObject> <UserObject label="OpenScenarioEngine" link="https://gitlab.eclipse.org/eclipse/openpass/openscenario1_engine" id="YvpkXVZpcQ3CE4Kt-1fF-4"> - <mxCell style="html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;rounded=0;verticalAlign=middle;fontSize=16;align=center;" parent="1" vertex="1"> + <mxCell style="html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;rounded=0;verticalAlign=middle;fontSize=16;align=center;points=[[0,0,0,0,0],[0,0.24,0,0,0],[0,0.5,0,0,0],[0,0.76,0,0,0],[0,1,0,0,0],[0.25,0,0,0,0],[0.25,1,0,0,0],[0.5,0,0,0,0],[0.5,1,0,0,0],[0.6,0,0,0,0],[0.75,1,0,0,0],[0.91,0,0,0,0],[1,0,0,0,0],[1,0.26,0,0,0],[1,0.5,0,0,0],[1,0.76,0,0,0],[1,1,0,0,0]];" parent="1" vertex="1"> <mxGeometry x="40" y="420" width="530" height="90" as="geometry"/> </mxCell> </UserObject> @@ -65,7 +65,7 @@ </mxCell> <UserObject label="yase" link="https://gitlab.eclipse.org/eclipse/openpass/yase" id="YvpkXVZpcQ3CE4Kt-1fF-17"> <mxCell style="html=1;fillColor=#008a00;rounded=0;fontColor=#ffffff;strokeColor=#005700;" parent="1" vertex="1"> - <mxGeometry x="382" y="334" width="110" height="50" as="geometry"/> + <mxGeometry x="364" y="334" width="100" height="50" as="geometry"/> </mxCell> </UserObject> <mxCell id="YvpkXVZpcQ3CE4Kt-1fF-19" value="ANTLR" style="html=1;rounded=0;" parent="1" vertex="1"> @@ -114,10 +114,10 @@ <mxGeometry x="41" y="550" width="180" height="50" as="geometry"/> </mxCell> </UserObject> - <mxCell id="xhKkH3lc2efCmdcfyuGa-1" value="Use" style="endArrow=open;endSize=12;dashed=1;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.75;exitY=0;exitDx=0;exitDy=0;" parent="1" source="YvpkXVZpcQ3CE4Kt-1fF-4" target="YvpkXVZpcQ3CE4Kt-1fF-17" edge="1"> + <mxCell id="xhKkH3lc2efCmdcfyuGa-1" value="Use" style="endArrow=open;endSize=12;dashed=1;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.706;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="YvpkXVZpcQ3CE4Kt-1fF-4" target="YvpkXVZpcQ3CE4Kt-1fF-17" edge="1"> <mxGeometry x="-0.0066" y="-2" width="160" relative="1" as="geometry"> - <mxPoint x="525" y="520" as="sourcePoint"/> - <mxPoint x="525" y="560" as="targetPoint"/> + <mxPoint x="397.5" y="420" as="sourcePoint"/> + <mxPoint x="485" y="560" as="targetPoint"/> <mxPoint as="offset"/> </mxGeometry> </mxCell> @@ -158,6 +158,18 @@ <mxPoint x="514.71" y="600" as="targetPoint"/> </mxGeometry> </mxCell> + <UserObject label="stochastics" link="https://gitlab.eclipse.org/eclipse/openpass/stochastics-lib" id="9"> + <mxCell style="html=1;fillColor=#008a00;rounded=0;fontColor=#ffffff;strokeColor=#005700;" vertex="1" parent="1"> + <mxGeometry x="473" y="334" width="100" height="50" as="geometry"/> + </mxCell> + </UserObject> + <mxCell id="10" value="Use" style="endArrow=open;endSize=12;dashed=1;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.91;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="YvpkXVZpcQ3CE4Kt-1fF-4" target="9"> + <mxGeometry x="-0.0066" y="-2" width="160" relative="1" as="geometry"> + <mxPoint x="670" y="410" as="sourcePoint"/> + <mxPoint x="407" y="394" as="targetPoint"/> + <mxPoint as="offset"/> + </mxGeometry> + </mxCell> </root> </mxGraphModel> </diagram> diff --git a/engine/BUILD.bazel b/engine/BUILD.bazel index 1143206ab9845afaf5d2154ccfc29060b36571d5..598d86cb5376b20f7b4bd84446f6c33f9bd4a024 100644 --- a/engine/BUILD.bazel +++ b/engine/BUILD.bazel @@ -30,6 +30,7 @@ cc_library( deps = [ "@mantle_api", "@open_scenario_parser", + "@stochastics_library", "@units_nhh", "@yase//middle_end/agnostic_behavior_tree", ], diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 3dd9426c5fc3379eedc13121158d6cd263aca5b5..c6a104d68d0171920d14197ed8111aa89f9bfe33 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -42,6 +42,9 @@ CPMAddPackage( # MantleAPI https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api find_package(MantleAPI REQUIRED) + +find_package(Stochastics REQUIRED) + # see https://stackoverflow.com/a/58495612 set(CMAKE_INSTALL_RPATH $ORIGIN) @@ -67,11 +70,12 @@ target_include_directories( $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include> ) -target_link_libraries(${PROJECT_NAME} PUBLIC openscenario_api::shared - antlr4_runtime::shared - Yase::agnostic_behavior_tree - units::units - MantleAPI::MantleAPI) +target_link_libraries(${PROJECT_NAME} PUBLIC openscenario_api::shared + antlr4_runtime::shared + Yase::agnostic_behavior_tree + units::units + MantleAPI::MantleAPI + PRIVATE Stochastics::Stochastics) if(USE_CCACHE) find_program(CCACHE_FOUND ccache) @@ -243,6 +247,7 @@ target_include_directories( target_link_libraries( ${PROJECT_NAME}Test PRIVATE ${PROJECT_NAME} + Stochastics::Stochastics antlr4_runtime::shared GTest::gmock_main pthread diff --git a/engine/bazel/deps.bzl b/engine/bazel/deps.bzl index efc8bf15c5f896262bb7a987943f953de9b60844..299b51c2c45b2402e9977cf4f99a60a8cf7d7023 100644 --- a/engine/bazel/deps.bzl +++ b/engine/bazel/deps.bzl @@ -4,6 +4,7 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") ECLIPSE_GITLAB = "https://gitlab.eclipse.org/eclipse" MANTLE_API_TAG = "v8.0.0" +STOCHASTICS_LIBRARY_TAG = "v0.10.0" UNITS_TAG = "2.3.3" YASE_TAG = "v0.0.1" @@ -17,6 +18,14 @@ def osc_engine_deps(): strip_prefix = "mantle-api-{tag}".format(tag = MANTLE_API_TAG), ) + maybe( + http_archive, + name = "stochastics_library", + url = ECLIPSE_GITLAB + "/openpass/stochastics-library/-/archive/{tag}/stochastics-library-{tag}.tar.gz".format(tag = STOCHASTICS_LIBRARY_TAG), + sha256 = "0b9173d005e433cf9e5ad68d3fe28fdcff5ea1b511118a4a47bb95f225534a6f", + strip_prefix = "stochastics-library-{tag}".format(tag = STOCHASTICS_LIBRARY_TAG), + ) + maybe( http_archive, name = "units_nhh", diff --git a/engine/cmake/generated_files.cmake b/engine/cmake/generated_files.cmake index 0bc2531654fdbedffe8595d8228871962bc9968f..20fd7859982501b6eb18d48fa9707cde883e8ace 100644 --- a/engine/cmake/generated_files.cmake +++ b/engine/cmake/generated_files.cmake @@ -239,7 +239,6 @@ list(APPEND ${PROJECT_NAME}_SOURCES src/Utils/EntityUtils.cpp src/Utils/EventPrioritizer.cpp src/Utils/Logger.cpp - src/Utils/ProbabilityService.cpp src/Utils/TrafficSignalBuilder.cpp ) @@ -606,8 +605,6 @@ list(APPEND ${PROJECT_NAME}_HEADERS src/Utils/EventPriority.h src/Utils/IControllerService.h src/Utils/IEventPrioritizer.h - src/Utils/IProbabilityService.h src/Utils/Logger.h - src/Utils/ProbabilityService.h src/Utils/TrafficSignalBuilder.h ) diff --git a/engine/include/OpenScenarioEngine/OpenScenarioEngine.h b/engine/include/OpenScenarioEngine/OpenScenarioEngine.h index c31735db090d17b0678c7519e255a94b96796ccc..d1d1f201f18297cadd5d9587c7ac8e91077efab4 100644 --- a/engine/include/OpenScenarioEngine/OpenScenarioEngine.h +++ b/engine/include/OpenScenarioEngine/OpenScenarioEngine.h @@ -17,14 +17,16 @@ #include <MantleAPI/Execution/i_scenario_engine.h> #include <openScenarioLib/src/common/SimpleMessageLogger.h> +#include <cstdint> #include <memory> #include <string> +class StochasticsInterface; + namespace OpenScenarioEngine::v1_3 { class ControllerCreator; class EntityCreator; -class IProbabilityService; namespace Node { @@ -49,7 +51,7 @@ public: const std::string& scenario_file_path, std::shared_ptr<mantle_api::IEnvironment> environment, std::shared_ptr<mantle_api::ILogger> logger = nullptr, - unsigned int initial_seed = 0); + std::uint32_t initial_seed = 0); /// Parses and validates the scenario and referenced catalogs. /// @note A map file referenced from the scenario is not parsed. @@ -92,7 +94,7 @@ public: /// Sets a manual random seed, which will be used at initialization /// - /// The given value will be hold until ResetProbabilityService is called + /// The given value will be hold until ResetStochastics is called /// during Inititialization. It has no direct impact on a currently running /// OpenScenarioEngine. Use this method, when you like to control the /// seed manually over consecutive invocations without reloading the scenario @@ -103,10 +105,10 @@ public: /// /// Note that the engine is invoked with a random seed per default, which will /// be incremented in between two initializations unless overridden. - /// @see Init, @see ResetProbabilityService + /// @see Init, @see ResetStochastics /// /// @param seed New random seed - void OverrideRandomSeed(unsigned int seed); + void OverrideRandomSeed(std::uint32_t seed); protected: std::string scenario_file_path_; @@ -143,7 +145,7 @@ private: void ParseScenarioFile(); - /// Instantly sets the random seed of the probability service + /// Instantly sets the random seed of the internal stochatics /// /// - At first call this method will set the random seed to the given /// value during initialization of the OSE. The initial seed will @@ -151,7 +153,7 @@ private: /// /// - If a SetRandomSeed has been called before, the given value will /// be used instead - void ResetProbabilityService(); + void ResetStochastics(); /// Reset all entities and create new according to scenario description void ResetAndCreateEntities(); @@ -177,7 +179,7 @@ private: std::shared_ptr<mantle_api::IEnvironment> environment_; std::shared_ptr<EntityCreator> entity_creator_; std::shared_ptr<ControllerCreator> controller_creator_; - std::shared_ptr<IProbabilityService> probability_service_; + std::shared_ptr<StochasticsInterface> stochastics_; std::shared_ptr<mantle_api::ILogger> logger_{nullptr}; std::shared_ptr<Node::RootNode> root_node_{nullptr}; const mantle_api::ICoordConverter* coordinate_converter_{nullptr}; @@ -186,6 +188,6 @@ private: bool finished_{false}; bool first_run_{true}; - std::optional<unsigned int> random_seed_value_override_{std::nullopt}; + std::optional<std::uint32_t> random_seed_value_override_{std::nullopt}; }; } // namespace OpenScenarioEngine::v1_3 diff --git a/engine/src/Node/RootNode.cpp b/engine/src/Node/RootNode.cpp index 1b8fb8c03a92783745ff6e628993baacedd4bbbb..ae0a474b6eaae26360dcc10ddb1ef71723956bd8 100644 --- a/engine/src/Node/RootNode.cpp +++ b/engine/src/Node/RootNode.cpp @@ -19,12 +19,12 @@ namespace OpenScenarioEngine::v1_3::Node RootNode::RootNode(std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::IScenarioDefinition> scenarioDefinition, std::shared_ptr<mantle_api::IEnvironment> environment, std::shared_ptr<IControllerService> controller_service, - std::shared_ptr<IProbabilityService> probability_service, + std::shared_ptr<StochasticsInterface> stochastics, std::shared_ptr<EngineAbortFlags> engine_abort_flags) : yase::ParallelNode{NAME_NODE_ROOT}, environment_{environment}, controller_service_{controller_service}, - probability_service_{probability_service}, + stochastics_{stochastics}, engine_abort_flags_{engine_abort_flags} { if (auto storyboard = scenarioDefinition->GetStoryboard(); storyboard) @@ -42,7 +42,7 @@ void RootNode::lookupAndRegisterData(yase::Blackboard& blackboard) { blackboard.set("Environment", environment_); blackboard.set("ControllerService", controller_service_); - blackboard.set("ProbabilityService", probability_service_); + blackboard.set("Stochastics", stochastics_); blackboard.set("EngineAbortFlags", engine_abort_flags_); } diff --git a/engine/src/Node/RootNode.h b/engine/src/Node/RootNode.h index e0c36503e9cf3d7b0ebd9b90cfaa8fabd7e8e703..9b4b7e65888ddb63c1dc31f2aae1a1a64267cbb5 100644 --- a/engine/src/Node/RootNode.h +++ b/engine/src/Node/RootNode.h @@ -16,7 +16,7 @@ #include <memory> #include "Utils/EngineAbortFlags.h" -#include "Utils/IProbabilityService.h" +#include "Stochastics/StochasticsInterface.h" namespace OpenScenarioEngine::v1_3 { @@ -35,7 +35,7 @@ public: RootNode(std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::IScenarioDefinition> scenarioDefinition, std::shared_ptr<mantle_api::IEnvironment> environment, std::shared_ptr<IControllerService> controller_service, - std::shared_ptr<IProbabilityService> probability_service, + std::shared_ptr<StochasticsInterface> stochastics, std::shared_ptr<EngineAbortFlags> engine_abort_flags); private: @@ -43,7 +43,7 @@ private: std::shared_ptr<mantle_api::IEnvironment> environment_; std::shared_ptr<IControllerService> controller_service_; - std::shared_ptr<IProbabilityService> probability_service_; + std::shared_ptr<StochasticsInterface> stochastics_; std::shared_ptr<EngineAbortFlags> engine_abort_flags_; }; diff --git a/engine/src/OpenScenarioEngine.cpp b/engine/src/OpenScenarioEngine.cpp index f9dd77515440403fcedec1f9a210a1c79a056ac2..76bd104dbbcfb3e116c90c64e42b95c0062dd992 100644 --- a/engine/src/OpenScenarioEngine.cpp +++ b/engine/src/OpenScenarioEngine.cpp @@ -10,6 +10,8 @@ *******************************************************************************/ #include "OpenScenarioEngine/OpenScenarioEngine.h" +#include <Stochastics/Stochastics.h> +#include <Stochastics/StochasticsInterface.h> #include <agnostic_behavior_tree/behavior_node.h> #include <agnostic_behavior_tree/utils/tree_print.h> #include <openScenarioLib/src/common/ErrorLevel.h> @@ -26,7 +28,6 @@ #include "Utils/EngineAbortFlags.h" #include "Utils/EntityCreator.h" #include "Utils/Logger.h" -#include "Utils/ProbabilityService.h" namespace OpenScenarioEngine::v1_3 { @@ -103,12 +104,13 @@ mantle_api::MapRegionType ExtractMapRegionType(std::shared_ptr<NET_ASAM_OPENSCEN OpenScenarioEngine::OpenScenarioEngine(const std::string& scenario_file_path, std::shared_ptr<mantle_api::IEnvironment> environment, std::shared_ptr<mantle_api::ILogger> logger, - unsigned int initial_seed) + std::uint32_t initial_seed) : scenario_file_path_{scenario_file_path}, environment_{std::move(environment)}, - probability_service_{std::make_shared<ProbabilityService>(initial_seed)} + stochastics_{std::make_shared<Stochastics>()} { Logger::SetLogger(std::move(logger)); + stochastics_->InitGenerator(initial_seed); if (!environment_) { @@ -117,19 +119,18 @@ OpenScenarioEngine::OpenScenarioEngine(const std::string& scenario_file_path, controller_creator_ = std::make_shared<ControllerCreator>(*environment_); } -void OpenScenarioEngine::OverrideRandomSeed(unsigned int random_seed) +void OpenScenarioEngine::OverrideRandomSeed(std::uint32_t random_seed) { random_seed_value_override_ = random_seed; } -void OpenScenarioEngine::ResetProbabilityService() +void OpenScenarioEngine::ResetStochastics() { - // upcast to implementation - auto probability_service = std::dynamic_pointer_cast<ProbabilityService>(probability_service_); + auto stochastics = std::dynamic_pointer_cast<Stochastics>(stochastics_); if (random_seed_value_override_) { - probability_service->SetRandomSeed(random_seed_value_override_.value()); + stochastics->InitGenerator(random_seed_value_override_.value()); } else { @@ -139,7 +140,7 @@ void OpenScenarioEngine::ResetProbabilityService() } else { - probability_service->SetRandomSeed(probability_service->GetRandomSeed() + 1); + stochastics->InitGenerator(stochastics->GetRandomSeed() + 1); } } } @@ -152,7 +153,7 @@ void OpenScenarioEngine::Init() void OpenScenarioEngine::SetupDynamicContent() { - ResetProbabilityService(); + ResetStochastics(); ResetAndCreateEntities(); ResetAndCreateControllers(); ResetAndCreateStoryboard(); @@ -365,7 +366,7 @@ void OpenScenarioEngine::ResetAndCreateStoryboard() scenario_definition_ptr_, environment_, controller_creator_->GetControllerService(), - probability_service_, + stochastics_, engine_abort_flags); } diff --git a/engine/src/Storyboard/GenericAction/TrafficSwarmAction.h b/engine/src/Storyboard/GenericAction/TrafficSwarmAction.h index bcbc46b13ebee8bf3e5717405de125554e35026a..43e88d5dabe3b7ceb3a09be7e189ef7bd11f7cf1 100644 --- a/engine/src/Storyboard/GenericAction/TrafficSwarmAction.h +++ b/engine/src/Storyboard/GenericAction/TrafficSwarmAction.h @@ -45,7 +45,7 @@ private: void lookupAndRegisterData(yase::Blackboard& blackboard) final { auto environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment"); - auto probabilityService = blackboard.get<std::shared_ptr<IProbabilityService>>("ProbabilityService"); + auto stochastics = blackboard.get<std::shared_ptr<StochasticsInterface>>("Stochastics"); impl_ = std::make_unique<OpenScenarioEngine::v1_3::TrafficSwarmAction>( OpenScenarioEngine::v1_3::TrafficSwarmAction::Values{ @@ -68,7 +68,7 @@ private: OpenScenarioEngine::v1_3::TrafficSwarmAction::Interfaces{ environment}, OpenScenarioEngine::v1_3::TrafficSwarmAction::Services{ - probabilityService}); + stochastics}); } std::unique_ptr<OpenScenarioEngine::v1_3::TrafficSwarmAction> impl_{nullptr}; diff --git a/engine/src/Storyboard/GenericAction/TrafficSwarmAction_base.h b/engine/src/Storyboard/GenericAction/TrafficSwarmAction_base.h index aadf874a13fea4404d3385e2b8226a2dee4f75b4..84416a982e817641db4a38e365d08a9023f816f5 100644 --- a/engine/src/Storyboard/GenericAction/TrafficSwarmAction_base.h +++ b/engine/src/Storyboard/GenericAction/TrafficSwarmAction_base.h @@ -12,6 +12,7 @@ #pragma once #include <MantleAPI/Execution/i_environment.h> +#include <Stochastics/StochasticsInterface.h> #include <optional> @@ -19,7 +20,6 @@ #include "Conversion/OscToMantle/ConvertScenarioDirectionOfTravelDistribution.h" #include "Conversion/OscToMantle/ConvertScenarioRange.h" #include "Conversion/OscToMantle/ConvertScenarioTrafficDefinition.h" -#include "Utils/IProbabilityService.h" namespace OpenScenarioEngine::v1_3 { @@ -45,7 +45,7 @@ public: }; struct Services { - std::shared_ptr<IProbabilityService> sampler; + std::shared_ptr<StochasticsInterface> stochastics; }; TrafficSwarmActionBase(Values values, Interfaces interfaces, Services services) diff --git a/engine/src/Storyboard/GenericAction/TrafficSwarmAction_impl.cpp b/engine/src/Storyboard/GenericAction/TrafficSwarmAction_impl.cpp index edfaee97dbd1fc1b1063e6f53b83c802f2d640a9..16deb16a337f49cc38b86a9824d2d0ffee0ee849 100644 --- a/engine/src/Storyboard/GenericAction/TrafficSwarmAction_impl.cpp +++ b/engine/src/Storyboard/GenericAction/TrafficSwarmAction_impl.cpp @@ -94,7 +94,7 @@ void TrafficSwarmAction::ValidateScenarioParameters(const OpenScenarioEngine::v1 mantle_api::VehicleClass TrafficSwarmAction::GetVehicleClassification() { mantle_api::VehicleClass vehicle_class; - auto sampled_value{services_.sampler->SampleRealUniformValue(vehicle_category_distribution_weights_sum_)}; + auto sampled_value{services_.stochastics->GetUniformDistributed(0, vehicle_category_distribution_weights_sum_)}; for (const auto& vehicle_category_distribution_entry : values_.trafficDefinition.vehicle_category_distribution_entries) { @@ -113,7 +113,7 @@ mantle_api::VehicleClass TrafficSwarmAction::GetVehicleClassification() mantle_api::ExternalControllerConfig TrafficSwarmAction::GetControllerConfiguration() { mantle_api::ExternalControllerConfig controller_config; - auto sampled_value{services_.sampler->SampleRealUniformValue(controller_distribution_weights_sum_)}; + auto sampled_value{services_.stochastics->GetUniformDistributed(0, controller_distribution_weights_sum_)}; for (const auto& controller_distribution_entry : values_.trafficDefinition.controller_distribution_entries) { @@ -220,7 +220,7 @@ units::velocity::meters_per_second_t TrafficSwarmAction::GetSpawnedVehicleSpeed( lower_speed_limit = central_entity_speed; } - return units::velocity::meters_per_second_t{services_.sampler->SampleRealUniformValue(upper_speed_limit - lower_speed_limit) + lower_speed_limit}; + return units::velocity::meters_per_second_t{services_.stochastics->GetUniformDistributed(0, upper_speed_limit - lower_speed_limit) + lower_speed_limit}; } void TrafficSwarmAction::SpawnEntities() diff --git a/engine/src/Utils/IProbabilityService.h b/engine/src/Utils/IProbabilityService.h deleted file mode 100644 index 65620cee5b07989c597088c052db09223eec05c2..0000000000000000000000000000000000000000 --- a/engine/src/Utils/IProbabilityService.h +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -#pragma once - -namespace OpenScenarioEngine::v1_3 -{ -/// Provides methods for centralized handling of probability -class IProbabilityService -{ -public: - /// Default destructor - virtual ~IProbabilityService() = default; - - /// Sample from an real uniform distribution - /// - /// @param scale description - /// @returns a value between [0 and scale] - [[nodiscard]] virtual double SampleRealUniformValue(double scale) noexcept = 0; -}; - -} // namespace OpenScenarioEngine::v1_3 \ No newline at end of file diff --git a/engine/src/Utils/ProbabilityService.cpp b/engine/src/Utils/ProbabilityService.cpp deleted file mode 100644 index 62436afd01006de0a705f80889bad8eb6e17147c..0000000000000000000000000000000000000000 --- a/engine/src/Utils/ProbabilityService.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -#include "ProbabilityService.h" - -namespace OpenScenarioEngine::v1_3 -{ -ProbabilityService::ProbabilityService(std::random_device::result_type seed) - : uniform_real_distribution{0.0, 1.0} -{ - SetRandomSeed(seed); -} - -void ProbabilityService::SetRandomSeed(std::random_device::result_type seed) -{ - seed_ = seed; - generator_ = std::mt19937{seed}; -} - -std::random_device::result_type ProbabilityService::GetRandomSeed() const -{ - return seed_; -} - -double ProbabilityService::SampleRealUniformValue(double scale) noexcept -{ - return uniform_real_distribution(generator_) * scale; -} - -} // namespace OpenScenarioEngine::v1_3 diff --git a/engine/src/Utils/ProbabilityService.h b/engine/src/Utils/ProbabilityService.h deleted file mode 100644 index f08c9a4b928ba5dd88b5e01f9671156bc44d9456..0000000000000000000000000000000000000000 --- a/engine/src/Utils/ProbabilityService.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -#pragma once - -#include <random> - -#include "IProbabilityService.h" - -namespace OpenScenarioEngine::v1_3 -{ -class ProbabilityService : public IProbabilityService -{ -public: - explicit ProbabilityService(std::random_device::result_type seed); - - [[nodiscard]] double SampleRealUniformValue(double scale) noexcept override; - - /// Set the random seed and instantiate a new generator - /// @param seed new random seed - void SetRandomSeed(std::random_device::result_type seed); - - /// Get the currently used random seed - /// @return seed - std::random_device::result_type GetRandomSeed() const; - -private: - std::random_device::result_type seed_; - std::mt19937 generator_; - std::uniform_real_distribution<double> uniform_real_distribution; -}; - -} // namespace OpenScenarioEngine::v1_3 \ No newline at end of file diff --git a/engine/tests/Storyboard/GenericAction/TrafficSwarmActionTest.cpp b/engine/tests/Storyboard/GenericAction/TrafficSwarmActionTest.cpp index b6dd5a9eb8b0f77ea38b765b0d3fcf5db873e1c7..5bb2f65308e46936b85790c90cc8588ff31440c7 100644 --- a/engine/tests/Storyboard/GenericAction/TrafficSwarmActionTest.cpp +++ b/engine/tests/Storyboard/GenericAction/TrafficSwarmActionTest.cpp @@ -16,7 +16,7 @@ #include <unordered_map> #include "Storyboard/GenericAction/TrafficSwarmAction_impl.h" -#include "TestUtils/MockProbabilityService.h" +#include "TestUtils/MockStochastics.h" #include "Utils/Ellipse.h" using namespace testing; @@ -68,7 +68,7 @@ protected: ON_CALL(mock_controller_repository, Delete(_)).WillByDefault([this]() { controller_count_--; }); - ON_CALL(*mock_probability_service_, SampleRealUniformValue(_)).WillByDefault(Return(mocked_random_value)); + ON_CALL(*mock_stochastics_, GetUniformDistributed(_, _)).WillByDefault(Return(mocked_random_value)); auto& host{static_cast<mantle_api::MockVehicle&>(mock_entity_repository.GetHost())}; @@ -117,7 +117,7 @@ protected: vehicle_classes.reserve(step_count); controller_configs.reserve(step_count); - OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test_1{parameters_, {mock_environment_}, {mock_probability_service_}}; + OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test_1{parameters_, {mock_environment_}, {mock_stochastics_}}; for (size_t i{0}; i < step_count; ++i) { @@ -142,7 +142,7 @@ protected: std::shared_ptr<mantle_api::MockEnvironment> mock_environment_{std::make_shared<mantle_api::MockEnvironment>()}; mantle_api::MockController mock_controller_; - std::shared_ptr<OpenScenarioEngine::v1_3::MockProbabilityService> mock_probability_service_{std::make_shared<OpenScenarioEngine::v1_3::MockProbabilityService>()}; + std::shared_ptr<OpenScenarioEngine::v1_3::MockStochastics> mock_stochastics_{std::make_shared<OpenScenarioEngine::v1_3::MockStochastics>()}; OpenScenarioEngine::v1_3::TrafficSwarmActionBase::Values parameters_; @@ -193,13 +193,13 @@ TEST_F(TrafficSwarmActionTestFixture, GivenDeprecatedVelocityParameter_WhenActio { parameters_.velocity = std::optional<double>(10.0); - EXPECT_THROW((OpenScenarioEngine::v1_3::TrafficSwarmAction{parameters_, {mock_environment_}, {mock_probability_service_}}), std::runtime_error); + EXPECT_THROW((OpenScenarioEngine::v1_3::TrafficSwarmAction{parameters_, {mock_environment_}, {mock_stochastics_}}), std::runtime_error); } TEST_F(TrafficSwarmActionTestFixture, GivenNoRequestedVehicle_WhenActionIsStepped_ThenNoVehicleAreSpawned) { parameters_.numberOfVehicles = 0; - OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_probability_service_}}; + OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_stochastics_}}; action_under_test.Step(); @@ -212,7 +212,7 @@ TEST_F(TrafficSwarmActionTestFixture, GivenFiveRequestedVehiclesInFrontOfCentral const double lower_speed_range_limit{1.0}; parameters_.numberOfVehicles = 5; parameters_.initialSpeedRange = OpenScenarioEngine::v1_3::Range{lower_speed_range_limit, 10.0}; - OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_probability_service_}}; + OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_stochastics_}}; const auto longitudinal_distance_between_vehicles{(parameters_.semiMajorAxis - parameters_.innerRadius) / parameters_.numberOfVehicles}; @@ -252,7 +252,7 @@ TEST_F(TrafficSwarmActionTestFixture, GivenFiveRequestedVehiclesInFrontOfCentral TEST_F(TrafficSwarmActionTestFixture, GivenOneRequestedVehiclesOutsideOfSpawningArea_WhenActionIsStepped_ThenVehiclesIsDespawned) { parameters_.numberOfVehicles = 1; - OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_probability_service_}}; + OpenScenarioEngine::v1_3::TrafficSwarmAction action_under_test{parameters_, {mock_environment_}, {mock_stochastics_}}; const auto longitudinal_distance_between_vehicles{(parameters_.semiMajorAxis - parameters_.innerRadius) / parameters_.numberOfVehicles}; @@ -303,7 +303,7 @@ TEST_F(TrafficSwarmActionTestFixture, GivenOneRequestedVehiclesOutsideOfSpawning TEST_F(TrafficSwarmActionTestFixture, GivenInnerRadiusBiggerThanSpawningArea_WhenActionIsStepped_ThenExpectThrow) { parameters_.innerRadius = 150.0; - EXPECT_THROW(OpenScenarioEngine::v1_3::TrafficSwarmAction(parameters_, {mock_environment_}, {mock_probability_service_}), std::runtime_error); + EXPECT_THROW(OpenScenarioEngine::v1_3::TrafficSwarmAction(parameters_, {mock_environment_}, {mock_stochastics_}), std::runtime_error); } TEST_F(TrafficSwarmActionTestFixture, DISABLED_GivenTwoActionsWithIdenticalParameters_WhenActionsAreSteppedMultipleTimes_ThenVehicleClassesAndControllerCategoriesAreIdentical) diff --git a/engine/tests/TestUtils/MockProbabilityService.h b/engine/tests/TestUtils/MockProbabilityService.h deleted file mode 100644 index 9a1c56972f7aabd8043e8bf0f208eecb802e7413..0000000000000000000000000000000000000000 --- a/engine/tests/TestUtils/MockProbabilityService.h +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -#pragma once - -#include <gmock/gmock.h> - -#include "Utils/IProbabilityService.h" - -namespace OpenScenarioEngine::v1_3 -{ -class MockProbabilityService : public IProbabilityService -{ -public: - MOCK_METHOD(double, SampleRealUniformValue, (double), (noexcept, override)); - - static inline std::shared_ptr<MockProbabilityService> make_shared() - { - return std::make_shared<MockProbabilityService>(); - } -}; - -} // namespace testing::OpenScenarioEngine::v1_3 \ No newline at end of file diff --git a/engine/tests/TestUtils/MockStochastics.h b/engine/tests/TestUtils/MockStochastics.h new file mode 100644 index 0000000000000000000000000000000000000000..87a4a21e494180e6556e3d5a3fa243658d9fec7b --- /dev/null +++ b/engine/tests/TestUtils/MockStochastics.h @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2023-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +#pragma once + +#include <gmock/gmock.h> +#include <Stochastics/StochasticsInterface.h> + +namespace OpenScenarioEngine::v1_3 +{ +class MockStochastics : public StochasticsInterface +{ +public: + MOCK_METHOD(double, GetUniformDistributed, (double a, double b), (override)); + MOCK_METHOD(int, GetBinomialDistributed, (int upperRangeNum, double probSuccess), (override)); + MOCK_METHOD(double, GetNormalDistributed, (double mean, double stdDeviation), (override)); + MOCK_METHOD(double, GetExponentialDistributed, (double lambda), (override)); + MOCK_METHOD(double, GetGammaDistributed, (double mean, double stdDeviation), (override)); + MOCK_METHOD(double, GetGammaDistributedShapeScale, (double shape, double scale), (override)); + MOCK_METHOD(double, GetLogNormalDistributed, (double mean, double stdDeviation), (override)); + MOCK_METHOD(double, GetLogNormalDistributedMuSigma, (double mu, double sigma), (override)); + MOCK_METHOD(double, GetSpecialDistributed, (std::string distributionName, std::vector<double> args), (override)); + MOCK_METHOD(double, GetRandomCdfLogNormalDistributed, (double mean, double stdDeviation), (override)); + MOCK_METHOD(double, GetPercentileLogNormalDistributed, (double mean, double stdDeviation, double probability), (override)); + MOCK_METHOD(double, SampleFromDiscreteDistribution, (const DiscreteDistributionInformation* distribution), (override)); + MOCK_METHOD(DiscreteDistributionInformation*, ConditionOnRandomVariables, (const DiscreteDistributionInformation* distribution, std::vector<double> conditions, int dimUnconditionedVariable), (override)); + MOCK_METHOD(std::uint32_t, GetRandomSeed, (), (const, override)); + MOCK_METHOD(void, ReInit, (), (override)); + MOCK_METHOD(void, InitGenerator, (std::uint32_t seed), (override)); + MOCK_METHOD(bool, Instantiate, (std::string), (override)); + + static inline std::shared_ptr<MockStochastics> make_shared() + { + return std::make_shared<MockStochastics>(); + } +}; + +} // namespace testing::OpenScenarioEngine::v1_3 \ No newline at end of file diff --git a/utils/ci/conan/conanfile.txt b/utils/ci/conan/conanfile.txt index f733534bc497fc8ef06feeda479bdc65a2268baf..72e5123b316c3dd7cd0f0d7ceb1de1f3fa973a10 100644 --- a/utils/ci/conan/conanfile.txt +++ b/utils/ci/conan/conanfile.txt @@ -3,6 +3,7 @@ units/2.3.3@openscenarioengine/testing mantleapi/v8.0.0@openscenarioengine/testing yase/d0c0e58d17358044cc9018c74308b45f6097ecfb@openscenarioengine/testing openscenario_api/v1.4.0@openscenarioengine/testing +stochastics/0.11.0@openscenarioengine/testing [options] diff --git a/utils/ci/conan/recipe/stochastics/all/conandata.yml b/utils/ci/conan/recipe/stochastics/all/conandata.yml new file mode 100644 index 0000000000000000000000000000000000000000..c7a49bb1f1c4e99330f06ee8ed518bc24878d7cd --- /dev/null +++ b/utils/ci/conan/recipe/stochastics/all/conandata.yml @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ + +################################################################################ +# conan data file for building stochastics library with Conan +################################################################################ + +sources: + "0.8.0": + url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git + sha256: b6d331a00c8569df7fe27f600eff59780c0b5cab + "0.9.0": + url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git + sha256: 04852059eb3032d8f45773bb1144f3e604f2e68a + "0.10.0": + url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git + sha256: 73414fd443a0804dbcca1134907b78e59b9d863c + "0.11.0": + url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git + sha256: 6c9dde7140d3a0e2ef1b188bac35f7ae94ea3941 + "commitid": + url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git diff --git a/utils/ci/conan/recipe/stochastics/all/conanfile.py b/utils/ci/conan/recipe/stochastics/all/conanfile.py new file mode 100644 index 0000000000000000000000000000000000000000..d1b0ae36f5cbf8173e09121d19f37bd3f0e71c81 --- /dev/null +++ b/utils/ci/conan/recipe/stochastics/all/conanfile.py @@ -0,0 +1,82 @@ +################################################################################ +# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ + +################################################################################ +# Install file for building stochastics with Conan +################################################################################ + +from conan import ConanFile +from conan.tools.scm import Git +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import rm, export_conandata_patches, apply_conandata_patches +import os + + +required_conan_version = ">=2.2.0" + +class StochasticsLibraryRecipe(ConanFile): + name = "stochastics" + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False], + "commit_id_value":[None, "ANY"]} + default_options = {"shared": False, "fPIC": True, + "commit_id_value": None} + exports_sources = "*" + no_copy_source = False + short_paths = True + commit = None + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if self.options.commit_id_value: + self.commit = self.options.commit_id_value + + def export_sources(self): + export_conandata_patches(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def _get_url_sha(self): + if self.version != "commitid" : + url = self.conan_data["sources"][self.version]["url"] + self.commit = self.conan_data["sources"][self.version]["sha256"] + else: + url = self.conan_data["sources"]["commitid"]["url"] + return url + + def source(self): + url = self._get_url_sha() + git = Git(self) + git.clone(url=url, target=self.name) + git.folder=self.name + git.checkout(commit=self.commit) + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=self.name) + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "none") + self.cpp_info.set_property("cmake_module_file_name", "Stochastics") + self.cpp_info.set_property("cmake_file_name", "Stochastics") + self.cpp_info.set_property("cmake_target_name", "Stochastics::Stochastics") diff --git a/utils/ci/conan/recipe/stochastics/config.yml b/utils/ci/conan/recipe/stochastics/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..7a34f1d4e21eb83ab962986c7908f4c5f64a76b3 --- /dev/null +++ b/utils/ci/conan/recipe/stochastics/config.yml @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ + +################################################################################ +# config file for building stochastics library with Conan +################################################################################ +versions: + "0.8.0": + folder: "all" + "0.9.0": + folder: "all" + "0.10.0": + folder: "all" + "0.11.0": + folder: "all" + "commitid": + folder: "all" diff --git a/utils/ci/scripts/20_configure.sh b/utils/ci/scripts/20_configure.sh index d511b2f1090cc39a81c442b29300ff939427420b..303502a8c14b9bcf1c4b3f4e5403d56df6472b51 100755 --- a/utils/ci/scripts/20_configure.sh +++ b/utils/ci/scripts/20_configure.sh @@ -33,6 +33,7 @@ cd "$MYDIR/../../../../build" || exit 1 DEPS=( "$PWD/../deps/direct_deploy/units" "$PWD/../deps/direct_deploy/mantleapi" + "$PWD/../deps/direct_deploy/stochastics" "$PWD/../deps/direct_deploy/yase" "$PWD/../deps/direct_deploy/openscenario_api"