Set up an OTP instance.Source:
OTP is run in Java and requires Java commands to be typed into the command line. The function allows the parameters to be defined in R and automatically passed to Java. This function sets up a local instance of OTP, for remote versions see documentation.
The function assumes you have run otp_build_graph()
otp_setup( otp = NULL, dir = NULL, memory = 2048, router = "default", port = 8080, securePort = 8081, analyst = FALSE, pointsets = FALSE, wait = TRUE, flag64bit = TRUE, quiet = TRUE, otp_version = NULL, open_browser = TRUE )
A character string, path to the OTP .jar file
A character string, path to a directory containing the necessary files, see details
A positive integer. Amount of memory to assign to the OTP in MB, default is 2048
A character for the name of the router to use, must be subfolder of dir/graphs, default "default". See vignettes for details.
A positive integer. Optional, default is 8080.
A positive integer. Optional, default is 8081.
Logical. Should the analyst features be loaded? Default FALSE
Logical. Should the pointsets be loaded? Default FALSE
Logical, Should R wait until OTP has loaded before running next line of code, default TRUE
Logical, if true the -d64 flag is added to Java instructions, ignored if otp_version >= 2
Logical, if FALSE the Java commands will be printed to console
Numeric, version of OTP to build, default NULL when version is auto-detected
Logical, if TRUE web browser is loaded when OTP is ready
This function does not return a value to R. If wait is TRUE R will wait until OTP is running (maximum of 5 minutes). After 5 minutes (or if wait is FALSE) the function will return R to your control, but the OTP will keep loading.
To run an OTP graph must have been created using otp_build_graph and the following files to be in the directory specified by the dir variable.
/graphs - A sub-directory
/default - A sub-directory with the name of the OTP router used in 'router' variable
graph.obj OTP graph