[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-glpk] fraction with vars

**From**: |
Michael Hennebry |

**Subject**: |
Re: [Help-glpk] fraction with vars |

**Date**: |
Wed, 2 May 2012 11:36:28 -0500 (CDT) |

**User-agent**: |
Alpine 1.00 (DEB 882 2007-12-20) |

On Wed, 2 May 2012, Kasper Tordrup wrote:

After looking over Xypron's example, it became clear to me that you lack
some information, sorry for that.
The x represent a percentage of p that I need, and this means that y is <=
to w.
So summing up:
x will always be <= to p.
y will always be <= to w.
if w is 0, then so are y.
p is a constant.
x,y and w are variables.
y and w are in the range [0..6] (or close to that)
and I want to calculate:
x_suj = p_s * (y_suj/w_su)

(repeating)

if w is 0, then so are y.

x_suj * w_su = p_s * y_suj
No division issues.
(repeating)

The x represent a percentage of p that I need, and this means that y is <=
to w.

Are you sure?

Sorry for the mess, hope this clarifies it.

Actually, 'tis a bit foggier now.
What is p? Can it be 22/7, 7/22, sqrt(2.), 1/123, pi?
Is the equality exact?
Why is there a percentage involved instead of a fraction?
One does not normally calculate with percentages.
Usually, percentages are just human-friendly input or output.
--
Michael address@hidden
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword." -- Lily