Optimise the problem question

1 次查看(过去 30 天)
Teanna Mills
Teanna Mills 2019-11-15
编辑: Teanna Mills 2019-11-17
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
Walter Roberson 2019-11-15
You can construct an UB according to max() of the budget divided by the two unit costs.
Walter Roberson
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
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 个评论
Teanna Mills
Teanna Mills 2019-11-16
would that constraint then require to be applied as Aeq as it is an equality?
Matt J
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 CenterFile 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!

Translated by