Mixed-Integer Nonlinear Programming for State-based Non-Intrusive Load Monitoring