Title: | Plots, Summary Statistics and Tools for Arena Simulation Users |
---|---|
Description: | Reads Arena <https://www.arenasimulation.com/> CSV output files and generates nice tables and plots. The package contains a 'Shiny' App that can be used to interactively visualize Arena's results. |
Authors: | Pedro Nascimento de Lima [aut, cre] |
Maintainer: | Pedro Nascimento de Lima <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-11-01 03:24:10 UTC |
Source: | https://github.com/pedroliman/arena2r |
A dataset containing test data from an Arena simulation model
arena_results
arena_results
A data frame with 2280 rows and 4 variables:
The Scenario Name
The Statistic's description
The Replication Number
The numeric value of the statistic within the replication and scenario
This function reads all csv files inside the provided path and returns a data.frame with the simulation runs, consolidated. You should provide a path containing only csv files generated by Arena, with the same number of replications. I Suggest you to name your csv files after your scenarios.
get_simulation_results(source, source_type = "path")
get_simulation_results(source, source_type = "path")
source |
The path where csv files is stored, or a list coming from shiny. If you do not provide a value, I'll assume they're on your current working directory. |
source_type |
String that describes where the data is coming from. "path" stands for a path that contains all csv files. "shinyInput" stands for the list object returned by fileInput in the ShinyApp. |
a tidy dataframe with simulation results.
# Define de path where your csv files are: path <- system.file("extdata", package = "arena2r") simulation_results = get_simulation_results(path) head(simulation_results)
# Define de path where your csv files are: path <- system.file("extdata", package = "arena2r") simulation_results = get_simulation_results(path) head(simulation_results)
Makes a summary table to every statistic available
get_statistics_summary(sim_results, confidence = 0.95)
get_statistics_summary(sim_results, confidence = 0.95)
sim_results |
The data.frame generated by get_simulation_results() |
confidence |
The confidence of the CI |
a data.frame with a summary for every Statistic
library(arena2r) statistics_summary = get_statistics_summary(arena_results) head(statistics_summary)
library(arena2r) statistics_summary = get_statistics_summary(arena_results) head(statistics_summary)
Plots a box plot for a response variable, across different simulated scenarios.
plot_box(sim_results, response_variable)
plot_box(sim_results, response_variable)
sim_results |
The data.frame generated by get_simulation_results() |
response_variable |
A character string indicating the Statistic to be plotted. |
a box plot using ggplot2.
library(arena2r) plot_box(arena_results, "Entity 1.NumberOut")
library(arena2r) plot_box(arena_results, "Entity 1.NumberOut")
Plots the confidence interval for a response variable, across different simulated scenarios.
plot_confint(sim_results, response_variable)
plot_confint(sim_results, response_variable)
sim_results |
The data.frame generated by get_simulation_results() |
response_variable |
A character string indicating the Statistic to be plotted. |
a confidence interval plot using ggplot2.
library(arena2r) plot_confint(arena_results, "Entity 1.WaitTime")
library(arena2r) plot_confint(arena_results, "Entity 1.WaitTime")
Scatter Plot
plot_scatter(sim_results, x_variable, y_variable)
plot_scatter(sim_results, x_variable, y_variable)
sim_results |
The data.frame generated by get_simulation_results() |
x_variable |
The name of the Statistic to be placed on the x axis |
y_variable |
The name of the Statistic to be placed on the y axis |
a scatter plot showing individual replication results
library(arena2r) plot_scatter(arena_results, "Entity 1.NumberOut","Entity 1.WaitTime")
library(arena2r) plot_scatter(arena_results, "Entity 1.NumberOut","Entity 1.WaitTime")
This function will launch a Shiny App allowing you to analyse Arena results without writing R code.
runArenaApp()
runArenaApp()