Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Jul 24, 2024
1 parent dabc13b commit 7c1f605
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 43 deletions.
10 changes: 8 additions & 2 deletions docs/src/manual/acPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ end

---

##### Print Results
##### Print Results in the REPL
Users have the option to print the results in the REPL using any units that have been configured, such as:
```@example ACPowerFlowSolution
@voltage(pu, deg, V)
Expand All @@ -328,13 +328,19 @@ printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

---

##### Save Results to a File
Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
printBusData(system, analysis, file)
end
```

---

##### Save Results to a CSV File
For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV
Expand Down Expand Up @@ -573,7 +579,7 @@ print(system.branch.label, analysis.current.to.angle)

---

##### Print Results
##### Print Results in the REPL
Users can utilize any of the print functions outlined in the [Print Power System Data](@ref PrintPowerSystemDataAPI) or [Print Power System Summary](@ref PrintPowerSystemSummaryAPI). For example, to create a bus summary with the desired units, users can use the following function:
```@example ComputationPowersCurrentsLosses
@voltage(pu, deg, V)
Expand Down
12 changes: 9 additions & 3 deletions docs/src/manual/acStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ nothing # hide

---

##### Print Results
##### Print Results in the REPL
Users have the option to print the results in the REPL using any units that have been configured, such as:
```@example ACSEWLS
@voltage(pu, deg, V)
Expand All @@ -369,6 +369,9 @@ printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

---

##### Save Results to a File
Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
Expand All @@ -377,7 +380,7 @@ end
```

!!! tip "Tip"
We also provide functions to print state estimation results, such as estimated values and residuals. For more details, users can consult the [Power and Current Analysis](@ref ACSEPowerCurrentAnalysisManual) section of this manual.
We also provide functions to print or save state estimation results, such as estimated values and residuals. For more details, users can consult the [Power and Current Analysis](@ref ACSEPowerCurrentAnalysisManual) section of this manual.

---

Expand Down Expand Up @@ -684,7 +687,7 @@ print(system.branch.label, analysis.current.from.angle)

---

##### Print Results
##### Print Results in the REPL
Users can utilize any of the print functions outlined in the [Print API](@ref setupPrintAPI). For example, to print state estimation data related to wattmeters, we can use:
```@example WLSACStateEstimationSolution
@power(MW, pu, pu)
Expand All @@ -693,6 +696,9 @@ printWattmeterData(system, device, analysis)
nothing # hide
```

---

##### Save Results to a CSV File
For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV
Expand Down
42 changes: 17 additions & 25 deletions docs/src/manual/dcPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ nothing # hide

---

##### Print Results
##### Print Results in the REPL
Users have the option to print the results in the REPL using any units that have been configured, such as:
```@example DCPowerFlowSolution
@voltage(pu, deg, V)
Expand All @@ -135,6 +135,9 @@ printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

---

##### Save Results to a File
Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
Expand All @@ -144,6 +147,18 @@ end

---

##### Save Results to a CSV File
For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV

io = IOBuffer()
printBusData(system, analysis, io; style = false)
CSV.write("bus.csv", CSV.File(take!(io); delim = "|"))
```

---

## [Power System Update](@id DCPowerSystemAlterationManual)
After establishing the `PowerSystem` type using the [`powerSystem`](@ref powerSystem) function and configuring the DC model with [`dcModel!`](@ref dcModel!), users gain the capability to incorporate new branches and generators. Furthermore, they can adjust buses, branches, and generators.

Expand Down Expand Up @@ -311,7 +326,7 @@ print(system.branch.label, system.base.power.value * analysis.power.from.active)

---

##### Print Results
##### Print Results in the REPL
Users can utilize any of the print functions outlined in the [Print Power System Data](@ref PrintPowerSystemDataAPI) or [Print Power System Summary](@ref PrintPowerSystemSummaryAPI). For example, users have the option to print the results in the REPL using any units that have been configured:
```@example ComputationPowersCurrentsLosses
@voltage(pu, deg, V)
Expand All @@ -321,29 +336,6 @@ printBusData(system, analysis)
nothing # hide
```

Next, users can easily customize the print results for specific buses, for example:
```julia
printBusData(system, analysis; label = "Bus 1", header = true)
printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
printBusData(system, analysis, file)
end
```

For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV

io = IOBuffer()
printBusData(system, analysis, io; style = false)
CSV.write("bus.csv", CSV.File(take!(io); delim = "|"))
```

---

##### Active Power Injection
Expand Down
13 changes: 8 additions & 5 deletions docs/src/manual/dcStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ nothing # hide

---

