looking at operators.
This commit is contained in:
parent
d1242028d2
commit
a7b4667e6c
@ -29,11 +29,11 @@ problem(Z, X, InFlow, OutFlow, N) :-
|
||||
End = 15,
|
||||
M = 999,
|
||||
d( M, DD ),
|
||||
D = array[1..N,1..N] of DD, % distance
|
||||
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
|
||||
OutFlow = array[1..N] of 0..1,
|
||||
InFlow = array[1..N] of 0..1,
|
||||
D <== array[1..N,1..N] of DD, % distance
|
||||
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
|
||||
OutFlow <== array[1..N] of 0..1,
|
||||
InFlow <== array[1..N] of 0..1,
|
||||
|
||||
% objective to minimize
|
||||
Z in 0..M,
|
||||
|
@ -50,8 +50,6 @@ Constraints supported are:
|
||||
op(700, xf, #=<),
|
||||
op(700, xf, #=),
|
||||
op(700, xf, #\=),
|
||||
op(700, xfx, in),
|
||||
op(700, xfx, ins),
|
||||
op(500, yfx, '<=>'),
|
||||
op(500, yfx, '=>'),
|
||||
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(maplist)).
|
||||
|
||||
:- reexport(library(matrix), [(<==)/2, op(600, xfx, '<=='),
|
||||
:- reexport(library(matrix), [(<==)/2, op(800, xfx, '<=='),
|
||||
op(700, xfx, in),
|
||||
op(700, xfx, ins),
|
||||
op(450, xfx, ..), % should bind more tightly than \/
|
||||
|
Reference in New Issue
Block a user