GRASS logo

NAME

p.mcdm.weight - AHP weight elicitation from a pairwise comparison matrix.

KEYWORDS

Planetary, Decision Support, AHP, landing

SYNOPSIS

p.mcdm.weight
p.mcdm.weight --help
p.mcdm.weight [-v] pairwise=name criteria=string [output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-v
Verbose — print eigenvector and eigenvalue to console
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

pairwise=name [required]
CSV file with pairwise comparison matrix (n×n, comma-separated)
Name of input file
criteria=string [required]
Comma-separated criterion names (must match matrix order)
output=name
Output JSON file with weights and consistency ratio
Name for output file
Default: weights.json

Table of contents

DESCRIPTION

p.mcdm.weight derives criterion weights from a user-supplied AHP pairwise comparison matrix (Saaty 1977), validates the consistency ratio, and writes results to a JSON file for use by p.mcdm.score and p.rank.

Analytic Hierarchy Process (Saaty 1977)

  1. Pairwise matrix A: n×n where A[i,j] = importance of criterion i relative to j on the 1–9 Saaty scale.

  2. Normalise: divide each element by its column sum; weight vector w is the row mean of the normalised matrix.

  3. Principal eigenvalue λmax = mean of (Aw)ᵢ / wᵢ over all i.

  4. Consistency Index (Liu et al. 2023, Eq. 9):

    CI = (λmax − n) / (n − 1)
    
  5. Consistency Ratio (Liu et al. 2023, Eq. 10):

    CR = CI / RI(n)
    

    Random Index RI: 0, 0, 0.58, 0.90, 1.12, 1.24, 1.32, 1.41, 1.45, 1.49 for n = 1…10 (Saaty 1977).

  6. CR ≤ 0.10 is required; otherwise the matrix must be revised.

PARAMETERS

Parameter Default Description
pairwise required CSV file with n×n pairwise comparison matrix
criteria required Comma-separated criterion names (matching matrix order)
output weights.json Output JSON with weights and consistency metrics

FLAGS

Flag Description
-v Verbose — print eigenvector, λmax, CI, CR to console

OUTPUT

JSON file with keys: criteria, weights, lambda_max, CI, CR, consistent.

EXAMPLES

cat > pcm.csv << 'EOF'
1,   3,   5
1/3, 1,   3
1/5, 1/3, 1
EOF

p.mcdm.weight pairwise=pcm.csv \
              criteria=slope,illumination,earth_vis \
              output=weights.json -v

NOTES

A consistency ratio (CR) > 0.10 indicates the pairwise comparisons are internally inconsistent. The module prints a warning but still writes the weights; review and revise the matrix before using the weights in p.mcdm.score. The AHP pairwise matrix is supplied as a CSV file with one n×n row per line, no header.

SEE ALSO

p.mcdm.score, p.terrain.ellipse

REFERENCES

AUTHOR

Yann Chemin

SOURCE CODE

Available at: p.mcdm.weight source code (history)

Accessed: Sunday Nov 15 11:06:02 2026


Main index | Paint index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual