Optimise the problem question
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 15 Nov. 2019
You can construct an UB according to max() of the budget divided by the two unit costs.
Walter Roberson
am 15 Nov. 2019
Bearbeitet: Walter Roberson
am 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)
Antworten (1)
Matt J
am 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 Kommentare
Matt J
am 16 Nov. 2019
Bearbeitet: Matt J
am 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.
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!