Working in finance field, I come across optimization (minimize cost maximize profit) problems which could be done on paper easily with two constraint variables and can even visualize solutions for three dimensional problems however I do not know anyway with which I could solve problems for over three variables or constraints except to do them on computer. Here is an example with two variables
Profitability = A table generates 40 dollars and chair gives 30 dollars Constraints: Material1: while a table consumes 7 units of material1 chair consumes units 4 of that. There are 200 units of that material available. Constraints: Material2: each Table and chair consumes 5 units of material2 of which 400 are available.
Syntax for this problem in Mathematica is as follows:
Maximize[{
40 tables + 30 chairs,
7 tables + 4 chairs <= 200 &&
5 tables + 5 chairs <= 400 &&
chairs ≥ 0 && tables ≥ 0},
{chairs, tables}]
And another similar problem (with four constraints) can be solved with following syntax:
Maximize[{
45000 P1 + 63000 P2 + 27500 P3 + 19500 P4 + 71000 P5 + 56000 P6 + 48500 P7,
6 P1 + 9 P2 + 4 P3 + 4 P4 + 7 P5 + 10 P6 + 6 P7 <= 800 &&
12 P1 + 16 P2 + 10 P3 + 5 P4 + 10 P5 + 5 P6 + 7 P7 <= 900 &&
0 P1 + 4 P2 + 4 P3 + 0 P4 + 8 P5 + 7 P6 + 10 P7 <= 700 &&
5 P1 + 8 P2 + 5 P3 + 7 P4 + 4 P5 + 0 P6 + 3 P7 <= 375 &&
25 >= P1 >= 0 && 30 >= P2 >= 0 && 47 >= P3 >= 0 && 53 >= P4 >= 0 &&
16 >= P5 >= 0 && 19 >= P6 >= 0 && 36 >= P7 >= 0},
{P1, P2, P3, P4, P5, P6, P7}]
How can I see these function/equations on graph? First one (with two variables) could be done on paper but I do not know how to plot even that in Mathematica.
Question was edited (the inequalities '<' and '>' were changed to '>=' and '=<' ) to get non boundary solution. But I don't understand what does boundary solution mean. Also, both answers are actually the same (in output) and could you tell me what are boundary and non boundary solutions (the one with errors) mean?