https://github.com/cvxgrp/osbdo
Oracle-Structured Bundle Distributed Optimization (OSBDO)
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.7%) to scientific vocabulary
Repository
Oracle-Structured Bundle Distributed Optimization (OSBDO)
Basic Info
- Host: GitHub
- Owner: cvxgrp
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 3 MB
Statistics
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
- Releases: 6
Metadata Files
README.md
# Oracle-Structured Bundle Distributed Optimization (OSBDO)
This repository accompanies the manuscript Implementation of an Oracle-Structured Bundle Method for Distributed Optimization.
We consider the optimization problem
math
\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 form
math
f(x) = \sum_{i=1}^M f_i(x_i),
where $xi \in {\mbox{\bf R}}^{ni}$ and $x=(x1, \ldots, xM)$.
We refer to $xi$ as the public variable and $fi$ as the objective function
of the agent $i$. Our access to $fi$ is only via an oracle that evaluates
the function value and a subgradient at a given point $xi$, i.e.,
$fi(xi)$ and $qi \in \partial fi(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 $x1, \ldots, xM$.
In this repository we provide an implementation of the bundle-type method proposed in our manuscript.
Installation
OSBDO is available on the Python Package Index, use
pip install osbdo
Requirements
* python >= 3.8
* CVXPY >= 1.2.0
* numpy >= 1.22.2
* matplotlib >= 1.16.0
* scipy >= 1.8.0
Getting started
To start using osbdo solver, follow the procedure below.
Describe each objective function $f_i$ in a class that inherits from
osbdo.AgentAgent_i(osbdo.Agent)- create dictionary with parameters
paramsrelevant for function $f_i$- dictionary
paramscontains items with the dimension of public variable $x_i$ and its lower and upper boundparams = {"dimension"= ..., "lower_bound"=..., "upper_bound":..., }
- dictionary
- implement methods
Agent_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.Expression
Define a structured function $g$ as an
osbdo.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 ofcvxpyconstraints
Define a distributed optimization problem as an
osbdo.Problem(agents, g)by specifyingagents: list of $M$ agents of typeAgent_ig: a structured function $g$ of typeCoupling
Solve a distributed optimization problem
osbdo.Problem.solve()memoryis an optional parameter that limits the memory (set to infinity by default); see the manuscript
osbdo.Problem.upper_bnd,osbdo.Problem.lower_bnd: upper and lower bounds on optimal problem value in each iteration, populated after calling theProblem.solve()
Hello world
We provide a guideline on how to use our method using the hello world example Jupyter notebook.
Example notebooks
We have example notebooks that show how to use our method on a number of different problems.
- supply chain problem
- resource allocation problem
- multi-commodity flow problem
- federated learning problem
Please consult our manuscript for the details of mentioned problems and their oracle-structured form.
Extra example
We use our method for finding the intersection of the convex sets. * intersection of convex sets
We 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
Citing
If you use OSBDO please cite the associated paper.
@article{parshakova2022oraclestructured,
title={An Oracle-Structured Bundle Method for Distributed Optimization},
author={Tetiana Parshakova and Fangzhao Zhang and Stephen Boyd},
year={2022},
eprint={2211.01418},
archivePrefix={arXiv},
primaryClass={math.OC}
}
Owner
- Name: Stanford University Convex Optimization Group
- Login: cvxgrp
- Kind: organization
- Location: Stanford, CA
- Website: www.stanford.edu/~boyd
- Repositories: 102
- Profile: https://github.com/cvxgrp
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 11 hours
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- parshakova (1)
- Thistleman (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 8 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
pypi.org: osbdo
Oracle-Structured Bundle Distributed Optimization
- Homepage: https://github.com/cvxgrp/osbdo
- Documentation: https://osbdo.readthedocs.io/
- License: GPLv3
-
Latest release: 0.0.6
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- cvxpy >=1.2.0
- matplotlib >=1.16.0
- numpy >=1.22.2
- scipy >=1.8.0
- cvxpy *
- matplotlib *
- numpy *
- scipy *
- actions/checkout v3 composite
- actions/setup-python v3 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- conda-incubator/setup-miniconda v2 composite