Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaeder committed Nov 28, 2024
1 parent d8bb381 commit 44d9a45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/component_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ function _fill_defaults(T, @nospecialize(kwargs))
#### External Inputs
####
if haskey(dict, :extin)
@assert dict[:extin] isa Vector{<:SymbolicIndex}
@assert dict[:extin] isa Union{Nothing, Vector{<:SymbolicIndex}}
else
dict[:extin] = nothing
end
Expand Down
2 changes: 2 additions & 0 deletions src/external_inputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ function ExtMap(im::IndexManager)
isempty(map) && error("There are no external inputs.")

for (vi, vm) in pairs(im.vertexm)
has_external_input(vm) || continue
for (i, si) in pairs(vm.extin)
map[im.v_ext[vi][i]] = _symidx_to_extidx(im, si)
end
end
for (ei, em) in pairs(im.edgem)
has_external_input(em) || continue
for (i, si) in pairs(em.extin)
map[im.e_ext[ei][i]] = _symidx_to_extidx(im, si)
end
Expand Down

0 comments on commit 44d9a45

Please sign in to comment.