gemseo.problems.mdo.scalable.data_driven.study.post module#
Post-processing for scalability study.
The PostScalabilityStudy
class implements the way as the set of
ScalabilityResult
-based result files
contained in the study directory are graphically post-processed. This class
provides several methods to easily change graphical properties, notably
the plot labels. It also makes it possible to define a cost function per
MDO formulation, converting the numbers of executions and linearizations
of the different disciplines required by an MDO process in an estimation
of the computational cost associated with what would be a scaled version
of the true problem.
Warning
Comparing MDO formulations in terms of estimated true computational time
rather than CPU time of the ScalabilityStudy
is highly
recommended.
Indeed, time is often an obviousness criterion to distinguish between
MDO formulations having the same performance in terms of distance to the
optimum: look at our calculation budget and choose the best formulation
that satisfies this budget, or even saves us time. Thus, it is important
to carefully define these cost functions.
- class PostScalabilityStudy(study_directory)[source]#
Bases:
object
Post-processing of scalability results.
- Parameters:
study_directory (str) -- The directory of the scalability study.
- labelize_exec_time(description)[source]#
Change the description of execution time.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_is_feasible(description)[source]#
Change the description of feasibility.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_n_calls(description)[source]#
Change the description of number of calls.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_n_calls_linearize(description)[source]#
Change the description of number of calls for linearization.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_original_exec_time(description)[source]#
Change the description of original execution time.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_scaling_strategy(description)[source]#
Change the description of scaling strategy.
- Parameters:
description (str) -- The description.
- Return type:
None
- labelize_status(description)[source]#
Change the description of status.
- Parameters:
description (str) -- The description.
- Return type:
None
- plot(legend_loc='upper left', xticks=None, xticks_labels=None, xmargin=0.0, **options)[source]#
Plot the results.
- Parameters:
legend_loc (str) --
The location of the legend.
By default it is set to "upper left".
xticks (Sequence[float] | None) -- The x-ticks.
xticks_labels (Sequence[str] | None) -- The labels for the x-ticks.
xmargin (float) --
The margin on the left and right sides of the x-axis.
By default it is set to 0.0.
**options (Any) -- The options for the specialized plot methods
- Return type:
None
- set_cost_unit(cost_unit)[source]#
Set the measurement unit for cost evaluation.
- Parameters:
cost_unit (str) -- The cost unit, e.g. 'h' or 'min'.
- Return type:
None
- NOMENCLATURE: ClassVar[dict[str, str]] = {'exec_time': 'Execution time (s)', 'is_feasible': 'Feasibility of the solution (0 or 1)', 'n_calls': 'Number of discipline evaluations', 'n_calls_linearize': 'Number of gradient evaluations', 'original_exec_time': 'Pseudo-original execution time', 'scaling_strategy': 'Scaling strategy index', 'status': 'Optimizatin status', 'total_calls': 'Total number of evaluations'}#