working on optim package for scenario and constraint matrix management