adamgreenhall / minpower

power systems tools made beautiful
adamgreenhall.github.io/minpower
71 stars 33 forks source link

MinPower ignores Generator Names (and Kind) #20

Closed BjoernLaemmerzahl closed 8 years ago

BjoernLaemmerzahl commented 8 years ago

I love minpower but i am fairly new to Python.

When running a sample EC, the output will always name the generators "g0","g1","g2", (...) , even though I specified a name and fuel type.

Where am I going wrong?

generators.csv

"name","kind","costcurveequation","Pmin","Pmax","min up time"," min down time"," ramp rate max","schedule filename"
"base","coal","30P+.01P^2",0,3000,0,0,3000,
"peaker","natural gas","50P",0,2500,0,2,2500,
"peaker1","natural gas","10P",0,1500,3,0,2500,
"peaker","oil","2P",0,700,0,2,1500,
"peaker1","oil","10P",0,550,3,0,1200,
"wind","wind",0,,,,,,"ireland_wind_fewdays.csv"

commitment-power.csv

time,g0,g1,g2,g3,g4,g5
2010-04-27 00:00:00,0.0,0.0,1397.0,700.0,0.0,403.0
2010-04-27 01:00:00,0.0,0.0,1486.0,700.0,0.0,303.0
2010-04-27 02:00:00,0.0,0.0,1421.0,700.0,0.0,311.0
2010-04-27 03:00:00,0.0,0.0,1332.0,700.0,0.0,340.0
2010-04-27 04:00:00,0.0,0.0,1260.0,700.0,0.0,360.0
2010-04-27 05:00:00,0.0,0.0,1221.0,700.0,0.0,345.0
rschell commented 8 years ago

You may wish to change in generators.py the: def str(self): return 'g{ind}'.format(ind=self.index)

To something like this: def str(self): if self.name != "": return self.name return 'Gen{ind}'.format(ind=self.index)

BjoernLaemmerzahl commented 8 years ago

Words can not describe the happiness your answer brought to me. Although I am embarrassed I did not see this line of code.