This repository contains code for solving nonconvex separable optimization problems of the form
where the functions
The full theoretical background can be found in our paper:
Benjamin Dubois-Taine, Laurent Pfeiffer, Nadia Oudjane, Adrien Seguret, Francis Bach. "Two-stage stochastic algorithm for solving large-scale (non)-convex separable optimization problems under affine constraints". In: arXiv preprint [arXiv link].
If your problem is convex, you should define the problem by creating a child of the ConvexSeparableOptProblem class defined in separable_opt_problem.py and implementing the required functions.
If your problem is nonconvex, you should define a child of the NonConvexSeparableOptProblem class defined in separable_opt_problem.py and implementing the required functions. You can use the file PEVs/pev_problem.py as template.
You can then run the two-stage solver implemented in two_stage_solver.py
To reproduce the experiment from the first plot on the charging of electric vehicles problem, run the following in PEVs folder:
$ python script.py
To reproduce the experiment from the second plot on the charging of electric vehicles problem, run the following in PEVs folder:
$ python script_nonconvex.py
You can use the jupyter notebook to reproduce the plots.
To cite our work please use:
@article{dubois2026two,
title={Two-stage stochastic algorithm for solving large-scale (non)-convex separable optimization problems under affine constraints},
author={Dubois-Taine, Benjamin and Pfeiffer, Laurent and Oudjane, Nadia and Seguret, Adrien and Bach, Francis},
journal={arXiv preprint arXiv:2602.06637},
year={2026}
}