Parameter driver value safety can be bypassed in constructor.
The ParameterDriver.setValue()
safeties can be bypassed if introducing a reference value out of range in the constructor.
The issue can occur when introducing parameters out of range in the BasicConstantThrustPropulsionModel
class constructor.
Potential fixes:
- Add a new constructor that also requires a value to set, decoupling the reference value and the initial value.
- Changing
this.value = referenceValue;
tothis.value = setValue(referenceValue);
- Add sanity check to reference value in the constructor.