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

Running a play list from command line. #9490

Open
ric394 opened this issue Dec 2, 2024 Discussed in #9465 · 0 comments
Open

Running a play list from command line. #9490

ric394 opened this issue Dec 2, 2024 Discussed in #9465 · 0 comments
Assignees

Comments

@ric394
Copy link
Contributor

ric394 commented Dec 2, 2024

New documentation is needed to demonstrate usage of Playlist via Models.

Discussed in #9465

Originally posted by HamishBrownPFR November 25, 2024
It is possible to run a sub-set of the simulations from an .apsimx file from command line by passing a list of simulations in. The example below uses the subprocess library in python to execute the command line run.

subprocess.run(['C:/GitHubRepos/ApsimX/bin/Debug/net6.0/Models.exe',
               'C:/GitHubRepos/ApsimX/Prototypes/Lentil/Lentil.apsimx',
               '/SimulationNameRegexPattern:(SimName1)|(SimName2)|(SimName3)|(SimName4)'],
               stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

APSIM now has the Playlist class which can select a sub set of simulations to run which is easier than trying to compile lists of simulations in a script. However, I cannot work out how to run the playlist from the command line.
Anyone know how to do that or if it is even possible?

@ric394 ric394 self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant