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

Current Abstract Country is too narrow #9

Closed
azyzio opened this issue Jun 8, 2012 · 8 comments
Closed

Current Abstract Country is too narrow #9

azyzio opened this issue Jun 8, 2012 · 8 comments
Assignees

Comments

@azyzio
Copy link
Collaborator

azyzio commented Jun 8, 2012

In the current implementation of Abstract Country, we include functions that are used for reporting, monitoring taxations etc. However, not all the countries (e.g. NonAnnexOne), need this functionality.

I suggest moving the Kyoto specific functionality to a separate class that extends from Abstract Country.

Do you agree and is there anyone that volunteers for doing it?

@webbo89
Copy link
Collaborator

webbo89 commented Jun 9, 2012

This is a good point -

From the initialisation side of things - we've been anticipating this too. But rather than adding classes we thought that you may want to expand your agent constructor and we don't think it would be hard to do, so using AbstractCountry as a minimum you could use your own agent to add more fields.

Then on construction time I imagine it would look something like this:

new EUAgent(id,"France", etc, target, eu_political_will); 
new NonAnnex(id,"Bangladesh", etc, farhan_superpower); 
new USAgent(id,"USA", etc, political_start_party); 

Perhaps as you say, modfiy A.C. so EU has a target, the others aren't required.

@azyzio
Copy link
Collaborator Author

azyzio commented Jun 9, 2012

Annex 1 sustain countries (e.g. Russia) also need all the functionality needed for kyoto and they have different behaviour than EU countries.
I think adding a new class that extends from Abstract Country and implements kyoto-related functionality would make sense. Having it:

  • EU inherits from AbstractKyotoCountry
  • Sustain inherits from AbstractKyotoCountry
  • NonAnnex inherits from AbstractCountry
  • US inherits from AbstractCountry

@azyzio
Copy link
Collaborator Author

azyzio commented Jun 9, 2012

And I agree that each type of a country type can introduce their own parameters if they wish to, but this is not what I was concerned about here.

@azyzio
Copy link
Collaborator Author

azyzio commented Jun 10, 2012

As there in no one against this change and I consider it quite an important one, I will work on it

@ghost ghost assigned azyzio Jun 10, 2012
@Sergeus
Copy link
Collaborator

Sergeus commented Jun 11, 2012

Sorry, I sorta need to oppose this change. If countries that are part of/not part of Kyoto inherit from different classes, then countries can't join or leave the protocol. (Which is the defined case for Canada.)

@azyzio
Copy link
Collaborator Author

azyzio commented Jun 12, 2012

I can see that Tom has come up with a different solution to this problem, can you explain what?

@Sergeus
Copy link
Collaborator

Sergeus commented Jun 12, 2012

Basically, as far as I know, the AbstractCountry has a field that says whether or not the country is a member of Kyoto. The Kyoto-only stuff like monitor tax just checks that the country is a member before executing.

@azyzio
Copy link
Collaborator Author

azyzio commented Jun 12, 2012

nice and simple.
Ok, if all the countries may be kyoto then I don't consider it an issue anymore.

@azyzio azyzio closed this as completed Jun 12, 2012
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