Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tariff transactions always positive in cash? #517

Closed
juricababic opened this issue Apr 12, 2012 · 3 comments
Closed

Tariff transactions always positive in cash? #517

juricababic opened this issue Apr 12, 2012 · 3 comments

Comments

@juricababic
Copy link
Member

It appears that we are receiving tariff transactions that are always positive in cash (charge property), no matter what type of transaction it really is (produce, consume etc.).

Javadoc for this TariffTransaction clearly says:

      "The total charge for this reading, according to the tariff: positive for credit to broker, negative for debit from broker".
@nhoening
Copy link

I think this refers to a post on the forum where some more details are given: http://power-tac-developers.975333.n3.nabble.com/Charge-for-production-tp3905433p3905433.html

@jecollins
Copy link
Member

I'm looking at a simulation state log. I see that for CONSUME transactions, the amount of power is negative, and the cash is positive. For PRODUCE transactions, the amount of power is positive, but the cash is still positive. This is indeed an error.

@jecollins
Copy link
Member

I found the problem: For a consumption tariff, the quantities (from the customer side) are positive, and the rates are negative (the customer pays). For a production tariff, quantities are negative, and the rates are positive. When we multiply quantity by rate, results have the same sign in both cases. Duh! I've fixed it in the controllable-capacity branch, which I hope to merge into master in the next day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants