Identifying Customer Types

classic Classic list List threaded Threaded
3 messages Options
sty
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Identifying Customer Types

sty
Good morning,

I am having trouble identifying Customer Types. I had believed that if I were to examine logs and looked at the Customer Info using the "getPowerType" method I would be able to see what types of customers were associated with a game. That is, I hoped to see there are x Consumption, y Interruptible Consumption, z Electric Vehicles, etc. The goal is to see a general break down of the types of customers that exist in a given simulation and look at correlating this with the types of tariffs available. However, having run a few tests and playing with this a lot I get that all customers are CONSUMPTION with no other power types being represented.

The code in question:
private class CustomerInfoHandler implements NewObjectListener
{
    @Override
    public void handleNewObject (Object thing)
    {
        CustomerInfo ci = (CustomerInfo) thing;
        PowerType pt = ci.getPowerType();
        int cc = ci.getPopulation() + customerByType.get(pt);
        customerByType.put(pt, cc);
    }
}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying Customer Types

grampajohn
Administrator
sty wrote
I am having trouble identifying Customer Types. I had believed that if I were to examine logs and looked at the Customer Info using the "getPowerType" method I would be able to see what types of customers were associated with a game. That is, I hoped to see there are x Consumption, y Interruptible Consumption, z Electric Vehicles, etc. The goal is to see a general break down of the types of customers that exist in a given simulation and look at correlating this with the types of tariffs available. However, having run a few tests and playing with this a lot I get that all customers are CONSUMPTION with no other power types being represented.
Interesting - I am able to reproduce your problem. It appears that the log reader is not correctly reconstructing PowerType instances from the state log. I'll look into it.

Thanks for reporting this problem. I've recorded it as Issue #891 if you wish to track progress on it.

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying Customer Types

grampajohn
Administrator
In reply to this post by sty
I have pushed an example that shows one correct way to count customers by PowerType in a game state log. Here's the output from one of the 2016 finals games:

ELECTRIC_VEHICLE: 123
INTERRUPTIBLE_CONSUMPTION: 104
THERMAL_STORAGE_CONSUMPTION: 9
BATTERY_STORAGE: 30
CONSUMPTION: 50152
SOLAR_PRODUCTION: 7003
WIND_PRODUCTION: 90

Cheers -

John
Loading...