Skip to content

Linopf.py does not have start_up_cost and shut_down_cost when calculating UC problem. #438

@loongmxbt

Description

@loongmxbt

Checklist

  • I am using the current master branch or the latest release. Please indicate:

Describe the Bug

Please provide a description of what the bug is and add a minimal example/command for reproducing the bug.
In original opf.py there is something related to start_up_cost and shut_down_cost:

## Start up cost
rhs = LExpression(
        [
            (suc, network.model.generator_status[gen, sn]),
            (-suc, network.model.generator_status[gen, snapshots[i - 1]]),
        ]
    )
lhs = LExpression([(1, network.model.generator_start_up_cost[gen, sn])])
sucs[gen, sn] = LConstraint(lhs, ">=", rhs)
l_constraint(network.model, "generator_start_up", sucs, list(suc_gens), snapshots)

# Shut down cost
rhs = LExpression(
        [
            (-sdc, network.model.generator_status[gen, sn]),
            (sdc, network.model.generator_status[gen, snapshots[i - 1]]),
        ]
    )
lhs = LExpression([(1, network.model.generator_shut_down_cost[gen, sn])])
sdcs[gen, sn] = LConstraint(lhs, ">=", rhs)
l_constraint(network.model, "generator_shut_down", sdcs, list(sdc_gens), snapshots)

## objective
def define_linear_objective(network, snapshots):
objective.variables.extend(
      [
          (1, model.generator_start_up_cost[gen, sn])
          for gen in suc_gens_i
          for sn in snapshots
      ]
  )

  objective.variables.extend(
      [
          (1, model.generator_shut_down_cost[gen, sn])
          for gen in sdc_gens_i
          for sn in snapshots
      ]
  )

But in linopf.py, there is no "start_up_cost" or "shut_down_cost" or related objectives.
It seems the two models (pyomo=True/False) will behave differently when it comes to UC problem.
By default we will assume linopf.py is just a rewrite/re-implentation of opf.py, with same constraints and objectives.

Error Message

If applicable, paste any terminal output to help illustrating your problem.
In some cases it may also be useful to share your list of installed packages: conda list.

<paste here>

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions