Mathematical Model of Multi-source Energy Flows for CNC Machine Tools