The construction of a dynamic, long term model of the Canadian energy sector is discussed, with examples of policy analysis done with the model. A linear process model of energy supply, conversion, distribution and end-use is linked to a model of the demands for services provided by energy in combination with other inputs. Nonlinear programming is used to find the supply-demand equilibrium by maximizing the discounted sum of consumers' plus producers' surplus over all periods — three five-year periods followed by three ten-year periods, from 1975 to 2020. Long-run marginal cost curves for coal, oil and natural gas are approximated by limiting the total amounts available at different cost levels. Upper limits on exports represent current pol...