Skip to content

Commit

Permalink
add print method for operational cost types
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Feb 6, 2024
1 parent 19f649c commit 884ebc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ function Base.summary(tech::DeviceParameter)
return "$(typeof(tech))"
end

function Base.show(io::IO, ::MIME"text/plain", data::OperationalCost)
println(io, "$(typeof(data)): ")
for field_name in fieldnames(typeof(data))
val = getproperty(data, field_name)
print(io, " $(field_name): $val\n")
end

Check warning on line 147 in src/utils/print.jl

View check run for this annotation

Codecov / codecov/patch

src/utils/print.jl#L142-L147

Added lines #L142 - L147 were not covered by tests
end

function Base.show(io::IO, ::MIME"text/plain", data::PowerSystemTableData)
println(io, "$(typeof(data)):")
println(io, " directory: $(data.directory)")
Expand Down

0 comments on commit 884ebc0

Please sign in to comment.