Retrieve RoadRunner Scenario API server port number in MATLAB
Retrieve RoadRunner Scenario Server Port Number
This example assumes that RoadRunner is installed in its default location.
Specify the location in which to create a project. For example, this code shows the
path to a RoadRunner project, on a Windows® machine, located at
roadrunner object and open RoadRunner by specifying your project as the location where you want to create a
roadrunner function 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);
Retrieve the RoadRunner Scenario port number, for this instance of RoadRunner Scenario, by using the
simPortNum = getCoSimPort(rrApp);
rrApp — RoadRunner application
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
rrApp provides functions that support importing data from
files and exporting scenes to other formats from RoadRunner.
simPortNum — Scenario simulation port number
RoadRunner Scenario simulation port number, returned as a positive integer.
Introduced in R2022b