> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateScalarMOP2 Class Reference

Part of [MOP legacy](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__legacy)

Simple interface encapsulating the external Dynardo [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) C-interface. Used to build and solve a [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) problem given an input and ouput [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) respectively.

## Public Member Functions

| Type | Name |
| - | - |
| | **addConfig** (legacy::configuration::ConfigurationBase config) |
| ::[ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) \* | [compute](#a21878f1bf6156eea8779b466ebe28f23) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) inputs, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) outputs) Builds the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) and returns it as an independent object, again encapsulated within a SoS [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) instance This function returns an owning pointer. Make sure to wrap it or delete it if applicable. |
|  ::legacy::ScalarMOP2 \* | [compute2](#affc835e0b628c455c70fd318d53f7238) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) inputs, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) outputs) specific function to some lua scripts |
| | [CreateScalarMOP2](#a7eb52db3530e18ab264973f707fa90b4) () Initializes the encapsulated [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) handle. |
| | [CreateScalarMOP2](#a5ae563f8f76bc96fa0f8310efcb1ebab) ([CreateScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p2.md) src) Copy constructor. |
| [CreateScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p2.md) | [operator=](#a0d88512c2349b850aa132f48cac9d1e7) ([CreateScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p2.md) other) Copy assignment. |
| | [setInputIdents](#a8c2f5db258736b3c041c1d282ef68f0d) (std::vector\< string > idents) Releases the encapsulated [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) handle. |
| | [setMandatoryInputIdents](#a7bf5b8d26d7179da1c228b5f4f18542e) (std::vector\< string > idents) Optional: Mandatory input idents. |
| | [setMandatoryInputs](#a953c6fc1d66f61da3d85b64a5db339fe) (std::vector\< number > unimportant\_selectable\_mandatory) Optional: Set selectability of inputs. |
| | [setOutputIdents](#a24881fd3742c170d26ed38d462130312) (std::vector\< string > idents) Optional output idents. |

## Detailed Description

Simple interface encapsulating the external Dynardo [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) C-interface. Used to build and solve a [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) problem given an input and ouput [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) respectively.

**Date**

2016

**Copyright**

DYNARDO Austria GmbH

## Constructor & Destructor Documentation

### CreateScalarMOP2()

```cpp theme={null}
CreateScalarMOP2(CreateScalarMOP2 src)
```

Copy constructor.

**Parameters**

| Name | Description |
| - | - |
| src | the data source |

## Member Function Documentation

### compute()

```cpp theme={null}
:: ScalarMOP * compute(
    Matrix inputs,
    Matrix outputs
)
```

Builds the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) and returns it as an independent object, again encapsulated within a SoS [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) instance This function returns an owning pointer. Make sure to wrap it or delete it if applicable.

**Parameters**

| Name | Description |
| - | - |
| inputs | the inputs that were evaluated. each column is one set of inputs, i.e. each column represents a single design, e.g. numRows = numInputs; numCols = number of designs |
| outputs | the output variable values as evaluated for each set of inputs; each column represents a single design, e.g. numRows = numOutputs; numCols = number of designs |

**Returns**

A raw pointer to a Legacy [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) instance initialized from this internal [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) handle

### operator=()

```cpp theme={null}
CreateScalarMOP2 operator=(CreateScalarMOP2 other)
```

Copy assignment.

**Parameters**

| Name | Description |
| - | - |
| src | the data source |

**Returns**

reference to the copied instance

### setInputIdents()

```cpp theme={null}
setInputIdents(std::vector< string > idents)
```

Releases the encapsulated [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) handle.

Optional input idents

**Parameters**

| Name | Description |
| - | - |
| idents | A vector of input idents |

### setMandatoryInputIdents()

```cpp theme={null}
setMandatoryInputIdents(std::vector< string > idents)
```

Optional: Mandatory input idents.

**Parameters**

| Name | Description |
| - | - |
| idents | A vector of input idents to be set mandatory (can not be chosen to be unimportant by [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md)) |

> [!NOTE]
>
> This method must be called after [setInputIdents()](#a8c2f5db258736b3c041c1d282ef68f0d)

### setMandatoryInputs()

```cpp theme={null}
setMandatoryInputs(std::vector< number > unimportant_selectable_mandatory)
```

Optional: Set selectability of inputs.

**Parameters**

| Name | Description |
| - | - |
| unimportant\_selectable\_mandatory | A vector of flags indicating the selectabiliy falg for each input. 0u=unimportant, 1u=selectable(default), 2u=mandatory |

### setOutputIdents()

```cpp theme={null}
setOutputIdents(std::vector< string > idents)
```

Optional output idents.

**Parameters**

| Name | Description |
| - | - |
| idents | A vector of output idents |
