Customer Initialization Services

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Customer Initialization Services

ddauer
Hi all,

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?

Any ideas? Thanks!
David
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

chris.flath
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

ddauer


On Sat, Jun 25, 2011 at 3:34 PM, chris.flath [via Power TAC Developers] <[hidden email]> wrote:
Isn't this related to the post by Sebastian (http://power-tac-developers.975333.n3.nabble.com/AbstractCustomer-problem-tp3066209p3066209.html) ?


If you reply to this email, your message will be added to the discussion below:
http://power-tac-developers.975333.n3.nabble.com/Customer-Initialization-Services-tp3107665p3107743.html
To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

ddauer
In reply to this post by chris.flath
It might be related because what I'm addressing has probably caused Sebastian's confusion. However, his setup was just wrong.

My questions were just for general understanding because I think that there is some business logic that should be moved to some other place or should not be there at all.

David
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

achryso
In reply to this post by ddauer
Hello there.

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.
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

ddauer
Hi, thanks for clarifying all that!

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?

David
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

achryso
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.
Reply | Threaded
Open this post in threaded view
|

Re: Customer Initialization Services

Prashant Reddy
Hi Antonios and all,

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
linguistic concept?

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
appliance/household-level details.

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?

Thanks,
Prashant