Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standby-cost the wrong way round? #864

Open
Cellophil opened this issue Apr 15, 2024 · 1 comment
Open

Standby-cost the wrong way round? #864

Cellophil opened this issue Apr 15, 2024 · 1 comment
Labels

Comments

@Cellophil
Copy link
Contributor

Cellophil commented Apr 15, 2024

Hi,

Standby cost is a newish feature that according to the docs

  | Stand-by cost for operating the generator at null power output. |

The code on the other hand is:

status = n.model.variables[f"{c}-status"].loc[:, stand_by_cost.columns]
objective.append((status * stand_by_cost).sum())

which seems to give cost to the Generator once it's running. Unless the stand_by_cost gets a sign flip but it doesn't look like it. I also tested a toy model - with a switched off Generator the objective function remains zero.

m = pypsa.Network()
m.add('Bus', 'mybus')
m.add('Generator', bus='mybus', p_nom=100, stand_by_cost=100, name='mygen', committable=True, marginal_cost=1)
m.set_snapshots(np.arange(10))
m.add('Load', bus='mybus', name='myload')
m.loads_t['p_set'].loc[:,'myload'] = np.zeros(10)
m.loads_t['p_set'].iloc[0,0] = 1
m.optimize()

gives me a objective function of 101; 100 for one snapshot of running plus 1 fuel cost.

I would actually prefer the current code version, offset cost for running a unit is very useful. It immediately acts as an efficiency curve. On the other hand "standby" implies the Generator is switched off, that could confuse users.
Also, standby cost does not seem to show up in the statistics module yet.

@Cellophil Cellophil added the bug label Apr 15, 2024
@Cellophil
Copy link
Contributor Author

Now that I think about it it could be that I misinterpreted the doc, maybe "operating generator with null power" refers to state=on [...regardless of power output]. Then it would be just a matter of maybe adding a clarifying sentence to the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant