fix: change variable defaults to guesses
Checklist
- [ ] Appropriate tests were added
- [x] Any code changes were done in a way that does not break public API
- [x] All documentation related to code changes were updated
- [ ] The new code follows the contributor guidelines, in particular the SciML Style Guide and COLPRAC.
- [ ] Any new documentation only uses public API
Additional context
Add any other context about the problem here.
Codecov Report
Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.
Project coverage is 0.00%. Comparing base (
3a8fb0a) to head (6e2af95). Report is 7 commits behind head on main.
:exclamation: Current head 6e2af95 differs from pull request most recent head f000b3d
Please upload reports for the commit f000b3d to get more accurate results.
| Files | Patch % | Lines |
|---|---|---|
| src/Blocks/utils.jl | 0.00% | 29 Missing :warning: |
| src/Blocks/continuous.jl | 0.00% | 2 Missing :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@ven-k I'm a little confused as to what is causing the test failure, its from the code below:
@mtkmodel SISO begin
@parameters begin
u_start = 0.0
y_start = 0.0
end
@variables begin
u(t), [guess = u_start, description = "Input of SISO system"]
y(t), [guess = y_start, description = "Output of SISO system"]
end
@components begin
input = RealInput(u_start = u_start)
output = RealOutput(u_start = y_start)
end
@equations begin
u ~ input.u
y ~ output.u
end
end
its due to guess = u_start, not sure why it says u_start not defined when I'm trying to use the one in the params (I'm not extremely familiar with the @mtkmodel syntax).
@ven-k I'm a little confused as to what is causing the test failure, its from the code below:
@mtkmodel SISO begin @parameters begin u_start = 0.0 y_start = 0.0 end @variables begin u(t), [guess = u_start, description = "Input of SISO system"] y(t), [guess = y_start, description = "Output of SISO system"] end @components begin input = RealInput(u_start = u_start) output = RealOutput(u_start = y_start) end @equations begin u ~ input.u y ~ output.u end endits due to
guess = u_start, not sure why it saysu_startnot defined when I'm trying to use the one in the params (I'm not extremely familiar with the@mtkmodelsyntax).
This requires: https://github.com/SciML/ModelingToolkit.jl/pull/2501
Rebased after @AayushSabharwal 's changes #291
@baggepinnen request for review
Where is this at?