A TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) model for calculating whether multiple households are suitable for keeping different pets. Whether these family are suitable for keeping pets is calculated as a number for 0 to 1.
Sample input: 8 factors of certain amount of families to compare.
Input to the code as: the specie of the pet (Cat, Dog, Rabbit, Hamster, Lizard) + number of rows of the table + each number in the table (from column to row)
Using a Gaussian distribution model and adjust the standard deviation for known mortality rates to obtain the predicted number of pets per year in the future.โ
Factors such as the species' lifetime are already set in the code.
The average lifetime of hamsters๐(21 months) is too short to be culculated in this model.
Sample input:
Enter the specie of pets: Cat
Enter the number of pets: 1000000
Enter the age of the pets: 6
Sample output:
Year 1: 999711 pets are predicted to survive.
Year 2: 997483 pets are predicted to survive.
Year 3: 985603 pets are predicted to survive.
Year 4: 941050 pets are predicted to survive.
Year 5: 825527 pets are predicted to survive.
Year 6: 621802 pets are predicted to survive.
Year 7: 376317 pets are predicted to survive.
Year 8: 173729 pets are predicted to survive.
Year 9: 58856 pets are predicted to survive.
Year 10: 14252 pets are predicted to survive.
Year 11: 2437 pets are predicted to survive.
Year 12: 287 pets are predicted to survive.
Year 13: 21 pets are predicted to survive.
Year 14: 0 pets are predicted to survive.
Year 15: 0 pets are predicted to survive.
Weights setting:
The weights of the eight factors for different species are already calculated.