I've been continuing in my efforts of implementing the smartmarket functionality with my 240 bus model. I'm in process of writing my own results scripts and have come across a few oddities which I suspect are related:
1 - Even though all offer and bid prices and quantities are positive, the cleared bid contains negative prices with positive quantities . I'm running the market using market type 5 (uniform price set by last cleared marginal unit) and have used load2disp to convert fixed loads to dispatchable loads with very high prices. The Pmax on all these values are negative and the Pmins are zero. This is seeming to indicate that the loads are being paid to consume which is not unreasonable but a bit suspicious. 2 - Perhaps relatedly, the sum of the revenue from the cleared offers and the outlays from the bids is not equal. I found the per gen/load values by... gen_revenue = sum(output.co.P.prc .* output.co.P.qty,2); load_cost = sum(output.cb.P.prc .* output.cb.P.qty,2); ... and then summed those column vectors. For the simulation period in question I get a revenue of ~$20M and a cost of ~$37M; not a small enough difference to ignore. It seems like these must be equal but maybe I am misunderstanding something. Trevor
