Tariff Analysis -- Rate and Fixed

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

Tariff Analysis -- Rate and Fixed

SPOT
Good evening,

We are curious about the numbers when viewing the logs for tariff rates. We understand the fixed, that corresponds to the rate that we set for the tariff. What we don't understand is the term "Rate" and the value it contains. This appears to be some sort of multiplier but we are unsure what it signifies or how it is set.

Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tariff Analysis -- Rate and Fixed

grampajohn
Administrator
Hello -
SPOT wrote
We are curious about the numbers when viewing the logs for tariff rates. We understand the fixed, that corresponds to the rate that we set for the tariff. What we don't understand is the term "Rate" and the value it contains. This appears to be some sort of multiplier but we are unsure what it signifies or how it is set.
I don't quite understand your question. When I look at a server trace log, I don't see the string "Rate" at all. It shows up in the sample broker log as simulationRate, which is the ratio by which time is accelerated in the sim compared to the real world. Of course the term gets recorded in the state logs as instances of the Rate class. Could you perhaps be a bit more specific about what you are looking at, and in what context?

Thanks -

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

Re: Tariff Analysis -- Rate and Fixed

SPOT
Simply running the logtool analysis tools and having it print out the rates we get the following output... (a few examples)

Rate.2.151170: Fixed -0.05025307403980297
Rate.2.32: Fixed -0.115

The fixed value is of course the value we assigned, but the other decimal is off and different brokers have different values as well.

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

Re: Tariff Analysis -- Rate and Fixed

grampajohn
Administrator
SPOT wrote
Simply running the logtool analysis tools and having it print out the rates we get the following output... (a few examples)

Rate.2.151170: Fixed -0.05025307403980297
Rate.2.32: Fixed -0.115
...
It would help if you told me which of the examples you ran to get this. My guess is that the first "decimal" 2.151170 actually a pair of numbers, but I don't recognize the format.

Thanks.

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

Re: Tariff Analysis -- Rate and Fixed

SPOT
Forgive me.

The code that gets these results is a modification of the tariff market share example, where the for each loop of a tariff transaction (tx) merely prints: tx.getTariffSpec().getRates()
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tariff Analysis -- Rate and Fixed

grampajohn
Administrator
SPOT wrote
The code that gets these results is a modification of the tariff market share example, where the for each loop of a tariff transaction (tx) merely prints: tx.getTariffSpec().getRates()
The Rate output in that case is generated by the toString() method on Rate, reproduced below. The two numbers represent the ID of the Rate instance, as prefix.id, where prefix is a value supplied by the server at login to prevent id collisions among brokers.

  public String toString ()
  {
    String result = "Rate." + IdGenerator.getString(getId()) + ":";
    if (fixed)
      result += (" Fixed " + getMinValue());
    else
      result += " Variable";
    if (weeklyBegin >= 0) {
      result += (", " + (weeklyEnd >= 0 ? "starts " : "") + "day" + weeklyBegin);
      if (weeklyEnd >= 0) {
        result += (" ends day " + weeklyEnd);
      }
    }
    if (dailyBegin >= 0) {
      result += (", " + dailyBegin + ":00 -- " + dailyEnd + ":00");
    }
    if (tierThreshold > 0.0) {
      result += (", usage > " + tierThreshold);
    }
    return result;
  }
Loading...