MATLAB Answers

The running time of binary integer linear programming and linear programming

조회 수: 10(최근 30일)
Salwa Mostafa
Salwa Mostafa 2021년 9월 14일
편집: Salwa Mostafa 2021년 9월 14일
I have a binary integer linear programming problem and I relax the binary integer constraint. I use the two built in functions intlinprog and linprog in matlab to solve the problem. I expexct that the running time of binary integer to be larger than the linear programming but when I do the simulation it is the opposit and I dont know what is wrong. Any suggestions.

채택된 답변

John D'Errico
John D'Errico 2021년 9월 14일
Why is there something "wrong"? It is unexpected for you. But this just comes down to two different problems, solved by different algorithms. Depending on the size of the problem, and any specifics, one algorithm may have an easier solution, and thus take less time. In fact, we don't even know if you used good methods to determine the time for each solve. For example, toc and toc are generally a bad way to compute the time required for code. And we certainly do not know what size problem is this, how many variables, how many constraints, are there equality or inequality constraints or both, etc.
  댓글 수: 1
Salwa Mostafa
Salwa Mostafa 2021년 9월 14일
I used tic toc to measure the time. I tried to use timeit before but the functions takes long time to run so I want the output of the function with the time. I cannot get the output values with timeit.
I use inequality constraints only and the same problem is entered to both solvers just I relaxed the binarry constraint x instead of in intlinprog I used in linprog . The problem size varies from 50 inequality constraints to 1000 constraints.
Thanks for your help.

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by