Usenet.com

www.Usenet.com

Group Index

Sci Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: basic LP (and lp_solve)



Sorry, I can't help you with using lp_solve.

I did implement a very simple version of SUMT for solving LPs in Java.  I
just did it to make a simple demo with two variables.  However, it should be
capable of solving larger problems.  It makes calls to a Java port of BLAS,
and the performance will be largely dependent on that.  One big downside is
that the code requires an initial (strictly) feasible starting point.

Anyways, you can get the code here if it is helpful to you:
http://www.alkires.com/software/JLPDEMO.htm

-Brien



"Chris Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This might be the wrong forum; if so, I apologize.
>
> I am generating a *very* simple LP problem (not TOO awfully small,
> though; about 1000 constraints on 2200 variables) from a Java
> application, and I need to solve it from within the application and
> access the answer progammatically.  I'm finding that very few free LP
> solvers speak Java, and I'm definitely not up to the task of porting
> one.  I'm trying to use lp_solve, because it's the only solver I can
> find that is suitable for my needs and has a Java port.
>
> The problem is that I can't figure out the solver's API.  I can generate
> a problem in the solver's non-standard text description language and
> solve it, and it works fine... but that requires manual intervention.
> My problems look something like:
>
> minimize: e1a + e1b + e2a + e2b + e3a + e3b + ...;
> x1  + e1a - x17 - e1b =  a;
> x7  + e2a - x4  - e2b =  b;
> x3  + e3a - x21 - e3b >= c;
> x13 + e4a - x3  - e4b =  d;
> x2  + e5a - x11 - e5b =  e;
> x19 + e6a - x13 - e6b >= f;
> ...
>
> (where a, b, c, d, ... are actually constants, but x1, x2, x3, ... AND
> e1a, e1b, e2a, e2b, ... are variables, all of which are real numbers
> bounded at zero and positive infinity; all the constraints have exactly
> the form given, with the operation being either '=' or '>=').
>
> Would anyone like to give me a suggestion on how this problem would be
> formed using the exposed API of lp_solve (using set_obj_fn,
> add_constraint, and the other functions there)?
>
> Thanks,
>
> --
> www.designacourse.com
> The Easiest Way to Train Anyone... Anywhere.
>
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation






<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.