Closed EwoutH closed 1 month ago
@toruseo The failure values look very small, could it be that just some rounding error and the tolerances are a bit tight?
The diff is not small. I guess (I dont fully understand the vectorizatoin technique used here) the modification broke the route choice logic.
Yes, took a look again, you’re right.
I will try a few other approaches, and also investigate dist_record
. Could it be that s.route_pref
is copied somewhere and/or pointed to from other entities?
Closing, as better one is implemented by https://github.com/toruseo/UXsim/pull/146
This commit resolves a memory consumption issue in the
homogeneous_DUO_update
method by replacing the previous array reallocation with an in-place update usingnp.place
. The old implementation created new NumPy arrays in each update cycle, leading to unnecessary memory overhead.With the in-place update, total memory usage was reduced from 1189 MB to 471 MB.
Changes
np.place
for in-place updates ofs.route_pref
.Part of https://github.com/toruseo/UXsim/issues/143.