Closed codeandkey closed 9 months ago
Yes, that seems likely. As a workaround, you could try putting quotes around the path you're passing into the optimiser. E.g.
model_path <- '"C:/Program Files/APSIM2022.5.7042.0/bin/Models.dll"'
Unfortunately when adding quotes to the input path, the apsimx_wrapper checks if the quoted file exists here and fails early. I opened a PR #5 addressing this issue.
When running CroptimizR on Windows 10 with a local R installation I run into the following error:
I think this might be due to the path being passed to
system()
being interpreted as multiple arguments when it contains spaces. Running the commanddotnet "C:/Program Files/APSIM2022.5.7042.0/bin/Models.dll" /Version
produces the expected output.