add new _setstatevalues function in plannerparameters that returns an error code