You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current way of simulating MTGs is too slow because it makes a lot of copies.
The computation goes as follows:
1 . we attribute a ModelList to each node depending on its symbol using a Dict of Symbol => ModelList (a reference ModeList)
2. we compute a status based on the initialisation in the reference ModelList, and if some variables are missing, we eventually use the variables from the MTG attributes.
The thing is the status is always one time-step that we initialise with values at t, compute, extract and move to the attributes, initialise with the second time-step, and loop until all time-steps are simulated. That's a lot of copying.
What I propose now, is to pre-initialise all variables in the attributes using the status of the models, considering that attributes can exist or not (if not, use the value from the status). Then, pre-allocate the values according to the number of time-steps (a little bit like before) in the attributes. And then, to make a TimeStepTable that only references the values in the attributes so a change in these is reflected automatically on the attributes.
The text was updated successfully, but these errors were encountered:
The current way of simulating MTGs is too slow because it makes a lot of copies.
The computation goes as follows:
1 . we attribute a ModelList to each node depending on its symbol using a Dict of Symbol => ModelList (a reference ModeList)
2. we compute a status based on the initialisation in the reference ModelList, and if some variables are missing, we eventually use the variables from the MTG attributes.
The thing is the status is always one time-step that we initialise with values at t, compute, extract and move to the attributes, initialise with the second time-step, and loop until all time-steps are simulated. That's a lot of copying.
What I propose now, is to pre-initialise all variables in the attributes using the status of the models, considering that attributes can exist or not (if not, use the value from the status). Then, pre-allocate the values according to the number of time-steps (a little bit like before) in the attributes. And then, to make a TimeStepTable that only references the values in the attributes so a change in these is reflected automatically on the attributes.
The text was updated successfully, but these errors were encountered: