Troubles with possibly negatives unknowns

2 views
Skip to first unread message

Antoine Morvan

unread,
Oct 7, 2009, 8:52:26 AM10/7/09
to PipLib Development
Hello,
I've some troubles with PIP. I use example/exampleMP to call PIP
(1.4.0), with the following entry :
--------------------------------------
6 4
1 1 0 128
1 -1 0 127
1 0 1 128
1 0 -1 127
1 -1 0 6
1 1 0 0
-1
1 7
0 -1 0 0 1 0 0
Urs_unknowns
--------------------------------------
context (generated automatically) :
M >= -128
M <= 127
N >= -128
N <= 127
M <= 6
M >= 0
no bignum
domain :
-1*r + 0*i + 0*j + 1*M + 0*N == 0
=> r = M
and the variables may be negatives. I saw another error here : in the
example.c (l 22), options->Urs_unknowns is set to 1 when options are
detected, but the doc tells that the value has to be set to -1 if the
unknowns have unrestricted sign (PIP edition 5.0, section 3.1.6).

So I'm looking for the lowest M (it may be an expression using terms
i, j, M and N) in the context, I use variable r to get the result, and
I'm expecting an integer result.

The expected result would be :

(list
#[ 1 0 0]
#[ 0 0 0]
#[ 0 0 0]
)

When I ask PIP to solve this problem, the solution is partially
integer and rational (although 0/0 doesn't mean anything) :

(list
#[ 1 0 0]
#[ 0/0 0/0 0/0]
#[ 0/0 0/0 0/0]
)

My parser is screaming with this result :(

--
Antoine Morvan,
amo...@irisa.fr


Sven Verdoolaege

unread,
Oct 7, 2009, 9:41:07 AM10/7/09
to Antoine Morvan, PipLib Development

I had planned to allow for a more fine-grained specification
of which unknowns may be negative, but I never got around to it.
For now, any non-zero value will do.

> So I'm looking for the lowest M (it may be an expression using terms

Do you mean r here ?

> i, j, M and N) in the context, I use variable r to get the result, and
> I'm expecting an integer result.

If i and j are supposed to be parameters, then you should tell pip!

> The expected result would be :
>
> (list
> #[ 1 0 0]
> #[ 0 0 0]
> #[ 0 0 0]
> )

Why would you expect the minimal values of i and j to be zero
if you say that they may become negative?

> When I ask PIP to solve this problem, the solution is partially
> integer and rational (although 0/0 doesn't mean anything) :
>
> (list
> #[ 1 0 0]
> #[ 0/0 0/0 0/0]
> #[ 0/0 0/0 0/0]

This is the notation for an infinite value.

Btw, you may want to consider using isl instead of piplib.

skimo

Reply all
Reply to author
Forward
0 new messages