-mpopf_model(filename, active_power_data, reactive_power_data, discharge_func::Function; kwargs...)</code></pre><p>Construct a multi-period AC optimal power flow (MPOPF) model using different formats of load input data.</p><p><strong>Arguments</strong></p><ul><li><code>filename::String</code>: Path to the network data file (e.g., MATPOWER).</li><li><code>curve::AbstractVector</code>: A time series of demand multiplier values.</li><li><code>active_power_data::String</code>: Path to a matrix of active power loads (Pd) per bus and time.</li><li><code>reactive_power_data::String</code>: Path to a matrix of reactive power loads (Qd).</li><li><code>discharge_func::Function</code>: (Optional) A function specifying battery discharge losses.</li></ul><p><strong>Keyword Arguments</strong></p><ul><li><code>N::Int</code>: Number of time periods (inferred if not provided).</li><li><code>corrective_action_ratio::Float64</code>: Ratio of corrective power action allowed (default = 0.1).</li><li><code>backend</code>: Optimization solver backend (deault = nothing).</li><li><code>form::Symbol</code>: Power flow formulation, either <code>:polar</code> or <code>:rect</code> (default = <code>:polar</code>).</li><li><code>T::Type</code>: Floating-point type for numeric variables (default = <code>Float64</code>).</li><li><code>storage_complementarity_constraint::Bool</code>: Whether to enforce complementarity for storage (only for some methods, default = false).</li><li><code>kwargs...</code>: Additional arguments passed to the solver or builder.</li></ul><p><strong>Returns</strong></p><p>A vector <code>(model::ExaModel object, variables::NamedTuple of variables, constraints::NamedTuple of constraints)</code> representing the MPOPF model.</p><p><strong>Method Variants</strong></p><p>This function is overloaded for different combinations of input:</p><ol><li><code>mpopf_model(filename, curve)</code></li><li><code>mpopf_model(filename, active_power_data, reactive_power_data)</code></li><li><code>mpopf_model(filename, curve, discharge_func)</code></li><li><code>mpopf_model(filename, active_power_data, reactive_power_data, discharge_func)</code></li></ol></div></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="ExaModelsPower.opf_model-Tuple{Any}" href="#ExaModelsPower.opf_model-Tuple{Any}"><code>ExaModelsPower.opf_model</code></a> — <span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">opf_model(filename; backend, T, form)</code></pre><p>Return <code>ExaModel</code>, variables, and constraints for a static AC Optimal Power Flow (ACOPF) problem from the given file.</p><p><strong>Arguments</strong></p><ul><li><code>filename::String</code>: Path to the data file.</li><li><code>backend</code>: The solver backend to use. Default if nothing.</li><li><code>T</code>: The numeric type to use (default is <code>Float64</code>).</li><li><code>form</code>: Voltage representation, either <code>:polar</code> or <code>:rect</code>. Default is <code>:polar</code>.</li><li><code>kwargs...</code>: Additional keyword arguments passed to the model builder.</li></ul><p><strong>Returns</strong></p><p>A vector <code>(model, variables, constraints)</code>:</p><ul><li><code>model</code>: An <code>ExaModel</code> object.</li><li><code>variables</code>: NamedTuple of model variables.</li><li><code>constraints</code>: NamedTuple of model constraints.</li></ul></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../opfs_doc/">« OPF Formulations</a><a class="docs-footer-nextpage" href="../ref/">References »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.13.0 on <span class="colophon-date" title="Friday 27 June 2025 16:15">Friday 27 June 2025</span>. Using Julia version 1.11.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments