define_constants;
mpc0 = loadcase('case6ww_');
mpc = load2disp(mpc0);
mpc.branch(:, RATE_A) = 0;  % disable flow limits
mpc.branch(:, RATE_B) = 0;
mpc.branch(:, RATE_C) = 0;
offers.P.qty = [200; 150; 180];
offers.P.prc = [30; 40; 50];
bids.P.qty = [30; 30; 30];
bids.P.prc = [100; 90; 80];
mkt.OPF = 'AC';
[r, co, cb] = runmarket(mpc, offers, bids, mkt);

co.P.qty
co.P.prc
cb.P.qty
cb.P.prc


