Manual Expert Example

[1]:
import numpy as np

from pymcdm.methods import COMET
from pymcdm.methods.comet_tools import ManualExpert

# Define characteristic values for two criteria.
cvalues = [
        [0, 500, 1000],
        [1, 5]
        ]

# Define expert function as ManualExpert object, which will prompt you to
# answer some pairwise comparison questions to copmare characteristic objects.
expert_function = ManualExpert(
        criteria_names=['Price [$]', 'Profit [grade]'],
        show_MEJ=True,
        filename=None
        )

# Creation of the COMET object will start model identification (see output below).
comet = COMET(cvalues, expert_function)
You need to evaluate 6 characteristic objects.
It will require 15 pairwise comparisons.

Characteristic Objects to be evaluated:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

=================================== 1 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "B" if B is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "C" if C is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 3 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "D" if D is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 4 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "E" if E is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 5 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "E" if E is better.
Input "F" if F is better
Leave empty for the tie.
>>>  E
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 6 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "C" if C is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 7 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "D" if D is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 8 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "E" if E is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 9 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "F" if F is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 10 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "D" if D is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 11 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "E" if E is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 12 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "F" if F is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 13 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "E" if E is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 14 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "F" if F is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 15 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "F" if F is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

Resulted MEJ:
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │ 0   │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │ 0   │ 0   │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │ 0   │ 0   │ 0   │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │ 0   │ 0   │ 0   │ 0   │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │ 0   │ 0   │ 0   │ 0   │ 0   │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘


>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "C" if C is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 3 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "D" if D is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 4 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "E" if E is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 5 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "E" if E is better.
Input "F" if F is better
Leave empty for the tie.
>>>  E
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 6 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "C" if C is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 7 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "D" if D is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 8 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "E" if E is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 9 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "F" if F is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 10 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "D" if D is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 11 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "E" if E is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 12 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "F" if F is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 13 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "E" if E is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 14 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "F" if F is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

================================== 15 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "F" if F is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

Resulted MEJ:
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │ 0   │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │ 0   │ 0   │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │ 0   │ 0   │ 0   │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │ 0   │ 0   │ 0   │ 0   │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │ 0   │ 0   │ 0   │ 0   │ 0   │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘


Identified MEJ was written to "mej.csv".

Triad Supported Expert Example

[2]:
import numpy as np

from pymcdm.methods import COMET
from pymcdm.methods.comet_tools import TriadSupportExpert

# Define characteristic values for two criteria.
cvalues = [
        [0, 500, 1000],
        [1, 5]
        ]

# Define expert function as TriadSupportExpert object, which will prompt you to
# answer some pairwise comparison questions to compare the  characteristic objects.
expert_function = TriadSupportExpert(
        criteria_names=['Price [$]', 'Profit [grade]'],
        show_MEJ=True,
        filename=None,
        )

# Creation of the COMET object will start model identification (see output below).
comet = COMET(cvalues, expert_function)
You need to evaluate 6 characteristic objects.
It will require 15 pairwise comparisons.

Characteristic Objects to be evaluated:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

ATTENTION: This expert function use full triad support to speed up identification of the MEJ matrix by expert. Please, be aware that full triad support assumes that answers of the expert are always is consistent and in transition relation. Please review resulted MEJ in the end and correct it if needed.

=================================== 1 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  A  │      0      │        1         │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
└─────┴─────────────┴──────────────────┘

Input "A" if A is better.
Input "B" if B is better
Leave empty for the tie.
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "C" if C is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Triad support:
A > B and  B > C
Therefore:
A > C i.e. mej[A][C] = 1.0

=================================== 4 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "D" if D is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 4 / 15 =====================================

Triad support:
B > C and  C > D
Therefore:
B > D i.e. mej[B][D] = 1.0

=================================== 6 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "E" if E is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 6 / 15 =====================================

Triad support:
C > D and  D > E
Therefore:
C > E i.e. mej[C][E] = 1.0

=================================== 8 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "E" if E is better.
Input "F" if F is better
Leave empty for the tie.
>>>  E
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 8 / 15 =====================================

