This repository accompanies the paper "Multiple-Response Agents: Fast, Feasible, Approximate Primal Recovery for Dual Optimization Methods".
The mra
package implements multiple-response agents (MRA) method for primal variable
recovery in dual optimization methods.
We consider the following problem
$$
\begin{array}{ll}
\text{minimize} & \sum_{i=1}^K f_i(x_i)\
\text{subject to} & \sum_{i=1}^K A_i x_i \leq b,
\end{array}
$$
where
Then MRA constructs a new primal point
MRA_Primal_Recovery
:
- Key parameters:
fun_agents
: List of agent functions that return responses for a given dual vector.primal_var_size
: Total dimension of the primal variable.A_ineq
,b_ineq
,A_eq
,b_eq
: constraint matrices and vectors.history
: Number of past iterations to retain.
- Methods:
query
:- Inputs:
lamb_k
: Current dual price vector.K
: Number of responses per agent: first response from the conjugate subgradient oracle, andK-1
responses from the approximate conjugate subgradient oracle.epoch
: Iteration index (updates history).- Outputs:
x_k
: Primal solution vector.Zs
: List of candidate response matrices.
primal_recovery
:- Process:
- Determine weights (
u_best
) via convex relaxation (default) or MILP/greedy. - Combine responses: For each agent, compute
Zs[i]
@u_best[i]
.
import mra
fun_agents, primal_var_size, A_ineq, b_ineq = ...
MRA = mra.MRA_Primal_Recovery(fun_agents, primal_var_size,
A_ineq=A_ineq, b_ineq=b_ineq)
x_k, Zs = MRA.query(lamb_k, K=10, epoch=0)
bar_xk = MRA.primal_recovery(lamb_k, Zs)