我必須定義一個或運營商的規則,但它返回多個true或false。序言或(;)規則返回多個結果
isloanaccept(Name,Guarantor,LoanType,LoanAmount,LoanTenure)
:- customer(Name,bank(_),customertype(_),
citizen(Ci),age(Age),credit(C),
income(I),property(_),bankemployee(_)),
Ci == 'malaysian',
Age >= 18,
C > 500,
I > (LoanAmount/LoanTenure)/12,
isguarantor(Guarantor,Name),
ispersonalloan(LoanType,LoanAmount,LoanTenure);
ishouseloan(LoanType,LoanAmount,LoanTenure);
isbusinessloan(LoanType,LoanAmount,LoanTenure);
iscarloan(LoanType,LoanAmount,LoanTenure).
其實,我需要檢查貸款類型是否滿足特定的貸款要求,並結合一般規則。
換句話說,我需要定義上述規則是這樣的。
Ci == 'malaysian', Age >= 18,C > 500,
I > (LoanAmount/LoanTenure)/12,
isguarantor(Guarantor,Name)
Or with (ispersonalloan(LoanType,LoanAmount,LoanTenure);
ishouseloan(LoanType,LoanAmount,LoanTenure);
isbusinessloan(LoanType,LoanAmount,LoanTenure);
iscarloan(LoanType,LoanAmount,LoanTenur)
它應該在命令行中返回1個真/假而不是多個語句。
每個或規則返回1布爾值,這不是我想要檢查了在命令行中的規則後。我需要像這樣(通用規則&(Multiple或Rule))。
怎麼把幾個或規則,返回1個布爾值相結合?
請幫忙。
謝謝。
謝謝。問題解決了。 – peterwkc 2010-07-29 06:01:43