Running MaxLEV
Run MaxLEV with the command:
maxlev <config.json>
where config.json is a JSON file that defines the optimization problem (see
Configuration Format for details). The maxlev command is available after installation
with pip install -e . (see Installation Guide).
Command-Line Options
--validateValidate configuration without running optimization. Useful for checking that all parameters and outputs are valid before a long optimization run.
--verbose, -vEnable verbose VPLanet output. By default, VPLanet output is suppressed during optimization.
--seed NOverride the random seed specified in the configuration file.
--maxiter NOverride the maximum number of iterations.
--workers NOverride the number of parallel workers:
1: Serial execution (default)-1: Use all available CPUsN: Use N parallel workers
Examples
Validate a configuration file:
maxlev myconfig.json --validate
Run optimization with 4 parallel workers:
maxlev myconfig.json --workers 4
Run with a different random seed:
maxlev myconfig.json --seed 12345
Output Files
After a successful run, MaxLEV generates:
Results file (default:
maxlike_results.txt): Contains the best-fit parameters, negative log-likelihood, chi-squared, model predictions with residuals, and parameter bounds.MaxLEV input files (
*_maxlev.in): For each VPLanet input file that contains optimized parameters, a new file is created with the maximum likelihood values substituted. These files are placed in the same directory as the template files.
Example output structure:
examples/<Method>/
earth.in # Original template
earth_maxlev.in # Generated with ML values
sun.in
vpl.in
<method>_results.txt
Timeout Handling
VPLanet simulations can sometimes hang or take extremely long for certain
parameter combinations. MaxLEV includes timeout protection:
{
"vplanet": {
"timeout": 120
}
}
If a simulation exceeds the timeout (in seconds), it is terminated and the parameter combination is assigned the failure penalty value.