Documente Academic
Documente Profesional
Documente Cultură
Systmes Intelligents
Chapitre 5: Systmes experts
base de cadres.
Cadres
Cadre
Cadre: exemple
Carte dembarquement Quantas
Transporteur: Quantas
Transporteur: EastJet
Nom: M. LeBlanc
Vol: Q101
Vol: EJ467
Date: 12 Dcembre
Date: 15 Dcembre
Sige: 24A
Sige: 26F
De: Moncton
De: Moncton
: Ottawa
: Montral
Embarquement: 0600
Embarquement: 0750
Porte: 4
Porte: 2
Cadres: utilit
Cadres:
Attributs
Valeur de lattribut
Information procdurale
Facette
Facette prompte
Facette dinfrence
Classes et instances
Transporteur: EastJet
Nom: Mme Richard
Vol: EJ467
Date: 15 Dcembre
Sige: 26F
De: Moncton
: Montral
Embarquement: 0750
Porte: 2
Instance: Carte dembarquement Quantas
Transporteur: Quantas
Nom: M. LeBlanc
Vol: Q101
Date: 12 Dcembre
Sige: 24A
De: Moncton
: Ottawa
Embarquement: 0600
Porte: 4
10
Hritage de classe
11
12
13
Hritage
14
Dsavantages
15
Mthodes et dmons
LORSQUE VOULU
16
17
18
Moteur dinfrence
19
Moteur dinfrence
20
21
22
23
24
25
tape 1
26
tape 1 (suite)
27
tape 2
28
tape 2 (suite)
CLASS:
[Str]
[Str]
[N]
[Str]
[N]
[N]
[Str]
[Str]
[Str]
[Str]
[N]
Property
Area :
Suburb :
Price :
Type :
Bedrooms :
Bathrooms :
Construction :
Phone :
Pictfile :
Textfile :
Instance Number
:
29
tape 3
30
tape 3 (suite)
MAKE Property
WITH Area := area OF dB3 HOUSE 1
WITH Suburb := suburb OF dB3 HOUSE 1
WITH Price := price OF dB3 HOUSE 1
WITH Type := type OF dB3 HOUSE 1
WITH Bedrooms := bedrooms OF dB3 HOUSE 1
WITH Bathrooms := bathrooms OF dB3 HOUSE 1
WITH Construction := construct OF dB3 HOUSE 1
WITH Phone := phone OF dB3 HOUSE 1
WITH Pictfile := pictfile OF dB3 HOUSE 1
WITH Textfile := textfile OF dB3 HOUSE 1
WITH Instance Number := Current Instance Number
31
tape 3 (suite)
INSTANCE: Property 1
Class:
Property
[Str] Area:
Central Suburbs
New Town
[Str] Suburb:
[N] Price:
164000
[Str] Type:
House
[N] Bedrooms:
3
[N] Bathrooms:
1
[Str] Construction:
Weatherboard
[Str] Phone:
(03) 6226 4212
[Str] Pictfile:
house01.bmp
[Str] Textfile:
house01.txt
[N] Instance Number: 1
INSTANCE: Property 2
Class:
Property
[Str] Area:
Central Suburbs
[Str] Suburb:
Taroona
[N] Price:
150000
[Str] Type:
House
[N] Bedrooms:
3
[N] Bathrooms:
1
[Str] Construction:
Brick
[Str] Phone:
(03) 6226 1416
[Str] Pictfile:
house02.bmp
[Str] Textfile:
house02.txt
[N] Instance Number: 2
32
tape 4
Crer linterface
33
tape 4 (suite)
Buy Smart
34
tape 4 (suite)
35
tape 4 (suite)
Buy Smart
Select the most important things you are looking for in your property.
Suburb
Bedrooms
Maximum Price
All Suburbs
No maximum
Central Suburbs
One bedroom
$ 50,000
Eastern Shore
Two bedrooms
$ 100,000
Northern Suburbs
Three bedrooms
Southern Suburbs
$ 150,000
$ 200,000
$ 250,000
$ 300,000
Property Type
Bathrooms
$ 350,000
House
One bathroom
$ 500,000
Unit
Two bathrooms
$ 1,000,000
Townhouse
$ 2,000,000
Help
Restart
$ 400,000
Search
36
tape 4 (suite)
37
tape 4 (suite)
Buy Smart
38
tape 5
39
tape 5 (suite)
40
tape 5 (suite)
CLASS:
Action Data
[WHEN CHANGED]
INSTANCE:
Action Data 1
Class:
Action Data
TRUE
WHEN CHANGED
BEGIN
Current Instance Number := 0
FORGET Property
FIND dB3 HOUSE 1
WHEN FOUND
Current Instance Number := Current Instance Number + 1
MAKE Property
WITH Area := area OFdB3 HOUSE 1
WITH Suburb := suburb OFdB3 HOUSE 1
WITH Price := price OFdB3 HOUSE 1
WITH Type := type OFdB3 HOUSE 1
WITH Bedrooms := bedrooms OFdB3 HOUSE 1
WITH Bathrooms := bathrooms OFdB3 HOUSE 1
WITH Construction := construct OFdB3 HOUSE 1
WITH Phone := phone OFdB3 HOUSE 1
WITH Pictfile := pictfile OF dB3 HOUSE 1
WITH Textfile := textfile OF dB3 HOUSE 1
WITH Instance Number := Current Instance Number
FIND END
Total Number of Instances := Current Instance Number
Goto First Property OF Action Data := TRUE
END
41
tape 5 (suite)
Dmons, DEMON 1
..
.
DEMON 5
IF selected OF House pushbutton
THEN FIND Property
WHERE Type OF Property <> "House"
WHEN FOUND
FORGET CURRENT Property
FIND END
GIND5439 Gabriel Cormier, Universit de Moncton
42
tape 5 (suite)
CLASS:
Action Data
[WHEN CHANGED]
[S] Load Properties:
[S] Load Instance Number: [WHEN CHANGED]
[WHEN CHANGED]
[S] Goto First Property:
INSTANCE:
Action Data 1
Class:
Action Data
[S] Load Properties:
TRUE
[S] Load Instance Number: TRUE
[S] Goto First Property:
TRUE
WHEN CHANGED
BEGIN
Current Instance Number := 0
FIND Property
WHEN FOUND
Current Instance Number := Current Instance Number + 1
Instance Number OF Property := Current Instance Number
FIND END
Total Number of Instances := Current Instance Number
Goto First Property OF Action Data := TRUE
END
WHEN CHANGED
BEGIN
FIND Property
LIMIT 1
WHEN FOUND
filename OF Property picturebox := Pictfile OF Property
filename OF Property textbox := Textfile OF Property
FIND END
END
43
tape 6
44
tape 7
45