Linearised UC only valid if start up costs = shut down costs
<!-- Please do not post usage questions here. Ask them on the PyPSA mailing list: https://groups.google.com/forum/#!forum/pypsa -->

## Checklist

- [ ] I am using the current [`master`](https://github.com/pypsa/pypsa/tree/master) branch or the latest [release](https://github.com/pypsa/pypsa/releases). Please indicate:

## Describe the Bug

The linearised unit commitment formulation from [Hua et al.](https://ieeexplore.ieee.org/abstract/document/8000610) to tighten the relaxation of the unit commitment is only valid if the start up costs = shut down costs. There should be a check added and the additional constraints only added in case that the above condition is met.



diff --git a/pypsa/optimization/constraints.py b/pypsa/optimization/constraints.py
index 94f1bfe1..1a2c82ac 100644
--- a/pypsa/optimization/constraints.py
+++ b/pypsa/optimization/constraints.py
@@ -233,7 +233,11 @@ def define_operational_constraints_for_committables(n, sns, c):
         n.model.add_constraints(status, "=", 0, name, mask=mask)
 
     # linearized approximation because committable can partly start up and shut down
-    if n._linearized_uc:
+    # only valid additional constraints if start up costs equal to shut down costs
+    cost_equal = all(
+        n.df(c).loc[com_i, "start_up_cost"] == n.df(c).loc[com_i, "shut_down_cost"]
+    )
+    if n._linearized_uc and cost_equal:
         # dispatch limit for partly start up/shut down for t-1
         lhs = (
             p.shift(snapshot=1)
['pypsa/optimization/constraints.py']