XiongPengNUS / rsome

Robust Stochastic Optimization Made Easy
GNU General Public License v3.0
282 stars 54 forks source link

ARO dimensionality #38

Closed GalPerelman closed 1 year ago

GalPerelman commented 1 year ago

Hi, While working on an adjustable robust optimization (ARO) problem, I noticed that my model dimensions are quite large (~10^6 variables). Which makes run times to be very long. I used ellipsoid uncertainty sets so inner optimization problems are convex, but the uncertainty is only in the RHS so the robust counterpart remains linear, and still run times were very long.

To test myself, I ran the production inventory example and examined its dimensions:

Conic program object:
=============================================
Number of variables:           10505
Continuous/binaries/integers:  10505/0/0
---------------------------------------------
Number of linear constraints:  4900
Inequalities/equalities:       196/4704
Number of coefficients:        38017
---------------------------------------------
Number of SOC constraints:     0
---------------------------------------------
Number of ExpCone constraints: 0

It seems that RSOME generates 10505 variables, while this problem is presented in Ben-Tal et al. 2004 and it is stated that the number of variables will be 2719 at the most extreme case.

I'm assuming RSOME is generating some auxiliary variables, is this correct? Is there a way to reduce the dimensionality?

XiongPengNUS commented 1 year ago

Hi @GalPerelman it is true that RSOME may add auxiliary variables and constraints in order to address more general uncertainty sets, but I do not think this is the main reason for RSOME to be slow. The great majority of time is used in concatenating matrices or constraints, when converting a robust constraint into its equivalent deterministic constraint. Such concatenation operations are simply not that efficient in Python and NumPy. The MATLAB version of RSOME is much faster, as the concatenation operations are rewritten in C language so the program is greatly speeded up, though it uses exactly the same method to reformulate the problem. We are planning to do the same for the Python version of RSOME in the future--use C language to rewrite the core concatenation operations, but before that, there is not much we can do for the reformation time of RSOME.

GalPerelman commented 1 year ago

@XiongPengNUS, Is there a way to obtain the LDR coefficients in MATLAB RSOME? I converted my problem to MATLAB but couldn't find how to retrieve the dynamic solution The objective value is the same as in static RO, so I guess by default the worst-case solution is returned

Also, I couldn't find any example or usage of the MATLAB version beside those in the user guide Are there other examples somewhere?