{
    "description": "- The energy system includes photovoltaic power stations, wind power stations, generators, batteries, and residential buildings.\n- The goal is to minimize the total costs of the energy system and the gap between power supply and residential load.\n- Electricity price, residential load, photovoltaic, and wind power generation are \\\\param{price_{}}, \\\\param{load_{}}, \\\\param{pv_{}}, and \\\\param{wind_{}}, each with 24 time steps representing hourly data.\n- Battery state of charge is \\\\param{soc_{}}, with a total battery capacity of 500. Power of generators 1, 2, and 3 is \\\\param{pg1_{}}, \\\\param{pg2_{}}, and \\\\param{pg3_{}}, respectively. The initial values at time step 0 are provided, and the system will update these values at each subsequent time step based on decisions made.\n- \\\\var{Apv_{}}, \\\\var{Asoc_{}}, \\\\var{Ag1_{}}, \\\\var{Ag2_{}}, and \\\\var{Ag3_{}} are adjustment factors ranging from -1 to 1, changing according to the value from the previous time step and affecting system parameters such as power generation and battery capacity.\n- Battery charging and discharging result in a capacity change of 100 * \\\\var{Asoc_{t}}.\n- Generators 1, 2, and 3 power change by 100 * \\\\var{Ag1_{t}}, 100 * \\\\var{Ag2_{t}}, and 200 * \\\\var{Ag3_{t}}.\n- \\\\param{soc_{t}} is calculated as (0.18 * \\\\var{Asoc_{t}} + \\\\param{soc_{t-1}}), with a maximum of 0.8 and a minimum of 0.2.\n- \\\\param{pg1_{t}} is calculated as (100 * \\\\var{Ag1_{t}} + \\\\param{pg1_{t-1}}), with a maximum of 150 and a minimum of 10.\n- \\\\param{pg2_{t}} is calculated as (100 * \\\\var{Ag2_{t}} + \\\\param{pg2_{t-1}}), with a maximum of 375 and a minimum of 50.\n- \\\\param{pg3_{t}} is calculated as (200 * \\\\var{Ag3_{t}} + \\\\param{pg3_{t-1}}), with a maximum of 500 and a minimum of 100.\n- Photovoltaic power is calculated as (\\\\param{pv_{t}} * (1 + \\\\var{Apv})).\n- Total power supply at each time step t = \\\\param{soc_{t}} + \\\\param{pg1_{t}} + \\\\param{pg2_{t}} + \\\\param{pg3_{t}}+ (photovoltaic power at time step t) + \\\\param{wind_{t}}.\n- Excess energy = total power supply - \\\\param{load_{t}}, and no less than 0.\n- Shortage energy = \\\\param{load_{t}} - total power supply, and no less than 0.\n- The total cost structure includes the following:\n- Battery cost = \\\\var{Asoc_{t}} + 0.1 * \\\\param{soc_{t}};\n- Gen1 cost = 0.0034 * \\\\param{pg1_{t}}^2 + 3 * \\\\param{pg1_{t}} + 30;\n- Gen2 cost = 0.001 * \\\\param{pg2_{t}}^2 + 10 * \\\\param{pg2_{t}} + 40;\n- Gen3 cost = 0.001 * \\\\param{pg3_{t}}^2 + 15 * \\\\param{pg3_{t}} + 70;\n- Renewable energy cost = 0.01 * (\\\\param{pv_{t}} + \\\\param{wind_{t}});\n- Sales revenue = 0.5 * \\\\param{price_{t}} * (excess energy);\n- Purchase cost = \\\\param{price_{t}} * (shortage energy);\n- Excess penalty = max(0, (excess energy - 100) * 50);\n- Shortage penalty = max(0, (shortage energy - 100) * 50).\n- The cost of each power generation module should be considered when supplying power, usually starting the subsequent generator when the power of the previous generator is insufficient to meet the load.\n- Minimize transactions exceeding the power grid transaction limit to avoid power grid fluctuations affecting the stability of residential electricity consumption.\n- Decisions made at each time step will update \\\\param{soc_{}}, \\\\param{pg1_{}}, \\\\param{pg2_{}}, and \\\\param{pg3_{}}, and these updated values will serve as the starting point for calculations in the next time step.\n",
    "parameters": {
        "TotalBatteryCapacity": {
            "shape": [],
            "definition": "The total capacity of the battery",
            "type": "int"
        },
        "InitialSoc": {
            "shape": [],
            "definition": "Initial state of charge of the battery",
            "type": "float"
        },
        "InitialPg1": {
            "shape": [],
            "definition": "Initial power of generator 1",
            "type": "float"
        },
        "InitialPg2": {
            "shape": [],
            "definition": "Initial power of generator 2",
            "type": "float"
        },
        "InitialPg3": {
            "shape": [],
            "definition": "Initial power of generator 3",
            "type": "float"
        },
        "Price": {
            "shape": [
                24
            ],
            "definition": "Electricity price at each time step",
            "type": "float"
        },
        "Load": {
            "shape": [
                24
            ],
            "definition": "Residential load at each time step",
            "type": "float"
        },
        "Pv": {
            "shape": [
                24
            ],
            "definition": "Photovoltaic power generation at each time step",
            "type": "float"
        },
        "Wind": {
            "shape": [
                24
            ],
            "definition": "Wind power generation at each time step",
            "type": "float"
        }
    },
    "objective": {
        "description": "\"The goal is to minimize the total costs of the energy system and the gap between power supply and residential load.\"",
        "formulation": null,
        "code": null
    },
    "constraints": [
        {
            "description": "Battery state of charge (soc_t) must be between 0.2 and 0.8",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 1 power (pg1_t) must be between 10 and 150",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 2 power (pg2_t) must be between 50 and 375",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 3 power (pg3_t) must be between 100 and 500",
            "formulation": null,
            "code": null
        },
        {
            "description": "Battery state of charge (soc_t) must be calculated as (0.18 * Asoc_t + soc_t-1)",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 1 power (pg1_t) must be calculated as (100 * Ag1_t + pg1_t-1)",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 2 power (pg2_t) must be calculated as (100 * Ag2_t + pg2_t-1)",
            "formulation": null,
            "code": null
        },
        {
            "description": "Generator 3 power (pg3_t) must be calculated as (200 * Ag3_t + pg3_t-1)",
            "formulation": null,
            "code": null
        },
        {
            "description": "Photovoltaic power must be calculated as (pv_t * (1 + Apv))",
            "formulation": null,
            "code": null
        },
        {
            "description": "Excess energy must be no less than 0",
            "formulation": null,
            "code": null
        },
        {
            "description": "Shortage energy must be no less than 0",
            "formulation": null,
            "code": null
        },
        {
            "description": "Adjustment factors (Apv, Asoc, Ag1, Ag2, Ag3) must range from -1 to 1",
            "formulation": null,
            "code": null
        },
        {
            "description": "Battery charging and discharging must result in a capacity change of 100 * Asoc_t",
            "formulation": null,
            "code": null
        },
        {
            "description": "The sum of power from generators and renewable sources must not exceed the residential load by more than the grid transaction limit to avoid instability",
            "formulation": null,
            "code": null
        }
    ]
}