Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ZikaiXiong/PDCS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Julia and CUDA implementation of the Primal-Dual algorithm for conic programming

Overview

This project implements the algorithm for solving conic optimization problems of the form:

$$\min_{x=(x_1,x_2),x_1\in \mathbb{R}^{n_1}, x_2\in \mathbb{R}^{n_2}} c^{\top} x\ \ \text{s.t.} Gx-h\in \mathcal{K}_d, l\leq x_1\leq u, x_2 \in \mathcal{K}_p,$$

where $\mathcal{K}_G$ is a closed convex cone, and $\mathcal{K}_x$ is a closed convex cone.

Features

  • Supports multiple cone types:
    • Second-order cone (recommended but not the rsoc) and Rotated second-order cone
    • Exponential cone and dual exponential cone

Installation

git clone https://github.com/ZikaiXiong/PDCS.git
cd PDCS
cd src/pdcs_gpu/cuda
make # compile the cuda code, default ARCH = sm_90, if necessary please modify makefile
cd ../../..

Usage

  • Given the example code in ./test/, you can run the following commands to test the code.
julia ./test/env.jl # install the dependencies
julia ./test/test_exp.jl # test the exponential cone cpu
julia ./test/test_soc.jl # test the second-order cone cpu
julia ./test/test_rsoc.jl # test the rotated second-order cone cpu

julia ./test/test_exp_gpu.jl # test the exponential cone gpu
julia ./test/test_soc_gpu.jl # test the second-order cone gpu
julia ./test/test_rsoc_gpu.jl # test the rotated second-order cone gpu

Converge Criteria

Three criteria are considered for the performance:

  • Primal infeasibility: $\frac{|(Gx - h) - \text{proj}_{\mathcal{K}_G}(Gx - h)|_{\infty}}{1+\max(|h|_{\infty}, |Gx|_{\infty}, |\text{proj}_{\mathcal{K}_G}(Gx - h)|_{\infty})}$
  • Dual infeasibility: $\frac{\max\{|\lambda_1-\text{proj}_{\Lambda_1}(\lambda_1)|_{\infty},|\lambda_2-\text{proj}_{\mathcal{K}_x^*}(\lambda_2)|_{\infty}\}}{1+\max\{|c|_{\infty},|G^\top y|_{\infty}\}}$,
  • Objective value accuracy: $\frac{|c^{\top}x-(y^{\top}h+l^{\top}\lambda_{1}^{+}+u^{\top}\lambda_{1}^{-})|}{1+\max{|c^{\top}x|, |y^{\top}h+l^{\top}\lambda_{1}^{+}+u^{\top}\lambda_{1}^{-}|}}$

where $\lambda=c-G^{\top}y=[\lambda_{1}^{\top},\lambda_{2}^{\top}]^{\top},\lambda_1\in \Lambda_1 \subseteq \mathbb{R}^{n_1}, \lambda_2\in \mathbb{R}^{n_2}$.

Paper

@misc{PDCS,
      title={PDCS: A Primal-Dual Large-Scale Conic Programming Solver with GPU Enhancements}, 
      author={Zhenwei Lin and Zikai Xiong and Dongdong Ge and Yinyu Ye},
      year={2025},
      eprint={2505.00311},
      archivePrefix={arXiv},
      primaryClass={math.OC},
      url={https://arxiv.org/abs/2505.00311}, 
}

About

The GPU-based primal-dual conic solver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •