diff --git a/main/.documenter-siteinfo.json b/main/.documenter-siteinfo.json index cc824e8..2a4ae12 100644 --- a/main/.documenter-siteinfo.json +++ b/main/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-17T00:46:15","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-24T00:46:26","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/main/dev/index.html b/main/dev/index.html index ce75d25..b10ba02 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*}\]

  1. Update $\lambda_z$
  2. Repeat steps 2-3 until $z \approx 0$.

Implementation steps

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:

  1. Create a directory models/myopf for your own model.

  2. 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.

  3. Implement all necessary functions: A list of functions required to implement

Note

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.

A list of functions required to implement

Define the following functions that will take your new model structure:

Functions in myopf_admm_increment_outer.jl

ExaAdmm.admm_increment_outerMethod

Increment outer iteration counter by one.

source
ExaAdmm.admm_increment_reset_innerMethod

Reset inner iteration counter to zero.

source
ExaAdmm.admm_increment_innerMethod

Increment inner iteration counter by one.

source

Functions in myopf_admm_prepoststep_{cpu,gpu}.jl

ExaAdmm.admm_outer_prestepMethod

Implement any algorithmic steps required before each outer iteration.

source
ExaAdmm.admm_inner_prestepMethod

Implement any algorithmic steps required before each inner iteration.

source
ExaAdmm.admm_poststepMethod

Implement any steps required after the algorithm terminates.

source

Functions in myopf_admm_update_x_{cpu,gpu}.jl

ExaAdmm.admm_update_xMethod

Update variable x, representing the variables for generators and lines in the component-based decomposition of ACOPF.

source

Functions in myopf_admm_update_xbar_{cpu,gpu}.jl

ExaAdmm.admm_update_xbarMethod

Update variable xbar, representing the variables for buses in the component-based decomposition of ACOPF.

source

Functions in myopf_admm_update_z_{cpu,gpu}.jl

ExaAdmm.admm_update_zMethod

Update variable z, representing the artificial variables that are driven to zero in the two-level ADMM.

source

Functions in myopf_admm_update_l_{cpu,gpu}.jl

ExaAdmm.admm_update_lMethod

Update multipliers λ for consensus constraints, x - xbar + z = 0.

source

Functions in myopf_admm_update_lz_{cpu,gpu}.jl

ExaAdmm.admm_update_lzMethod

Compute and update multipliers λ_z for the augmented Lagrangian wit respect to z=0 constraint.

source

Functions in myopf_admm_update_residual_{cpu,gpu}.jl

ExaAdmm.admm_update_residualMethod

Compute and update the primal and dual residuals at current iteration.

Arguments

  • env::AdmmEnv – struct that defines the environment of ADMM
  • mod::ModelAcopf – struct that defines model

Notes

The primal and dual residuals are stored in mod.solution.rp and mod.solution.rd, respectively.

source
Note

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|}})\]

Notes for GPU

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.

+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

  • Note

    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.

    A list of functions required to implement

    Define the following functions that will take your new model structure:

    Functions in myopf_admm_increment_outer.jl

    ExaAdmm.admm_increment_outerMethod

    Increment outer iteration counter by one.

    source
    ExaAdmm.admm_increment_reset_innerMethod

    Reset inner iteration counter to zero.

    source
    ExaAdmm.admm_increment_innerMethod

    Increment inner iteration counter by one.

    source

    Functions in myopf_admm_prepoststep_{cpu,gpu}.jl

    ExaAdmm.admm_outer_prestepMethod

    Implement any algorithmic steps required before each outer iteration.

    source
    ExaAdmm.admm_inner_prestepMethod

    Implement any algorithmic steps required before each inner iteration.

    source
    ExaAdmm.admm_poststepMethod

    Implement any steps required after the algorithm terminates.

    source

    Functions in myopf_admm_update_x_{cpu,gpu}.jl

    ExaAdmm.admm_update_xMethod

    Update variable x, representing the variables for generators and lines in the component-based decomposition of ACOPF.

    source

    Functions in myopf_admm_update_xbar_{cpu,gpu}.jl

    ExaAdmm.admm_update_xbarMethod

    Update variable xbar, representing the variables for buses in the component-based decomposition of ACOPF.

    source

    Functions in myopf_admm_update_z_{cpu,gpu}.jl

    ExaAdmm.admm_update_zMethod

    Update variable z, representing the artificial variables that are driven to zero in the two-level ADMM.

    source

    Functions in myopf_admm_update_l_{cpu,gpu}.jl

    ExaAdmm.admm_update_lMethod

    Update multipliers λ for consensus constraints, x - xbar + z = 0.

    source

    Functions in myopf_admm_update_lz_{cpu,gpu}.jl

    ExaAdmm.admm_update_lzMethod

    Compute and update multipliers λ_z for the augmented Lagrangian wit respect to z=0 constraint.

    source

    Functions in myopf_admm_update_residual_{cpu,gpu}.jl

    ExaAdmm.admm_update_residualMethod

    Compute and update the primal and dual residuals at current iteration.

    Arguments

    • env::AdmmEnv – struct that defines the environment of ADMM
    • mod::ModelAcopf – struct that defines model

    Notes

    The primal and dual residuals are stored in mod.solution.rp and mod.solution.rd, respectively.

    source
    Note

    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|}})\]

    Notes for GPU

    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.

    diff --git a/main/index.html b/main/index.html index 36b94b2..3e845c1 100644 --- a/main/index.html +++ b/main/index.html @@ -8,4 +8,4 @@ scale=1e-4, tight_factor=0.99, use_gpu=true -);

    The following table shows parameter values we used for solving pegase and ACTIVSg data.

    Datarho_pqrho_vascaleobj_scale
    1354pegase1e11e31e-41.0
    2869pegase1e11e31e-41.0
    9241pegase5e15e31e-41.0
    13659pegase5e15e31e-41.0
    ACTIVSg25k3e33e41e-51.0
    ACTIVSg70k3e43e51e-52.0

    We have used the same tight_factor=0.99, outer_iterlim=20, and inner_iterlim=1000 for all of the above data.

    Publications

    Acknowledgements

    This research was supported by the Exascale ComputingProject (17-SC-20-SC), a collaborative effort of the U.S. Department of Energy Office of Science and the National Nuclear Security Administration. This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.

    +);

    The following table shows parameter values we used for solving pegase and ACTIVSg data.

    Datarho_pqrho_vascaleobj_scale
    1354pegase1e11e31e-41.0
    2869pegase1e11e31e-41.0
    9241pegase5e15e31e-41.0
    13659pegase5e15e31e-41.0
    ACTIVSg25k3e33e41e-51.0
    ACTIVSg70k3e43e51e-52.0

    We have used the same tight_factor=0.99, outer_iterlim=20, and inner_iterlim=1000 for all of the above data.

    Publications

    Acknowledgements

    This research was supported by the Exascale ComputingProject (17-SC-20-SC), a collaborative effort of the U.S. Department of Energy Office of Science and the National Nuclear Security Administration. This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.