Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Oct 13, 2024
1 parent d2518de commit fa3eb9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ JuliaGrid documentation consists of three main parts:
---

### Getting Started

Below, we have provided a list of exhaustive examples in order to ease users in getting started with the JuliaGrid package. These examples highlight some of the functionalities that the framework offers.

---
Expand Down
1 change: 1 addition & 0 deletions docs/src/manual/acOptimalPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ print(system.bus.label, analysis.voltage.magnitude, analysis.voltage.angle)
Users retain the flexibility to reset initial primal values to their default configurations at any juncture. This can be accomplished by utilizing the active and reactive power outputs of the generators and the initial bus voltage magnitudes and angles extracted from the `PowerSystem` type, employing the [`startingPrimal!`](@ref startingPrimal!) function:
```@example ACOptimalPowerFlow
startingPrimal!(system, analysis)
nothing # hide
```
The primal starting values will now be identical to those that would be obtained if the [`acOptimalPowerFlow`](@ref acOptimalPowerFlow) function were executed after all the updates have been applied.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/acStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ Given the available set of measurements ``\mathcal{M}``, the weighted least-squa
```
where ``\nu = \{0,1,2,\dots\} `` is the iteration index, ``\mathbf \Delta \mathbf x \in \mathbb {R}^{n_{\text{u}}} `` is the vector of increments of the state variables, ``\mathbf J (\mathbf x)\in \mathbb {R}^{k \times n_{\text{u}}}`` is the Jacobian matrix of measurement functions ``\mathbf h (\mathbf x)`` at ``\mathbf x=\mathbf x^{(\nu)}``, ``\bm \Sigma \in \mathbb {R}^{k \times k}`` is a measurement error covariance matrix, and ``\mathbf r (\mathbf x) = \mathbf{z} - \mathbf h (\mathbf x)`` is the vector of residuals [monticellibook; Ch. 10](@cite). It is worth noting that assuming uncorrelated measurement errors leads to a diagonal covariance matrix ``\bm \Sigma`` corresponding to measurement variances. However, when incorporating PMUs in a rectangular coordinate system and aiming to observe error correlation, this matrix loses its diagonal form.

The non-linear or AC state estimation represents a non-convex problem arising from the non-linear measurement functions [weng2012semidefinite](@cite). Due to the fact that the values of state variables usually fluctuate in narrow boundaries, the non-linear model represents the mildly non-linear problem, where solutions are in a reasonable-sized neighborhood which enables the use of the Gauss-Newton method. The Gauss-Newton method can produce different rates of convergence, which can be anywhere from linear to quadratic [hansen2013least; Sec. 9.2]](@cite). The convergence rate in regard to power system state estimation depends on the topology and measurements, and if parameters are consistent (e.g., free bad data measurement set), the method shows near quadratic convergence rate [monticellibook; Sec. 11.2](@cite).
The non-linear or AC state estimation represents a non-convex problem arising from the non-linear measurement functions [weng2012semidefinite](@cite). Due to the fact that the values of state variables usually fluctuate in narrow boundaries, the non-linear model represents the mildly non-linear problem, where solutions are in a reasonable-sized neighborhood which enables the use of the Gauss-Newton method. The Gauss-Newton method can produce different rates of convergence, which can be anywhere from linear to quadratic [hansen2013least; Sec. 9.2](@cite). The convergence rate in regard to power system state estimation depends on the topology and measurements, and if parameters are consistent (e.g., free bad data measurement set), the method shows near quadratic convergence rate [monticellibook; Sec. 11.2](@cite).

---

Expand Down
22 changes: 5 additions & 17 deletions src/backend/utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -366,33 +366,21 @@ import Base.print
function print(
io::IO,
label::Union{OrderedDict{String, Int64}, OrderedDict{String, Int64}},
data::Union{Vector{Float64}, Vector{Int64}, Vector{Int8}}
data::Vararg{Union{Vector{Float64}, Vector{Int64}, Vector{Int8}}}
)
for (key, value) in label
println(io::IO, key, ": ", data[value])
for (key, idx) in label
println(io::IO, key, ": ", join([d[idx] for d in data], ", "))
end
end

function print(
io::IO,
label::Union{OrderedDict{String, Int64}, OrderedDict{String, Int64}},
data1::Union{Vector{Float64}, Vector{Int64}, Vector{Int8}},
data2::Union{Vector{Float64}, Vector{Int64}, Vector{Int8}}
obj::Dict{Int64, ConstraintRef}
)
for (key, value) in label
println(io::IO, key, ": ", data1[value], ", ", data2[value])
end
end

function print(
io::IO,
label::Union{OrderedDict{String, Int64}, OrderedDict{String, Int64}},
obj::Union{Dict{Int64, ConstraintRef}, Dict{Int64, Float64}}
)
for (key, value) in label
try
if is_valid(owner_model(obj[value]), obj[value])
println(io::IO, key, ": ", obj[value])
catch
end
end
end
Expand Down

0 comments on commit fa3eb9d

Please sign in to comment.