APSIMInitiative / ApsimOnR

7 stars 6 forks source link

simple_run_example.R #2

Open ckluss opened 4 years ago

ckluss commented 4 years ago

Hi Drew,

thany you for your great package. But with APSIM2020.09.09.5640 there seem to be problems:

I get an error:

"System.Exception: Error in report DailyReport: Invalid report variables found:"                                                                            
"Wheat.Phenology.HaunStage" 

And when I delete Wheat.Phenology.HaunStage from the DailyReport I get "While locating model VPD: VPD is not a child of XValue"

Thank you in advance.

Kind regards Christof

hol430 commented 4 years ago

Hi Christof, yeah the simulations will fail if the report contains an invalid variable name. For HaunStage, you could try [Wheat].Phenology.HaunStage. The requirement for square brackets is kind of silly, and we're working on removing them, but for now we just need to put up with them. As for the second error about VPD - I'm not sure what's causing this off the top of my head, would you be able to upload your .apsimx file?

Zhaoyu0403 commented 3 years ago

Hi Drew, I used the CroptimizR package for the first time. When I run the example of ApsimX, I get the an error imformation: "Error: no such table: DailyReport In additation: Warning message: In system(cmd, wait = TRUE, intern = TRUE) : Run Commond: The status of 'C:/Progra~1/APSIM2019.12.04.4404/Bin/Models.exe C:\WINDOWS\TEMP\Rtmp0u2Cf4\apsimOnR5cd4567ece6.apsimx' is 1". I don't know how to solve it. I earnestly hope to get your help.

Yours Yu Zhao

hol430 commented 3 years ago

Hi @Zhaoyu0403, thanks for letting me know. This should be fixed if you upgrade to the latest version of apsim (2020.12.01.5893 or newer).

Zhaoyu0403 commented 3 years ago

Hi @Zhaoyu0403, thanks for letting me know. This should be fixed if you upgrade to the latest version of apsim (2020.12.01.5893 or newer).

Thanks for your response. I have been able to successfully run the cases you provided

hol430 commented 3 years ago

Glad to hear it's running without error now. We actually found an issue with this today where the objective function is not changing from iteration to iteration which kind of makes the whole thing useless. I'll try to get it fixed tomorrow and send you a message when it's fixed.

hol430 commented 3 years ago

Just updating this to say that the issue we were having yesterday turned out to be a false alarm, caused by not keeping our r packages up to date (@sbuis fyi - and thanks for the tip).