From 3fb8579f4be6d3aaf0b7c5c0f1a6e4b0a5356105 Mon Sep 17 00:00:00 2001 From: Simon Bowly Date: Tue, 19 Nov 2024 10:06:29 +1100 Subject: [PATCH] Update OPF docs (#161) - Document AClocal option - Add time limits to doc examples --- docs/source/mods/opf/opf.rst | 9 ++++++++- src/gurobi_optimods/opf/api.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/source/mods/opf/opf.rst b/docs/source/mods/opf/opf.rst index a74eec99..067e622c 100644 --- a/docs/source/mods/opf/opf.rst +++ b/docs/source/mods/opf/opf.rst @@ -195,6 +195,10 @@ argument when calling the function. Currently, the available options are ``AC``, it is also the most difficult problem to solve and thus usually leads to the longer runtimes. +- The ``AClocal`` setting solves the ``AC`` problem using adjusted settings to + quickly find a good quality local solution, without attempting to solve to + global optimality. + - The ``ACrelax`` setting solves a Second Order Cone (SOC) relaxation of the nonconvex bilinear ACOPF problem formulation defined by the given network data. The relaxation is constructed by dropping nonconvex bilinear terms but @@ -402,7 +406,10 @@ whether branch switching allows a better solution. case = datasets.load_opf_example("case9-switching") result = opf.solve_opf( - case, opftype="AC", branch_switching=True, min_active_branches=0.1 + case, opftype="AC", + branch_switching=True, + min_active_branches=0.1, + time_limit=60, ) .. testoutput:: opf diff --git a/src/gurobi_optimods/opf/api.py b/src/gurobi_optimods/opf/api.py index bab64e25..7fb09451 100644 --- a/src/gurobi_optimods/opf/api.py +++ b/src/gurobi_optimods/opf/api.py @@ -54,7 +54,7 @@ def solve_opf( case : dict Dictionary holding case data opftype : str - Desired OPF model type. One of ``AC``, ``ACrelax``, or ``DC`` + Desired OPF model type. One of ``AC``, ``AClocal``, ``ACrelax``, or ``DC`` branch_switching : bool, optional If set to True, enables branch switching. min_active_branches : float, optional