Launching the workflow : xpansion trajectory¶
Usage¶
Usage of the launcher is :
antares-xpansion-launcher --trajectory --step <step> [-i <path/to/input/root>] [--input-file <path/to/user/input/file>] ...
Mandatory arguments¶
-
--trajectory: Tells the program to run in trajectory context. -
--step: Step of the workflow to execute, can be:full: Executes the full workflow, step by step (in the order described below).input_translation: Parses and translates theinput-trajectory.yamlfile, and writes themaster_merger_info.jsonfile. See : User input parsing and translation for more details.problem_generation: Runs the problem generation step on the studies in the tree, and writes thenodal_lp_info.jsonfile. See : Multiple problem generation for more details.merge_master: Merges the generated master problem and writes themerged_master.<mps/svf>andmerged_structure.txtfiles. See : Master problem merging for more details.merge_weights: Merges the weights file generated during the problem generation into a single weights file that accurately weighs each subproblem depending on the node's study data and the node's information in the tree. See : Generating a merged weights file for more details.
Optional arguments¶
Input location¶
-
-i, --dataDir: Path to the folder that contains each node's corresponding antaresXpansion study. If not specified, defaults to the current directory. -
--input-file: Path to the user input file. If not specified, the program will look for a file namedinput-trajectory.yamlin the--dataDirdirectory. If this file is not found, an error will be raised. -
--cache_problems: If specified, tells the program to cache the generated optimization problems on disk during the benders step, instead of keeping them in memory. Prevents out of memory issue for large studies.
Execution options¶
-
--memory: Tells the program wether to run the problem generation in memory mode. Only useful when--stepis eitherproblem_generationorfull.
NOTE : As of now, multiple problem generation is only implemented for memory mode, and thus this flag is necessary when running a part of the workflow that includes the problem generation. -
--method: Similarly to the annual xpansion context, sets the method used for the resolution.
NOTE : As of now, onlybendersandmerge_mpsresolutions are compatible with the trajectory context. Theouter_loop(adequacy_criterion) method still requires adaptations and probably cannot be used as-is. -
--np: See the eponymous annual xpansion argument. -
--problems-format: See the eponymous annual xpansion argument. -
--solver: Tells the program which solver to use when manipulating optimization problems in stepsmerge_masterandresolution
Note that this does not apply to the step problem_generation, where the solver and file format used in instead
determined by the solver entry in <study>/user/expansion/settings.ini.
A note on intermediary files¶
As of now, most intermediary files will be written using a hardcoded default name in a folder name
intermediary_files situated at : <INPUT_ROOT>/intermediary_files, and the drivers of the different steps
will only look at those hardcoded locations when looking for those files.
TODO : implement arguments in xpansion-trajectory-launcher to allow custom names and locations for the
intermediary files.
- After
--step input_translation,master_merger_info.jsonwill be found at<INPUT_ROOT>/intermediary_files/master_merger_info.json. -
The input files of the
multiple_problem_generationexecutable generated bymultiple_problem_generation_driverwill be written at :<INPUT_ROOT>/intermediary_files/mpg_input.txtfor the study paths file.<INPUT_ROOT>/intermediary_files/mpg_weights.txtfor the custom weights reference file, if at least one study has a custom weights file.<INPUT_ROOT>/intermediary_files/mpg_constraints.txtfor the additional constraints reference file, if at least one study has additional constraints.
-
After
--step problem_generation,nodal_lp_info.jsonwill be found at<INPUT_ROOT>/intermediary_files/nodal_lp_info.json -
The
options_merge_master.jsonfile used by themerge_master_mpsexecutable is generated bymerge_master_driverand written at<INPUT_ROOT>/intermediary_file/options_merge_master.json -
After
--step merge_master, the output files will be found at :<INPUT_ROOT>/merged_master.<mps/svf>for the merged master problem. Note that it is written directly at the<INPUT_ROOT>.<INPUT_ROOT>/merged_structure.txtfor the merged structure file.
-
After
--step merge_weights, the output file will be found at<INPUT_ROOT>/merged_weights.txt. -
The
options_benders.jsonfile required by the different resolution executables (bendersormerge_mpsmostly) is written by thetrajectory_resolution_driverat<INPUT_ROOT>/intermediary_file/options_benders.json.