-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constraints should be relational operator not assignment operators (Trac #487) #621
Comments
Trac update at |
Trac update at |
Trac update at
Moving to Beta Approximation Work Package whilst we consider constraints.
|
Trac update at I would say that constraints have to be "assignments" as the second example, they are after all mathematical equations. The first example does what it should with the scond over-riding the first. Suggest this ticket is closed. |
Trac update at While I agree that in constructing a full language the assignment approach would make sense, in this case it does not make sense other than to punish users who are not a programmer:-) I can see absolutely no situation where overriding makes any sense in the context of the constraints setup. If m1.x=m3.x why every say m1.x=m2.x?? We have however found users who want m2.x, m3.x etc to all be the fixed to m1.x ... and their natural behavior it appears is to write as example 1 above then don't understand why it doesn't work. I would argue that allowing overwriting adds unnecessary complexity to constraints since you have to now not only think about what relations you want but also worry about the order in which you provide them. |
Trac update at We might perhaps introduce some new logic symbol such as M2.radius ~ M1.radius for something that has to work in both directions, but even then the details of how the fitting was done would have to be looked at very carefully. I suspect that sasview would still have to internally set up equivalent assignments. Still suggest we close this ticket as we have plenty more to be getting on with. [Actually in FISH, I can and do nest constraints, then tie back the least squares partial derviatives by running backwards through the constraints list.] |
This is something we've picked out to fix here at some point |
@gonzalezma to check progress. |
Code now does not allow to have several definitions for the same parameter. Only the last definition is retained and shown in the list of constraints. This should already warn any inadvertent user that it is not possible to define two constraints as: The way of defining a general constrain such as M1.p = M2.p = M3.p is: Or entirely equivalent: Or even: While this is the expected behaviour for a programmer, it can be less intuitive for a non-programmer. The tutorial about the simultaneous fitting clarifies this, but perhaps a more detailed description should also be added to the documentation (at fitting_help.html#simultaneous-fits-with-constraints). But there is nothing that can be easily done to change the "programmatic" behaviour, so closing this issue. |
currently the constraints/optimizer treats the constraint as an assignment rather than relational operator. The result is that for 3 models the following constraint set up
will result in ONLY the second constraint being implemented (the second assignment to M1.parameter1 overwrites the fist assignment). However if the constraints are set up as follows:
results in the expected behavior. This is both confusing to users and seems logically incorrect for a constraint which should always, I think, be a relational object.
Migrated from http://trac.sasview.org/ticket/487
The text was updated successfully, but these errors were encountered: