Skip to content

Instantly share code, notes, and snippets.

@gluc
Last active March 28, 2017 19:27
Show Gist options
  • Save gluc/adf29ccde4d0cb04a061cfdb70216adf to your computer and use it in GitHub Desktop.
Save gluc/adf29ccde4d0cb04a061cfdb70216adf to your computer and use it in GitHub Desktop.
Version: 2.0
#####################################
# Alternatives Section
#
Alternatives: &alternatives
# Here, we list all the alternatives, together with their attributes.
# We can use these attributes later in the file when defining
# preferenceFunctions. The attributes can be quantitative or
# qualitative.
Becton_Dickinson:
Entrega: 15 dias
Nipro_Medical:
Entrega: 30 dias
Rymco:
Entrega: 30 dias
#
# End of Alternatives Section
#####################################
#####################################
# Goal Section
#
Goal:
# The goal spans a tree of criteria and the alternatives
name: Elegir Proveedor
description: >
This is a classic single decision maker problem. It models
the situation facing by a family that wants to buy a new car.
preferences:
# preferences are typically 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
pairwise:
- [Entrega, Posicion_Financiera, 7]
- [Entrega, Precio, 1/3]
- [Entrega, Calidad, 1/9]
- [Entrega, Experiencia, 3]
- [Entrega, Atencion_cliente, 1/5]
- [Entrega, Reputacion, 3]
- [Posicion_Financiera, Precio, 1/7]
- [Posicion_Financiera, Calidad, 1/9]
- [Posicion_Financiera, Experiencia, 1]
- [Posicion_Financiera, Atencion_cliente, 1/9]
- [Posicion_Financiera, Reputacion, 1]
- [Precio, Calidad, 1/7]
- [Precio, Experiencia, 5]
- [Precio, Atencion_cliente, 1/5]
- [Precio, Reputacion, 5]
- [Calidad, Experiencia, 9]
- [Calidad, Atencion_cliente, 3]
- [Calidad, Reputacion, 9]
- [Experiencia, Atencion_cliente, 1/9]
- [Experiencia, Reputacion, 1]
- [Atencion_cliente, Reputacion, 9]
children:
Entrega:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1/7]
- [Becton_Dickinson, Rymco, 3]
- [Nipro_Medical, Rymco, 9]
children: *alternatives
Posicion_Financiera:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1/2]
- [Becton_Dickinson, Rymco, 7]
- [Nipro_Medical, Rymco, 9]
children: *alternatives
Precio:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1/7]
- [Becton_Dickinson, Rymco, 1]
- [Nipro_Medical, Rymco, 4]
children: *alternatives
Calidad:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1]
- [Becton_Dickinson, Rymco, 9]
- [Nipro_Medical, Rymco, 7]
children: *alternatives
Experiencia:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1/2]
- [Becton_Dickinson, Rymco, 5]
- [Nipro_Medical, Rymco, 9]
children: *alternatives
Atencion_cliente:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1/2]
- [Becton_Dickinson, Rymco, 7]
- [Nipro_Medical, Rymco, 9]
children: *alternatives
Reputacion:
preferences:
pairwise:
- [Becton_Dickinson, Nipro_Medical, 1]
- [Becton_Dickinson, Rymco, 9]
- [Nipro_Medical, Rymco, 4]
children: *alternatives
#
# End of Goal Section
#####################################
library(ahp)
ahp <- Load("C:/tmp/proveedor.yaml")
Visualize(ahp)
Calculate(ahp)
Analyze(ahp)
AnalyzeTable(ahp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment