Optimise the problem question
5 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 15 Nov 2019
You can construct an UB according to max() of the budget divided by the two unit costs.
Walter Roberson
on 15 Nov 2019
Edited: Walter Roberson
on 15 Nov 2019
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)
Answers (1)
Matt J
on 15 Nov 2019
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 Comments
Matt J
on 16 Nov 2019
Edited: Matt J
on 16 Nov 2019
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.
See Also
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!