Skip to content

Commit

Permalink
update print functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Jun 19, 2024
1 parent f4b9a46 commit a8474e2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/utility/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ printBusData(system, analysis)
```
"""
function printBusData(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBusData(system, analysis, scale)

maxLine = sum(format["length"][1:3]) + 8
Expand Down Expand Up @@ -196,7 +196,7 @@ function printBusData(system::PowerSystem, analysis::AC, io::IO = stdout)
end

function printBusData(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBusData(system, analysis, scale)

maxLine = sum(format["length"][1:2]) + 5
Expand Down Expand Up @@ -291,7 +291,7 @@ printBranchData(system, analysis)
```
"""
function printBranchData(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBranchData(system, analysis, scale)

if format["power"] || format["current"]
Expand Down Expand Up @@ -468,7 +468,7 @@ function printBranchData(system::PowerSystem, analysis::AC, io::IO = stdout)
end

function printBranchData(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBranchData(system, analysis, scale)

if format["power"]
Expand Down Expand Up @@ -537,7 +537,7 @@ printGeneratorData(system, analysis)
```
"""
function printGeneratorData(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatGeneratorData(system, analysis, scale)

if format["power"]
Expand Down Expand Up @@ -592,7 +592,7 @@ function printGeneratorData(system::PowerSystem, analysis::AC, io::IO = stdout)
end

function printGeneratorData(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatGeneratorData(system, analysis, scale)

if format["power"]
Expand Down Expand Up @@ -890,7 +890,7 @@ printBusSummary(system, analysis)
```
"""
function printBusSummary(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBusSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand Down Expand Up @@ -941,7 +941,7 @@ function printBusSummary(system::PowerSystem, analysis::AC, io::IO = stdout)
end

function printBusSummary(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBusSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand Down Expand Up @@ -1002,7 +1002,7 @@ printBranchSummary(system, analysis)
```
"""
function printBranchSummary(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBranchSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand Down Expand Up @@ -1051,7 +1051,7 @@ function printBranchSummary(system::PowerSystem, analysis::AC, io::IO = stdout)
end

function printBranchSummary(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatBranchSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand Down Expand Up @@ -1102,7 +1102,7 @@ printGeneratorSummary(system, analysis)
```
"""
function printGeneratorSummary(system::PowerSystem, analysis::AC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatGeneratorSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand All @@ -1123,7 +1123,7 @@ function printGeneratorSummary(system::PowerSystem, analysis::AC, io::IO = stdou
end

function printGeneratorSummary(system::PowerSystem, analysis::DC, io::IO = stdout)
scale = printScale(prefix)
scale = printScale(system, prefix)
format = formatGeneratorSummary(system, analysis, scale)

Printf.@printf io "\n"
Expand Down Expand Up @@ -1647,7 +1647,7 @@ function printTitle(maxLine::Int64, title::String, io::IO)
Printf.@printf(io, "|%s|\n", "-"^maxLine)
end

function printScale(prefix::PrefixLive)
function printScale(system::PowerSystem, prefix::PrefixLive)
scale = Dict(
"voltageAngle" => 1.0,
"activePower" => 1.0,
Expand Down

0 comments on commit a8474e2

Please sign in to comment.