How to plot the generation of each generator

I have written the script below to plot the power generated by each of my 8 generators, but it is inconsistent with other plots that show that my entire demand is unserved, and also doesn’t make sense considering my demand profiles. Is there an issue with my code? Is there a better way to view these plots?

Define start and end time

start = ‘01/01/2025 01:00’
end = ‘01/01/2026 00:00’

Plot

nplot(
‘PV.PV_HABITAT.P.[kW];r196g78b82;legend=PV Habitat;stack’,
‘PV.PV_ISRU.P.[kW];r140g140b140;legend=PV ISRU;stack’,
‘PV.PV_ICEMINING.P.[kW];r147g120b96;legend=PV Ice Mining;stack’,
‘PV.PV_ROVERS.P.[kW];r85g168b104;legend=PV Rovers;stack’,
‘PV.PV_SCIENCE.P.[kW];r221g132b82;legend=PV Science;stack’,
‘PV.PV_AGRICULTURE.P.[kW];r144g255b177;legend=PV Agriculture;stack’,
‘PV.PV_MANUFACTURING.P.[kW];r255g224b139;legend=PV Manufacturing;stack’,
‘FGEN.SMR.P.[kW];r255g204b51;legend=SMR;stack;Title=Generation Fleet Dispatch;[6.5,0,5]’,
start,
end
)

Hi @smeloney,

The code you’ve pasted below appears to be the correct syntax for making a stacked dispatch plot for those 8 generators. Great work!

If these results disagree with another plot showing unserved demand, I would recommend double-checking the unserved demand by accessing some properties of the ENET object. Some properties like ENET.PDSET and ENET.PIN, which correspond to Total Scheduled Active Power Demand and Total Active Power Injection, can be very useful for these sanity checks like this.

1 Like