Hi Charlie,
You are correct that the model is essentially trying to reduce the grid peak. The algorithm seeks to reduce the grid power purchased over the course of 24 hours within the context of the monthly peak. So for instance, if the monthly peak power from the grid is 100 kW, and the peak power over the next 24 hours is 80 kW, the battery will not discharge, since it can make no effect in the demand charge for the month.
It sounds like what you are most interested in is a dispatch strategy to maximize self-consumption. To do this, I think I would recommend the manual dispatch controller, as it gives you more fine grained control on what kind of strategy you'd like to employ. Using a manual strategy, the approach of up-sizing the system should eventually result in an "off-grid" usage scenario, where no power is ever purchased from the grid.
If you'd like, I can try and put together a quick example in one of the files you attached, just let me know.
Best,
Nick DiOrio