This represitory is an implementation of the paper: A Learning-Based Inexact ADMM for Solving Quadratic Programs.
Quadratic programs (QPs) constitute a fundamental class of constrained optimization problems with broad applications spanning multiple disciplines, including finance, engineering, and machine learning. The development of efficient and reliable algorithms for solving QPs continues to be an important research direction due to their widespread utility. This paper focuses on solving the following convex quadratic program:
where the optimization variable
where
python=3.10
pytorch=1.13.1
gurobi=10.0.3
osqp=0.6.3To generate a convex QP dataset with 1000 variables, 500 inequality constraints, and 500 equality constraints, run:
python generate_data.py --config ./configs/Generate_Data.yaml --prob_type QP --num_var 1000 --num_ineq 500 --num_eq 500For training phase, you can run following command:
python main.py --config ./configs/QP.yaml --prob_type QP --outer_T 100 --truncated_length 100 --hidden_dim 800 --eq_tol 0.2 --ineq_tol 0.2 --scalingOur model will be stored at ./results/lstm/params/QP_1000_500_500_100_800.pth. During the testing phase, you can run the following command to obtain our experimental results:
python main.py --config ./configs/QP.yaml --prob_type QP --outer_T 100 --truncated_length 100 --hidden_dim 800 --eq_tol 0.2 --ineq_tol 0.2 --scaling --test --test_outer_T 100 --save_sol