negative wind speed and same sign market orders

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

negative wind speed and same sign market orders

Joran
Hi All,

I am in the phase of developing an agent. So, I am looking at the log files. I found two things that I can't explain. I hope you can help me.

First, in the file "finals_2017_06_4.state" many of the wind speed forecasts and reports are negative.

What is the meaning of a negative speed?

For example:
6540:org.powertac.common.WeatherForecastPrediction::26::new::1::-11.0::23.0::0.0::0.97
6540:org.powertac.common.WeatherForecastPrediction::27::new::2::-11.0::11.0::0.0::0.93
6540:org.powertac.common.WeatherForecastPrediction::28::new::3::-11.0::12.0::0.0::0.94
6540:org.powertac.common.WeatherForecastPrediction::29::new::4::-11.0::14.0::0.0::0.94
6541:org.powertac.common.WeatherForecastPrediction::30::new::5::-11.0::15.0::0.0::0.95

Secondly,
I have also seen in the trace files, market orders  with both energy and price with same sign. Does this means that the agent "buys" energy and gets paid for it?

For example (from finals_2017_06_1.trace):
164722 INFO  auctioneer.AuctionService: Received Order 700861713 from AgentUDE for 0.09048415563801011 mwh at 3.150643621775103 in ts 396
164722 INFO  auctioneer.AuctionService: Received Order 700861714 from AgentUDE for 0.08536601657488768 mwh at 1.0193132272892438 in ts 397
164722 INFO  auctioneer.AuctionService: Received Order 700861715 from AgentUDE for 0.06693604705977804 mwh at 18.560064343280015 in ts 398
164727 INFO  auctioneer.AuctionService: Received Order 700861716 from AgentUDE for 0.06690793781519429 mwh at 8.936186645619468 in ts 399
164748 INFO  auctioneer.AuctionService: Received Order 700861717 from AgentUDE for 0.06977604230069429 mwh at 21.496054002266952 in ts 400
164748 INFO  auctioneer.AuctionService: Received Order 700861718 from AgentUDE for 0.07426423671537968 mwh at 36.404478676348624 in ts 401
164748 INFO  auctioneer.AuctionService: Received Order 700861720 from AgentUDE for 0.08508824857683045 mwh at 37.638204465806794 in ts 402

Finally,
I have looked for a guide on the content of the state and trace files but so far I haven't found it.

Would you have such a file, that defines the meaning of each field (column) in those files?

Thanks a lot.
Joran
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: negative wind speed and same sign market orders

grampajohn
Administrator
Hello, Joran and all -
Joran wrote
I am in the phase of developing an agent. So, I am looking at the log files. I found two things that I can't explain. I hope you can help me.

First, in the file "finals_2017_06_4.state" many of the wind speed forecasts and reports are negative.

For example:
6540:org.powertac.common.WeatherForecastPrediction::26::new::1::-11.0::23.0::0.0::0.97
6540:org.powertac.common.WeatherForecastPrediction::27::new::2::-11.0::11.0::0.0::0.93
...
The arguments for WeatherForecastPrediction are temperature, wind speed, wind direction, cloud cover. So the wind speed values here are positive, and the temperature is well below freezing. Probably this was winter somewhere in the interior of North America.
Secondly,
I have also seen in the trace files, market orders  with both energy and price with same sign. Does this means that the agent "buys" energy and gets paid for it?

For example (from finals_2017_06_1.trace):
164722 INFO  auctioneer.AuctionService: Received Order 700861713 from AgentUDE for 0.09048415563801011 mwh at 3.150643621775103 in ts 396
...
This was discussed at length in an earlier conversation. Basically, some other broker in that game is issuing orders to sell at a negative price, probably a bug in the code.
Finally,
I have looked for a guide on the content of the state and trace files but so far I haven't found it. Would you have such a file, that defines the meaning of each field (column) in those files?
That's a reasonable request, which for some reason has so far not reached the top of my long to-do list. What I do is look at the Java object and see the order of field declarations. For simple cases like WeatherForecastPrediction that's pretty easy. For the more complex ones, the field order is generally contained in the @Domain annotation. For an example, see MarketTransaction.java.

I will see if I can get to this in the next few weeks. It should have been done long ago, and I apologize for the delay. Probably nobody other than me or Govert or Erik could do it, and it would be a lot easier for me.

Cheers -

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

Re: negative wind speed and same sign market orders

Joran
My mistake, actually I read the comments in WeatherForecastStats.java i.e.,

/**
   * Takes three args:
   *     input_filename (or -) temp-data_filename, wind-data_filename
   * In each output file, each line starts with an observation followed by
   * 24 predictions, with the first being 1h out, the last 24h out.
   */

before posting my question and yet I swapped temp for wind. Perhaps workshop blindness. I appreciate you answering these kind of questions

I found your advice about looking into the @Domain fields very helpful. Would you help me further understand it, for example,

In MarketTransaction.java I see the following:

@Domain(fields = {"postedTimeslot", "timeslot", "MWh", "price"})

In Rate.java:

@Domain (fields = {"tariffId", "weeklyBegin", "weeklyEnd", "dailyBegin", "dailyEnd",
                   "tierThreshold", "fixed", "minValue", "maxValue",
                   "noticeInterval", "expectedMean", "maxCurtailment"})

I think that's very clear but for instance in WeatherForecast.java and ClearedTrade.java there are no explicit fields, i.e.,

@Domain
@XStreamAlias("weather-forecast")
public class WeatherForecast

@Domain
@XStreamAlias("trade")
public class ClearedTrade

How is this interpreted?

Thanks for your patient.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: negative wind speed and same sign market orders

serkan
In reply to this post by grampajohn
grampajohn wrote
This was discussed at length in an earlier conversation. Basically, some other broker in that game is issuing orders to sell at a negative price, probably a bug in the code.
John, it is not a bug. I will explain the reason in a detailed paper.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: negative wind speed and same sign market orders

grampajohn
Administrator
In reply to this post by Joran
Hello, Joran -

Sorry for the long delay. Busy.
Joran wrote
I found your advice about looking into the @Domain fields very helpful. Would you help me further understand it, for example,

In MarketTransaction.java I see the following:

@Domain(fields = {"postedTimeslot", "timeslot", "MWh", "price"})
...
I think that's very clear but for instance in WeatherForecast.java and ClearedTrade.java there are no explicit fields, i.e.,

@Domain
@XStreamAlias("weather-forecast")
public class WeatherForecast
....
How is this interpreted?
For types without field annotations like WeatherForecast and ClearedTrade, the order of args in the state log is the same as the arguments to the constructor. See powertac-core/powertac-aop/.../StateLogging.newstate() for details. Note that some types have superclasses.

The types having the field annotations must be logged from a read-resolve operation rather than a new instance creation. This happens in the server when messages are received from brokers. See StateLogging.collectProperties() to see how it's used.

I understand that it takes some effort to puzzle this out. The doc you want is on my to-do list.

Cheers -

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

Re: negative wind speed and same sign market orders

Joran
Hi John,

I appreciate it very much, thanks.

Joran
Loading...