Optimise the problem question
조회 수: 1 (최근 30일)
이전 댓글 표시
I have the following question to attempt:
A company manufactures two types of products, ‘A’ and ‘B’. The production cost associated with these products are £200 and £150 respectively. Selling each unit of product ‘A’ brings £20 and product ‘B’, £15 of profit. The monthly demand for both products combined is 500 units. The production budget is limited to £50,000. How many units of each product should be made to gain maximum profit?
Right now I have my function as:
How do i know what my starting point (x0) is?
and should I have a value for Aeq and Beq?
Thanks in advance for any help provided.
댓글 수: 2
Walter Roberson
2019년 11월 15일
You can construct an UB according to max() of the budget divided by the two unit costs.
Walter Roberson
2019년 11월 15일
편집: Walter Roberson
2019년 11월 15일
It does not matter how many units of each you make as long as the total cost is the budget. The profit is 10% no matter which you make, so any combination that adds up to 50000 will get you 5000 profit.
(though this does not directly take into account the 500 unit requirement)
답변 (1개)
Matt J
2019년 11월 15일
You should be using linprog to solve this problem. It does not require a starting point x0. I don't see any need for equality constraints, but I don't see where you have satisfied this constraint: "The monthly demand for both products combined is 500 units"
댓글 수: 6
Matt J
2019년 11월 16일
편집: Matt J
2019년 11월 16일
There is no requirement that it be applied with equality. As discussed above, the optimizer will force equality to be reached regardless of whether you specify the constraint as an equality or inequality. But if you wished to specify equality, Aeq is what you would use.
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!