Originally posted by: EdKlotz
You are solving an LP. Unless you go out of your way with non default settings to prevent it, CPLEX will provide a basic solution to your LP. In your small example above, there are only 5 basic feasible solutions solutions, corresponding to the bases {x}, {y}, and {z} and various bound settings for the nonbasic variables. CPLEX will only give you one of those 5 solutions. To get random solutions, you could start with all 5 basic solutions (41.3, 1, 1), (1, 41,3, 1), (99, 99, 156.7), (99, 1, 58.7), and (1,99,58.7). Any convex combination of those 5 solutions is also feasible. So, you could take random convex combinations of those 5 solutions to generate random solutions. Note that while this works for this one constraint, three variable model, enumerating all the basic feasible solutions in general is not computationally feasible at all. This will only work for very small models. If you need to do this with larger models, I think you need to first ask yourself what you want to do with random solutions if you could easily get them. Maybe there's another way to accomplish the same thing.
#CPLEXOptimizers#DecisionOptimization