The printed results from the smartmarket module produces an output that shows the revenue, costs, and net profit from the operation of the generators for that hour. I have found that when I calculate the review using the formulas below, I get value that match the smartmarket results.
gen_revenue = sum(output.co.P.prc .* output.co.P.qty,2); In thinking about this more, though, it seems this would only be the case if the generators were paid what they bid. I'm running the market with uniform pricing set by the last marginal unit which I take to mean that all accepted generation is paid the same rate regardless of their offer price. My questions: 1 - Is my understanding of uniform pricing in this context correct? 2 - If my understanding is correct, it seems like the smartmarket prices are not being correctly calculated in the printed summary; is this true? It seems the revenue for each generator should be something like: gen_revenue = sum(marginal_lambda * output.co.P.qty,2); where marginal_lambda is the price offered/bid by the marginal unit. 3 - If this new revenue equation is correct for markets with uniform pricing, how do I determine which of the values of LAM_P in the results are for the marginal unit? Is it the highest value? Trevor
