KevinFasusi / supplychainpy

Supplychainpy is a Python library for supply chain analysis, modelling and simulation. The library assists a workflow that is reliant on Excel and VBA.
http://www.supplychainpy.org/
BSD 3-Clause "New" or "Revised" License
283 stars 99 forks source link

AHP and quantitative criteria #63

Open labuzm opened 6 years ago

labuzm commented 6 years ago

Hello, I'm wondering if it's possible to compute AHP with only qualitative criteria? I have tried to omit 'quantitative_criteria' parameter or set it to empty tuple, but in both cases program crashes. Any help would be appreciated.

KevinFasusi commented 6 years ago

Hi @labuzm,

Can you please give me an example, preferably with a code snippet, of what you mean by using only 'qualitative_criteria' ? Thank you.

labuzm commented 6 years ago

Hmm I wasn't right, setting quantitative_criteria to empty tuple works.

See line: https://github.com/KevinFasusi/supplychainpy/blob/master/supplychainpy/bi/_analytical_heirachy_process.py#L40

The default value for quantitative_criteria argument is set to None which is I believe the reason why below code crashes: https://gist.github.com/labuzm/e25374b86385d9fed0cd43b4ffdee84c

How about setting default value to empty tuple?

KevinFasusi commented 6 years ago

@labuzm okay. Yep, I will see if I can change it to an empty tuple in the next release or highlight in the docs that you need to set the qualitative_criteria to an empty tuple. Thanks for raising the issue.