ExaAdmm.admm_increment_outer
— MethodIncrement outer iteration counter by one.
diff --git a/main/.documenter-siteinfo.json b/main/.documenter-siteinfo.json index 8a9fbae..fc79ace 100644 --- a/main/.documenter-siteinfo.json +++ b/main/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-22T00:44:04","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-29T00:44:44","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/main/dev/index.html b/main/dev/index.html index a2f5c59..9756d18 100644 --- a/main/dev/index.html +++ b/main/dev/index.html @@ -9,4 +9,4 @@ \text{subject to} \quad & x - \bar{x} + z = 0 & (\lambda) \end{align*}\]
We encourage to follow our naming convention for the files created for your own model. In this description, we assume that we are creating our own model called myopf
. The steps required to implement the two-level ADMM algorithm for the model myopf
are as follows:
Create a directory models/myopf
for your own model.
Create a file models/myopf/myopf_model.jl
to define the model structure from AbstractOPFModel
.
mutable struct ModelMyopf{T,TD,TI,TM} <: AbstractOPFModel{T,TD,TI,TM}
# ...
-end
Examples are available in models/acopf/acopf_model.jl
and models/mpacopf_model.jl
.
Implement all necessary functions: A list of functions required to implement
ExaAdmm.jl
provides a default implementation for each function, dispatching on AbstractOPFModel
. This default implementation matches the behavior of ModelAcopf
, and allow the user to avoid overloading if the behavior of the new model ModelMyopf
matches those of ModelAcopf
for a particular function.
Define the following functions that will take your new model structure:
myopf_admm_increment_outer.jl
ExaAdmm.admm_increment_outer
— MethodIncrement outer iteration counter by one.
ExaAdmm.admm_increment_reset_inner
— MethodReset inner iteration counter to zero.
ExaAdmm.admm_increment_inner
— MethodIncrement inner iteration counter by one.
myopf_admm_prepoststep_{cpu,gpu}.jl
ExaAdmm.admm_outer_prestep
— MethodImplement any algorithmic steps required before each outer iteration.
ExaAdmm.admm_inner_prestep
— MethodImplement any algorithmic steps required before each inner iteration.
ExaAdmm.admm_poststep
— MethodImplement any steps required after the algorithm terminates.
myopf_admm_update_x_{cpu,gpu}.jl
ExaAdmm.admm_update_x
— MethodUpdate variable x
, representing the variables for generators and lines in the component-based decomposition of ACOPF.
myopf_admm_update_xbar_{cpu,gpu}.jl
ExaAdmm.admm_update_xbar
— MethodUpdate variable xbar
, representing the variables for buses in the component-based decomposition of ACOPF.
myopf_admm_update_z_{cpu,gpu}.jl
ExaAdmm.admm_update_z
— MethodUpdate variable z
, representing the artificial variables that are driven to zero in the two-level ADMM.
myopf_admm_update_l_{cpu,gpu}.jl
ExaAdmm.admm_update_l
— MethodUpdate multipliers λ for consensus constraints, x - xbar + z = 0
.
myopf_admm_update_lz_{cpu,gpu}.jl
ExaAdmm.admm_update_lz
— MethodCompute and update multipliers λ_z
for the augmented Lagrangian wit respect to z=0
constraint.
myopf_admm_update_residual_{cpu,gpu}.jl
ExaAdmm.admm_update_residual
— MethodCompute and update the primal and dual residuals at current iteration.
Arguments
env::AdmmEnv
– struct that defines the environment of ADMMmod::ModelAcopf
– struct that defines modelNotes
The primal and dual residuals are stored in mod.solution.rp
and mod.solution.rd
, respectively.
Internally, these x
and xbar
correspond to u
and v
variables in the code, respectively. Variables u
and v
have the same structure. For example in ACOPF, the variable stores modeling variable values in the following order:
\[({\color{blue} (p_{g,i}, q_{g,i})_{i=1,\dots,|G|}}, {\color{red} (p_{ij,\ell}, q_{ij,\ell}, p_{ji,\ell}, q_{ji,\ell}, w_{i,\ell}, w_{j,\ell}, t_{i,\ell}, t_{j,\ell})_{\ell=1,\dots,|L|}})\]
To make your model run on Nvidia GPUs, the AdmmEnv
and you also need to implement these functions that take arrays of type CuArray
. You can find examples in interface/solve_acopf.jl
and interface/solve_mpacopf.jl
.
Settings
This document was generated with Documenter.jl version 1.7.0 on Sunday 22 September 2024. Using Julia version 1.9.4.