Are we overloading the meaning of "Abstract"?

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

Are we overloading the meaning of "Abstract"?

Prashant Reddy
[Reposting as a new topic:  Referencing http://power-tac-developers.975333.n3.nabble.com/Customer-Initialization-Services-td3107665.html]

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


Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

Prashant Reddy
To clarify the comment on simplifying AbstractCustomer -

AbstractCustomer seems to have a concrete implementation of an
AbstractConsumer based on Chris' logit model, so that part of it
should probably be separated into a GenericCustomer class and moved
into a plugin as well?
Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

achryso
Just to make sure that I understand fully your proposal, I will have to make a detailed description of what you have now in our server-side plugins as far as the customers are concerned.

For one, we have the CustomerInfo class that contains the general information of every customer-like entity in the server.

Secondly, we have the AbstractCustomer class which is supposed to contain the general functions and variables that all the models should implement (in order to have only to worry about implementing your model correctly and not having to worry about subscribing etc), which is also utilizing the customerInfo as a base variable for the main attributes of the model.

Now, you are suggesting to remove some of the implemented functions of the AbstractCustomer (for example evaluation of tariffs, cost Estimation) and the services on which they are based or called and create a new plugin that will encapsulate the Genetic Consumers - Producers as they are implemented now.

Would be as kind as to be more specific as to which of the functions should remain and which not, because the subject is a bit sensitive for the well-preservance of the data integrity and structure?

Thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

Prashant Reddy
Hi Antonios,

Yes, that's essentially what I'm suggesting.  I will take a look again
in the next few days and get back to you on the specific functions
that should remain vs. be moved.

Thanks!
Prashant


On Wed, Jun 29, 2011 at 5:44 AM, achryso [via Power TAC Developers]
<[hidden email]> wrote:

> Just to make sure that I understand fully your proposal, I will have to make
> a detailed description of what you have now in our server-side plugins as
> far as the customers are concerned.
>
> For one, we have the CustomerInfo class that contains the general
> information of every customer-like entity in the server.
>
> Secondly, we have the AbstractCustomer class which is supposed to contain
> the general functions and variables that all the models should implement (in
> order to have only to worry about implementing your model correctly and not
> having to worry about subscribing etc), which is also utilizing the
> customerInfo as a base variable for the main attributes of the model.
>
> Now, you are suggesting to remove some of the implemented functions of the
> AbstractCustomer (for example evaluation of tariffs, cost Estimation) and
> the services on which they are based or called and create a new plugin that
> will encapsulate the Genetic Consumers - Producers as they are implemented
> now.
>
> Would be as kind as to be more specific as to which of the functions should
> remain and which not, because the subject is a bit sensitive for the
> well-preservance of the data integrity and structure?
>
> Thank you in advance.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://power-tac-developers.975333.n3.nabble.com/Are-we-overloading-the-meaning-of-Abstract-tp3115389p3120946.html
> To unsubscribe from Are we overloading the meaning of "Abstract"?, click
> here.
Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

grampajohn
Administrator
In reply to this post by achryso
Antonios and Prashant -

Thanks for getting this conversation started.

I'm having a bit of trouble with the concept and the names. First of all, a Customer can be either a producer or a consumer, or possibly an electric vehicle owner. So a type called AbstractCustomer should be a superclass of all those customer types. It does not make sense to me to have an AbstractCustomer and an AbstractProducer, unless the AbstractProducer is a subclass of AbstractCustomer and there's also an AbstractConsumer.

I think perhaps what you need is an instance or two of the TemplateMethod pattern - an AbstractCustomer that contains generic tariff evaluation and cost estimation tools, but not the actual tariff selection process. That way, an actual customer could use those tools or not in the process of making its choices.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

Prashant Reddy
Hi John,

That's my point exactly -- AbstractCustomer should just be a base class with some template methods.  What I was proposing was that the rest of the AbstractCustomer code should become something like GenericConsumer, AbstractProducer should then become GenericProducer, and the corresponding AbstractCustomerService and AbstractCustomerInitializationService should become GenericCustomerService and GenericCustomerInitializationService and all the Generic_ classes should move into a powertac-generic-customer plugin.

Cheers,
Prashant



Reply | Threaded
Open this post in threaded view
|

Re: Are we overloading the meaning of "Abstract"?

achryso
I have just finished cleaning and transferring the customers. I have created a new plugin in my trunk.

https://github.com/chrysopoulos18/powertac-generic-customer

I have also made two pull requests with the changed accounting-service (nothing much, just moved the test to the newly-created repo) and server-interface (removed the functions, classes and the services)

Please check it out and give me your insights.