Skip to content

Commit

Permalink
[draft] add shortcut for CLI options (#1613)
Browse files Browse the repository at this point in the history
Co-authored-by: Abdoulbari ZAKIR <[email protected]>
  • Loading branch information
a-zakir and a-zakir authored Sep 11, 2023
1 parent d23aed5 commit 57bae5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/reference-guide/10-command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ _In all cases, arguments " –h" or "–help" can be used to get help_
|--optimization-range | Force the simplex optimization range ('day' or 'week') |
|--no-constraints | Ignore all binding constraints|
|--no-ts-import | Do not import timeseries into the input folder. <br/> (This option may be useful for running old studies without upgrade)|
|--mps-export | Export weekly or daily optimal UC+dispatch linear |
|-m, --mps-export | Export anonymous mps weekly or daily optimal UC+dispatch linear |
|-s, --named-mps-problems | Export named mps weekly or daily optimal UC+dispatch linear |

- Misc.

Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ bool Parameters::loadFromINI(const IniFile& ini, uint version, const StudyLoadOp
if (options.usedByTheSolver)
prepareForSimulation(options);

if (options.mpsToExport)
if (options.mpsToExport || options.namedProblems)
{
this->include.exportMPS = mpsExportStatus::EXPORT_BOTH_OPTIMS;
}
Expand Down
8 changes: 4 additions & 4 deletions src/solver/misc/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ std::unique_ptr<GetOpt::Parser> CreateParser(Settings& settings,

// --mps-export
parser->addFlag(options.mpsToExport,
' ',
'm',
"mps-export",
"Export in the mps format the optimization problems.");
"Export in the mps (anonymous) format the optimization problems (both optim).");

// --named-problems
parser->addFlag(options.namedProblems,
' ',
's',
"named-mps-problems",
"Naming constraints and variables in problems.");
"Export named constraints and variables in mps (both optim).");

parser->addParagraph("\nMisc.");
// --progress
Expand Down

0 comments on commit 57bae5b

Please sign in to comment.