whit.

When a String isn't a String

A blog reader wrote in to present me with a devious problem. the mdlnam function returns dynamic model name for generators, excitation systems and others. Can you spot the problem with the code below?


# get the generator dynamic model name for machine at bus 100.
ierr, genmodel = psspy.mdlnam(100, '1', 'GEN')
print genmodel
 
if genmodel == 'GENROE':
    print 'bus', 100, 'uses a GENROE model'
elif genmodel == 'GENROU':
    print 'bus', 100, 'uses a GENROU model'
elif genmodel == 'GENSAE':
    print 'bus', 100, 'uses a GENSAE model'
elif genmodel == 'GENSAL':
    print 'bus', 100, 'uses a GENSAL model'
else:
    print 'No match'


# >>>
# GENROE
# No match

In case it isn’t clear. The print statement prints GENROE, so we’re expecting the next output to be bus 100 uses a GENROE model. However, and this is where it becomes mysterious, the first if statement doesn’t match, nothing matches and instead the else clause No match is printed.

Read on →

AEMO settlement date

Here’s a reminder of how to use the AEMO Settlement Date.

The settlement date is a day and time used in many of AEMO’s database tables. It’s a fundamental marker of time because it marks one of the 48 trading intervals.

Every half hour, AEMO generates a new electricity price that is used to bill customers and pay generators. There are 48 half hours in a day, each is called a trading interval.

Read on →

Solve a loadflow with PSSE

I’ve been asked many times: “How do I solve a loadflow with Python?” It’s a great question because once you know how to solve a loadflow - you can begin to automate your PSSE work.

This video will show you exactly how to solve a PSSE loadflow using the full newton raphson solution.

Read on →

Electricity Hedge Contracts Save Money In Volatile Australian Market

Hedge contracts are for large consumers
Hedge contracts are for large consumers

Last week, we investigated how a pool pass through contract could save you money. We concluded that when market conditions are favourable, your electricity bill will be lower if you take the pool price. That post raised some discussion about what if hedge contracts had been purchased instead.

In this post we investigate how hedging your electricity contract can insure you against the volatility of the market.

Read on →

Will a pool pass through contract reduce your electricity bill?

Electricity prices vary throughout the day
Electricity prices vary throughout the day

We investigate the raw cost of electricity. How much profit does a retailer make in selling us electricity?

Not everyone will find this article interesting. Because not everyone has a huge electricity bill or works in the electricity industry. If your electricity usage is greater than 50000 kWh / year (the equivalent usage of ten small families) then this is for you.

For those not reading on: Conclusion, A pool pass through contract could save 24% on your annual electricity bill. But by doing so you take on wholesale market risk instead of your retailer, and we note that in recent months it may have been more profitable to be on a fixed contract due to the large spike in volatility after the carbon price introduction.

Read on →

Subscribe by RSS.