RAMP-project / RAMP

Repository of the open-source RAMP model for generating multi-energy loads profiles
European Union Public License 1.2
59 stars 33 forks source link

User empty object print ValueError #122

Closed Bachibouzouk closed 5 months ago

Bachibouzouk commented 6 months ago

issue: When a user object is empty cannot be printed due as the repr method uses the save() method to print the properties of the users, which raise Exception in case no appliances are added to the user.

solution: in case save() methods returns an exception, the function prints the user_name, and user_num with a message to mention no appliances are assigned to the user object yet.

additional:

Bachibouzouk commented 6 months ago

@mohammadamint - I added a new method and fixed a bug in Appliance comparison I found while playing around with Appliances to test your fix