Skip to content

Commit

Permalink
updates for v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mforets committed Jan 27, 2019
1 parent 4cccc12 commit a1c5bad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function parse_location(field)
elseif nodename(element) == "flow"
f = parse_sxmath(nodecontent(element))
else
warn("field $(nodename(element)) in location $(field["id"]) is ignored")
@warn("field $(nodename(element)) in location $(field["id"]) is ignored")
end
end
return (id, I, f)
Expand Down Expand Up @@ -339,7 +339,7 @@ function parse_transition(field)
elseif nodename(element) == "assignment"
A = parse_sxmath(nodecontent(element), assignment=true)
else
warn("field $(nodename(element)) in transition $(field["source"])$(field["target"]) is ignored")
@warn("field $(nodename(element)) in transition $(field["source"])$(field["target"]) is ignored")
end
end
return (q, r, G, A)
Expand Down
12 changes: 6 additions & 6 deletions src/symbolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function linearHS(HDict; ST=ConstrainedLinearControlContinuousSystem,
nlocations, ntransitions = HDict["nlocations"], HDict["ntransitions"]

# vector of modes (flows, invariants)
modes = Vector{ST}(nlocations)
modes = Vector{ST}(undef, nlocations)

for id_location in eachindex(flows)

Expand All @@ -79,10 +79,10 @@ function linearHS(HDict; ST=ConstrainedLinearControlContinuousSystem,
local_state_variables = convert.(Basic, [fi.args[1].args[1] for fi in flows[id_location]])

# dynamics matrix
A = Matrix{N}(n, n)
A = Matrix{N}(undef, n, n)

# forcing terms
B = Matrix{N}(n, m)
B = Matrix{N}(undef, n, m)
C = zeros(N, n) # constant terms

# track if there are constant terms
Expand Down Expand Up @@ -153,7 +153,7 @@ function linearHS(HDict; ST=ConstrainedLinearControlContinuousSystem,
end

# reset maps (assignments, guards) for each transition (equations)
resetmaps = Vector{STD}(ntransitions)
resetmaps = Vector{STD}(undef, ntransitions)

for id_transition in eachindex(assignments)

Expand All @@ -172,10 +172,10 @@ function linearHS(HDict; ST=ConstrainedLinearControlContinuousSystem,
local_state_variables = convert.(Basic, [ai.args[1].args[1] for ai in assignments[id_transition]])

# dynamics matrix
Ar = Matrix{N}(n, n)
Ar = Matrix{N}(undef, n, n)

# forcing terms
Br = Matrix{N}(n, m)
Br = Matrix{N}(undef, n, m)
Cr = zeros(N, n) # constant terms

# track if there are constant terms
Expand Down

0 comments on commit a1c5bad

Please sign in to comment.