Nothing
clonesSFCrule <- function(cw, eta) { # Sequentiall full contributions rule with clones
# cw: Vector de costes sin agentes clonados (cada respectivo coste solo aparece una vez)
# eta: Tamaño de cada grupo de agentes clonados
# Comprobaciones:
## Requerimiento 1: Todos los costes del vector cw han de ser no negativos
if (any(cw < 0)) {
stop("'cw' must have nonnegative coordinates")
}
## Requerimiento 2: Los componentes del vector eta han de ser números enteros positivos.
if (any(floor(eta) != eta) || any(eta <= 0)) {
stop("'eta' must be a vector of positive integers")
}
## Requerimiento 3: Los vectores cw y eta han de tener la misma longitud
if (length(cw) != length(eta)) {
stop("'cw' and 'eta' must be the same length")
}
## Aviso: El vector de costes cw no ha de incluir clones
if (length(cw) != length(unique(cw))) {
warning("'cw' has cloned agents")
}
# Llama a la función wSFCrule usando cw como c y eta como w
return(wSFCrule(cw, eta))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.