Skip to content

Commit

Permalink
fix #2215
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Aug 24, 2023
1 parent 12c83d4 commit bed9504
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 @@ -1424,7 +1424,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
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 bed9504

Please sign in to comment.