{'fraction_non_alphanumeric': 0.013879709187045605, 'fraction_numerical': 0.0, 'mean_word_length': 5.789237668161435, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dynamic contract to regulate energy management in microgrids

Powered by unreliable renewable energy sources, microgrids with limited storage capacities need to purchase supplementary energy from the main grid to support local consumers' random demand. The high variability of renewable energy increases a microgrid's energy purchasing fluctuation over time and makes the main grid's energy generation and supply more unscheduled and risky. This paper proposes a dynamic contract mechanism to regulate microgrids' energy purchasing over time, while the mismatch between renewable supply and local demand in each microgrid is efficiently resolved. The contract sets time-specific purchasing commitments for a microgrid to fulfill, yet still provides the microgrid with flexibility to change future commitments. Under the contract, a stochastic dynamic program is formulated for each microgrid to update commitments according to current storage status and future load prediction. As the microgrid's optimal purchase planning is complex to analyze, we further propose a heuristic algorithm to develop a suboptimal purchasing policy which is threshold-based and easy to implement. Extensive simulations show that the proposed contract can significantly reduce microgrids' purchasing fluctuation even though a large flexibility is allowed to change commitments. The contract smoothes out more purchasing fluctuations when fewer microgrids connect to the main grid or the net load variation in each microgrid increases.