Skip to content

Bugs in KOW_generation_limits #313

@HunterTracer

Description

@HunterTracer

In line 305-306 in model_library/unit_commitment/generation_limits.py, the coef is set as max((Pmax - SD - SD_time_limit * RD) - (Pmax - SU - (SU_time_limit+1) * RU), 0). However, I think there is a mistake in its order and it should be reversed. The correct one should be max((Pmax - SU - (SU_time_limit + 1) * RU) - (Pmax - SD - SD_time_limit * RD), 0).

Consider that UnitOn(t) = 1, UnitStart(t - SU_time_limit - 1) = 1 and meanwhile UnitStop(t + 1 + SD_time_limit) = 1, then the maximum power of Pg(t) should be min((SU + (SU_time_limit+1) * RU), (SD + SD_time_limit * RD)). However, in the current program, if UnitOn(t) = 1, UnitStart(t - SU_time_limit - 1) = 1 and meanwhile UnitStop(t + 1 + SD_time_limit) = 1 and (SU + (SU_time_limit+1) * RU) > (SD + SD_time_limit * RD), then the upper bound will be (SD + SD_time_limit * RD) - ((SU + (SU_time_limit+1) * RU) - (SD + SD_time_limit * RD)) instead of the true value (SD + SD_time_limit * RD), which is invalid.

I also check the generation limits in KOW_production_costs_super_tight in production_cost.py and find the order is right. Since we already subtract sd_step[SD_time_limit]*m.UnitStop[g,t+1+SD_time_limit] in line 276, then it is correct to subtract max(su_step[j]-sd_step[SD_time_limit],0)*m.UnitStart[g,t-j] in line 280. I also find that at first the order in KOW_production_costs_super_tight was also wrong and get fixed in d21d5d7. Unfortunately, it seems that the bugs in generation_limits.py are not considered in this code.

Is it a bug? I already submit my code at #312. Many thanks! @bknueven

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions