I was just looking into the household customer model in detail and am wondering why we have an AbstractCustomerInitializationService and HouseholdCustomerInitializationService?
Also, why is the AbstractCustomerInitializationService creating its own PluginConfig and passing it to AbstractCustomerService? It seems that what's currently in AbstractCustomerInitializationService should be in each plugin's InitializationService.
Next, why does AbstractCustomerService's init() process this configuration and creates an AbstractCustomer instance from that?
When we first began to create these initialization Services, we weren't sure which of the newly implemented Customer Models will utilized them as they were or they are going to have changes that will occur in during the implementation.So, just be on the safe side we left them both on the current server implementation.
For the second matter at hand, I didn't quite understand what you want to say there. I am guessing what you mean is that the models that are utilizing AbstractCustomer should have the same Initialization Service. So there is no need for the AbstractCustomer Services only for the ones in the other Models or the opposite, not both at the same time.
But I think I explained that on the answer above. If you meant something else, please correct me.
As far as the third question is concerned, if you see closely, you will see that the number of Abstract Customers created for the server in the initialization service is zero. So AbstractCustomer is created for that matter at the beginning of the server running.
If I wasn't clear in any of my answers and you need more information, please say so, I would be happy to help.
So just to avoid confusion I would propose to remove code that creates AbstractCustomer instances because all plugins are supposed to extend it anyway (namely the complete AbstractCustomerInitializationService as well as the last half of AbstractCustomerService init()).
Plugin-devs will look at household-customer or other customer plugins to see how it's done. Alternatively, there should be some instructions on the wiki. Thoughts?
It is my understanding that the Initialization Services in general, and the Abstract Customer's in particular are needed in order to start the corresponding Service in the Server. So I don't think that it is possible to remove the whole AbstractCustomerInitializationService and leave half of the AbstractCustomerService as it is.
Either we will have to remove both of them altogether and take some of the code from AbstractCustomer to each and every other Service of customer models (for example HouseholdService) or we will leave them with removing only the creation of AbstractCustomers part of the AbstractCustomerService.
AbstractCustomerService was implemented to begin with so that we want have to write the tariff listener and the call of the step function for every customer individually. We would only have step function changed in each model, but called universally for all of them.
But if you think this is a better strategy for the code implementation, I don't have a problem. We can make it work the way you suggest.
As far as the second part is concerned, I think that the household model is well written and understandable, but a wiki how-to would not harm anyone. I can write one if you want me to.
I just started looking into this today to implement a customer
population model and I'm a bit confused too. It seems that we're
mixing the object-oriented meaning of 'abstract' with the general
The fact that TariffSubscription depends on AbstractCustomer seems to
indicate that 'Abstract' in this sense is supposed to be an "abstract
base class" for customers instantiated in the customer model plugins.
On the other hand, AbstractProducer, AbstractCustomerService and
AbstractCustomerInitializationService seem to represent a customer
population model represented "in the abstract", i.e., without
If my understanding is correct, I'd suggest simplifying
AbstractCustomer and moving the rest of the stuff (AbstractProducer,
AbstractCustomerService and AbstractCustomerInitializationService)
into a separate plugin and renaming it to not overload the word
'Abstract' -- maybe call it GenericCustomer or CustomerPopulation or
something like that?