Beyond the frictionless machine : economic analysis of energy policy in an imperfect world