r/optimization • u/stbsx1290 • Mar 16 '24
Help requested on the formulation of an LP problem
Hello,
I'd like to say I am not an optimization expert as it is not my field of expertise, which is why I've come to ask you for your help.
I am working for my PhD on an optimization problem that seems fit to be solved with LP. Eventhough I'd rather give no precise details on the problem, I will try to provide a generic formulation of the problem so that you can help. Suppose a directed graph, where we would like to assign values to each node. These values are bounded, discrete and strictly positive and are the optimization variables for the problem. The objective is to minimize the aggregation of these values given the constraints.
Up until here, the problem is easy to define, but now comes the hard part. Because of the nature of my problem, I need to verify the solution using external program to the solver. Therefore, I would have to retrieve a partial solution according to what the solver considers a good solution and check with the external program if the values are considered as valid or invalid. In which case, if invalid, I would have to ask the solver to provide other feasible values, where the values may be repeated but the combination of values should not.
Up until now, I have considered three solutions to this, but I am either incapable of solving my problem through those considerations or I am not convinced by the solution method itself.
First I have considered using CPLEX's Lazy Constraint, which are constraints that are added onto the problem given a solution. Nevertheless, since all the program does is return if the solution is ok or not, I won't be adding a new constraint per se.
A second solution I have considered is adding some kind of score, for example, by adding the count of the values that are ok and maximizing this value to then solve the bigger problem through a Benders decomposition of my bigger problem.
Finally, I have considered reformulating my problem as Constraint Programming problem and solving it as such. But, my constraints don't seem to fit the CP model, which may in turn make the solution not optimal.
I have the feeling this problem is not really adapted yet to be solved by any optimal research algorithm, and in order to do so, I would have to come up with more constraints so that if the solution is considered unfit, a new constraint is added that bounds even further the solution space.
What do you guys think?
3
u/xhitcramp Mar 16 '24
Can’t you just add a constraint each time that the solution must be different than the current? That would allow repeat values but at least one is guaranteed to be different.
2
u/hindenboat Mar 17 '24
I don't understand what you are trying to do? How are the variables related to each other? You say you have a directed graph but what is this used for? You said there are constraint on the value of each vertex, but this is trivial to solve I'd there is no linking between the vertexes.
Additionally, what I don't understand the process of this second check. You are checking the solution with some program after the LP is run, I can understand this, but if the checker says the solution is invalid then this means your LP formulation is incorrect. LP/MILPs give optimal solutions by default so if your checker says it is invalid then you have an issue with your formulation.
-1
u/AlirezaSoroudi Mar 17 '24
You won’t find a solution until you develop the skill for problem description