ERROR in TariffSpecifications.

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

ERROR in TariffSpecifications.

Sinisa Matetic
Dear John,

i have a problem with creating a simple tariff that isFixed=true! Server (0.6.3) marks it as invalid with this warning

5638017 WARN  common.Rate: maxValue 0.0 out of range
5638017 WARN  common.TariffSpecification: invalid rate
5638017 WARN  tariffmarket.TariffMarketService: invalid spec 200000388

which basically means that max value is smaller than min value. Of course it is because max value does not have to be set in fixed tariffs. The problem is that server should mark this as true, because method "isValid" from Rate.java checks first if the rate is fixed and returns true, otherwise, it check the min and max values.

Where could the problem be?

here is also some log from broker trace:


4565 INFO  core.MessageDispatcher: sending text:
q442cj<tariff-spec id="200000388" minDuration="0" powerType="WIND_PRODUCTION" signupPayment="0.0" earlyWithdrawPayment="0.0" periodicPayment="0.0">
  <broker>CrocodileAgent_tariff1</broker>
  <rates>
    <rate id="200000389" tariffId="200000388" weeklyBegin="-1" weeklyEnd="-1" dailyBegin="-1" dailyEnd="-1" tierThreshold="0.0" isFixed="true" minValue="0.018293788587366435" maxValue="0.0" noticeInterval="0" expectedMean="0.0" maxCurtailment="0.0">
      <rateHistory/>
    </rate>
  </rates>
</tariff-spec>
4565 INFO  services.PortfolioManagerService: TARIFA_BASIC PRODUCTION:0 [Rate.2.389: Fixed 0.018293788587366435] 0.0 size:1
4566 DEBUG core.BrokerMessageReceiver: onMessage(Message) - receiving a message
4567 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<tariff-status id="1542" tariffId="200000388" updateId="200000388" status="invalidTariff">
  <broker>CrocodileAgent_tariff1</broker>
</tariff-status>
4567 INFO  common.Rate: Adding HourlyCharge 200000392 at 2009-10-25T04:00:00.000Z to Rate.2.391: Variable
4568 DEBUG repo.BrokerRepo: find CrocodileAgent_tariff1
4568 DEBUG core.BrokerMessageReceiver: onMessage(String) - received message of type TariffStatus
4568 DEBUG core.MessageDispatcher: Route org.powertac.common.msg.TariffStatus
4568 DEBUG services.PortfolioManagerService: found method public void hr.fer.tel.powertac.crocodileagent.services.PortfolioManagerService.handleMessage(org.powertac.common.msg.TariffStatus)
4568 INFO  services.PortfolioManagerService: TariffStatus: invalidTariff
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

grampajohn
Administrator
Sinisa Matetic wrote
Dear John,

i have a problem with creating a simple tariff that isFixed=true! Server (0.6.3) marks it as invalid with this warning

5638017 WARN  common.Rate: maxValue 0.0 out of range
5638017 WARN  common.TariffSpecification: invalid rate
5638017 WARN  tariffmarket.TariffMarketService: invalid spec 200000388

which basically means that max value is smaller than min value. Of course it is because max value does not have to be set in fixed tariffs. The problem is that server should mark this as true, because method "isValid" from Rate.java checks first if the rate is fixed and returns true, otherwise, it check the min and max values.

Where could the problem be?
This happens to me when I run the server using common:master and the broker using common:logtool, but it does not happen if both server and broker are using the same version of common. So I suspect you are running one in STS and the other using mvn, right?

Are you experimenting with the new logtool? To get deserialization working from the state log, I had to change the xml attribute in Rate from "isFixed" to "fixed". Your log shows the attribute name as "isFixed" so that makes me suspect you are running your agent with the master version of common, and the server with the logtool version.

Just to make sure that I had not unintentionally deployed the logtool version, I blew away my ~/.m2/repository/org/powertac/common to force a download, ran the server with the current common:master, and started the sample broker. It downloaded a fresh copy of common, and it works fine.

Does this help?

John
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

Sinisa Matetic
Dear John,

I still get the error in broker trace file, and the server trace file.

I updated pom file in the broker to use 0.6.3 snapshot, deleted everything from repository, and started all over...but still the same mistake...

I do not know how to fix this issue...
Dan
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

Dan
In reply to this post by Sinisa Matetic
I am also getting the same error. The tariff was valid using version 0.6.2 of the server.
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

grampajohn
Administrator
In reply to this post by Sinisa Matetic
Sinisa, Daniel, and all -
Sinisa Matetic wrote
I still get the error in broker trace file, and the server trace file.

I updated pom file in the broker to use 0.6.3 snapshot, deleted everything from repository, and started all over...but still the same mistake...
This is very strange. I thought perhaps my dev environment was out of sync, or that I had messed up a deployment, so I blew away my .m2 repo, pulled in fresh downloads to an empty dir, and ran a boot, a sim using -Pcli, and a sim using -Pweb (the web deployment has its own copies of all the modules). It all works fine. Here's a tariff spec from the sample broker that is correctly validated by the server:

<tariff-spec id="200000394" minDuration="0" powerType="WIND_PRODUCTION" signupPayment="0.0" earlyWithdrawPayment="0.0" periodicPayment="-1.0">
  <broker>Sample</broker>
  <rates>
    <rate id="200000395" tariffId="200000394" weeklyBegin="-1" weeklyEnd="-1" dailyBegin="-1" dailyEnd="-1" tierThreshold="0.0" isFixed="true" minValue="0.05345248201260664" maxValue="0.0" noticeInterval="0" expectedMean="0.0" maxCurtailment="0.0">
      <rateHistory/>
    </rate>
  </rates>
</tariff-spec>

It seems like there must be something out-of-date in your environment. The validity test starts on line 648 of Rate.java; if you scan down to lines 670-677 you can see that the error message you are seeing is generated only if the Rate is not seen as fixed. So it appears that somehow the broker and server are not agreeing on the xml encoding of the Rate.

I have very little time the rest of today and tomorrow - family commitments. But I'll try to check in this evening to see if you have further insights on this.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

Daniel
I am currently experiencing this problem with the 0.6.3 release - does anyone remember what was the cause for this problem?

Thanks,
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

grampajohn
Administrator
Daniel wrote
I am currently experiencing this problem with the 0.6.3 release - does anyone remember what was the cause for this problem?
The problem Daniel is referring to is that the broker is issuing a fixed-rate tariff but the server is treating it as if it were variable-rate.

You tell us which version of the server you are using; I assume you downloaded the 0.6.3 version of server-distribution, right? If you look at the pom.xml, the version id should be 0.6.3.

You also need to be using server-master:0.6.3 to compile your broker (because it pulls in common:0.6.3) for this to work, because this is exactly the problem you will see if you run a 1.0.0 broker against a 0.6.3 server or vice-versa. I suspect you have been updating your source environment and re-compiled your broker. Is that correct?

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: ERROR in TariffSpecifications.

Daniel
Hi John,

You are right - I was running broker 1.0.0 against server 0.6.3 - the problem is solved now.

Thanks!
Daniel