The Preference class has two attributes that contain alternative IDs - superior and inferior.
The Indifference class has two attributes that contain alternative IDs - equal1 and equal2.
The Criterion class has three attributes - criterion_id, weight, and gain/loss.
performance_table_list is a dictionary with alternative IDs as keys and dictionaries as values, where the keys are criterion IDs and the values are performance values. Inconsistencies should be detected (e.g., missing or additional criteria for some alternatives).
preferences is a list of Preference class objects.
indifferences is a list of Indifference class objects.
criteria is a list of Criterion class objects.
The function should automatically infer how to match the appropriate IDs. Before performing any calculations, it should check whether all IDs in alternatives and criteria are unique, and if not, raise an exception.
It might be a good idea to use the Pydantic library for data validation.
I would like to be able to use the
get_ranking_dict
function from the Solver classhttps://github.com/UTA-WESOME/uta-gms-engine/blob/7dacb7d9fa6debc37cefd04dfbd8fc952ff4ce19/src/utagmsengine/solver.py#L59-L67
in the following way:
Preference
class has two attributes that contain alternative IDs - superior and inferior.Indifference
class has two attributes that contain alternative IDs - equal1 and equal2.Criterion
class has three attributes - criterion_id, weight, and gain/loss.The function should automatically infer how to match the appropriate IDs. Before performing any calculations, it should check whether all IDs in alternatives and criteria are unique, and if not, raise an exception.
It might be a good idea to use the Pydantic library for data validation.