I want to solve a linear programming problem within ECLiPSe Prolog. But
how to do this? I've tried some things, respectively I have some
ideas:
- installing ECLiPSe 5.7 together with xpress (but I've got some
problems there)
- converting simplex.pl from SWI-Prolog to ECLiPSe Prolog, also with
some problems
- Using a LPP-Solver written in C or C++, but which one?
May be, somebody has a good solution for me?
Regards,
Thomas Witkowski
> - converting simplex.pl from SWI-Prolog to ECLiPSe Prolog, also with
> some problems
Anything specific? You can safely remove all "clpr_..." predicates if
you aren't interested in the CLP(R) bindings of simplex.pl.
> > - converting simplex.pl from SWI-Prolog to ECLiPSe Prolog, also with
> > some problems
>
> Anything specific? You can safely remove all "clpr_..." predicates if
> you aren't interested in the CLP(R) bindings of simplex.pl.
First, I've changed the definition of rational numbers from rdiv (which
is not supported in ECLiPSe in that way) to the ECLiPSe-version of
rational numbers. After that, I can compile simplex.pl without
warnings/errors. But when I try the first example from the
SWI-documentation for simplex.pl, I get the following error:
?- radiation(S), variable_value(S, x1, Val1), variable_value(S, x2,
Val2).
type error in select(c(0, [1 * x1], >=, CRight), [c(0, [0.6 * x1, 0.4 *
x2], >=, 6_1), c(0, [0.5 * x1, 0.5 * x2], =, 6_1), c(0, [0.3 * x1, 0.1
*x2], =<, 27_10)], RestCs)
But I have not thought about what's wrong with it.
Thomas Witkowski
select/3 is an ECLiPSe built-in with a different meaning.
Add the following redefinition at the top of your file:
:- local select/3.
select(X,Y,Z) :- lists:delete(X,Y,Z).
-- Joachim
I posted a reply to your question from a few days ago.
What problem do you still have?
-- Joachim