Triad support:
D > E and  E > F
Therefore:
D > F i.e. mej[D][F] = 1.0

=================================== 9 / 15 =====================================

Triad support:
A > B and  B > D
Therefore:
A > D i.e. mej[A][D] = 1.0

================================== 10 / 15 =====================================

Triad support:
B > C and  C > E
Therefore:
B > E i.e. mej[B][E] = 1.0

================================== 11 / 15 =====================================

Triad support:
C > D and  D > F
Therefore:
C > F i.e. mej[C][F] = 1.0

================================== 12 / 15 =====================================

Triad support:
A > B and  B > E
Therefore:
A > E i.e. mej[A][E] = 1.0

================================== 13 / 15 =====================================

Triad support:
B > C and  C > F
Therefore:
B > F i.e. mej[B][F] = 1.0

================================== 14 / 15 =====================================

Triad support:
A > B and  B > F
Therefore:
A > F i.e. mej[A][F] = 1.0

Resulted MEJ:
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │ 0   │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │ 0   │ 0   │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │ 0   │ 0   │ 0   │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │ 0   │ 0   │ 0   │ 0   │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │ 0   │ 0   │ 0   │ 0   │ 0   │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘


Answered by the expert: 5
Completed by the triads: 10
>>>  A
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  B  │      0      │        5         │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
└─────┴─────────────┴──────────────────┘

Input "B" if B is better.
Input "C" if C is better
Leave empty for the tie.
>>>  B
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │     │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 2 / 15 =====================================

Triad support:
A > B and  B > C
Therefore:
A > C i.e. mej[A][C] = 1.0

=================================== 4 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  C  │     500     │        1         │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
└─────┴─────────────┴──────────────────┘

Input "C" if C is better.
Input "D" if D is better
Leave empty for the tie.
>>>  C
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 4 / 15 =====================================

Triad support:
B > C and  C > D
Therefore:
B > D i.e. mej[B][D] = 1.0

=================================== 6 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  D  │     500     │        5         │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
└─────┴─────────────┴──────────────────┘

Input "D" if D is better.
Input "E" if E is better
Leave empty for the tie.
>>>  D
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 6 / 15 =====================================

Triad support:
C > D and  D > E
Therefore:
C > E i.e. mej[C][E] = 1.0

=================================== 8 / 15 =====================================

Evaluate following characteristic objects:
┌─────┬─────────────┬──────────────────┐
│     │  Price [$]  │  Profit [grade]  │
├─────┼─────────────┼──────────────────┤
│  E  │    1000     │        1         │
├─────┼─────────────┼──────────────────┤
│  F  │    1000     │        5         │
└─────┴─────────────┴──────────────────┘

Input "E" if E is better.
Input "F" if F is better
Leave empty for the tie.
>>>  E
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │     │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │     │ 1/2 │ 1   │ 1   │     │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │     │     │ 1/2 │ 1   │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │     │     │     │ 1/2 │ 1   │     │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │     │     │     │     │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │     │     │     │     │     │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

=================================== 8 / 15 =====================================

Triad support:
D > E and  E > F
Therefore:
D > F i.e. mej[D][F] = 1.0

=================================== 9 / 15 =====================================

Triad support:
A > B and  B > D
Therefore:
A > D i.e. mej[A][D] = 1.0

================================== 10 / 15 =====================================

Triad support:
B > C and  C > E
Therefore:
B > E i.e. mej[B][E] = 1.0

================================== 11 / 15 =====================================

Triad support:
C > D and  D > F
Therefore:
C > F i.e. mej[C][F] = 1.0

================================== 12 / 15 =====================================

Triad support:
A > B and  B > E
Therefore:
A > E i.e. mej[A][E] = 1.0

================================== 13 / 15 =====================================

Triad support:
B > C and  C > F
Therefore:
B > F i.e. mej[B][F] = 1.0

================================== 14 / 15 =====================================

Triad support:
A > B and  B > F
Therefore:
A > F i.e. mej[A][F] = 1.0

