require(ggplot2)
require(readxl)
dat <- read_xlsx(exampleData("exampleGosling.xlsx"))
init <- initScenario(dat, uValue = 2,
optimisticRule = "expectation",
fixDistance = 3)
result <- solveScenario(x = init)
performance <- calcPerformance(result)
# Visualize the distance
ggplot(performance$scenarioTable,
aes(x = indicator,
y = performance,
color = indicator)) +
geom_point() +
geom_hline(yintercept =
min(performance$scenarioTable$performance),
linetype = "dashed", color = "red") +
ylim(0, 1)
Run the code above in your browser using DataLab