Closed PavelBal closed 3 months ago
this worked before?
Yes, V11.
ok moving to core
@PavelBal I don't think this worked before. PSV were applied after validation . But anyways
hum nevermind. It's validating the configuration and not the updated model
ok so this is because of this code here
var actualParameterValue = parameterValue.Value.Value;
if (parameter.Formula is ConstantFormula constantFormula)
constantFormula.Value = actualParameterValue;
else
parameter.Value = actualParameterValue;
We say that if the formula is constant, we overwrite the constant value with the value Otherwise we simply let the formula and let the isFixedValue= true in the simulation
@Yuri05 and @PavelBal I tired to skp validation if the value is overwritten. But this does not work because then we try to resolve references later on So we need to OVERWRITTE WRONG FORMULAS with constant somehow. That means that we need to evaluate them all again.... doable but a bit of a pain
I don't think this worked before. PSV were applied after validation . But anyways
This definitely worked, I relied on this concept a lot in my projects and now I cannot create the simulations because of this changed behavior :)
formula-resolved-before-pb.zip
In the attached project, the module
Test2
defines a parameterOrganism|Param
by an invalid formula (the referenced parameterfoo
is not present).Additionally, the value of the parameter is defined in the PV BB
When trying to create a simulation, an error is thrown that
foo
is not found. This behavior is unwanted, as I want the value defined in the PV BB to be applied without the formula being evaluated. This is how it worked in MoBi 11, and it was a way to overwrite parameters that otherwise would not be resolved.