Skip to content

Commit a0a96a5

Browse files
Small fixes regarding fixed and flow attributes
1 parent a24f97d commit a0a96a5

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/language/Instantiation.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ function Base.show(io::IO, v::Variable)
208208
first = false
209209
end
210210

211+
if v.fixed != nothing
212+
if !first; print(io, ", ") end
213+
print(io, "fixed = ", v.fixed)
214+
first = false
215+
end
216+
211217
if v.nominal != nothing
212218
if !first; print(io, ", ") end
213219
print(io, "nominal = ", v.nominal)

src/symbolic/StructuralTransform.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ function transformStructurally(flat_model)
745745

746746
nFlow = 0
747747
for (n, v) in unknowns
748-
if v.flow
748+
if v.flow != nothing && v.flow
749749
nFlow += 1
750750
end
751751
end

src/symbolic/Utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function showVariable(v)
164164
first = false
165165
end
166166

167-
if v.flow != false
167+
if v.flow != nothing
168168
if !first; logModia(", ") end
169169
logModia("flow = ", v.flow)
170170
first = false

0 commit comments

Comments
 (0)