##### Print Results
##### Print Results in the REPL
Users have the option to print the results in the REPL using any units that have been configured, such as:
```@example WLSDCStateEstimationSolution
@voltage(pu, deg, V)
Expand All @@ -117,6 +117,9 @@ printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

---

##### Save Results to a File
Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
Expand Down Expand Up @@ -363,14 +366,17 @@ print(system.bus.label, analysis.power.injection.active)

---

##### Print Results
##### Print Results in the REPL
Users can utilize any of the print functions outlined in the [Print API](@ref setupPrintAPI) related to the DC analysis. For example, to print state estimation data related to wattmeters, we can use:
```@example WLSDCStateEstimationSolution
@power(MW, pu, pu)
printWattmeterData(system, device, analysis)
@default(unit) # hide
```

---

##### Save Results to a CSV File
For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV
Expand All @@ -380,9 +386,6 @@ printWattmeterData(system, device, analysis, io; style = false)
CSV.write("bus.csv", CSV.File(take!(io); delim = "|"))
```

---


---

##### Active Power Injection
Expand Down
10 changes: 5 additions & 5 deletions docs/src/manual/measurementModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ In this example, we have chosen to specify `magnitude` and `variance` in kilovol

---

##### Print Data
##### Print Data in the REPL
Users have the option to print the voltmeter data in the REPL using any units that have been configured:
```@example addVoltmeterSI
printVoltmeterData(system, device)
Expand Down Expand Up @@ -208,7 +208,7 @@ In this example, we have opted to specify the `magnitude` and `variance` in ampe

---

##### Print Data
##### Print Data in the REPL
Users have the option to print the ammeter data in the REPL using any units that have been configured:
```@example addAmmeterSI
printAmmeterData(system, device)
Expand Down Expand Up @@ -272,7 +272,7 @@ In this example, we have chosen to specify the `active` and `variance` in megawa

---

##### Print Data
##### Print Data in the REPL
Users have the option to print the wattmeter data in the REPL using any units that have been configured:
```@example addWattmeterSI
printWattmeterData(system, device)
Expand Down Expand Up @@ -334,7 +334,7 @@ JuliaGrid will still store the values in the per-unit system:

---

##### Print Data
##### Print Data in the REPL
Users have the option to print the varmeter data in the REPL using any units that have been configured:
```@example addVarmeterSI
printVarmeterData(system, device)
Expand Down Expand Up @@ -426,7 +426,7 @@ In this example, we have opted to specify kilovolts (kV) and degrees (deg) for t

---

##### Print Data
##### Print Data in the REPL
Users have the option to print the PMU data in the REPL using any units that have been configured:
```@example addPmuSI
printPmuData(system, device; width = Dict("Measurement Mean" => 8))
Expand Down
12 changes: 9 additions & 3 deletions docs/src/manual/pmuStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ nothing # hide

---

##### Print Results
##### Print Results in the REPL
Users have the option to print the results in the REPL using any units that have been configured, such as:
```@example PMUOptimalPlacement
@voltage(pu, deg, V)
Expand All @@ -215,6 +215,9 @@ printBusData(system, analysis; label = "Bus 2")
printBusData(system, analysis; label = "Bus 3", footer = true)
```

---

##### Save Results to a File
Users can also redirect print output to a file. For example, data can be saved in a text file as follows:
```julia
open("bus.txt", "w") do file
Expand All @@ -223,7 +226,7 @@ end
```

!!! tip "Tip"
We also provide functions to print state estimation results, such as estimated values and residuals. For more details, users can consult the [Power and Current Analysis](@ref PMUSEPowerCurrentAnalysisManual) section of this manual.
We also provide functions to print or save state estimation results, such as estimated values and residuals. For more details, users can consult the [Power and Current Analysis](@ref PMUSEPowerCurrentAnalysisManual) section of this manual.

---

Expand Down Expand Up @@ -454,7 +457,7 @@ print(system.branch.label, analysis.current.from.magnitude)

---

##### Print Results
##### Print Results in the REPL
Users can utilize any of the print functions outlined in the [Print API](@ref setupPrintAPI). For example, to print state estimation data related to PMUs, we can use:
```@example PMUStateEstimationSolution
@voltage(pu, deg, V)
Expand All @@ -466,6 +469,9 @@ printPmuData(system, device, analysis; fmt, show)
@default(unit) # hide
```

---

##### Save Results to a CSV File
For CSV output, users should first generate a simple table with `style = false`, and then save it to a CSV file:
```julia
using CSV
Expand Down

0 comments on commit 7c1f605

Please sign in to comment.