fredmarlton
Hi all,
I have a problem where i want to randomise a particular parameter to either 0.00, 0.25, 0.50 or 0.75 after convergence:
prm rand_num1 0.5 val_on_continue=Round(Rand(0,3))/4;
The other thing is that I want is to set max/min constraints of +/- 0.05 during refinement
The problem is that I can't set fixed numbers for min and max.
One way I thought to do this is follows, but it doesn't work as the first prm is refined.
prm rand_num_dev1 0.00 min -0.05 max 0.05
prm rand_var1 = rand_num1 + rand_num_dev1 ;:0.0
Any suggestions?
rowlesmr
does
min = Val - 0.05;
max = Val + 0.05;
work?
fredmarlton
Thanks Matt,
Does 'Val' change during the refinement iterations? Or does it corresponds to the value at the start and does not change?
rowlesmr
Hi Fred
I don't know. TechRef says "Val is a reserved parameter name corresponding to the numeric value of a parameter during refinement".
Maybe "Constant(Val)" will stay the same value?
Matthew
alancoelho
I'm not sure if Constant(Val) works. What does work is:
prm a 3 min = Constant(a) - 0.05; max = Constant(a) + 0.05;
fredmarlton
Thanks Alan.
So if I have something like this:
prm a 0.5 val_on_continue=Round(Rand(0,3))/4; min = Constant(a) - 0.05; max = Constant(a) + 0.05;
Will the min and max update with val_on_continue?
alancoelho
min and max wont update after the first iteration due to Constant; they will use the initial value of 'a'.