MATLAB Answers

Optimization problem with intlinprog

8 views (last 30 days)
Hi everyone,
I'm trying to solve an optimization problem with integer and continuous variables and I chose intlinprog because ga seems very slow with a big number of variables.
after a four of hours, this solver gives me the following results ( 'display','iter')
Solving problem using intlinprog.
LP: Optimal objective value is -9.338358e+06.
Branch and Bound:
nodes total num int integer relative
explored time (s) solution fval gap (%)
504 574.99 0 - -
1008 618.74 0 - -
1512 681.23 0 - -
2016 747.29 0 - -
2520 794.77 0 - -
3024 856.94 0 - -
3528 900.18 0 - -
4032 957.26 0 - -
4536 1007.86 0 - -
5040 1320.73 0 - -
5544 1339.90 0 - -
6048 1371.66 0 - -
6552 1389.46 0 - -
7056 1425.35 0 - -
7560 1466.88 0 - -
8064 1504.28 0 - -
8568 1543.27 0 - -
9072 1574.28 0 - -
9576 1597.74 0 - -
10080 1617.25 0 - -
10584 1632.35 0 - -
11088 1689.24 0 - -
11592 1788.00 0 - -
12096 1799.15 0 - -
12600 1817.04 0 - -
13104 1832.20 0 - -
13608 1846.55 0 - -
14112 1861.89 0 - -
14616 2126.65 0 - -
15120 2649.13 0 - -
15624 2682.48 0 - -
what does it mean? why there is no fval? Did I wait too little?

  0 Comments

Sign in to comment.

Accepted Answer

Alan Weiss
Alan Weiss on 1 May 2020
You see in the iterative display that the number of integer solutions is reported to be 0. That means that intlinprog did not yet find even one feasible point, so it is not returning any solution since it has not yet found one.
I suggest that for such a long-running problem you specify the 'optimplotmilp' plot function. That way you can observe the progress and, more importantly, stop the solver if it ever comes up with a feasible point. You might also want to set the time limit to a large value.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

  4 Comments

Show 1 older comment
michael francesco pez
michael francesco pez on 4 May 2020
last question:
is it possible to save the last solution and the last upper and lower bounds (branch/bound UB and branch/bound LB)? if I stop the solver, I mean.
From what I've understood, in this way, I would know the interval where the optimal value lays, even if the solver didn't find the optimal point. Isn't that right?
Alan Weiss
Alan Weiss on 4 May 2020
Yes indeed. You can write a new plot function that is based on the 'optimplotmilp' plot function and returns the upper and lower bounds to the workspace. Be careful when writing the function because, as documented, not all fields of the optimValues structure are available at all times.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (0)


Translated by