I have a particular function which calculates average cost of electricity ($/MWh) over the lifetime of a power plant.
An example function looks like this
def calc(a,b,c):
res = 65*a+74*b+12*c
return res
Where a
b
and c
are cost parameters, such as operating expenditure, construction cost and insurance.
I could vary a
b
and c
in an infinite number of ways, but I would like to keep the ratios the same as an example data point I have, with a lower result for average cost of electricity.
For example
When a=1
, b=2
and c=3
, res = 249
.
However, I would like to find out the optimal values, which keeps the same original ratios, for a
b
and c
when res=600
I have tried to figure out a way to do this using scipy.optimize, but with some difficulty.
I'm not sure how I would program in the ratios for the constraints.
Many thanks.