[PPL-devel] [GIT] ppl/ppl(pip): Added a standalone PIP solver demo program.
Sven Verdoolaege
skimo-ppl at kotnet.org
Wed Oct 28 17:11:37 CET 2009
On Wed, Oct 28, 2009 at 04:47:39PM +0100, François Galea wrote:
> However, some results I found are different from those which are in the
> corresponding '.ll' solution files. For instance, in 'boulet.pip', I get
> the solution minimum {0 ; 0 ; 0}, since all constraints have a
> nonnegative constant term. PIPlib finds a solution with negative
> elements : "if (p>=-5) then {-3*p-15 ; -p-5 ; p+5}."
>
> This may be valid if variables and parameters are not supposed
> nonnegative, but my current implementation of the solver does not
> support negative variables and parameters.
That's what the options "Urs_parms" and "Urs_unknowns" in boulet.pip
mean. That is, both the parameters and the unknowns have unrestricted
sign. So, piplib's answer is correct (see the piplib manual,
where this example originates from).
A bit of history. The original version of pip would assume that
all unknowns and parameters are non-negative, but allowed the
user to specify a "big parameter" that is treated in a special
way by piplib. By reformulating the problem a little bit
and by applying yet another trick to deal with urs parameters,
the user could trick piplib into handling urs unknowns and
parameters. A couple of years ago, I made some changes to piplib
that allow the user to simply _indicate_ that the unknowns and
parameters have urs and then piplib will perform all these tricks
internally. The default was not changed for reasons of backward
compatibility.
Now, I actually think it is wrong to expose this implementation
detail to the user, so, in isl, I make no assumption about the
sign of the unknowns or the parameters. In the demo application
isl_pip, I then add the appropriate ">= 0" constraints if the
user did _not_ specify the Urs_parms or Urs_unknowns options.
skimo
More information about the PPL-devel
mailing list