- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 47
 
fix: change variable defaults to guesses #281
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
fix: change variable defaults to guesses #281
Conversation
          Codecov ReportAttention: Patch coverage is  
 
 
 Additional details and impacted files@@            Coverage Diff             @@
##             main    #281       +/-   ##
==========================================
- Coverage   61.48%   0.00%   -61.49%     
==========================================
  Files          46      32       -14     
  Lines        1472    1657      +185     
==========================================
- Hits          905       0      -905     
- Misses        567    1657     +1090     ☔ View full report in Codecov by Sentry.  | 
    
| 
           @ven-k I'm a little confused as to what is causing the test failure, its from the code below: its due to   | 
    
          
 This requires: SciML/ModelingToolkit.jl#2501  | 
    
8276b01    to
    b54c7b1      
    Compare
  
    | 
           Rebased after @AayushSabharwal 's changes #291  | 
    
| 
           @baggepinnen request for review  | 
    
| @extend u, y = siso = SISO() | ||
| @variables begin | ||
| x(t) = 0.0, [description = "State of Integrator"] | ||
| x(t), [guess = 0.0, description = "State of Integrator"] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had the same suggestion in #292, but #292 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integrators always start at zero though?
Most of the time this is what users want, but it is occasionally useful to have the system solve for an integrator value that makes an initial control signal have a particular value to avoid initial transients, so forcing the user to specify the initial state explicitly might not be too bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the user can not easily remove a default value that has been specified in the library? If they cannot remove the value, we must not provide it since then it cannot be solved for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we now have the capability to remove a default, the explicit state variables, like those in Integrator, Derivative, FirstOrder, SecondOrder should keep their defaults, but y,u in SISO etc. should not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am probably going to make a new PR, since almost everything in this is not correct :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisRackauckas We can probably close this without merging since this PR has more incorrect than correct things, I'll make a new PR for the things that I would like to fix and the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
| 
           Where is this at?  | 
    
f000b3d    to
    2ff740c      
    Compare
  
    
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.