It would be nice if an incorrect initial origin value could be automatically corrected (when possible, and with a warning) instead of an exception being thrown. Sometimes when a tree initialiser is being used it is not possible ahead of time to know what value of origin is large enough.
I suggest replacing the current exception with these two lines:
originInput.get().setValue(rootHeight + 1.0);
System.err.println("WARNING: Initial value of origin was changed to " + origin() + " so that it is greater than initial root height (" + rootHeight + ")");
@rbouckaert is working on a solution that would allow a check on the RealParameter to make sure it is being estimated. Then if it is, the above solution can be employed, else throw exception.
It would be nice if an incorrect initial origin value could be automatically corrected (when possible, and with a warning) instead of an exception being thrown. Sometimes when a tree initialiser is being used it is not possible ahead of time to know what value of origin is large enough.
I suggest replacing the current exception with these two lines:
@rbouckaert is working on a solution that would allow a check on the RealParameter to make sure it is being estimated. Then if it is, the above solution can be employed, else throw exception.