LANDIS-II-Foundation / Library-Harvest-Mgmt

Apache License 2.0
0 stars 5 forks source link

Landis.Library.HarvestManagement.SiteVars.Stand is returned as "void" from another LANDIS-II extension #28

Open Klemet opened 3 years ago

Klemet commented 3 years ago

Hello, there !

I'm Clément, the developer of the FRS module for LANDIS-II.

I've been using the Biomass Harvest succession V4.1 for a while, because later versions tended to mess up the functioning of repeated prescriptions. I don't know if the problem was solved, but one of my users wanted to use Biomass Harvest 4.4, and we ran into a problem with the more recent harvest libraries (harvest-management-v4, I imagine); while this problem did no appear with earlier versions (harvest-management-v3 ?). The problem also appears with Base Harvest.

The FRS module tries to adapt to the necessity of coming back to a pixel for a future harvest, which can influence the type of road that will be constructed. To that end, I had to get the Stand object of a pixel via Landis.Library.HarvestManagement.SiteVars.Stand. Then, the extension gets the information it needs concerning the prescription that have been used in this stand at the last activation of the harvest extension.

The code looks like this :

// We get the stand of the cell
ISiteVar<Landis.Library.HarvestManagement.Stand> standOfSite = Landis.Library.HarvestManagement.SiteVars.Stand;
Landis.Library.HarvestManagement.Stand standOfTheSite = standOfSite[site];

However, the newest harvest libraries makes it so that the standOfSite object ends up being null; as if Landis.Library.HarvestManagement.SiteVars.Stand doesn't exist, or cannot be referenced.

Would any of you have any idea as to why I can't access this SiteVar anymore on my side ?

EGustafson-L2 commented 3 years ago

Hi Clement,

We have recently discovered something very like this, and we are working on it. How might we contact you if we have questions about your experience? Thanks!

Eric Gustafson

Klemet commented 3 years ago

Hello, Mr. Gustafson !

I'm sorry to hear that you're having a similar issue. If you want, you can contact me at the address "clem.hardy@outlook.fr" : ) .