Hello Joseph,
What version of MATPOWER/MOST you are using? I know there were some significant
speedups in building certain kinds of large models in recent versions of MOST,
so if you’re not using MATPOWER 8, I’d definitely try that, though I’m not sure
if those improvements would affect your model or not.
There are 3 main steps in constructing the mathematical model (LP or QP) that
eventually gets solved.
1. Construct the input MOST Data struct (mdi) from the base MATPOWER case (mpc)
and profiles.
2. Construct the MP-Opt-Model object (om) from mdi by adding variables,
constraints and costs.
3. Construct the final LP/QP constraints from om, done automatically by
om.params_lin_constraint().
Modifying the final LP/QP parameters directly, as you suggest, would obviously
save the most time, since it bypasses all 3 steps, but it requires detailed
knowledge of all of the constraint and variable indexing. That information is
contained in om.
Eg. If you do …
ll = om.get_idx('lin');
… then …
mdo.QP.l(ll.i1.Pmis(t,1,1):ll.iN.Pmis(t,1,1))
mdo.QP.u(ll.i1.Pmis(t,1,1):ll.iN.Pmis(t,1,1))
… should address the elements of those vectors that correspond to period t.
Hope this helps,
Ray
On Nov 23, 2024, at 2:20 PM, Joey Brown <[email protected]> wrote:
Hi All,
I am working with a very large system and trying to simulate various load
profiles on a fixed network. Rebuilding the MOST structure for each load
profile takes an extremely long time.
The work-around I have currently is to manually go in and change the QP and OM
structures in a prebuilt and unsolved MOST structure (mdo) where I think the
relevant data ultimately lies, mainly mdo.QP.l, mdo.QP.u, and
mdo.om.lin.data.{l,u}.Pmis. This seems to work for a single time period, but
extending this to multiperiod does not seem as simple since the QP struct does
not seem as simply laid out.
Is there a hidden helper function or more efficient way to change the
underlying load profile without rebuilding the entire struct?
Thank you all
Joseph Brown