Add objective and input output to model