Hey All, I need to solve a problem of this form: Find (n) and (X_1,...,X_n) such that the constraint (C(X_1,...,X_n)) is satisfied and (G(X_1,...,X_n)) is minimized. In other words, the number of variables itself is unknown and need to be found by the solver. The naive approach is to repeatedly invoke the solver for (n=1,2,3,...) and stop after a number of iterations. However, this is a very expensive process and is not guaranteed to find the global optimum. Is there a systematic way of handing this type of optimization setting, i.e. by somehow reducing it into an equivalent problem but with a fixed number of variables? Is there a solver that can handle this type of optimization? Does matlab have any features to solve this type of problem? What if we're also looking for a robust solution (i.e., the actual problem is a robust optimization problem)?
showing 5 of 7
show 2 more comments

@sina: Two quick questions:
1) Are the variables continuous or discrete?
2) Is there any upper bound on the maximum number of variables based on the problem infromation?
3) Are C and G arbitrarily chosen?
1) variables are continuous.
2) there are no trivial bounds
3) Yes in general C and G are arbitrary, although in the problem setting that I am dealing with (C=sum_{i=1}^n c_i/X_i) where (c_i)'s are constants.
I know you want to know in general, but it might be better to tackle your specific case first and see what insights you get. Even if your method for solving your case doesn't generalize at all, at least you solve your case.
Can you exploit some information about the constants (c_i)? Where do they come from? Can you tell us what G is?
Is (c_i) an infinite dimensional vector? If not, you have a bound on the number of variables.
In this generality, we probably cannot help. I am sure that  even when C and G are generic, they are not arbitrary, they have a meaning!  your variables are not entirely arbitrary either but taken from some (possibly infinite, but welldescribed) set. What do we know about this set? [yes, I think about column generation]
All the comments so far are very good for more precise problem definition. However, I've another concern. As far as I know, unknown number of decision variables (not unknown number of things to select, e.g. which facilities to open, which vehicles to use, or which products to produce) is a sign of incorrect modeling or lack of enough information about the system structure. If @sina could give us examples for applications of such problem definition, maybe it would help with solving the problem modeling as well.