stopOnInvalidLeftRightGloveGame: Parameter Function stopOnInvalidLeftRightGloveGame

Description Usage Arguments Error Code Ranges Author(s) See Also Examples

View source: R/ParameterChecks_CoopGame.R

Description

stopOnInvalidLeftRightGloveGame checks if L (left gloves) and R (right gloves) are specified as parameter correctly (also regarding grand coalition). Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.

Usage

1
stopOnInvalidLeftRightGloveGame(paramCheckResult, L, R, N)

Arguments

paramCheckResult

list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message.

L

numeric vector of players owning one left-hand glove each

R

numeric vector of players owning one right-hand glove each

N

represents the grand coalition.

Error Code Ranges

Error codes and messages shown to user if error on parameter check occurs

Error Code Message
1140 Not all players in L and R included.
1141 L must have size > 0.
1142 R must have size > 0.
1143 L and R have to be disjoint sets.

Author(s)

Jochen Staudacher jochen.staudacher@hs-kempten.de

Johannes Anwander anwander.johannes@gmail.com

See Also

Other ParameterChecks_CoopGame: getEmptyParamCheckResult(), stopOnInconsistentEstateAndClaimsVector(), stopOnInvalidAllocation(), stopOnInvalidBoolean(), stopOnInvalidClaimsVector(), stopOnInvalidCoalitionS(), stopOnInvalidDictator(), stopOnInvalidEstate(), stopOnInvalidGameVector(), stopOnInvalidGrandCoalitionN(), stopOnInvalidIndex(), stopOnInvalidNChooseB(), stopOnInvalidNumberOfPlayers(), stopOnInvalidNumber(), stopOnInvalidQuota(), stopOnInvalidVetoPlayer(), stopOnInvalidWeightVector(), stopOnParamCheckError()

Examples

1
2
3
4
5
library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validL=c(1,3)
validR=c(2)
stopOnInvalidLeftRightGloveGame(paramCheckResult, L=validL,R=validR,N=c(1,2,3))

CoopGame documentation built on Aug. 24, 2021, 1:07 a.m.