LibreOffice Calc

This node allows you to register cell ranges selected in the Spreadsheet tab to numerical data types in optiSLang. This integration is done using LibreOffice Calc software.

Supported files types are *.xls, *.xlsx, *.xlsm, *.XLS or *.odt.

Parametrization
  • Scalars

    To define a scalar input or output select, the value and if there is a corresponding name next to or above the value, also select it. Drag the selected cells to the appropriate input or output pane. You can also select multiple scalars.

    Defining three scalars named Param_01, Param_02 and Param_03:

    Defining the same three scalars in vertical order:

    For matrix-like tables, scalars are registered with the name row-name.column-name.

    Registering scalars named Col_01.Row_01, Col_02.Row_01, and so on:

  • Vectors (Response)

    To define a vector response select at least two consecutive scalar values beneath or to the right of a name. Drag the selected cells to the output side and let them drop. The selection automatically expands downward or to the right until an empty cell is reached.

    Though vectors are registered with a fixed dimension, their size may vary during simulation runs. optiSLang updates the length at each run if it is longer or shorter than the original range that it was registered with.

    Defining three vectors named Resp_01, Resp_02 and Resp_03:

    Defining the same vectors in vertical order:

  • Signals (Response)

    To add signals as responses, parametrize the timeline and the values as vectors and add them as internal variables. Switch to the variables tab and add a new variable to contain the resulting signal. Use the calculator function xydata(timeline, values) to construct the signal.

  • Strings

    You can register strings by selecting a single cell that contains the string. Instead of including the name in the selection, you are prompted to enter a name manually.

    Registering the string Variant_a:

Existing slots can be dropped directly onto the cells.

Multiselection

Multiselection is available for scalars and vectors.

  • Scalars: The cells with the parameter names and the corresponding value cells must be direct neighbors. Either the name cells are left or above the value cells. When you select the first name cell, press Shift and select the last value cell. You can add a full parameter block as input or output parameter using drag and drop.

    If there are names above and left of the selected value cells, several parameters are added where the name is a combination of the above and left name cell (for example, A1 - empty, B1 - My, A2 - Parameter, B2 - 5 → My.Parameter belongs to value 5).


    Note:  This does not work with empty cells in between.


  • Vectors: You can multi-select vectors in the same way as for scalars except that there are more value cells right next to or below the name cells.

Execution Settings Tab
OptionDescription
Distinct working directoryWhen selected, creates an extra directory in the design directories for calculations.
Save in design directoryWhen selected, saves the document in the design directory after completing a design.
Show Calc windowWhen selected, the LibreOffice Calc is visible during calculations
Close document after each designWhen selected, the current file is closed after each design calculation. This is useful when deleting design directories.
Automatic cell calculationWhen selected, cells are calculated and updated automatically. Disabling this setting can improve solver performance for computational-intensive sheets or a high number of parameters.
Run Options

This node has general Run Options. The number of supported options is individual for each node.

Troubleshooting
  • If LibreOffice Calc cannot be found on your Linux system, make sure it is properly installed and the PATH is set correctly. To set the PATH to your Calc installation:

    1. Open, then close optiSLang.

    2. Open the $HOME/.config/Dynardo/optiSLang.ini text file and replace the path of SC_CalcDirectoryPath with your LibreOffice Calc installation path.

  • In LibreOffice Calc only ASCII characters are allowed (no umlauts etc.)

Standard Slots

Besides the common integration slots this node has the following slots.

Slot NameSlot TypeData TypeDescription
InOut
Path x Path to a file with format *.xls, *.XLS or *.odt
Supported Versions

See the Supported Integration Versions table.