18.10.2014 Views

Constraint Logic Programming (Ch.14)

Constraint Logic Programming (Ch.14)

Constraint Logic Programming (Ch.14)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CLP<br />

• Types of CLP:<br />

– CLP(R): variables take values over reals (decimal points)<br />

– CLP(Z): integers<br />

– CLP(Q): rationals (fractions)<br />

– CLP(FD): finite domains (sets) and others<br />

• Good for solving problems involving:<br />

– scheduling<br />

– linear equations and optimization<br />

– logistics<br />

• To run with SICStus:<br />

?- use_module(library(clpq)). % CLP package for rationals (fractions)<br />

?- use_module(library(clpr)). % CLP package for reals<br />

?- use_module(library(clpfd)). % CLP package for finite domains (sets)<br />

B. Ross COSC 2Y01 Prolog<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!