257 lines
3.7 KiB
Plaintext
257 lines
3.7 KiB
Plaintext
|
/tmp/clpq
|
||
|
|
||
|
yes
|
||
|
| ?- [library('clpqr/examples/eliminat')].
|
||
|
{consulting /freyung/christian/sicstus2.1.9.clp/library/clpqr/examples/eliminat.pl...}
|
||
|
{/freyung/christian/sicstus2.1.9.clp/library/clpqr/examples/eliminat.pl consulted, 200 msec 15600 bytes}
|
||
|
|
||
|
yes
|
||
|
| ?- hull([X,Y]).
|
||
|
|
||
|
{Y=<2},
|
||
|
{X+1/2*Y=<3},
|
||
|
{X>=1},
|
||
|
{Y>=0},
|
||
|
{X+Y>=2} ?
|
||
|
|
||
|
yes
|
||
|
| ?- example(1,[_,_,X3,X4]).
|
||
|
|
||
|
{X3-1/3*X4>=-1/3},
|
||
|
{X3-11/9*X4=<1/9},
|
||
|
{X3-8/9*X4=<1/9},
|
||
|
{X3-13/18*X4>=-2/9},
|
||
|
{X3-1/6*X4=<1/3} ?
|
||
|
|
||
|
yes
|
||
|
| ?- example(2,[X0,X1|_]).
|
||
|
|
||
|
{X0+2619277/17854273*X1>=-851123/17854273},
|
||
|
{X0+6429953/16575801*X1=<-12749681/16575801},
|
||
|
{X0+19130/1213083*X1>=795400/404361},
|
||
|
{X0-1251619/3956679*X1>=21101146/3956679},
|
||
|
{X0+601502/4257189*X1>=220850/473021} ?
|
||
|
|
||
|
yes
|
||
|
| ?- proj(1).
|
||
|
%%% Timing 00:00:00.100 0.100
|
||
|
[A,B,C,D]:6
|
||
|
{B>=0}
|
||
|
{A>=0}
|
||
|
{D-3*C+B+12*A=<1}
|
||
|
{D-9/7*C+1/7*B+18/7*A>=1/7}
|
||
|
{D-18/11*C+2/11*B+36/11*A>=2/11}
|
||
|
{D-18/13*C+4/13*B+45/13*A=<4/13}
|
||
|
|
||
|
%%% Timing 00:00:00.270 0.270
|
||
|
[A,B,C]:6
|
||
|
{A>=0}
|
||
|
{C-6*B-2*A>=-2}
|
||
|
{C-18/13*B+4/13*A=<4/13}
|
||
|
{C-9/11*B-1/11*A>=-1/11}
|
||
|
{C-9/8*B-1/8*A>=-1/8}
|
||
|
{C-3*B+A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.320 0.320
|
||
|
[A,B]:5
|
||
|
{B-3*A=<1}
|
||
|
{B-9/11*A>=-1/11}
|
||
|
{B-9/8*A>=-1/8}
|
||
|
{B-18/13*A=<4/13}
|
||
|
{B-6*A>=-2}
|
||
|
|
||
|
%%% Timing 00:00:00.290 0.290
|
||
|
[A]:2
|
||
|
{A=<1}
|
||
|
{A>=-1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.030 0.030
|
||
|
[]:0
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A]:2
|
||
|
{A=<1/2}
|
||
|
{A>=-1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.250 0.250
|
||
|
[A,B]:3
|
||
|
{A>=0}
|
||
|
{B-1/2*A>=-1/2}
|
||
|
{B+A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.190 0.190
|
||
|
[A]:2
|
||
|
{A>=0}
|
||
|
{A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.270 0.270
|
||
|
[A,B]:3
|
||
|
{A>=0}
|
||
|
{B-1/2*A>=-1/2}
|
||
|
{B+1/2*A=<1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B,C]:6
|
||
|
{A>=0}
|
||
|
{C-2*B+3*A>=0}
|
||
|
{C-18/13*B+45/13*A=<4/13}
|
||
|
{C-B+A>=0}
|
||
|
{C-4/3*B+4/3*A>=0}
|
||
|
{C-3*B+12*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.250 0.250
|
||
|
[A,B]:4
|
||
|
{A>=0}
|
||
|
{B-36/5*A>=-4/5}
|
||
|
{B-9/2*A>=-1/2}
|
||
|
{B+9/2*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.200 0.200
|
||
|
[A]:2
|
||
|
{A>=0}
|
||
|
{A=<2/13}
|
||
|
|
||
|
%%% Timing 00:00:00.230 0.230
|
||
|
[A,B]:4
|
||
|
{A>=0}
|
||
|
{B-32/5*A>=-3/5}
|
||
|
{B-11/2*A>=-1/2}
|
||
|
{B+3/4*A=<1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.230 0.230
|
||
|
[A,B,C]:5
|
||
|
{B>=0}
|
||
|
{A>=0}
|
||
|
{C+B+9/2*A=<1}
|
||
|
{C-1/2*B-9/2*A>=-1/2}
|
||
|
{C-4/5*B-36/5*A>=-4/5}
|
||
|
|
||
|
%%% Timing 00:00:00.200 0.200
|
||
|
[A,B]:3
|
||
|
{B>=0}
|
||
|
{A>=0}
|
||
|
{B+13/2*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.210 0.210
|
||
|
[A,B,C]:5
|
||
|
{B>=0}
|
||
|
{A>=0}
|
||
|
{C+1/2*B+3/4*A=<1/2}
|
||
|
{C-1/2*B-11/2*A>=-1/2}
|
||
|
{C-3/5*B-32/5*A>=-3/5}
|
||
|
|
||
|
%%% Timing 00:00:00.000 0.000
|
||
|
|
||
|
no
|
||
|
| ?- proj(3).
|
||
|
%%% Timing 00:00:00.100 0.100
|
||
|
[A,B,C,D]:6
|
||
|
{B>=0}
|
||
|
{A>0}
|
||
|
{D-3*C+B+12*A=<1}
|
||
|
{D-9/7*C+1/7*B+18/7*A>=1/7}
|
||
|
{D-18/11*C+2/11*B+36/11*A>=2/11}
|
||
|
{D-18/13*C+4/13*B+45/13*A=<4/13}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B,C]:6
|
||
|
{A>=0}
|
||
|
{C-6*B-2*A>=-2}
|
||
|
{C-18/13*B+4/13*A<4/13}
|
||
|
{C-9/11*B-1/11*A>=-1/11}
|
||
|
{C-9/8*B-1/8*A>=-1/8}
|
||
|
{C-3*B+A<1}
|
||
|
|
||
|
%%% Timing 00:00:00.290 0.290
|
||
|
[A,B]:5
|
||
|
{B-3*A<1}
|
||
|
{B-9/11*A>=-1/11}
|
||
|
{B-9/8*A>=-1/8}
|
||
|
{B-18/13*A<4/13}
|
||
|
{B-6*A>=-2}
|
||
|
|
||
|
%%% Timing 00:00:00.280 0.280
|
||
|
[A]:2
|
||
|
{A<1}
|
||
|
{A>-1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.040 0.040
|
||
|
[]:0
|
||
|
|
||
|
%%% Timing 00:00:00.250 0.250
|
||
|
[A]:2
|
||
|
{A<1/2}
|
||
|
{A>-1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B]:3
|
||
|
{A>=0}
|
||
|
{B-1/2*A>-1/2}
|
||
|
{B+A<1}
|
||
|
|
||
|
%%% Timing 00:00:00.190 0.190
|
||
|
[A]:2
|
||
|
{A>=0}
|
||
|
{A<1}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B]:3
|
||
|
{A>=0}
|
||
|
{B-1/2*A>-1/2}
|
||
|
{B+1/2*A<1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B,C]:6
|
||
|
{A>0}
|
||
|
{C-2*B+3*A>=0}
|
||
|
{C-18/13*B+45/13*A=<4/13}
|
||
|
{C-B+A>=0}
|
||
|
{C-4/3*B+4/3*A>=0}
|
||
|
{C-3*B+12*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.260 0.260
|
||
|
[A,B]:4
|
||
|
{A>0}
|
||
|
{B-36/5*A>=-4/5}
|
||
|
{B-9/2*A>=-1/2}
|
||
|
{B+9/2*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.210 0.210
|
||
|
[A]:2
|
||
|
{A>0}
|
||
|
{A=<2/13}
|
||
|
|
||
|
%%% Timing 00:00:00.230 0.230
|
||
|
[A,B]:4
|
||
|
{A>0}
|
||
|
{B-32/5*A>=-3/5}
|
||
|
{B-11/2*A>=-1/2}
|
||
|
{B+3/4*A=<1/2}
|
||
|
|
||
|
%%% Timing 00:00:00.220 0.220
|
||
|
[A,B,C]:5
|
||
|
{B>=0}
|
||
|
{A>0}
|
||
|
{C+B+9/2*A=<1}
|
||
|
{C-1/2*B-9/2*A>=-1/2}
|
||
|
{C-4/5*B-36/5*A>=-4/5}
|
||
|
|
||
|
%%% Timing 00:00:00.200 0.200
|
||
|
[A,B]:3
|
||
|
{B>=0}
|
||
|
{A>0}
|
||
|
{B+13/2*A=<1}
|
||
|
|
||
|
%%% Timing 00:00:00.230 0.230
|
||
|
[A,B,C]:5
|
||
|
{B>=0}
|
||
|
{A>0}
|
||
|
{C+1/2*B+3/4*A=<1/2}
|
||
|
{C-1/2*B-11/2*A>=-1/2}
|
||
|
{C-3/5*B-32/5*A>=-3/5}
|
||
|
|
||
|
%%% Timing 00:00:00.020 0.020
|
||
|
|
||
|
no
|
||
|
| ?-
|