Skip to content

Commit

Permalink
Merge pull request #49 from Welthulk/dev/0.4.17
Browse files Browse the repository at this point in the history
hotfix issue#48
  • Loading branch information
sudo-ac authored Apr 14, 2024
2 parents 4ddfe51 + f45da0a commit ab6f835
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Sparlectra"
uuid = "31ce9bba-fd9d-44a1-b005-f5f509afda38"
authors = ["Udo Schmitz"]
description = "load flow calculation using newton-raphson"
version = "0.4.17"
version = "0.4.18"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
5 changes: 5 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Change Log
## Version 0.4.18 (2024-04-14)

### Bug Fixes
- closes issue#48 "printout jacobian runs into error"

## Version 0.4.17 (2024-04-14)
### New Features
- added testcase for importing Matpower files
Expand Down
4 changes: 2 additions & 2 deletions src/Sparlectra.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Sparlectra 0.4.17
Sparlectra 0.4.18
Sparlectra is a Julia package for the calculation of electrical networks. It is designed to be used in the context of power system analysis and optimization.
Expand Down Expand Up @@ -27,7 +27,7 @@ using LinearAlgebra, SparseArrays, Printf, Logging

# resource data types for working with Sparlectra
const Wurzel3 = 1.7320508075688772
const SparlectraVersion = VersionNumber("0.4.17")
const SparlectraVersion = VersionNumber("0.4.18")
abstract type AbstractBranch end

export
Expand Down
10 changes: 5 additions & 5 deletions src/jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -676,16 +676,16 @@ function calcNewtonRaphson!(Y::AbstractMatrix{ComplexF64}, nodes::Vector{Node},
end

if verbose > 3
vm_pu = round(nodes[i]._vm_pu, digits = 3)
va_deg = round(nodes[i]._va_deg, digits = 3)
vm_pu = round(nodes[idx]._vm_pu, digits = 3)
va_deg = round(nodes[idx]._va_deg, digits = 3)
if va_deg > 180
va_deg -= 360
va_deg = round(va_deg, digits = 3)
end
if i == lastNode
println("(Bus=$(i), vm=$(vm_pu), va=$(va_deg))")
if idx == lastNode
println("(Bus=$(idx), vm=$(vm_pu), va=$(va_deg))")
else
print("(Bus=$(i), vm=$(vm_pu), va=$(va_deg)), ")
print("(Bus=$(idx), vm=$(vm_pu), va=$(va_deg)), ")
end
end
end
Expand Down

0 comments on commit ab6f835

Please sign in to comment.