support discrete variables in nonlinear problems
Merge pull request #334 from yeesian/master

support discrete variables in nonlinear problems