# GEMSEO Study Analysis¶

## Objective and scope¶

This section describes how to use StudyAnalysis. The idea is to help the users to define the right MDO problem to be solved, even before wrapping any software. The result of the study are a N2 (or DSM) and XDSM diagrams (see more explanations here XDSM), with a defined MDO problems including:

• The list of disciplines, with their inputs and outputs

• The design variables

• The constraints

• The objective function(s)

No executable code is produced, the idea is to assist the discussions with design and field experts, customers, to define the MDO problem, from the white sheet. This way, the study may be visualized before any process or tool being actually ready.

There is no need to write any line of code to use this tool. A command line executable is available.

Warning

GEMSEO study analysis only works with python 3.6 or earlier.

## Examples¶

The next figure illustrates how this tool can be used to create a MDO study analysis. This requires the creation of an excel workbook with one sheet per discipline. The name of the discipline is given by the name of the sheet. On each of these sheets, the inputs and outputs of the discipline must be given.

Disciplines definition

Scenarios are defined by sheet names starting with “Scenario”.

Scenario definition

The N2 and XDSM diagrams can be generated from such as study file. The N2 diagrams are generated as pdf files. The XDSM diagrams are generated as standalone HTML files, by default, or as Latex and pdf files as an option (-l).

N2 of the study

MDF XDSM diagram of the study

IDF XDSM diagram of the study

Multi level formulations can be also used. You need to define multiple scenarios, and add the name of the scenarios in the disciplines list. Use a MDO formulation that is distributed (BiLevel for instance).

BiLevel scenario definition

## Class documentation¶

class gemseo.utils.study_analysis.StudyAnalysis(xls_study_path)[source]

Generate a N2 (equivalent to the Design Structure Matrix) diagram, showing the couplings between discipline and XDSM, (Extended Design Structure Matrix), showing the MDO process, from a Excel specification of the inputs, outputs, design variables, objectives and constraints.

The input excel files contains one sheet per discipline. The name of the sheet is the discipline name. The sheet has at least two columns, one for inputs and one for outputs, with the following format:

Inputs

Outputs

in1

out1

in2

out2

[Disc1]

Empty lines are ignored.

The scenarios (at least one, or multiple for distributed formulations) must appear in a Excel sheet name starting by “Scenario”.

The sheet has the following columns, with some constraints : All of them are mandatory, even if empty for the Constraints The order may be any 1 and only 1 formulation must be declared At least 1 objective must be provided, and 1 design variable

Design variables

Objective function

Constraints

Disciplines

Formulation

Options

Options values

in1

out1

out2

Disc1

MDF

tolerance

0.1

Disc2

[Scenario1]

All Objective functions and constraints must be outputs of a discipline, not necessarily the one of the current sheet. All Design variables must be inputs of a discipline, not necessarily the one of the current sheet.

The Options and Options values columns are used to pass the formulation options

To use multi level MDO formulations, create multiple scenarios, and add the name of the sub scenarios in the list of disciplines of the main (system) scenario.

An arbitrary number of levels can be generated this way (three, four levels etc formulations).

Initializes the study from the excel specification

Parameters

xls_study_path – path to the excel file describing the study

## Usage of the command line executable¶

GEMSEO installation provides the gemseo-study command line executable, its usage is:

gemseo-study [-h] [-o OUT_DIR] [-x] [-l] [-s FIGSIZE] study_file

A tool to generate a N2 and XDSM diagrams from an excel description file.

positional arguments:

study_file XLS file that describes the study

optional arguments:
-h, --help

show this help message and exit

-o OUT_DIR, --out_dir OUT_DIR

Output directory for the generated files

-x, --xdsm

If True, generates the XDSM file

-l, --latex_output

If True, generates the XDSM in PDF and Latex

-s FIGSIZE, --figsize FIGSIZE

Size of the N2 figure, tuple (x,y)