Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Dec 6, 2024
1 parent d7ac4b1 commit 9ac3d42
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/src/manual/acOptimalPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ addGenerator!(system; label = "Generator 1", bus = "Bus 1", active = 0.4, reacti
addGenerator!(system; label = "Generator 2", bus = "Bus 2", active = 0.2, reactive = 0.1)
cost!(system; generator = "Generator 1", active = 2, polynomial = [800.0; 200.0; 80.0])
cost!(system; generator = "Generator 2", active = 1, piecewise = [10.8 12.3; 14.7 16.8; 18 18.1])
cost!(system; generator = "Generator 2", active = 1, piecewise = [10 12.3; 14.7 16.8; 18 19])
cost!(system; generator = "Generator 1", reactive = 2, polynomial = [2.0])
cost!(system; generator = "Generator 2", reactive = 1, piecewise = [2.0 4.0; 6.0 8.0])
Expand Down Expand Up @@ -339,7 +339,7 @@ JuliaGrid also stores the objective function in a separate variable, which can b
##### Update Objective Function
By utilizing the [`cost!`](@ref cost!) functions, users have the flexibility to modify the objective function by adjusting polynomial or linear piecewise coefficients or by changing the type of polynomial or linear piecewise function employed. For example, consider `Generator 1`, which employs a quadratic polynomial cost function for active power. We can redefine the cost function for this generator as a cubic polynomial and thereby define a nonlinear objective function:
```@example ACOptimalPowerFlow
cost!(system, analysis; generator = "Generator 1", active = 2, polynomial = [631; 257; 40; 5.0])
cost!(system, analysis; generator = "Generator 1", active = 2, polynomial = [63; 25; 4; 0.5])
nothing # hide
```

Expand Down Expand Up @@ -577,7 +577,7 @@ addGenerator!(system; label = "Generator 1", bus = "Bus 1", active = 3.2, reacti
addGenerator!(system; label = "Generator 2", bus = "Bus 2", active = 0.2, reactive = 0.1)
cost!(system; generator = "Generator 1", active = 2, polynomial = [1100.2; 500; 80])
cost!(system; generator = "Generator 2", active = 1, piecewise = [10.8 12.3; 14.7 16.8; 18 18.1])
cost!(system; generator = "Generator 2", active = 1, piecewise = [10 12.3; 14.7 16.8; 18 19])
analysis = acOptimalPowerFlow(system, Ipopt.Optimizer)
JuMP.set_silent(analysis.method.jump) # hide
Expand Down
2 changes: 1 addition & 1 deletion docs/src/manual/dcOptimalPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ addGenerator!(system; label = "Generator 3", bus = "Bus 2", active = 0.2, maxAct
cost!(system; generator = "Generator 1", active = 2, polynomial = [1100.2; 500; 80])
cost!(system; generator = "Generator 2", active = 1, piecewise = [8.0 11.0; 14.0 17.0])
cost!(system; generator = "Generator 3", active = 1, piecewise = [6.8 12.3; 8.7 16.8; 11.2 19.8])
cost!(system; generator = "Generator 3", active = 1, piecewise = [6 12.3; 8.7 16.8; 11 19])
dcModel!(system)
nothing # hide
Expand Down
24 changes: 23 additions & 1 deletion docs/src/manual/powerSystemModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ system = powerSystem("C:/hdf5/case14.h5")
!!! tip "Tip"
It is recommended to load the power system from the HDF5 file to reduce the loading time.

---

##### Examples
The table below presents a selection of widely used power system datasets that users can utilize to model and analyze power systems. These datasets vary in size and complexity, offering flexibility for various applications.

| Power System | Buses | Branches | Generators | Download Links
|:------------------------------------------|:-----:|:--------:|:----------:|:------------------------------------------------:|
| IEEE 14-bus test case | 14 | 20 | 5 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case14.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case14.m)]
| IEEE 30-bus test case | 30 | 41 | 6 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case_ieee30.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case_ieee30.m)]
| IEEE 118-bus test case | 118 | 186 | 54 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case118.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case118.m)]
| IEEE 300-bus test case | 300 | 411 | 69 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case300.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case300.m)]
| Part of the European transmission network | 1354 | 1991 | 260 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case1354pegase.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case1354pegase.m)]
| French transmission network | 1951 | 2596 | 392 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case1951rte.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case1951rte.m)]
| Synthetic US WECC model | 10000 | 12706 | 2485 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case_ACTIVSg10k.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case_ACTIVSg10k.m)]
| Synthetic US NE/Mid-Atlantic model | 25000 | 32230 | 4834 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case_ACTIVSg25k.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case_ACTIVSg25k.m)]
| Synthetic Eastern US model | 70000 | 88207 | 10390 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case_ACTIVSg70k.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case_ACTIVSg70k.m)]
| Synthetic US model | 82000 | 104121 | 13419 | [[hdf5](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/hdf5/case_SyntheticUSA.h5)] [[matpower](https://github.com/mcosovic/JuliaGridData/raw/refs/heads/main/power_systems/matlab/case_SyntheticUSA.m)]


---

##### Model from Scratch
Expand Down Expand Up @@ -760,4 +779,7 @@ system.generator.cost.reactive.piecewise[1]
```

!!! tip "Tip"
The [`cost!`](@ref cost!) function not only adds costs but also allows users to update previously defined cost functions. This functionality is particularly valuable in optimal power flow analyses, as it allows users to modify generator power costs without the need to recreate models from scratch.
The [`cost!`](@ref cost!) function not only adds costs but also allows users to update previously defined cost functions. This functionality is particularly valuable in optimal power flow analyses, as it allows users to modify generator power costs without the need to recreate models from scratch.



0 comments on commit 9ac3d42

Please sign in to comment.