Micro-grid tri-level EPEC based model for finding equilibria in the day-ahead and balancing markets | Synapse