Skip to content

Commit

Permalink
fix #2215
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jul 29, 2023
1 parent 4aa29a0 commit 79e07b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,12 @@ function markio!(state, orig_inputs, inputs, outputs; check = true)
outputset = Dict{Any, Bool}(o => false for o in outputs)
for (i, v) in enumerate(fullvars)
if v in keys(inputset)
v = setio(v, true, false)
if v in keys(outputset)
v = setio(v, true, true)
outputset[v] = true

Check warning on line 1418 in src/systems/abstractsystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/abstractsystem.jl#L1417-L1418

Added lines #L1417 - L1418 were not covered by tests
else
v = setio(v, true, false)
end
inputset[v] = true
fullvars[i] = v
elseif v in keys(outputset)
Expand Down
7 changes: 7 additions & 0 deletions test/linearize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ lsys, ssys = linearize(sys, [r], [y])
@test lsys.C[] == 1
@test lsys.D[] == 0

lsys, ssys = linearize(sys, [r], [r])

@test lsys.A[] == -2
@test lsys.B[] == 1
@test lsys.C[] == 0
@test lsys.D[] == 1

##
```
Expand Down

0 comments on commit 79e07b0

Please sign in to comment.