Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Request about Ciao Fuzzy Prolog
Hi,
after several searches i'm using Ciao Prolog for my thesis, because it
contain an extension for Fuzzy Theory.
I must apply the Fuzzy Theory to Constraint Programming and i've
chosen like example the knapsack problem without the maximization.

I've defined one list of objects

K =  [oggetto('A',3,402),oggetto('B',1,422),o
ggetto('C',2.3,80),
oggetto('D',0.7,145),oggetto('E',0.3,611)]

where 'A' is the name, 3 the volume, 402 the price, etc...

The rest of code is:

knapsack(O, Vu, Pu) :-
K =  [oggetto('A',3,402),oggetto('B',1,422),o
ggetto('C',2.3,80),
oggetto('D',0.7,145),oggetto('E',0.3,611)],
vincolo(K,O,Vu, Pu).

vincolo(K,O,Vu,Pu):~
subseq(O, K),
volume(O, V),
prezzo(O, P),
volfuzzy(V,Vu),
prefuzzy(P,Pu),
{Vu .=<. 1.0},
{Pu .>=. 0.5}.

% alto se > 10
volfuzzy :# fuzzy_predicate([(0,0),(5,0.5),(10,1)]).

% alto se > 2500 €
prefuzzy :# fuzzy_predicate([(0,0),(1500,0.5),(3000,1)]).

where

sublist(A,B) return all the sublist of K, volume(X,Y) return in Y the
sum of volumes of the list X, prezzo(X,P) the price.
The constraint that i've defined are:
{Vu .=<. 1.0},
{Pu .>=. 0.5}.

Now i would want that the values of the objects of the list K were
fuzzy value, that is i would want to say that the object ' A' does not
have a
volume of 3 liters but a fuzzy value.
How can be made this thing in Hello Prolog?
Can you help me, please?
Thanks a lot,
Paul.

Report this thread to moderator Post Follow-up to this message
Old Post
Paolo
03-31-05 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:00 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.