Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

CreateScalarMOP2 Class Reference

Last update: 16.07.2025

Simple interface encapsulating the external Dynardo MOP C-interface. Used to build and solve a MOP problem given an input and ouput Matrix respectively. More...

Public Member Functions

 addConfig (legacy::configuration::ConfigurationBase config)
 
::ScalarMOPcompute (Matrix inputs, Matrix outputs)
 Builds the MOP and returns it as an independent object, again encapsulated within a SoS MOP instance This function returns an owning pointer. Make sure to wrap it or delete it if applicable. More...
 
::legacy::ScalarMOP2 * compute2 (Matrix inputs, Matrix outputs)
 specific function to some lua scripts
 
 CreateScalarMOP2 ()
 Initializes the encapsulated MOP handle.
 
 CreateScalarMOP2 (CreateScalarMOP2 src)
 Copy constructor. More...
 
CreateScalarMOP2 operator= (CreateScalarMOP2 other)
 Copy assignment. More...
 
 setInputIdents (std::vector< string > idents)
 Releases the encapsulated MOP handle. More...
 
 setMandatoryInputIdents (std::vector< string > idents)
 Optional: Mandatory input idents. More...
 
 setMandatoryInputs (std::vector< number > unimportant_selectable_mandatory)
 Optional: Set selectability of inputs. More...
 
 setOutputIdents (std::vector< string > idents)
 Optional output idents. More...
 

Detailed Description

Simple interface encapsulating the external Dynardo MOP C-interface. Used to build and solve a MOP problem given an input and ouput Matrix respectively.

Date
2016

Constructor & Destructor Documentation

◆ CreateScalarMOP2()

Copy constructor.

Parameters
srcthe data source

Member Function Documentation

◆ compute()

::ScalarMOP* compute ( Matrix  inputs,
Matrix  outputs 
)

Builds the MOP and returns it as an independent object, again encapsulated within a SoS MOP instance This function returns an owning pointer. Make sure to wrap it or delete it if applicable.

Parameters
inputsthe 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
outputsthe 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 instance initialized from this internal MOP handle

◆ operator=()

CreateScalarMOP2 operator= ( CreateScalarMOP2  other)

Copy assignment.

Parameters
srcthe data source
Returns
reference to the copied instance

◆ setInputIdents()

setInputIdents ( std::vector< string >  idents)

Releases the encapsulated MOP handle.

Optional input idents

Parameters
identsA vector of input idents

◆ setMandatoryInputIdents()

setMandatoryInputIdents ( std::vector< string >  idents)

Optional: Mandatory input idents.

Parameters
identsA vector of input idents to be set mandatory (can not be chosen to be unimportant by MOP)
Note
This method must be called after setInputIdents()

◆ setMandatoryInputs()

setMandatoryInputs ( std::vector< number >  unimportant_selectable_mandatory)

Optional: Set selectability of inputs.

Parameters
unimportant_selectable_mandatoryA vector of flags indicating the selectabiliy falg for each input. 0u=unimportant, 1u=selectable(default), 2u=mandatory

◆ setOutputIdents()

setOutputIdents ( std::vector< string >  idents)

Optional output idents.

Parameters
identsA vector of output idents

Connect with Ansys