Customer Models and Behaviour

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

Customer Models and Behaviour

Jonathan
Hi John, I am working on some experiments for my thesis project. I am interested, for research purposes only, to modify the behaviour of the customer models, the household model for instance and test a broker against this only model, shutting down the other models. I want to modify for the household model their behaviour, specifically the parameter that controls how rational the customers are. This parameter is modeled on equation 13 with lambda, if I am correct, from this publication.  

[1] W. Ketter and J. Collins, “The 2013 Power Trading Agent Competition,” no. May, 2013.

Is it possible to modify this parameter to conduct my experiments on my local server copy?

Thank you very much.

Jonathan
Reply | Threaded
Open this post in threaded view
|

Re: Customer Models and Behaviour

achryso
Hello there.

If I may, since I am the one who implemented the household and the officecomplex models in the PowerTAC Competition, I would like to aswer your question.

First of all you will have to follow the instructions of the developers' guide, because you will need to have all the modules in your workspace https://github.com/powertac/powertac-server/wiki/Getting-started 

Then, all you have to do is to change the VillageType1.properties file that can be found in the main/resources folder of the project of household customers. Near the end of the file is where the lamdba is set for each type of houses.

(you can see it in this link https://github.com/powertac/household-customer/blob/master/src/main/resources/VillageType1.properties)

The values can be from 0 to a large number. Now, it is set to 20.

Hopefully, that is all you will have to do.
Reply | Threaded
Open this post in threaded view
|

Re: Customer Models and Behaviour

Jonathan
Well thanks... I was roaming near there. It helps me a lot the info you just provided me. I will test it right away. Have a good day!
Reply | Threaded
Open this post in threaded view
|

Re: Customer Models and Behaviour

grampajohn
Administrator
In reply to this post by Jonathan
Jonathan -

There are a couple more things you will need to do if you want to run the Power TAC simulator with just one customer model, or with a subset of the standard set.

First, the set of customer models included when the simulator starts up is determined by server-main/pom.xml. If a module is listed in the dependencies for server-main, it will be loaded and initialized at startup.

Second, the activation sequence for various models is determined by Spring configuration clauses in server-main/src/main/resources/powertac.xml. If a model appears there but is not in the pom.xml, then Spring will not start.

Third, if you want to use the visualizer with a non-standard set of models, you will also have to modify visualizer/src/main/webapp/WEB-INF/spring/visualizer.embedded.xml. That bit of configuration redundancy is the subject of issue #728.

I hope this helps -

John
Reply | Threaded
Open this post in threaded view
|

Re: Customer Models and Behaviour

Mario
Hi... I want to make some experiments as well with the lambda. I already checked the posts above and I updated the poms accordingly, leaving only the household customer. However I am not seeing significant changes on my experiments with different lambdas. I set a simple experiment with a fixed tariff playing against the default broker and then changed the lambdas. I believe there is something wrong with my configuration. I found this on the Getting Started

***
The server is run with maven, so maven can manage dependencies and build the classpath. To run a development version of the server using maven, you need to first install each of the server components. First, if you have local changes to the common module, do mvn clean install in common. Then you can install all the server modules in one step using maven, with mvn clean install in powertac-server. If you modify one of the module and need to re-install, you can do mvn clean installin the individual server modules, except for common and server-interface. If you change either of these modules, you will need to do a full re-install. Once all the pieces are installed, you can go to the server-distribution directory and run it. Instructions are in server-distribution/README.md.
***

So I performed this steps:

1) Changed the file household-customer/src/main/resources/VillageType1.properties with a lambda of 1000, so it looks like this:

# House Variables (Inertia, Evaluation Periods (in publishing periods), Lamda where 0 the random - 1000 the logic)
# Not Shifting Houses
NSInertia=0.9
NSPeriod=2
RaSLamda=1000000
#
# Randomly Shifting Houses
RaSInertia=0.5
RaSPeriod=1
RaSLamda=1000
#
# Regularly Shifting Houses
ReSInertia=0.25
ReSPeriod=2
RaSLamda=1000
#
# Smart Shifting Houses
SSInertia=0.05
SSPeriod=1
RaSLamda=1000

2) Then I moved to household-customer/ and run mvn clean install. I received a BUILD SUCCESS message:
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.powertac.householdcustomer.HouseholdCustomerServiceTests
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.008 sec
Running org.powertac.householdcustomer.HouseholdControllableCapacitiesTests
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.609 sec

Results :

Tests run: 23, Failures: 0, Errors: 0, Skipped: 0

3) Then I moved to server-distribution/ and ran the server and then the broker.

Can you confirm if this steps to properly change the lambda were correct?

Thank you very much.