-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
152 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
Version: 1.0 | ||
#NOTE: Version 1.0 of the ahp file format is now deprecated. This version | ||
#of the file is only included in the package to test backward compatibility. | ||
#Please use the latest format! | ||
|
||
######################### | ||
# Alternatives Section | ||
# THIS IS FOR The Tom, Dick, & Harry problem at | ||
# https://en.wikipedia.org/wiki/Analytic_hierarchy_process_%E2%80%93_leader_example | ||
# | ||
# This example is provided by Nicole Radziwill, see | ||
# http://qualityandinnovation.com/2016/01/04/analytic-hierarchy-process-ahp-with-the-ahp-package/ | ||
# | ||
Alternatives: &alternatives | ||
# 1= not well; 10 = best possible | ||
# Your assessment based on the paragraph descriptions may be different. | ||
Tom: | ||
age: 50 | ||
experience: 7 | ||
education: 4 | ||
leadership: 10 | ||
Dick: | ||
age: 60 | ||
experience: 10 | ||
education: 6 | ||
leadership: 6 | ||
Harry: | ||
age: 30 | ||
experience: 5 | ||
education: 8 | ||
leadership: 6 | ||
# | ||
# End of Alternatives Section | ||
##################################### | ||
# Goal Section | ||
# | ||
Goal: | ||
# A Goal HAS preferences (within-level comparison) and HAS Children (items in level) | ||
name: Choose the Most Suitable Leader | ||
preferences: | ||
# preferences are defined pairwise | ||
# 1 means: A is equal to B | ||
# 9 means: A is highly preferrable to B | ||
# 1/9 means: B is highly preferrable to A | ||
- [Experience, Education, 4] | ||
- [Experience, Charisma, 3] | ||
- [Experience, Age, 7] | ||
- [Education, Charisma, 1/3] | ||
- [Education, Age, 3] | ||
- [Age, Charisma, 1/5] | ||
children: | ||
Experience: | ||
preferenceFunction: > | ||
ExperiencePreference <- function(a1, a2) { | ||
if (a1$experience < a2$experience) return (1/ExperiencePreference(a2, a1)) | ||
ratio <- a1$experience / a2$experience | ||
if (ratio < 1.05) return (1) | ||
if (ratio < 1.2) return (2) | ||
if (ratio < 1.5) return (3) | ||
if (ratio < 1.8) return (4) | ||
if (ratio < 2.1) return (5) | ||
return (6) | ||
} | ||
children: *alternatives | ||
Education: | ||
preferenceFunction: > | ||
EducPreference <- function(a1, a2) { | ||
if (a1$education < a2$education) return (1/EducPreference(a2, a1)) | ||
ratio <- a1$education / a2$education | ||
if (ratio < 1.05) return (1) | ||
if (ratio < 1.15) return (2) | ||
if (ratio < 1.25) return (3) | ||
if (ratio < 1.35) return (4) | ||
if (ratio < 1.55) return (5) | ||
return (5) | ||
} | ||
children: *alternatives | ||
Charisma: | ||
preferences: | ||
- [Tom, Dick, 5] | ||
- [Tom, Harry, 9] | ||
- [Dick, Harry, 4] | ||
children: *alternatives | ||
Age: | ||
preferences: | ||
- [Tom, Dick, 1/3] | ||
- [Tom, Harry, 5] | ||
- [Dick, Harry, 9] | ||
children: *alternatives | ||
# | ||
# End of Goal Section | ||
##################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters