# cplexoptnode properties #

![CPLEX Optimization node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/cplexnodeicon.png) The CPLEX Optimization node provides the ability to use complex mathematical (CPLEX) based optimization via an Optimization Programming Language (OPL) model file\.

<!-- <table "summary="cplexoptnode properties" class="defaultstyle" "> -->

cplexoptnode properties  

Table 1\. cplexoptnode properties

| `cplexoptnode` properties            | Data type                       | Property description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `opl_model_text`                     | *string*                        | The OPL (Optimization Programming Language) script program that the CPLEX Optimization node will run and then generate the optimization result\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `opl_tuple_set_name`                 | *string*                        | The tuple set name in the OPL model that corresponds to the incoming data\. This isn't required and is normally not set via script\. It should only be used for editing field mappings of a selected data source\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `data_input_map`                     | *List of structured properties* | The input field mappings for a data source\. This isn't required and is normally not set via script\. It should only be used for editing field mappings of a selected data source\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `md_data_input_map`                  | *List of structured properties* | The field mappings between each tuple defined in the OPL, with each corresponding field data source (incoming data)\. Users can edit them each individually per data source\. With this script, you can set the property directly to set all mappings at once\. This setting isn't shown in the user interface\.<br><br>Each entity in the list is structured data:<br><br>Data Source Tag\. The tag of the data source\. For example, for `0_Products_Type` the tag is `0`\.<br><br>Data Source Index\. The physical sequence (index) of the data source\. This is determined by the connection order\.<br><br>Source Node\. The source node (annotation) of the data source\. For example, for `0_Products_Type` the source node is `Products`\.<br><br>Connected Node\. The prior node (annotation) that connects the current CPLEX optimization node\. For example, for `0_Products_Type` the connected node is `Type`\.<br><br>Tuple Set Name\. The tuple set name of the data source\. It must match what's defined in the OPL\.<br><br>Tuple Field Name\. The tuple set field name of the data source\. It must match what's defined in the OPL tuple set definition\.<br><br>Storage Type\. The field storage type\. Possible values are `int`, `float`, or `string`\. |
|                                      |                                 | Data Field Name\. The field name of the data source\.<br><br>Example:<br><br>`[0,0,'Product','Type','Products','prod_id_tup','int','prod_id'], 0,0,'Product','Type','Products','prod_name_tup','string', 'prod_name'],1,1,'Components','Type','Components', 'comp_id_tup','int','comp_id'],1,1,'Components','Type', 'Components','comp_name_tup','string','comp_name']]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `opl_data_text`                      | *string*                        | The definition of some variables or data used for the OPL\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `output_value_mode`                  | *string*                        | Possible values are `raw` or `dvar`\. If `dvar` is specified, on the Output tab the user must specify the object function variable name in OPL for the output\. If `raw` is specified, the objective function will be output directly, regardless of name\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `decision_variable_name`             | *string*                        | The objective function variable name in defined in the OPL\. This is enabled only when the `output_value_mode` property is set to `dvar`\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `objective_function_value_fieldname` | *string*                        | The field name for the objective function value to use in the output\. Default is `_OBJECTIVE`\.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `output_tuple_set_names`             | *string*                        | The name of the predefined tuples from the incoming data\. This acts as the indexes of the decision variable and is expected to be output with the Variable Outputs\. The Output Tuple must be consistent with the decision variable definition in the OPL\. If there are multiple indexes, the tuple names must be joined by a comma (`,`)\.<br><br>An example for a single tuple is `Products`, with the corresponding OPL definition being `dvar float+ Production[Products];`<br><br>An example for multiple tuples is `Products,Components`, with the corresponding OPL definition being `dvar float+ Production[Products];`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `decision_output_map`                | *List of structured properties* | The field mapping between variables defined in the OPL that will be output and the output fields\. Each entity in the list is structured data:<br><br>Variable Name\. The variable name in the OPL to output\.<br><br>Storage Type\. Possible values are `int`, `float`, or `string`\.<br><br>Output Field Name\. The expected field name in the results (output or export)\.<br><br>Example:<br><br>`['Production','int','res'],'Remark','string','res_1']'Cost', 'float','res_2']]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

<!-- </table "summary="cplexoptnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->