-
Notifications
You must be signed in to change notification settings - Fork 26
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
Constructing 'constrained' objects with empty constraints #1524
Comments
Searched project for usages of: Found empty list usages: Using
Using
Using
|
Each one of these look like they need a 'domain expert' to look at it, to decide whether there should be a constraint [and add it], or there shouldn't be, and a different constructor should be used. @smiths can you do that task assignment please? Then we should make it illegal to use the constructors that expect a constraint to get none. |
@JacquesCarette, are we just taking about physical constraints? That is constraints for things that physically cannot happen? We distinguish these from software constraints. The software constraints are not imposed by the "universe," but by the context of the specific problem. For instance, x and y coordinates can take on any value between -inf and inf. They are not constrained. |
I was just looking at the physics example yesterday and tried to see if there is a constructor that can be used specifically for empty constraints instead of using constrained' for those ones, I have not found, let me know if you find one. |
@smiths you are over-complicating things: my issue is much simpler. We are using a constructor for "constrained" things when in fact we give no constraints. This feels like a bug. @oluowoj if you're trying to build something with empty constraints, then you ought to be building something "lower down" in the hierarchy of quantities. There's a dependency graph of the classes somewhere, that should be your guide. |
@JacquesCarette what are you looking for from me? Yes, we shouldn't constrain things that do not have constraints. |
@smiths : I want someone knowledgeable to review each use of an empty constraint to figure out whether that is correct (and thus a different constructor should be used), or there ought to be a constraint but it's not there. I would like you to do the assignment of that review to the 'right' people in the team, given the domain of each use, as given in @danscime 's list. |
@JacquesCarette based on your response, I'll assume that you are only interested in the physical constraints. The software constraints would be problem specific, but physics constraints will always apply. I'll go through the list from @danscime and identify any missing physical constraints. My guess is that most of the items in his list do not have physical constraints, except maybe for some that should be constrained to be positive. @danscime, to save me some time, can you repeat your list again, but this time include the definition of each object? |
I think some more have been added and removed since I made the list, so I will include updated ones here. Using
|
I can speak to the ones from SSP since I worked with those. All of the ones under the "Using
|
@bmaclach we should make issues for each of those 'too complicated to capture'. They should be eventually fixed. But in the meantime, we should fix things to use the right constructor: I really want to upgrade the 'constrained' constructors to throw an error when there are none given! |
Thank you @danscime. This information is very helpful. I'll edit in my thoughts below.
Yes, this should be renamed. (@danscime, can you please create an issue for this.) If I remember correctly, this is the gravitational constant from Newton. It definitely does not have a constraint. It is a constant. I guess it has a constraint that it can only take on one value, but if we have the notion of constants, then we wouldn't express this with a constraint.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
I cannot think of any constraints for this. Any value (real number) should be valid, from a physics point of view.
@bmaclach is right that this should probably be changed to the specific
@bmaclach has discussed these in the issues below. |
Currently it is possible to build something (say via
constrained'
) that is "constrained" but in fact has an empty list of constraints (there are examples in Game Physics). This is a double bug:@danscime can you please augment this Issue with a list of all of the uses of this buggy feature? We need to know the scale of the problem before we 'just fix it'. Then this can be assigned to the appropriate people.
The text was updated successfully, but these errors were encountered: