npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aroman-dss

v1.0.0

Published

Decision Support System using Aroman method for Multi-Criteria Decision Making and ranking

Readme

DSS Aroman (TypeScript)

NPM package untuk Decision Support System menggunakan metode MEREC-AROMAN dalam Multi-Criteria Decision Making (MCDM) dan perangkingan.

Instalasi

npm install dss-aroman

Penggunaan

Method 1: Function-based (Recommended)

import { calculateRankAroman, calculateAroman } from "dss-aroman";

const matrix = [
  [8, 7, 6, 9],
  [6, 8, 7, 5],
  [9, 6, 8, 7],
  [7, 9, 5, 8],
];

const weights = [0.3, 0.25, 0.25, 0.2];
const criteriaTypes = ["benefit", "benefit", "cost", "benefit"];

// Untuk ranking saja (cara yang direkomendasikan)
const ranking = calculateRankAroman(matrix, weights, criteriaTypes);
console.log(ranking);

// Dengan parameter beta dan lambda custom
const customRanking = calculateRankAroman(
  matrix,
  weights,
  criteriaTypes,
  0.7,
  0.3
);
console.log(customRanking);

// Untuk hasil lengkap semua tahap perhitungan
const fullResult = calculateAroman(matrix, weights, criteriaTypes);
console.log(fullResult);

Method 2: Object Input (Compatibility)

import { rank, calculate, AromanInput } from "dss-aroman";

const input: AromanInput = {
  matrix: [
    [8, 7, 6, 9],
    [6, 8, 7, 5],
    [9, 6, 8, 7],
    [7, 9, 5, 8],
  ],
  weights: [0.3, 0.25, 0.25, 0.2],
  criteriaTypes: ["benefit", "benefit", "cost", "benefit"],
  options: {
    beta: 0.5, // Weighting factor untuk aggregated normalization
    lambda: 0.5, // Coefficient untuk ranking calculation
  },
};

// Untuk ranking saja
const ranking = rank(input);
console.log(ranking);

// Untuk hasil lengkap
const fullResult = calculate(input);
console.log(fullResult);

Parameter Beta dan Lambda

Parameter Beta (β)

  • Fungsi: Mengontrol bobot relatif antara linear normalization dan vector normalization
  • Range: 0 - 1
  • Default: 0.5 (bobot seimbang)
  • Formula: K_norm = (β*K_linear + (1-β)*K_vector) / 2

Parameter Lambda (λ)

  • Fungsi: Mengontrol bobot antara cost criteria dan benefit criteria dalam ranking
  • Range: 0 - 1
  • Default: 0.5 (bobot seimbang)
  • Formula: R_i = L_i^λ + P_i^(1-λ)

API Reference

Types

interface AromanInput {
  matrix: number[][];
  weights: number[];
  criteriaTypes: CriteriaType[];
  options?: AromanOptions;
}

interface AromanOptions {
  beta?: number; // Default: 0.5
  lambda?: number; // Default: 0.5
}

interface RankingResult {
  alternative: number;
  Li: number; // Cost criteria sum
  Pi: number; // Benefit criteria sum
  Ri: number; // Final ranking score
  rank: number; // Final rank position
}

Static Methods

Aroman.CalculateRank(matrix, weights, criteriaTypes, beta?, lambda?): RankingResult[]

Method utama untuk menghitung ranking alternatif.

Parameters:

  • matrix: number[][] - Matrix keputusan (m x n)
  • weights: number[] - Array bobot kriteria [0-1]
  • criteriaTypes: CriteriaType[] - Array tipe kriteria ('benefit' atau 'cost')
  • beta?: number - Weighting factor (default: 0.5)
  • lambda?: number - Coefficient (default: 0.5)

Aroman.Calculate(matrix, weights, criteriaTypes, beta?, lambda?): AromanResult

Method untuk menghitung hasil lengkap termasuk semua tahap perhitungan.

Functions (Compatibility)

rank(input: AromanInput): RankingResult[]

Mengembalikan ranking alternatif saja menggunakan input object.

calculate(input: AromanInput): AromanResult

Mengembalikan hasil lengkap menggunakan input object.

Metode AROMAN

Package ini mengimplementasikan metode AROMAN (Alternative Ranking Order Method Accounting for two-step Normalization) yang terdiri dari 6 tahap:

Tahap 1: Linear Normalization

Normalisasi linear menggunakan formula min-max:

K_{ij} = (z_{ij} - min_i z_{ij}) / (max_i z_{ij} - min_i z_{ij})

Tahap 2: Vector Normalization

Normalisasi vektor menggunakan formula:

K_{ij}* = z_{ij} / √(∑_{i=1}^m z_{ij}²)

Tahap 3: Aggregated Normalization

Gabungan kedua normalisasi dengan parameter β:

K_{ij}^norm = (β*K_{ij} + (1-β)*K_{ij}*) / 2

Tahap 4: Weight Multiplication

Kalikan dengan bobot kriteria:

K̂_{ij} = w_j * K_{ij}^norm

Tahap 5: Cost-Benefit Calculation

Pisahkan dan jumlahkan berdasarkan tipe kriteria:

  • Cost: L_i = ∑ K̂_{ij}^(min)
  • Benefit: P_i = ∑ K̂_{ij}^(max)

Tahap 6: Ranking Calculation

Hitung nilai akhir dengan parameter λ:

R_i = L_i^λ + P_i^(1-λ)

Contoh Output

// Ranking result
[
  { alternative: 3, Li: 0.1, Pi: 0.193, Ri: 0.756, rank: 1 },
  { alternative: 1, Li: 0.049, Pi: 0.22, Ri: 0.691, rank: 2 },
  { alternative: 4, Li: 0.024, Pi: 0.224, Ri: 0.627, rank: 3 },
  { alternative: 2, Li: 0.075, Pi: 0.121, Ri: 0.622, rank: 4 },
];

Build dan Test

npm run build
npm test

Referensi

Metode ini didasarkan pada paper:

  • MEREC: Keshavarz-Ghorabaee et al. (2021)
  • AROMAN: Bošković et al. (2023)
  • MEREC-AROMAN: Kara et al. (2024) - Socio-Economic Planning Sciences