# Set up values relating to both minimum and maximum values of yĬoefficients_inequalities = ] # require -1*x + -1*y <= -180Ĭoefficients_equalities = ] # require 3*x + 12*y = 1000īounds_x = (30, 160) # require 30 <= x <= 160īounds_y = (10, 60) # require 10 <= y <= 60Ĭoefficients_min_y = # minimize 0*x + 1*y Finally, the inequality restrictions must be "less than or equal to" in linprog, so I multiplied both sides of your inequality x + y > 180 by -1 to get one, namely -x + -y <= -180. To find the maximum value of y the code instead finds the minimum value of -y then prints the additive inverse of that, since linprog minimizes the objective function. Note that all the inequalities were slightly changed to include equality, which is necessary to have a maximum or minimum value of y. Here is commented code to do what you want. The scipy package, using the function, can do this kind of linear programming. The equality, inequalities, and expression are all linear, so that makes it linear programming. Solving application problems that require linear equations, inequalities and systems of linear equations in two variables.Yours is a problem in linear programming, where your equality and inequalities are the limitations and you want to minimize (then later maximize) the expression y.Graphing a linear inequality in two variables.Graphing linear equations in two variables.Properties of the rectangular coordinate system.Solve applications problems that require linear equations, inequalities and systems of linear equations in two variables.Given the graph of y = f(x), find x for specific values of f(x).Given the graph of y = f(x), evaluate f(x) for specific values of x.Evaluate y = f(x) for specific values of x.Identify a system of linear equations as consistent and independent, consistent and dependent, or inconsistent.Solve by elimination using substitution.Solve systems of linear equations by graphing. Determine if an ordered pair is a solution of system of equations in two variables.Find the equation of a line that is parallel or perpendicular to a given line and passes through a given point.
0 Comments
Leave a Reply. |