General Optimization Technique for Large Scale Systems by Decomposition of Discrete Event Systems