Resulted MEJ:
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│     │ A   │ B   │ C   │ D   │ E   │ F   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ A   │ 1/2 │ 1   │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ B   │ 0   │ 1/2 │ 1   │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ C   │ 0   │ 0   │ 1/2 │ 1   │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ D   │ 0   │ 0   │ 0   │ 1/2 │ 1   │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ E   │ 0   │ 0   │ 0   │ 0   │ 1/2 │ 1   │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ F   │ 0   │ 0   │ 0   │ 0   │ 0   │ 1/2 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘


Answered by the expert: 5
Completed by the triads: 10

Compromise COMET Example

[3]:
import numpy as np

from pymcdm.methods import COMET, TOPSIS
from pymcdm.methods.comet_tools import CompromiseExpert

# Define characteristic values for three criteria.
cvalues = [
        [0, 500, 1000],
        [1, 5],
        [1, 3, 10],
        ]

# We will use TOPSIS with three different criteria weights vectors.
# Define criteria
types = np.ones(3)

topsis = TOPSIS()

evaluation_function = [
        lambda co: topsis(co, np.array([0.2, 0.3, 0.5]), types, validation=False),
        lambda co: topsis(co, np.array([0.3, 0.4, 0.3]), types, validation=False),
        lambda co: topsis(co, np.array([0.1, 0.5, 0.4]), types, validation=False),
        ]
# Notice validation=False parameter here. It is required because normally input data is
# validated in different ways, including whether there are dominated or dominant solutions
# in the matrix. However, in case of evaluation of the characteristic objects some of them
# will be dominant or dominated. Therefore we need to omit validation here.

expert_function = CompromiseExpert(evaluation_function)

# Creation of the COMET object will identify the model based on provided evaluation functions.
comet = COMET(cvalues, expert_function)

print(comet.p)
[0.         0.11764706 0.35294118 0.47058824 0.70588235 0.88235294
 0.05882353 0.17647059 0.41176471 0.58823529 0.76470588 0.94117647
 0.23529412 0.29411765 0.52941176 0.64705882 0.82352941 1.        ]

ESP Expert Example

[4]:
import numpy as np
import matplotlib.pyplot as plt
import pymcdm as pm

# Define criteria bounds for the decision problem
bounds = np.array([[0, 1]] * 2, dtype=float)
# Define the Expected Solution Point (or Points) for this problem
esps = np.array([[0.4, 0.4]])
# Create the expert function using ESPExpert class
expert = pm.methods.comet_tools.ESPExpert(esps,
                                          bounds,
                                          cvalues_psi=0.2)
# Generate ESP-guided cvalues based on provided ESP and psi
cvalues = expert.make_cvalues()
# Create and identify COMET model
comet = pm.methods.COMET(cvalues, expert)
# Create a visualization of the characteriscic values,
# ESP and preference function
fig, ax = plt.subplots(figsize=(4, 3.5), dpi=200)
ax, cax = pm.visuals.comet_2d_esp_plot(comet, esps, bounds)
plt.tight_layout()
plt.show()
../_images/example_COMET_Examples_7_0.png

Structural COMET Example

[5]:
import numpy as np

from pymcdm.methods import TOPSIS
from pymcdm.methods.comet_tools import StructuralCOMET, Submodel, MethodExpert

# This is simplified example from the followed paper:
# Shekhovtsov, A., Kołodziejczyk, J., & Sałabun, W. (2020). Fuzzy model
# identification using monolithic and structured approaches in decision
# problems with partially incomplete data. Symmetry, 12(9), 1541.

# Suppose we want to evaluate some electric vechcles
# and define four criteria for them:
criteria_names = ['C_1 Max velocity', 'C_2 Travel range',
                  'C_3 Charging time', 'C_4 Price']

cvalues = [
        [57, 107.3, 150],
        [100, 144, 180],
        [4, 7, 10],
        [12.9, 43.3, 120]
        ]

# We want to group C_1 and C_2 into submodel P_1 and then group P_1 with C_3
# in order to create submodel P_2 and then group P_2 with C_4 to evaluate final
# preferene P.

# Define equal weights for all submodels
weights = np.array([0.5, 0.5])

