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

Accumulate Function Harvesting event resets value to 0 before Reporting happens #9434

Open
par456 opened this issue Nov 8, 2024 · 1 comment · May be fixed by #9496
Open

Accumulate Function Harvesting event resets value to 0 before Reporting happens #9434

par456 opened this issue Nov 8, 2024 · 1 comment · May be fixed by #9496
Assignees
Labels

Comments

@par456
Copy link
Collaborator

par456 commented Nov 8, 2024

What happened?

In the case of Soybean, if you try and report NodeNumber at harvest, it will always report 0 because the Accumulated Value that holds NodeNumber is changed prior to the report being run.

This is obviously designed for pasture plants, so that you can harvest them without ending them and have the accumulated values reduce, but with soybean (and I assume other crops) the harvest factor is set to 100% removal, so it's cleared to 0 instead.

What Operating System are you on?

Windows

@par456 par456 added the Bug label Nov 8, 2024
@par456 par456 changed the title Accumulate Function listening to Harvesting event to reset instead of PlantEnding Accumulate Function Harvesting event resets value to 0 before Reporting happens Nov 8, 2024
@par456
Copy link
Collaborator Author

par456 commented Nov 8, 2024

Looking into this further, we have 5 models that are listening to this event and doing resets on values prior to reports or manager scripts being able to run their harvesting events.

These are:

  • AccumulateByNumericPhase
  • AccumulateFunction
  • BasialBuds
  • Leaf
  • DEROPAPY

None of these should be listening to the Harvesting event, as they need to happen after that event. The best solution we can think of to handle this would be a new event ("HarvestComplete" or something, we haven't got a good name yet) that is invoked after Harvesting that models can listen for and do their resets and changes with.

Normally the crops would do resets in the EndCrop event, however that obviously doesn't work when a crop is harvested without being ended, such as with a pasture or crop that isn't removed after harvesting.

An event like this would also help out organs which currently have to have their harvest function manually called in Plant after the Harvesting event is done. Adding a new event here would let use remove that code and link the organ harvest function to that event as well.

@HamishBrownPFR tagging you since this effects DEROPAPY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
1 participant