Skip to content

Instantly share code, notes, and snippets.

@xhan85
Last active December 28, 2016 16:36
Show Gist options
  • Save xhan85/388d8e3e868a2663338bd1bd2883ee24 to your computer and use it in GitHub Desktop.
Save xhan85/388d8e3e868a2663338bd1bd2883ee24 to your computer and use it in GitHub Desktop.
Yaml code for ahp: pairwise comparisons
Version: 1.0
Alternatives: &alternatives
GIC Monitoring:
Geologic Data:
USGS:
Energy Infrastructure:
Variometer:
Goal:
name: Data Source
preferences:
pairwise:
- [Coverage, Cost, 2]
- [Coverage, Reliability, 1/3]
- [Cost, Reliability, 1/5]
children:
Coverage:
preferences:
pairwise:
- [Temporal, Spatial, 1/5]
children:
Temporal:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 8]
- [GIC Monitoring, USGS, 8]
- [GIC Monitoring, Energy Infrastructure, 8]
- [GIC Monitoring, Variometer, 9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 7]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 7]
- [Energy Infrastructure, Variometer, 7]
children: *alternatives
Spatial:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1/7]
- [GIC Monitoring, Variometer, 5]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1/7]
- [Geologic Data, Variometer, 5]
- [USGS, Energy Infrastructure, 1/7]
- [USGS, Variometer, 5]
- [Energy Infrastructure, Variometer, 5]
children: *alternatives
Cost:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1]
- [GIC Monitoring, Variometer, 1/9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 1/9]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 1/9]
- [Energy Infrastructure, Variometer, 1/9]
children: *alternatives
Reliability:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1]
- [GIC Monitoring, Variometer, 9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 9]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 9]
- [Energy Infrastructure, Variometer, 9]
children: *alternatives
#
# End of Goal Section
#####################################
library(ahp)
library(data.tree)
library(yaml)
library(R6)
#read in file
GIC<-yaml.load_file("U:/EOA/AHP/GIC Assessment_wdoane.yml")
#will not Load file...
Load(GIC)
Calculate(GIC)
Analyze(GIC)
AnalyzeTable(GIC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment