looking at operators.

This commit is contained in:
Vítor Santos Costa 2014-10-05 23:51:06 +01:00
parent d1242028d2
commit a7b4667e6c
2 changed files with 6 additions and 8 deletions

View File

@ -29,11 +29,11 @@ problem(Z, X, InFlow, OutFlow, N) :-
End = 15, End = 15,
M = 999, M = 999,
d( M, DD ), d( M, DD ),
D = array[1..N,1..N] of DD, % distance D <== array[1..N,1..N] of DD, % distance
RHS = array[1..N] of _, % requirements (right hand statement) RHS <== array[1..N] of _, % requirements (right hand statement)
X = array[1..N, 1..N] of 0..1, % the resulting matrix, 1 if connected, 0 else X <== array[1..N, 1..N] of 0..1, % the resulting matrix, 1 if connected, 0 else
OutFlow = array[1..N] of 0..1, OutFlow <== array[1..N] of 0..1,
InFlow = array[1..N] of 0..1, InFlow <== array[1..N] of 0..1,
% objective to minimize % objective to minimize
Z in 0..M, Z in 0..M,

View File

@ -50,8 +50,6 @@ Constraints supported are:
op(700, xf, #=<), op(700, xf, #=<),
op(700, xf, #=), op(700, xf, #=),
op(700, xf, #\=), op(700, xf, #\=),
op(700, xfx, in),
op(700, xfx, ins),
op(500, yfx, '<=>'), op(500, yfx, '<=>'),
op(500, yfx, '=>'), op(500, yfx, '=>'),
op(450, xfx, ..), % should bind more tightly than \/ op(450, xfx, ..), % should bind more tightly than \/
@ -236,7 +234,7 @@ The product of constant _Cs_ by _Vs_ must be in relation
:- use_module(library(gecode)). :- use_module(library(gecode)).
:- use_module(library(maplist)). :- use_module(library(maplist)).
:- reexport(library(matrix), [(<==)/2, op(600, xfx, '<=='), :- reexport(library(matrix), [(<==)/2, op(800, xfx, '<=='),
op(700, xfx, in), op(700, xfx, in),
op(700, xfx, ins), op(700, xfx, ins),
op(450, xfx, ..), % should bind more tightly than \/ op(450, xfx, ..), % should bind more tightly than \/