Integrated Optimization and Game Theory Framework for Fair Cost Allocation in Community Microgrids