Update mechanism not consistent with vary method
Update/mutation of a viariable, which is part of a sumbomdel group created via vary
, is not possible employing the var := new_value
method.
To reproduce:
~>$ texts session -w -r
Input > vara = 1.0
Input > varb = 0.5[angstrom]
Input > eq1 = varb / vara
Input >
Input > %hist
COMPLETED 2024-08-19T15:49:53+02:00 eq1 = varb / vara
COMPLETED 2024-08-19T15:49:53+02:00 varb = 0.5[angstrom]
COMPLETED 2024-08-19T15:49:53+02:00 vara = 1.0
Input > vary((varb: 1.5)[angstrom])
Input >
Input > %vary
vary: ((varb: 0.5, 1.5) [angstrom], ('%uuid': 'c57f931e4ce4476e9a284b86fc01b684', '7498c6e783e3428eb80ef612902dd325'))
Input >
Input > varb := 5.5 [angstrom]
Input > %hist
COMPLETED 2024-08-19T15:51:50+02:00 varb = 5.5 [angstrom]
COMPLETED 2024-08-19T15:50:43+02:00 vara = 1.0
COMPLETED 2024-08-19T15:51:50+02:00 eq1 = varb / vara
Input > %vary
vary: ((varb: 0.5, 1.5) [angstrom], ('%uuid': 'c57f931e4ce4476e9a284b86fc01b684', '7498c6e783e3428eb80ef612902dd325'))
Input > print(eq1)
Output > 5.5 [angstrom]
Input >
Input > %uuid 7498c6e783e3428eb80ef612902dd325
Input > %hist
COMPLETED 2024-08-19T15:51:48+02:00 varb = 5.5 [angstrom]
COMPLETED 2024-08-19T15:50:39+02:00 vara = 1.0
COMPLETED 2024-08-19T15:51:48+02:00 eq1 = varb / vara
The variable will mutate to the new value within all submodels of the group and all related nodes will use such value.
However, the %vary
magic will continue to display the values from the original vary
statement.
The expected behaviour is that the mutate statement varb := 5.5 [angstrom]
should only affect the variable in the active submodel (such that 0.5 becomes 5.5 [angstrom]).
Also, the model group should be updated accordingly and %vary
should reflect those changes.