#' plotDecisionCost
#' Plots the mean number of rounds it took for the status quo to be defeated for each k-majority rule, across all the iterations.
#'
#' @param outputDataList The output data list of summaries, that is generated by the iterations() function
#' @return A plot of the mean, across all iterations, of the decision cost incurred for each k-majority rule.
#' @export
plotDecisionCost<- function(outputDataList){
numberOfKMajorities <- nrow(outputDataList$externalCost)
roundPropPassed <- outputDataList$rounds$meanRoundProposalPassedEachIteration
xRange <- range(c(0:numberOfKMajorities))
yRange <- range( c(0:ceiling((max(outputDataList$rounds$meanNumberOfProposalsConsideredEachIteration)*outputDataList$theInputParameters$perProposalDecisionCost))))
plot(xRange, yRange, type="n", xlab="k-majority", ylab="Decision Costs")
lines(c(1:numberOfKMajorities), outputDataList$rounds$meanNumberOfProposalsConsideredEachIteration*outputDataList$theInputParameters$perProposalDecisionCost, col = "Black", lwd = 3)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.