Open cranju opened 5 days ago
In the Rotation example, there's an harvest routine that takes a string argument (the "glable" bit in red):
This is great while you're using that particular (Wheat) Manager component, but if you call it from another (eg a vetch rule copied from the maize rule) that doesnt have this argument, then you'll get a message like above - one argument supplied ("glable"), none desired.
Thanks Peter.
What happened?
I am attempting to simulate a mixed farming system with a rotation of sown annual pasture, specifically vetch, canola, and winter wheat, at a stocking rate of 6 DSE per hectare. Since vetch is not included in APSIM, I am using SCRUM and calibrating it against field data for vetch. However, I am encountering the following error. Is this a bug, or could it be an issue with my setup? I had earlier tried with chickpea and peanut before using SCRUM but I still had the same error? Error_Rotation.zip
ERROR in file: C:\Users\ranjuc\Desktop\UTAS\APSIM files\Error_Rotation\Rotation_Vetch.apsimx Simulation name: MFAPVetch-Canola-Winterwheat Models.Core.SimulationException ---> System.Exception: Unable to transition to state prepForCrop ---> System.Exception: Unable to call method HarvestCrop: expected 1 arguments but 0 were given at Models.Management.RotationManager.GetArgumentsForMethod(String[] arguments, MethodInfo method) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Management\RotationManager.cs:line 412 at Models.Management.RotationManager.CallMethod(String invocation) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Management\RotationManager.cs:line 397 at Models.Management.RotationManager.TransitionTo(Arc transition) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Management\RotationManager.cs:line 348 --- End of inner exception stack trace --- at Models.Management.RotationManager.TransitionTo(Arc transition) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Management\RotationManager.cs:line 356 at Models.Management.RotationManager.OnDoManagement(Object sender, EventArgs e) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Management\RotationManager.cs:line 268 at Models.Clock.OnDoCommence(Object , CommenceArgs e) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Clock.cs:line 359 at Models.Core.Simulation.Run(CancellationTokenSource cancelToken) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Core\Simulation.cs:line 298 --- End of inner exception stack trace --- at Models.Core.Simulation.Run(CancellationTokenSource cancelToken) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Core\Simulation.cs:line 307 at Models.Core.Run.SimulationDescription.Run(CancellationTokenSource cancelToken) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\Models\Core\Run\SimulationDescription.cs:line 136 at APSIM.Shared.JobRunning.JobRunner.RunActualJob(IRunnable job, IJobManager jobManager) in C:\Users\ContainerAdministrator\AppData\Local\Temp\ApsimX\APSIM.Shared\JobRunning\JobRunner.cs:line 214
What Operating System are you on?
Windows