https://github.com/cvxgrp/osbdo

Oracle-Structured Bundle Distributed Optimization (OSBDO)

https://github.com/cvxgrp/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
Last synced: 10 months ago · JSON representation

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
Created almost 4 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License

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.

  1. Describe each objective function $f_i$ in a class that inherits from osbdo.Agent

    • Agent_i(osbdo.Agent)
    • create dictionary with parameters params relevant for function $f_i$
      • dictionary params contains items with the dimension of public variable $x_i$ and its lower and upper bound
        • params = {"dimension"= ..., "lower_bound"=..., "upper_bound":..., }
    • implement methods
      • Agent_i.query(v): returns output of the subgradient oracle at point $v$ as a Point(v, q, f_i(v))
      • Agent_i._construct_params(): construct necessary parameters for $f_i$ from params
      • Agent_i.get_init_minorant(): returns initial minorant of agent's objective $\hat f^0_i$ as a cvxpy.Expression
  2. Define a structured function $g$ as an osbdo.Coupling(agents, function, domain) by specifying

    • agents: list of $M$ agents of type Agent_i
    • function: function $g$ on its domain, given as a cvxpy.Expression
    • domain: domain of $g$ given as a list of cvxpy constraints
  3. Define a distributed optimization problem as an osbdo.Problem(agents, g) by specifying

    • agents: list of $M$ agents of type Agent_i
    • g: a structured function $g$ of type Coupling
  4. Solve a distributed optimization problem

    • osbdo.Problem.solve()
      • memory is 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 the Problem.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.

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

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

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 8 Last month
Rankings
Dependent packages count: 6.6%
Average: 20.9%
Downloads: 25.5%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 10 months ago

Dependencies

requirements.txt pypi
  • cvxpy >=1.2.0
  • matplotlib >=1.16.0
  • numpy >=1.22.2
  • scipy >=1.8.0
setup.py pypi
  • cvxpy *
  • matplotlib *
  • numpy *
  • scipy *
.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • conda-incubator/setup-miniconda v2 composite
pyproject.toml pypi