USC-NSL / Computational-Agroecology

6 stars 1 forks source link

Ralph's refactor #87

Closed ralphchung closed 5 years ago

ralphchung commented 5 years ago

@barath This PR removes the simulator and moves its functionality to environment and agent. Since this is a draft, unit tests have not been refactored. For the photon_simulator, it is too complicated for me to refactor now. I think it needs to be refactored as well (maybe in the following commits in this PR). Please take a look at this. Thank you.

ralphchung commented 5 years ago

@barath I have refactored the SunInfo. I think it is close to be reviewed. I will put the unit test later so that it can be merged back to the master.

ralphchung commented 5 years ago

@barath

Could you add a TODO here to generalize the harvest / yield handling?

I am sorry. I don't quite understand what this means.

I think this PR is close to merging back. Unit tests have been refactored and been pushed. The only thing perplexing me is that I don't know the correct values for the sun simulator. I copied the original test cases to the refactored one, but the tests failed. I marked this problem TODO in the test.cc file.

Finally, please take a look at this. Thank you.