Effacer les filtres
Effacer les filtres

Is it possible that, given the same problem, fmincon finds a solution and intlinprog does not?

3 vues (au cours des 30 derniers jours)
I have a system of inequalities i need to solve and the first step is to understand if a simplified version of this problem, lacking some constraints that involve binary variables, exists. In order to do that i first tried using intlinprog as it was going to be the function to use with the added constraints. No feasible solution is found even after changing the LPPreprocess option to 'none'.
Out of curiosity I tried using fmincon with the exact same matrices and cost function and a feasible solution was found.
Why does this happen? Shouldn't both the functions find a feasible solution when they're fed the same problem data?
  4 commentaires
Walter Roberson
Walter Roberson le 22 Fév 2023
I would check whether the fmincon output is a true solution. fmincon uses tolerances to decide whether to terminate, and sometimes proposed parameters get within tolerance but are not true solutions.
Torsten
Torsten le 22 Fév 2023
I don't see that fmincon succeeds (see above).

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 22 Fév 2023
Modifié(e) : Matt J le 23 Fév 2023
Your constraints are not feasible, as can be seen by looking at inequalities 4,15, and 23.
A=A([4,15,23],:); B=B([4,15,23],:);
[array2table(A), array2table(B)]
ans = 3×17 table
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 B __ __ __ __ __ __ __ __ __ ___ ___ ___ ___ ___ ___ ___ __ -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1
Equalities 15 and 23 say that x1<=1 and x4<=1, which in turn implies that x1+x4<=2. However, inequality 4 states that x1+x4>=3.
The answer to your question, in this situation, is yes. fmincon can find a solution when the constraint set is empty, but it is an infeasible solution, representing some point fmincon reached in its search for a feasible solution before it gave up. Conversely, intlinprog and linprog will not return an infeasible solution.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by