Questions about on-grid and off-grid in simulation

Hello, I am a developer from China, I am now using Open EMS to implement a simple case, I configure the following modules:
1.Simulator ProducingMeter Acting
2.Simulator GridMeter Reacting
3.Simulator NRCMeter Acting
4.Simulator EssSymmetric Reacting
5.datasource…
6.Controller Ess Balancing

The above modules can achieve as little grid power as possible, set the grid target to 0, and consume mainly using photovoltaics and batteries.

I have a question right now: I want to do both on-grid and off-grid in my simulation, and I don’t know how. So far I’ve only found the GridMode setting in the Ess configuration, but this only controls whether the Ess is added to the grid, and my purpose is to control whether the grid (e.g. Simulator GridMeter Reacting) is added to our overall system. For example, in off-grid mode, the consumption of the system is only provided by PV and Ess, and no longer relies on buying electricity from the grid.

Your help apprecieated.
Rong