How can I write objective function with variable plus constant for solving using intlinprog Ex. X1+4
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I write objective function with variable plus constant for solving using intlinprog Ex. X1+4
Thank you for your time
댓글 수: 0
채택된 답변
Matt J
2017년 9월 16일
편집: Matt J
2017년 9월 16일
There is no way to include a constant term in the objective function, but it would be meaningless to do so. Adding a constant term does not change the optimal solution, x.
추가 답변 (1개)
Aurele Turnes
2017년 11월 13일
편집: Aurele Turnes
2017년 11월 13일
If you have R2017b, the new Problem-based approach lets you specify constant terms in the objective of linear and mixed-integer linear problems. Although Matt is correct that the constant term will not change the final solution value, just the objective value.
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Programming and Mixed-Integer Linear Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!