improveTariffs() in PortfolioManagerService

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

improveTariffs() in PortfolioManagerService

Sujin shin
Hello all,


I've been having some problems when implementing something in improveTariffs().

Actually, it is not working as I expected at all.


For testing, I even tried to type into improveTariffs() as below.
As I know, the tariffRepo.recycle() method removes all tariffs....
But according to the results observed by me, it is still working well using initial rate value of tariff.
(Not only recylcle() method but other methods in improveTariffs() also didn't work.)


So, what I would like to know is that whether improveTariffs() method is working correctly or not.
If it is, anyone who know about that, please explain to me why.

cf. Actually, I didn't upgrade recent 0.6.2? server yet. Can it be a cause of this problem?


private void improveTariffs() {
         tariffRepo.recycle();
}

// source code of recycle
  @Override
  public synchronized void recycle ()
  {
    specs.clear();
    tariffs.clear();
    deletedTariffs.clear();
    rates.clear();
    balancingOrders.clear();
  }


Regards,
Sujin shin
Reply | Threaded
Open this post in threaded view
|

Re: improveTariffs() in PortfolioManagerService

grampajohn
Administrator
Sujin shin wrote
I've been having some problems when implementing something in improveTariffs().

Actually, it is not working as I expected at all.
In the current sample broker implementation (0.6.1), the improveTariffs() method gets called in every timeslot. The idea is that you can look at the performance of your portfolio (subscriptions, revenue, profitability, predictability, etc.) and take appropriate action. Actions might include offering new tariffs, superseding existing tariffs, setting adjustable prices, exercising economic controls, making balancing offers, etc. The sample implementation simply checks to see if it's currently timeslot 371 (11 timeslots into a normal sim), and if so, sets up some balancing offers.
For testing, I even tried to type into improveTariffs() as below.
As I know, the tariffRepo.recycle() method removes all tariffs....
But according to the results observed by me, it is still working well using initial rate value of tariff.
(Not only recylcle() method but other methods in improveTariffs() also didn't work.)
The recycle() method clears out the broker's database, but has no impact on the server. It will just make it hard for the broker to deal with incoming messages, because you won't know which tariffs are associated with the incoming tariff transactions.
So, what I would like to know is that whether improveTariffs() method is working correctly or not.
If it is, anyone who know about that, please explain to me why.
I don't know whether other teams have kept that method or subdivided it. As far as I know, it gets called correctly, and issues balancing orders in timeslot 371. I assume you would want to rip out that code and put in your own.

I have tried to avoid making any changes to classes in the powertac.samplebroker package, to minimize disruptions for broker developers. All the recent changes have been in the powertac.samplebroker.core package.
cf. Actually, I didn't upgrade recent 0.6.2? server yet. Can it be a cause of this problem?
Highly unlikely. That was a server-only upgrade. It's backward-compatible from the broker's standpoint with 0.6.1, except that the costs in the balancing market will be different, and the customers do a better job of evaluating tariffs.
private void improveTariffs() {
         tariffRepo.recycle();
}
As I said, this is probably a bad idea, because it clears out the broker's database.

I hope this is somewhat helpful -

John
Reply | Threaded
Open this post in threaded view
|

Re: improveTariffs() in PortfolioManagerService

icmoon
Dear John:

It was nice to see you at the last AAMAS conference.

To my knowledge, her point is that her broker cannot send a message
to the server by calling sendMessage in improveTariff.

Having said that, what she is passing to the server is sendMessage(TariffSpecification spec) in improveTariff
This is different from sendMessage(BalacingOrder order) that the sample broker does.

Hence, a straight-forward question would be whether an agent can send a message to server
by using sendMessage(TariffSpecification spec) in the code block of improveTariff.

Also, if sending the tariff specifcation in improveTariff is a bad idea, where would be the best spot to
send a tariff specification to the server?

Thanks,

Il-Chul Moon


On Fri, Sep 14, 2012 at 5:10 AM, grampajohn [via Power TAC Developers] <[hidden email]> wrote:
Sujin shin wrote
I've been having some problems when implementing something in improveTariffs().

Actually, it is not working as I expected at all.
In the current sample broker implementation (0.6.1), the improveTariffs() method gets called in every timeslot. The idea is that you can look at the performance of your portfolio (subscriptions, revenue, profitability, predictability, etc.) and take appropriate action. Actions might include offering new tariffs, superseding existing tariffs, setting adjustable prices, exercising economic controls, making balancing offers, etc. The sample implementation simply checks to see if it's currently timeslot 371 (11 timeslots into a normal sim), and if so, sets up some balancing offers.
For testing, I even tried to type into improveTariffs() as below.
As I know, the tariffRepo.recycle() method removes all tariffs....
But according to the results observed by me, it is still working well using initial rate value of tariff.
(Not only recylcle() method but other methods in improveTariffs() also didn't work.)
The recycle() method clears out the broker's database, but has no impact on the server. It will just make it hard for the broker to deal with incoming messages, because you won't know which tariffs are associated with the incoming tariff transactions.
So, what I would like to know is that whether improveTariffs() method is working correctly or not.
If it is, anyone who know about that, please explain to me why.
I don't know whether other teams have kept that method or subdivided it. As far as I know, it gets called correctly, and issues balancing orders in timeslot 371. I assume you would want to rip out that code and put in your own.

I have tried to avoid making any changes to classes in the powertac.samplebroker package, to minimize disruptions for broker developers. All the recent changes have been in the powertac.samplebroker.core package.
cf. Actually, I didn't upgrade recent 0.6.2? server yet. Can it be a cause of this problem?
Highly unlikely. That was a server-only upgrade. It's backward-compatible from the broker's standpoint with 0.6.1, except that the costs in the balancing market will be different, and the customers do a better job of evaluating tariffs.
private void improveTariffs() {
         tariffRepo.recycle();
}
As I said, this is probably a bad idea, because it clears out the broker's database.

I hope this is somewhat helpful -

John



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

Reply | Threaded
Open this post in threaded view
|

Re: improveTariffs() in PortfolioManagerService

grampajohn
Administrator
Il-chul - yes, it was good to meet you, and thanks for your feedback and suggestions.

icmoon wrote
To my knowledge, her point is that her broker cannot send a message
to the server by calling sendMessage in improveTariff.

Having said that, what she is passing to the server is
sendMessage(TariffSpecification spec) in improveTariff
This is different from sendMessage(BalacingOrder order) that the sample
broker does.

Hence, a straight-forward question would be whether an agent can send a
message to server
by using sendMessage(TariffSpecification spec) in the code block of
improveTariff.
OK, that's clearly not the question in the original email. There should be no problem with calling
   broker.sendMessage(newSpecification);
in the body of the improveTariff() method, assuming that newSpecification is a correctly-composed TariffSpecification.

Do you know that the specification is not being sent? If that's the case, then there should be an error message in the broker log. On the other hand, if it's being sent but not published, there should be an error message in the server log. You can also look at the id of the new TariffSpecification (it should be recorded in the state log) and see that it shows up in the server's state log.

Does this help?

John