Performance optimization on Manufacturing Systems: an hybrid systems approach