Bi-level energy optimization model in smart integrated engineering systems using WSN | Synapse