Main Content

newScenario

Create new scenario in RoadRunner Scenario using MATLAB

Since R2022a

    Description

    example

    newScenario(rrApp) creates a new scenario in the current RoadRunner scene. You must create or load a new scene before creating a new scenario.

    Examples

    collapse all

    Create a new scenario in RoadRunner Scenario using MATLAB.

    Start RoadRunner and open the project called "C:\RR\MyProject".Return the RoadRunner application object in rrApp. This example assumes that RoadRunner is installed in its default location in Windows. This call returns an object rrApp that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects.

    projectFolder = "C:\RR\MyProject";
    rrApp = roadrunner(projectFolder);

    Open an existing scene in RoadRunner. For example, open the FourWaySignal scene, which is one of the scenes included by default in RoadRunner projects.

    filename = "FourWaySignal.rrscene";
    openScene(rrApp,filename);

    Create a new, empty scenario in the scene using the newSenario function.

    newScenario(rrApp);

    Input Arguments

    collapse all

    RoadRunner application associated with a project, specified as a roadrunner object. This object provides functions for performing common workflow tasks such as opening, closing, and saving scenes and projects. rrApp provides functions that support importing data from files and exporting scenes to other formats from RoadRunner.

    Version History

    Introduced in R2022a