Based on the error message, it seems the number of active power offers you are providing is not correct. What are the values of the following?
- number of rows in gen matrix - number of actual generators (as opposed to dispatchable loads) - number of rows in offer.P.qty/prc Ray > On Jul 28, 2016, at 8:17 AM, Haroon Malik <[email protected]> wrote: > > Hello Dr. Zimmerman, > > I am running a code with offers and bids for the case 118 bus, I have checked > my generator offers and dispatchable loads and all seem to be in line with > the offer.P.qty/prc and bid.P.qty/prc, but when I execute the runmarket > function after setting the type and default solver I receive the following > error: > > Error using off2case>idx_vecs (line 412) > number of active power offers must be zero or match either the number of > generators or the total number of rows in gen > > Error in off2case (line 81) > [idxPo, idxPb, idxQo, idxQb] = idx_vecs(offers, bids, G, L, haveQ); > > Error in smartmkt (line 50) > [gen, genoffer] = off2case(mpc.gen, mpc.gencost, offers, bids, mkt.lim); > > Error in runmarket (line 120) > [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt, mpopt); > > Error in Code_118 (line 166) > [results,co,cb,f,dispatch,success,et]=runmarket(mpc,offers,bids,mpopt); % > Runmarket > > > Could you tell me what might be the reason so I could adjust accordingly, > > > Many thanks for your time and assistance, > > Mohammad Haroon Malik.
