order of named parameters matters in isFeasible
Opened this issue · 2 comments
maierhofert commented
The order of the parameters in par and x makes a difference. I think it would be nice, if the parameter values and the parameters set would be matched by name. See the minimal example:
# minimal example for isFeasible
par.set = makeParamSet(
makeIntegerParam(id = "int", default = 1L),
makeLogicalParam(id = "logic", default = TRUE)
)
# this works
par.list = list(int = 2L, logic = TRUE)
isFeasible(par.set, par.list)
# this does not work, but I think it should
par.list2 = list(logic = TRUE, int = 2L)
isFeasible(par.set, par.list2)
berndbischl commented
i guess you are correct. this is also not documented properly.
but i am currently on holiday :)
so you might have to wait a bit
maierhofert commented
Thank you. There is an easy work-around. Please take your time and don´t fix it while you are on holiday :-)