1 (edited by timothyso 2013-04-10 19:24:44)

Topic: Linear Programming.

Ivan you seem to use a very strange method for shading.  A very common application is to graph the feasible region of
say:  10x + 20 y < 300,  10x + 8 y > 200, and y > 2( x -20)    (Sometimes there can be 5 equations that result in a polygonal
region in the x-y plane. )  As it stands, it seem impossible to do this with your shading choices (btw I had experimented and find that I have NO IDEA what it mean 'decrease to intersection' etc.... Totally baffling. 

Now it is possible with relations to very carefully and (complex to boot) create shaded triangles using the CONSTRAINTS
portion of the relation.  However, I have not found a way to animate it. (Which I find to be  your most usefull tool)

CLEAR EXAMPLE:  function: f(x) = (300-10x)/16 (used as lower bound of triangle)
               custom  function: g(x) = (250-a*x)/15  (used as upper bound of triangle)

The additional constrainst are x>0 y>0.   If I choose to shaded between  I get into problems getting the
triangular region Above the intersection point of g and f  So experiementing I found I could use shading between with the option from 62 decrease to intersection.  That gives me only the lower triangle but it extends to infinity.    I now animate it from a= 4 to a = 8.36 and my lower triangle 'sinks down'.  HOWEVER I can't find a way to us only x>0 or other constraints to get the restricte shading.


Can you explain however, what do you mean by you shading options?
and why is there TWO choice one set with 2nd fuction and another under options tab?

Below is an example  shading partially successful. Animatation too large to upload (vary a between as above)

Post's attachments

Attachment icon Frist Giffen attempt.grf 2.35 kb, 584 downloads since 2013-04-10 

Re: Linear Programming.

timothyso wrote:

Ivan you seem to use a very strange method for shading.  A very common application is to graph the feasible region of
say:  10x + 20 y < 300,  10x + 8 y > 200, and y > 2( x - 20)    (Sometimes there can be 5 equations that result in a polygonal
region in the x-y plane. )  As it stands, it seem impossible to do this with your shading choices (btw I had experimented and find that I have NO IDEA what it mean 'decrease to intersection' etc.... Totally baffling.

You can always combine several inequalities in a relation:

10x + 20 y < 300 and 10x + 8 y > 200 and y > 2( x -20)
timothyso wrote:

Now it is possible with relations to very carefully and (complex to boot) create shaded triangles using the CONSTRAINTS
portion of the relation.  However, I have not found a way to animate it. (Which I find to be  your most usefull tool)

You can animate it like anything else by creating a custom constant and use it in the animation dialog.

timothyso wrote:

CLEAR EXAMPLE:  function: f(x) = (300-10x)/16 (used as lower bound of triangle)
               custom  function: g(x) = (250-a*x)/15  (used as upper bound of triangle)

The additional constrainst are x>0 y>0.   If I choose to shaded between  I get into problems getting the
triangular region Above the intersection point of g and f  So experiementing I found I could use shading between with the option from 62 decrease to intersection.  That gives me only the lower triangle but it extends to infinity.    I now animate it from a= 4 to a = 8.36 and my lower triangle 'sinks down'.  HOWEVER I can't find a way to us only x>0 or other constraints to get the restricte shading.

You need to specify a range in x-coordinates. For f(x) this will be From=0 and To=30. For g(x) the crossing of the x-axis depends on a, so here you need From=0 and To=250/a.

timothyso wrote:

Can you explain however, what do you mean by you shading options?

The Increase/Decrease check boxes are not very useful in your case. They are intended for the case where you for example want to shade one side of where the functions cross, but you don't know the exact coordinate where they cross.

timothyso wrote:

and why is there TWO choice one set with 2nd fuction and another under options tab?

Because as in your case it is necessary with different ranges for the two functions.

I have attached an updated version of your file with a shading and a relation that both shades the area you want.

Post's attachments

Attachment icon Frist Giffen attempt.grf 2.33 kb, 590 downloads since 2013-04-12