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

Carbon Reduction Handler Values #31

Closed
Sergeus opened this issue Jun 12, 2012 · 11 comments
Closed

Carbon Reduction Handler Values #31

Sergeus opened this issue Jun 12, 2012 · 11 comments
Assignees
Labels

Comments

@Sergeus
Copy link
Collaborator

Sergeus commented Jun 12, 2012

Currently, the carbon reduction handler works in a flow of control perspective, but the values it returns for given investments are way out of range. (A marginal investment (10% of availableToSpend) when carbonOutput is 30,000 tons results in an output change in excess of 900,000)

@ghost ghost assigned azyzio Jun 12, 2012
@azyzio
Copy link
Collaborator

azyzio commented Jun 12, 2012

I don't understand the issue? Do you want to me to adjust the constants already?

@Sergeus
Copy link
Collaborator Author

Sergeus commented Jun 12, 2012

I don't really follow the math within the carbon reduction handler, so I'm not sure if the errors derive just from the GameConst stuff or the internal math of the handler. If it's possible to get it to output reasonable values for testing that would be awesome.

@azyzio
Copy link
Collaborator

azyzio commented Jun 12, 2012

OK, I will come up with some numbers.

@azyzio
Copy link
Collaborator

azyzio commented Jun 12, 2012

Ok, I have changed them so reasonable results should be found. Close the issue if it solved the problem.

@tumblerer
Copy link
Collaborator

Not solved. carbonOutputChange in CarbonReductionHandler.invest() is throwing huge negative numbers.

@tumblerer
Copy link
Collaborator

Ok, found the problem:

CarbonOutput in calculateCarbonOutput is calculated as energyOut *(1-cleanIndustry). However clean industry is not always a positive number less than 1.

Hence the roots of your quadratic need to be smaller.

@piotroslaw
Copy link
Collaborator

Is it not? assuming carbonOutput < energyOuput, dirtyIndustry is their ratio (0 <= dirtyIndustry <= 1), so should work.

But I think there is an easier and more easy to work with way to calculate all of it, without using quadratic equations. Will propose something later.

@azyzio
Copy link
Collaborator

azyzio commented Jun 12, 2012

Clean industry is always supposed to be positive number between 0 and 1. I guess the values of EnergyOutput and CarbonOutput in the simulation are not correct.

@ghost ghost assigned piotroslaw Jun 12, 2012
@Sergeus
Copy link
Collaborator Author

Sergeus commented Jun 12, 2012

The energyOutput and carbonOutput are initialized to correct values, but once the reduction handler supplies a massive change in one direction or the other, it breaks the formula for the second run at reduction.

@tumblerer
Copy link
Collaborator

@azyzio and @piotroslaw could you work something out between you?

The values of energyOutput and carbonOutput are correct. Frankly, there's no way they can be incorrect, since they could take any value aslong as energyOutput>=carbonOut

@azyzio
Copy link
Collaborator

azyzio commented Jun 13, 2012

As the Carbon Reduction is now using a slightly modified model, this issue is no longer valid.

@azyzio azyzio closed this as completed Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants