Defining a function on the coordinates of points?`

Alasdair shared this question 4 years ago
Answered

I'm experimenting with using GeoGebra for the teaching of linear programming, and I'm particularly interested in sensitivity (post-optimality) analysis; currently shadow prices - what happens if a constraint resource is increased by one unit.

To do this, I'd like to apply the objective function to each of the vertices of the feasible region, which means I need some way of defining a function whose input is a point, and whose definition depends on the point coordinates, such as:

Z(P) = 3*x(P)+2*y(P)

However, I can't get such a definition to work. If I could, then I could solve the problem by simply mazimizing the function over the vertices of the feasible region.

Can I do this - define a function of a point that uses its coordinates? Thanks!

Comments (2)

photo
1

Try this:

Z(x,y)=3x+2y
Z(P)

photo
1

That works perfectly - thank you very much!

photo
© 2023 International GeoGebra Institute