-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproject_risk.pl
223 lines (164 loc) · 4.78 KB
/
project_risk.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
%%----------------------------------------------------------------------
%%
%% MYCIN RULEBASE EXAMPLE
%%
%% Angel Fernandez Pineda.
%%
%% DESCRIPTION:
%%
%% Our company is willing to develop a new software project.
%% We would like to know how risky is such project.
%%
%%----------------------------------------------------------------------
:- module(project_risk,[],[mycin_rulebase]).
%% Import current knowledge about the project.
:- use_module(project_features).
%%----------------------------------------------------------------------
%% RULES
%%----------------------------------------------------------------------
%%----------------------------------------------------------------------
%% Select the best organization pattern for the people involved on
%% development.
%%
%% Possible organization patterns are: by_applications, by_functions,
%% weak_matrix, strong_matrix , by_projects.
%%
%%----------------------------------------------------------------------
:- export(org/1).
org(by_applications) cf 0.9 :-
soft_reliability(high).
org(by_applications) cf 0.5 :-
user_interaction(strong),
duration(high),
risk(high).
org(by_applications) cf -1 :-
boss_availability(high).
%
org(by_functions) cf 0.3 :-
technical_qualification(low).
org(by_functions) cf 0.85 :-
tech_level(high),
risk(high).
org(by_functions) cf -0.85 :-
soft_reliability(high).
org(by_functions) cf -0.6 :-
boss_availability(high).
org(by_functions) cf -1 :-
user_interaction(strong).
org(by_functions) cf -0.75 :-
duration(high).
org(by_functions) cf -0.15 :-
new_employees(yes).
org(by_functions) cf -0.6 :-
technical_qualification(low).
%
org(weak_matrix) cf 0.9 :-
risk(high).
org(weak_matrix) cf 0.3 :-
technical_qualification(high).
org(weak_matrix) cf 0.65 :-
boss_availability(high),
new_employees(yes),
tech_level(high).
org(weak_matrix) cf -1 :-
soft_reliability(high).
org(weak_matrix) cf -0.85 :-
user_interaction(strong).
org(weak_matrix) cf -0.4 :-
technical_qualification(low).
%
org(strong_matrix) cf 0.9 :-
boss_availability(high),
user_interaction(strong),
tech_level(high).
org(strong_matrix) cf 0.2 :-
technical_qualification(low),
new_employees(yes).
org(strong_matrix) cf 0.8 :-
risk(high).
%
org(by_projects) cf 0.8 :-
boss_availability(high),
user_interaction(strong),
soft_reliability(high).
org(by_projects) cf -0.85 :-
risk(high).
%%----------------------------------------------------------------------
%%
%% HOW RISKY IS THIS PROJECT
%%
%%----------------------------------------------------------------------
:- export(risk/1).
risk(high) cf 0.8 :-
tech_level(high).
risk(high) cf 0.3 :-
new_employees(yes).
risk(high) cf -0.35 :-
boss_availability(high).
risk(high) cf -0.3 :-
technical_qualification(high).
risk(high) cf -0.25 :-
user_interaction(strong).
risk(high) cf 0.4 :-
involves(some).
risk(high) cf 0.75 :-
company_impact(high).
risk(high) cf 0.55 :-
market_status(war),
imitation_time(short).
rish(high) cf 0.37 :-
market_status(offensive),
imitation_time(short).
risk(high) cf -0.3 :-
market_status(defensive),
imitation_time(short).
risk(high) cf -0.4 :-
market_status(peace).
%%----------------------------------------------------------------------
%%
%% CHECK WHETHER THIS PROJECT WILL HAVE A DIRECT IMPACT
%% ON OUR COMPANY'S "WAY OF LIFE"
%%
%%----------------------------------------------------------------------
company_impact(high) cf 0.65 :-
kind(trans).
company_impact(high) cf 0.30 :-
kind(sis).
company_impact(high) cf -0.15 :-
new_employees(yes).
%%----------------------------------------------------------------------
%%
%% WHAT WILL BE OUR COMPANY'S STATUS IN RELATION WITH THE MARKET
%% (at the end of the project)
%%
%% war - our company will be trying to take over the
%% market against other company.
%% offensive - there will be no other company annoying us.
%% defensive - we will be in a weak situation.
%% peace - things will stay the same.
%%----------------------------------------------------------------------
:- export(market_status/1).
market_status(war) cf 0.9 :-
kind(info),
company(proactive),
other_companies(proactive).
market_status(war) cf 0.7 :-
kind(trans),
company(proactive),
other_companies(proactive).
market_status(war) cf -0.3 :-
barrier(yes).
market_status(peace) cf 0.95 :-
company(reactive),
other_companies(reactive).
market_status(offensive) cf 0.95 :-
kind(info),
company(proactive),
other_companies(reactive).
market_status(offensive) cf 0.6 :-
kind(trans),
company(proactive),
other_companies(reactive).
market_status(defensive) cf 1 :-
company(reactive),
other_companies(proactive).