Skip to content

Commit

Permalink
bump BlockSystems, remove direct dep on MTK (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaeder authored Jul 20, 2022
1 parent 64b83da commit 2ca9f26
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 24 deletions.
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
NetworkDynamics = "22e9dc34-2a0d-11e9-0de0-8588d035468b"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Expand All @@ -28,17 +27,16 @@ Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"

[compat]
BlockSystems = "0.3.1"
BlockSystems = "0.4.2"
DiffEqBase = "^6.9.4"
DiffEqCallbacks = "^2"
Graphs = "1.4"
Ipopt = "0.7, 0.8, 0.9, 1"
JSON = "^0.21.0"
Lazy = "^0.14.0, 0.15"
MacroTools = "^0.5.1"
ModelingToolkit = "7"
NLsolve = "^4.1.0"
NetworkDynamics = "0.7"
NetworkDynamics = "0.7, 0.8"
OrderedCollections = "1.3"
OrdinaryDiffEq = "^5.17.2, 6"
Parameters = "^0.12.0"
Expand Down
4 changes: 0 additions & 4 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
BlockSystems = "4663d367-db1f-4bef-81e7-dc1bd7f7b428"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PowerDynamics = "cc46b21f-1b17-51c2-b642-af74c3d3a8be"

[compat]
Documenter = "0.24"
1 change: 0 additions & 1 deletion examples/BlockSystems/Example_node_construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Implementation of `VSIVoltagePT1` as an IONode.
=#

using BlockSystems
using ModelingToolkit
using PowerDynamics.IOComponents
using PowerDynamics: IONode, GFI, SlackAlgebraic, PiModelLine, PowerGrid, find_operationpoint, ChangeInitialConditions, simulate, Inc
using OrderedCollections: OrderedDict
Expand Down
2 changes: 0 additions & 2 deletions src/IONodes/BusNode.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ModelingToolkit

"""
BusNode(inj::BlockPara...; name=gensym(:Bus), verbose=false)
Expand Down
1 change: 0 additions & 1 deletion src/IONodes/GFI_MTK.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BlockSystems
using ModelingToolkit
using PowerDynamics.IOComponents

export GFI
Expand Down
7 changes: 2 additions & 5 deletions src/IONodes/IOComponents.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module IOComponents

using BlockSystems
using ModelingToolkit
using ModelingToolkit.Symbolics
using ModelingToolkit.SymbolicUtils

export LowPassFilter, DroopControl, VoltageSource, Power, PowerConstraint, InversePowerConstraint, ImpedanceConstraint

Expand Down Expand Up @@ -34,7 +31,7 @@ end
Returns in `IOBlock` with outputs which are directly mapped to values.
```jldoctest; setup = :(using ModelingToolkit)
```jldoctest; setup = :(using BlockSystems)
julia> blk = PowerDynamics.IOComponents.Constants(:a=>42, :b=>3.14; name=:const)
IOBlock :const with 2 eqs
├ inputs: (empty)
Expand Down Expand Up @@ -265,4 +262,4 @@ function ImpedanceConstraint(;name=gensym(:rxconstraint), renamings...)
return isempty(renamings) ? block : rename_vars(block; renamings...)
end

end # module
end # module
1 change: 0 additions & 1 deletion src/IONodes/IONode.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BlockSystems
using ModelingToolkit: getname, value

export IONode

Expand Down
1 change: 0 additions & 1 deletion src/IONodes/MTK_Load.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BlockSystems
using ModelingToolkit
using PowerDynamics.IOComponents

export PQ_Load
Expand Down
3 changes: 1 addition & 2 deletions src/IONodes/utils.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using BlockSystems
using BlockSystems: remove_namespace
using ModelingToolkit
using ModelingToolkit: Symbolic, getname
using BlockSystems.ModelingToolkit: getname, Symbolic

export BusNode, BlockPara
export get_block, get_parameters
Expand Down
4 changes: 2 additions & 2 deletions test/IONodes/BusNode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ using LinearAlgebra: Diagonal
rx_load = BlockPara(rx_constraint, rx_para)

busnode = BusNode(pq_load,rx_load)
@test_nowarn BusNode((pq_load,rx_load))
@test_nowarn BusNode([pq_load,rx_load])
# @test_nowarn BusNode((pq_load,rx_load))
# @test_nowarn BusNode([pq_load,rx_load])

@test symbolsof(busnode) == [:u_r, :u_i]
@test busnode.mass_matrix == Diagonal([0,0])
Expand Down
1 change: 0 additions & 1 deletion test/IONodes/IONode.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using PowerDynamics
using BlockSystems
using ModelingToolkit
using PowerDynamics.IOComponents

@testset "BlockPara testes" begin
Expand Down

0 comments on commit 2ca9f26

Please sign in to comment.