Rough investigation: Open-source solver time and memory penalties
#24
Thanks @willcattoneeca! Probably a lot of time is spent on filtering here:
Code:
EQ_PTRANS[
        r in REGION,
        p in PROCESS,
        cg1 in COMGRP,
        cg2 in COMGRP,
        s1 in TSLICE,
        t in MILEYR,
        v in MODLYR,
        s in TSLICE;
        (r, p, cg1, cg2, s1) in RP_PTRAN &&
        (r, s1, s) in eachindex(RS_FR) &&
        s in RP_S1[r, p] &&
        (r, t, p) in RTP_VARA &&
        v in RTP_VNT[r, t, p],
    ]

The following code takes almost 26 sec.

Code:
[(r, p, cg1, cg2, s1, t, v, s)
for r in REGION
for p in PROCESS
for cg1 in COMGRP
for cg2 in COMGRP
for s1 in TSLICE
for t in MILEYR
for v in MODLYR
for s in TSLICE
if (
    (r, p, cg1, cg2, s1) in RP_PTRAN &&
    (r, s1, s) in eachindex(RS_FR) &&
    s in RP_S1[r, p] &&
    (r, t, p) in RTP_VARA &&
    v in RTP_VNT[r, t, p]
)
]

I can experiment with relational algebra instead.
Reply


Messages In This Thread
RE: Rough investigation: Open-source solver time and memory penalties - by Olexandr - 09-09-2024, 06:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)