Package: osbdo
Oracle-Structured Bundle Distributed Optimization (OSBDO)This repository accompanies the manuscriptAn Oracle-Structured Bundle Method for Distributed Optimization.We consider the optimization problem\begin{array}{ll}
\mbox{minimize} & h(x) = f(x) + g(x),
\end{array}where $x \in {\mbox{\bf R}}^n$ is the variable, and
$f, g:{\mbox{\bf R}}^n \to {\mbox{\bf R}}\cup {\infty}$
are the oracle and structured convex objective functions, respectively.The oracle objective function $f$
is block separable, i.e., is of the formf(x) = \sum_{i=1}^M f_i(x_i),where $x_i \in {\mbox{\bf R}}^{n_i}$ and $x=(x_1, \ldots, x_M)$.
We refer to $x_i$ as the public variable and $f_i$ as the objective function
of the agent $i$. Our access to $f_i$ is only via an oracle that evaluates
the function value and a subgradient at a given point $x_i$, i.e.,
$f_i(x_i)$ and $q_i \in \partial f_i(x_i)$.The function $g$ is structured in the sense that we are given its complete
description in disciplined convex programming (DCP) format.
Presumably the function $g$ couples the block variables
$x_1, \ldots, x_M$.In this repository we provide an implementation of the bundle-type method
proposed in ourmanuscript.InstallationOSBDO is available on the Python Package Index, usepip install osbdoRequirementspython >= 3.8CVXPY >= 1.2.0numpy >= 1.22.2matplotlib >= 1.16.0scipy >= 1.8.0Getting startedTo start usingosbdosolver, follow the procedure below.Describe each objective function $f_i$ in a class that inherits fromosbdo.AgentAgent_i(osbdo.Agent)create dictionary with parametersparamsrelevant for function $f_i$dictionaryparamscontains items with the dimension of public variable $x_i$ and its lower and upper boundparams = {"dimension"= ..., "lower_bound"=..., "upper_bound":..., }implement methodsAgent_i.query(v): returns output of the subgradient oracle at point $v$ as aPoint(v, q, f_i(v))Agent_i._construct_params(): construct necessary parameters for $f_i$ fromparamsAgent_i.get_init_minorant(): returns initial minorant of agent's objective $\hat f^0_i$ as acvxpy.ExpressionDefine a structured function $g$ as anosbdo.Coupling(agents, function, domain)by specifyingagents: list of $M$ agents of typeAgent_ifunction: function $g$ on its domain, given as acvxpy.Expressiondomain: domain of $g$ given as a list ofcvxpyconstraintsDefine a distributed optimization problem as anosbdo.Problem(agents, g)by specifyingagents: list of $M$ agents of typeAgent_ig: a structured function $g$ of typeCouplingSolve a distributed optimization problemosbdo.Problem.solve()memoryis an optional parameter that limits the memory (set
to infinity by default); see themanuscriptosbdo.Problem.upper_bnd,osbdo.Problem.lower_bnd: upper and lower bounds on optimal
problem value in each iteration, populated after calling theProblem.solve()Hello worldWe provide a guideline on how to use our method using thehello world exampleJupyter notebook.Example notebooksWe haveexample notebooksthat show how to use our method on a number of different problems.supply chain problemresource allocation problemmulti-commodity flow problemfederated learning problemPlease consult ourmanuscriptfor the details of mentioned problems and their oracle-structured form.Extra exampleWe use our method for finding the intersection of the convex sets.intersection of convex setsWe also check the performance of OSBDO when applied to the action directed Walrasian equilibrium (over the primal variables) and price directed Walrasian equilibrium (over the dual variable).Walrasian equilibrium