Dear PyPSA community,
I have a network which has a PPA load and a generator simulating flexible demand (i.e. a market to sell excess power). I need to make a constraint that restricts the sale of power to flexible demand while the PPA load is not fulfilled. I’ve sketched out the network in the attached picture.
Does anyone know how I can formulate this constraint? I can’t think of a mathematical way of constraining generation only when another generator is generating.
Thanks for the help.
Regards,
Matt
Hi Matt,
A constraint would be feasible but I don't think you really need one here. You would typically treat both the PPA and flexible demand as two demands with different fulfillment priority where the PPA is cheaper to fulfill. Examples to achieve this are either the generation costs of the flexible demand being higher or a tweak of the wheeling charges of the links.
-K
--
You received this message because you are subscribed to the Google Groups "pypsa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypsa+un...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pypsa/80a45c80-1447-4853-990b-5f032fc2c4b7n%40googlegroups.com.
Hi K,
Thanks for the response.
In some cases, this doesn't work. The PPA might have a lower price than the market sale, but have specific terms forbidding sale to the market during periods when the PPA is not fulfilled. There would be scenarios where the optimal decision would be to charge the ESS and discharge it to the market at a time when both the PPA load is being fully met and the market price is high.
Best regards,
Matt
Hi Matt,
Mathematically, you can do 100*Gflex_on <= X, where:
X is either the flow of the line to the PPA or the amount of demand the PPA consumes. I am not a PyPSA user but I assume you have access to those variables. You also need to run an integer optimisation since G_on needs to be a binary variable that turns the flex generator on or off (PyPsa should somehow give you access to that too).
Despite that, I would still not recommend this approach since it adds complexity to the model and I think you can achieve it via not using the real PPA price or meddling with the line usage costs.
Best Regards,
K