flexiblepower / powermatcher

PowerMatcher - The Java implementation of the PowerMatcher, including the API, the core, a couple of examples, a remote implementation using websockets and a visualisation of the configuration.
http://www.powermatcher.org
Apache License 2.0
41 stars 23 forks source link

Auctioneer price/PointBid.getDemandAt(Price) does not result in equalibrium #199

Open wilcowijbrandi opened 9 years ago

wilcowijbrandi commented 9 years ago

There seems to be an issue with PointBids and the equalibrium price. The source of this problem lies probably in the combination of ArrayBids and PointBids, which do not have the same precision. I create a simple unit test to demonstrate the problem: https://gist.github.com/wilcowijbrandi/ce156c84464dcffa3554

A temporary solution is to transform a PointBid into an ArrayBid and then call the getDemandAt method. See for example https://github.com/flexiblepower/fpai-apps/commit/a869413991ccd6ca2c67d9b3e89418f5060ec089.