Closed PavelBal closed 8 months ago
Add a test for this use case.
Implementing option validation for objectiveFunctionOptions revealed a limitation with active bindings: modifying individual fields does not invoke the setter function, making it problematic to run the validation logic. There is also no simple way to intercept changes to individual list elements in order to trigger validation. I think we have two options: (1) since direct modification seems to be common in ospsuite, we could remove this direct validation functionality and validate (throw meaningful error messages to users) later, e.g., within ParameterIdentification$run(). (2) keep the validation, but require that configurations are made through active binding using a named list of options.
Can objectiveFunctionOptions
be another R6 class with pre-defined fields? You could then implement validations within this class.
$run()
Trying this:
throws an error