# For this puprpose we can define StructuralCOMET object in the following way:
model = StructuralCOMET(
        submodels=[
            Submodel(
                name='P_1', # Name the submodel so we could refer to it later
                structure=(0, 1), # We could use indexes to refer to criteria
                cvalues=[0.0, 0.5, 1.0], # Because normally output of the COMET
                                         # is in range [0, 1] it is good idea
                                         # to put cvalues in this range here.
                expert_function=MethodExpert(TOPSIS(), weights, [1, 1])
                ),
            Submodel(
                name='P_2',
                structure=('P_1', 'C_3 Charging time'), # Names also allowed
                cvalues=[0.0, 0.5, 1.0],
                expert_function=MethodExpert(TOPSIS(), weights, [1, -1])
                ),
            Submodel(
                name='P',
                structure=('P_2', 'C_4 Price'),
                cvalues=None, # This is the final model
                              # so we don't need cvalues
                expert_function=MethodExpert(TOPSIS(), weights, [1, -1])
                )
            ],
        cvalues=cvalues,
        criteria_names=criteria_names
        )

# And now we can evaluate some alternatives
alts = np.array([
    [120, 130, 5, 40],
    [100, 180, 8, 60],
    ])

print(model(alts))

# Consider more complex example (full example from the referenced paper)
# This one is used as test case for the StructuralCOMET
cvalues = [
        [340, 909.3, 3000],
        [57, 107.3, 150],
        [100, 144, 180],
        [10, 87.9, 200],
        [80, 325.8, 610],
        [4, 7, 10],
        [10, 54, 120],
        [10.5, 37.57, 99],
        [12.9, 43.3, 120]
        ]

criteria_names = [f'C_{i+1}' for i in range(len(cvalues))]

matrix = np.array([
    [3000,  96, 145, 200, 610, 10.0, 120, 99.0, 120.0],
    [2000, 100, 145, 200, 610, 10.0, 120, 99.0,  90.0],
    [ 705, 120, 170,  80, 270,  4.0,  30, 24.0,  25.0],
    [ 613, 140, 180, 140, 400,  8.0,  40, 24.2,  50.0],
    [ 350, 100, 110,  30, 196,  4.5,  15, 10.5,  12.9],
    [ 350, 100, 100,  30, 196,  4.5,  15, 10.5,  15.5],
    [ 350, 100, 150,  30, 196,  7.0,  35, 16.0,  18.7],
    [ 635, 110, 170,  49, 200,  8.0,  35, 22.5,  31.5],
    [ 340, 150, 160, 110, 500,  6.0,  10, 35.0,  45.0],
    [ 750,  57, 110,  10,  80,  8.0, 120, 35.0,  24.4]
    ], dtype='float')

model = StructuralCOMET(
        submodels=[
            Submodel((0, 1, 2),
                     [8.24041444e-02, 4.53869580e-01, 7.85105159e-01],
                     MethodExpert(
                         TOPSIS(),
                         np.ones(3)/3, [1, 1, 1]),
                     'P_1'),
            Submodel((3, 4),
                     [0.00000000e+00, 4.43071484e-01, 1.00000000e+00],
                     MethodExpert(
                         TOPSIS(),
                         np.ones(2)/2, [1, 1]),
                     'P_2'),
            Submodel((5, 6, 7),
                     [1.49566750e-01, 4.81255932e-01, 7.15106856e-01],
                     MethodExpert(
                         TOPSIS(),
                         np.ones(3)/3, [-1, -1, 1]),
                     'P_3'),
            Submodel(('P_1', 'P_3', 'P_2', 'C_9'),
                     None,
                     MethodExpert(
                         TOPSIS(),
                         np.ones(4)/4, [1, 1, 1, -1]),
                     'P Final')
            ],
        cvalues=cvalues,
        criteria_names=criteria_names
        )

res = model(matrix)

print(res)
[0.68790081 0.47987326]
[0.57315653 0.59720388 0.7717737  0.69961053 0.4911195  0.46185119
 0.45946537 0.51384576 0.83742736 0.1512458 ]