julia> dump(sys.buses[5])
Bus
number: Int64 10
name: String "bus5"
bustype: String "PQ"
angle: Float64 0.0
voltage: Float64 1.0
voltagelimits: NamedTuple{(:min, :max),Tuple{Float64,Float64}}
min: Float64 0.9
max: Float64 1.1
basevoltage: Float64 230.0
julia> PowerSimulations.constructdevice!(op_model.model, netinjection, category.device, category.formulation, op_model.transmission, sys)
ERROR: Variable name p_th[Solitude,1] is already used by MathOptInterface.VariableIndex(1))
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] check_can_assign_name(::JuMP.JuMPMOIModel{Float64}, ::Type{MathOptInterface.VariableIndex}, ::MathOptInterface.VariableIndex, ::String) at /Users/cbarrows/.julia/packages/MathOptInterface/62rhX/src/Utilities/model.jl:162
[3] set at /Users/cbarrows/.julia/packages/MathOptInterface/62rhX/src/Utilities/model.jl:189 [inlined]
[4] set(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP.JuMPMOIModel{Float64}}}, ::MathOptInterface.VariableName, ::MathOptInterface.VariableIndex, ::String) at /Users/cbarrows/.julia/packages/MathOptInterface/62rhX/src/Utilities/cachingoptimizer.jl:400
[5] set(::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP.JuMPMOIModel{Float64}}},MathOptInterface.Bridges.AllBridgedConstraints{Float64}}, ::MathOptInterface.VariableName, ::MathOptInterface.VariableIndex, ::String) at /Users/cbarrows/.julia/packages/MathOptInterface/62rhX/src/Bridges/bridgeoptimizer.jl:200
[6] set(::Model, ::MathOptInterface.VariableName, ::VariableRef, ::String) at /Users/cbarrows/.julia/packages/JuMP/LjMor/src/JuMP.jl:479
[7] set_name at /Users/cbarrows/.julia/packages/JuMP/LjMor/src/variables.jl:225 [inlined]
[8] add_variable(::Model, ::JuMP.ScalarVariable{Float64,Float64,Float64,Float64}, ::String) at /Users/cbarrows/.julia/packages/JuMP/LjMor/src/variables.jl:593
[9] macro expansion at /Users/cbarrows/.julia/packages/JuMP/LjMor/src/macros.jl:180 [inlined]
[10] activepowervariables(::Model, ::Array{ThermalDispatch,1}, ::Int64) at /Users/cbarrows/Documents/repos/PowerSimulations.jl/src/device_models/thermal_generation/thermal_variables.jl:12
[11] #constructdevice!#122(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Model, ::NamedTuple{(:var_active, :var_reactive, :timeseries_active, :timeseries_reactive),Tuple{Array{JuMP.GenericAffExpr{Float64,VariableRef},2},Nothing,Array{Float64,2},Nothing}}, ::Type{ThermalGen}, ::Type{PowerSimulations.ThermalDispatch}, ::Type{CopperPlatePowerModel}, ::PowerSystem{Union{Nothing, Array{#s719,1} where #s719<:ThermalGen},Union{Nothing, Array{#s720,1} where #s720<:RenewableGen},Union{Nothing, Array{#s721,1} where #s721<:HydroGen},ElectricLoad,Array{Branch,1},Array{PowerSystems.Storage,1}}) at /Users/cbarrows/Documents/repos/PowerSimulations.jl/src/component_constructors/thermalgeneration_constructor.jl:8
[12] constructdevice!(::Model, ::NamedTuple{(:var_active, :var_reactive, :timeseries_active, :timeseries_reactive),Tuple{Array{JuMP.GenericAffExpr{Float64,VariableRef},2},Nothing,Array{Float64,2},Nothing}}, ::Type{ThermalGen}, ::Type{PowerSimulations.ThermalDispatch}, ::Type{CopperPlatePowerModel}, ::PowerSystem{Union{Nothing, Array{#s719,1} where #s719<:ThermalGen},Union{Nothing, Array{#s720,1} where #s720<:RenewableGen},Union{Nothing, Array{#s721,1} where #s721<:HydroGen},ElectricLoad,Array{Branch,1},Array{PowerSystems.Storage,1}}) at /Users/cbarrows/Documents/repos/PowerSimulations.jl/src/component_constructors/thermalgeneration_constructor.jl:8
[13] top-level scope at none:0