> ## 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.

# CreateModelBase Struct Reference

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

API for all MOP3 model creation classes.

## Public Member Functions

| Type | Name |
| - | - |
| virtual string | [\_\_str\_\_](#a3031d648b73235d11d64df95db3d84ce) () Output function used in python context. Use this function to print instances of this class in python. |
|  virtual | [addProperty](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#aedfb47575823522e6a6d22ce6c12e826) ([PropertyBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_property_base.md) p) Properties that help the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) scheduling the Models to be built The properties class needs to be implemented for the specific model type. |
| virtual [ModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_model_base.md) \* | [compute](#a5e64887b96b93ac8aa95cca396d78f0a) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md) training\_plan, quality\_measure::QualityMeasureBase quality\_measure, [CancelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_cancel_base) \*cancel=nullptr)=0 Builds the model from the given samples and returns the model. |
| virtual bool | [equals](#a4a1cc8519f2bdb1f9952ceaa3391cbca) ([CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md) other)=0 Checking if the given configurations are equal this this instance. |
|  virtual [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) | [getProperties](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#a0e1dd7df82728594fc128ed1c797b0c0) () Returns the properties stored by this user. |
| virtual bool | [isValid](#a1202ca4468e899d1e6d321ebf59e67a1) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md) training\_plan)=0 This function checks if the model can validly be trained from the given samples. |
| [CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md) | [operator=](#a95dd7a3a92dfccdf5f49e060644e651b) ([CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md) other) assignement operator |
| virtual | [transferProperties](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#ab9507274f126b856fb69cd621f0f9fb4) ([PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) property\_list) Convenience function to transfer a complete [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) into the model. |

## Public Attributes

| Type | Name |
| - | - |
|  string | **node\_name** |
|  string | **working\_dir** |

## Detailed Description

API for all MOP3 model creation classes.

## Member Function Documentation

### \_\_str\_\_()

```cpp theme={null}
virtual string __str__()
```

`virtual`

Output function used in python context. Use this function to print instances of this class in python.

**Returns**

string containing the object

Reimplemented in [CreateCustomModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_custom_model.md#a3031d648b73235d11d64df95db3d84ce).

### compute()

```cpp theme={null}
virtual ModelBase * compute(
    ::data_handler::DataHandlerBase datahandler,
    TrainingPlanBase training_plan,
    quality_measure::QualityMeasureBase quality_measure,
    CancelBase * cancel = nullptr
)
```

`pure virtual`

Builds the model from the given samples and returns the model.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler that contains the samples |
| training\_plan | The training plan that specifies how the model will be trained |
| quality\_measure | The quality measure that allows to compute a models approximation quality |
| cancel | A cancellation object to cancel the training |

**Returns**

The trained model iff not cancelled

Implemented in [CreateCustomModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_custom_model.md#adab3d3e83d7c6ba1916a079748b0f152).

### equals()

```cpp theme={null}
virtual bool equals(CreateModelBase other)
```

`pure virtual`

Checking if the given configurations are equal this this instance.

**Parameters**

| Name | Description |
| - | - |
| other | The other Config |

**Returns**

true iff the same type and the same config entries

Implemented in [CreateCustomModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_custom_model.md#ad90ea62af69f033af4b88810fc877308).

### isValid()

```cpp theme={null}
virtual bool isValid(
    ::data_handler::DataHandlerBase datahandler,
    TrainingPlanBase training_plan
)
```

`pure virtual`

This function checks if the model can validly be trained from the given samples.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The samples the model shall be trained with. |
| training\_plan | The training\_plan |

**Returns**

True iff th emodel can be trained with the configuration data, the properties and samples

Implemented in [CreateCustomModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_custom_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), [CreateKrigingModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_kriging_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), [CreateMLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_m_l_s_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), [CreateRBFModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_r_b_f_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), [CreatePolynomialModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_polynomial_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), [CreateLegacyMOPModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_p_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d), and [CreateLegacyMOQModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_q_model.md#a1a42d0ff7ef3b9c17965ecc14310ed5d).

### operator=()

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

assignement operator

**Returns**

A raw of type [CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md) to cloned instance

### transferProperties()

```cpp theme={null}
virtual transferProperties(PropertyList property_list)
```

`virtual` `inherited`

Convenience function to transfer a complete [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) into the model.

**Parameters**

| Name | Description |
| - | - |
| property\_list | The properties to transfer into this model |
