gluc / ahp

Analytical Hierarchy Process (AHP) with R
97 stars 41 forks source link

Why does the online yaml visualizer not work? #22

Closed rufreakde closed 2 years ago

rufreakde commented 4 years ago

Hi I found this example here:

Version: 2.0
Alternatives: &alternatives
  OLD:
    cost: 100
  NEW:
    cost: 100
Goal:
  name: Select Between Old and New Chatbots
  preferences:
    pairwise:
      - [Performance, Humanity, 7]
      - [Performance, Affect, 7]
      - [Performance, Accessibility, 1/3]
      - [Humanity, Affect, 1/5]
      - [Humanity, Accessibility, 1/7]
      - [Affect, Accessibility, 1/7]
  children:
    Performance:
      preferences:
        pairwise:
          - [UnexpectedInput, Escalation, 7]
      children:
        UnexpectedInput:
          preferences:
            pairwise:
              - [OLD, NEW, 3]
          children: *alternatives
        Escalation:
          preferences:
            pairwise:
              - [OLD, NEW, 7]
          children: *alternatives
    Humanity:
      preferences:
        pairwise:
          - [Transparent, ThemedDiscussion, 1/5]
          - [Transparent, SpecificQs, 1/5]
          - [ThemedDiscussion, SpecificQs, 1]
      children:
        Transparent:
          preferences:
              pairwise:
                - [OLD, NEW, 1]
          children: *alternatives
        ThemedDiscussion:
          preferences:
              pairwise:
                - [OLD, NEW, 1/3]
          children: *alternatives
        SpecificQs:
          preferences:
              pairwise:
                - [OLD, NEW, 1/5]
          children: *alternatives
    Affect:
      preferences:
        pairwise:
          - [Personality, Entertaining, 1/5]
      children:
        Personality:
          preferences:
            pairwise:
              - [OLD, NEW, 1/5]
          children: *alternatives
        Entertaining:
          preferences:
            pairwise:
              - [OLD, NEW, 1/5]
          children: *alternatives
        Accessibility:
          preferences:
            pairwise:
              - [MeaningIntent, SocialCues, 7]
          children:
            MeaningIntent:
              preferences:
                pairwise:
                  - [OLD, NEW, 3]
              children: *alternatives
            SocialCues:
              preferences:
                pairwise:
                  - [OLD, NEW, 1]
              children: *alternatives

but it seems not to work here what is wrong?

I looked into the reference and also looked into the source for mistakes but cant find a mistake? source of example source of ref

Error message:

Error: attempt to apply non-function

Error in unique(c(ahpTree$Get(attribute = function(x) names(x$preferences$children), : attempt to apply non-function

rufreakde commented 2 years ago

Issue is stale I just used another tool for the job :)