Skip to main content

optiSLang MOPSolver API 2026 R1

File mopsolver_api.h

Last update: 31.07.2026

Location: mopsolver_api.h

version
$Rev$

Includes

flowchart LR
  n1["mopsolver_api.h"]
  n2["mopsolver_api_shared.h"]
  n1 --> n2
  click n1 href "mopsolver__api_8h.md#mopsolver__api_8h"
  click n2 href "mopsolver__api__shared_8h.md#mopsolver__api__shared_8h"

Functions

Function dmop_hasSurrogate

DYNARDO_MOPSOLVER_API int dmop_hasSurrogate(const char *_omdbfile)

test binfile if it contains Surrogate Data Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang database file (*.omdb) containing MOP

Returns:

zero if Surrogate is found

Parameters:

  • const char * _omdbfile

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getDimensions

DYNARDO_MOPSOLVER_API int dmop_getDimensions(const char *_omdbfile, int *_num_inputs, int *_num_responses)

retrieves problem dimensions i.e. number of active inputs and responses Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_inputs: pointer to an integer variable into which the number of active inputs should be written
  • _num_responses: pointer to an integer variable into which the number of active responses of type scalar should be written

Returns:

zero if the dimensions could be determined

Parameters:

  • const char * _omdbfile
  • int * _num_inputs
  • int * _num_responses

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_solve_extrapolate

DYNARDO_MOPSOLVER_API int dmop_solve_extrapolate(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double *_responses, int _extrapolate)

approximates the active response values based on their best metamodel for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which response values should be approximated
  • _inputs: array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _responses: array of consecutive response values approximated per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_responses )
  • _extrapolate: one or zero to make the mop solver extrapolate the data

Returns:

zero if the aproximation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double * _responses
  • int _extrapolate

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_solve

DYNARDO_MOPSOLVER_API int dmop_solve(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double *_responses)

approximates the active response values based on their best metamodel for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which response values should be approximated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _responses: pointer to array of consecutive response values approximated per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_responses )

Returns:

zero if the approximation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double * _responses

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_gradients_per_response_extrapolate

DYNARDO_MOPSOLVER_API int dmop_gradients_per_response_extrapolate(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_gradients, int _extrapolate)

calculates the gradients based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which gradients should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _gradients: pointer to array of consecutive gradients calculated per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _extrapolate: one or zero to make the mop solver extrapolate the data

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _gradients
  • int _extrapolate

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_gradients_per_response

DYNARDO_MOPSOLVER_API int dmop_gradients_per_response(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_gradients)

calculates the gradients based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which gradients should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _gradients: pointer to array of consecutive gradients calculated per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _gradients

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_errors_per_response_extrapolate

DYNARDO_MOPSOLVER_API int dmop_errors_per_response_extrapolate(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_errors, int _extrapolate)

calculates the errors based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which errors should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _errors: pointer to array of consecutive errors calculated per design point. The length of the array is to be expected as ( _num_designs * 4 )
  • _extrapolate: one or zero to make the mop solver extrapolate the data

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _errors
  • int _extrapolate

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_errors_per_response

DYNARDO_MOPSOLVER_API int dmop_errors_per_response(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_errors)

calculates the errors based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which errors should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _errors: pointer to array of consecutive errors calculated per design point. The length of the array is to be expected as ( _num_designs * 4 )

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _errors

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_density_per_response_extrapolate

DYNARDO_MOPSOLVER_API int dmop_density_per_response_extrapolate(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_density, unsigned int _size_density, int _extrapolate)

calculates the density based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which density should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _density: pointer to array of consecutive density calculated per design point. The length of the array is to be expected as ( _num_designs )
  • _size_density: length of the _density array. Expected to be _num_designs
  • _extrapolate: one or zero to make the mop solver extrapolate the data

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _density
  • unsigned int _size_density
  • int _extrapolate

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_density_per_response

DYNARDO_MOPSOLVER_API int dmop_density_per_response(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_density, unsigned int _size_density)

calculates the density based on the best metamodels for any given design point Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _num_designs: number of design points for which density should be calculated
  • _inputs: pointer to array of consecutive input values per design point. The length of the array is to be expected as ( _num_designs * dmop_getDimensions._num_inputs )
  • _response_name: zero terminated character string containing the name of the response
  • _density: pointer to array of consecutive density calculated per design point. The length of the array is to be expected as ( _num_designs )
  • _size_density: length of the _density array. Expected to be _num_designs

Returns:

zero if the calculation succeeded

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _density
  • unsigned int _size_density

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputNames

DYNARDO_MOPSOLVER_API int dmop_getInputNames(const char *_omdbfile, char **_input_names)

retrieves the names of all active, scalar inputs. The array sizes depend on the number of inputs determined in dmop_getDimensions Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _input_names: pointer to an array of zero-terminated C-strings. The array is going to be created internally

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • char ** _input_names

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputNamesWithDelimiter

DYNARDO_MOPSOLVER_API int dmop_getInputNamesWithDelimiter(const char *_omdbfile, char **_input_names, const char *_delimiter)

retrieves the names of all active, scalar inputs. The array sizes depend on the number of inputs determined in dmop_getDimensions Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _input_names: pointer to an array of zero-terminated C-strings. The array is going to be created internally
  • _delimiter: Character to use as a delimiter for the different variable names. Can be used to achieve connectivity to different programs which cannot handle '\0' properly. Passing an empty string will use '\0'.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • char ** _input_names
  • const char * _delimiter

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getOutputNames

DYNARDO_MOPSOLVER_API int dmop_getOutputNames(const char *_omdbfile, char **_response_names)

retrieves the names of all responses. The array sizes depend on the number of inputs and responses determined in dmop_getDimensions Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _response_names: pointer to an array of zero-terminated C-strings. The array is going to be created internally

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • char ** _response_names

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getOutputNamesWithDelimiter

DYNARDO_MOPSOLVER_API int dmop_getOutputNamesWithDelimiter(const char *_omdbfile, char **_response_names, const char *_delimiter)

retrieves the names of all responses. The array sizes depend on the number of responses determined in dmop_getDimensions Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _response_names: pointer to an array of zero-terminated C-strings. The array is going to be created internally
  • _delimiter: Character to use as a delimiter for the different variable names. Can be used to achieve connectivity to different programs which cannot handle '\0' properly. Passing an empty string will use '\0'.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • char ** _response_names
  • const char * _delimiter

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputBounds

DYNARDO_MOPSOLVER_API int dmop_getInputBounds(const char *_omdbfile, double *_limits)

retrieves the sampling bounds for all parameters. The array size depends on the number of inputs. Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _limits: pointer to array of parameter limits, been given alternetly min1, max1, min2, max2 ... . The length of the array is to be expected as ( 2 * dmop_getDimensions._num_inputs ).

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • double * _limits

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputBoundsPerParameter

DYNARDO_MOPSOLVER_API int dmop_getInputBoundsPerParameter(const char *_omdbfile, const char *_param_name, double *_limits)

retrieves the sampling bounds for given parameters. Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _param_name: zero terminated character string containing the name of the parameter
  • _limits: pointer to array of parameter limits, first element is min, second is max. The length of the array is 2.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double * _limits

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getReferenceValuePerParameter

DYNARDO_MOPSOLVER_API int dmop_getReferenceValuePerParameter(const char *_omdbfile, const char *_param_name, double *_ref_val)

retrieves the Reference Value for given parameter. Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _param_name: zero terminated character string containing the name of the parameter
  • _ref_val: pointer to reference value.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double * _ref_val

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getCoPValuesPerResponse

DYNARDO_MOPSOLVER_API int dmop_getCoPValuesPerResponse(const char *_omdbfile, const char *_response_name, double *_cop_vals)

retrieves the CoP values for given response. Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _response_name: zero terminated character string containing the name of the response
  • _cop_vals: pointer to array of CoP values, containing single CoP values for each parameter plus the total CoP. The length of the array is to be expected dmop_getDimensions._num_inputs+1.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • double * _cop_vals

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getFilteredStatesPerResponse

DYNARDO_MOPSOLVER_API int dmop_getFilteredStatesPerResponse(const char *_omdbfile, const char *_response_name, int *_filtered_states)

retrieves the filtered states for given response. Parameters:

  • _omdbfile: zero terminated character string containing the filesystem path to the optiSLang monitoring database file (*.omdb) containing MOP
  • _response_name: zero terminated character string containing the name of the response
  • _filtered_states: pointer to array of filtered states, 0 is not filtered, 1 is filtered, if the last entry is 1 this means that there is no total CoP. The length of the array is to be expected dmop_getDimensions._num_inputs+1.

Returns:

zero if the name arrays were created and filled

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • int * _filtered_states

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getLastError

DYNARDO_MOPSOLVER_API const char * dmop_getLastError()

Calling a solver API function will reset the string, so you'll need to check for errors immediately after the function call. Returns:

String describing last error or nullptr if no error occured.

Return type: DYNARDO_MOPSOLVER_API const char *

Function dmop_allocate_and_getInputBounds

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getInputBounds(const char *_omdbfile, double **_limits)

some functionalities also exist with the possibility of internal memory allocation management data put to given pointer is valid up to next call of any dmop_ function (except a call of dmop_getLastError())

Parameters:

  • const char * _omdbfile
  • double ** _limits

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getInputBoundsPerParameter

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getInputBoundsPerParameter(const char *_omdbfile, const char *_param_name, double **_limits)

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double ** _limits

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getCoPValuesPerResponse

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getCoPValuesPerResponse(const char *_omdbfile, const char *_response_name, double **_cop_vals)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • double ** _cop_vals

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getFilteredStatesPerResponse

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getFilteredStatesPerResponse(const char *_omdbfile, const char *_response_name, int **_filtered_states)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • int ** _filtered_states

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_solve_extrapolate

DYNARDO_MOPSOLVER_API int dmop_allocate_and_solve_extrapolate(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double **_responses, int _extrapolate)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double ** _responses
  • int _extrapolate

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_solve

DYNARDO_MOPSOLVER_API int dmop_allocate_and_solve(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double **_responses)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double ** _responses

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_hasSurrogate_hash

DYNARDO_MOPSOLVER_API int dmop_hasSurrogate_hash(const char *_omdbfile, const char *_hash)

each functionality which needs a file path also exists with a signature check of the given file to ensure that the file was not exchanged by comparing the given value with the internally calculated

Parameters:

  • const char * _omdbfile
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getDimensions_hash

DYNARDO_MOPSOLVER_API int dmop_getDimensions_hash(const char *_omdbfile, int *_num_inputs, int *_num_responses, const char *_hash)

Parameters:

  • const char * _omdbfile
  • int * _num_inputs
  • int * _num_responses
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_solve_extrapolate_hash

DYNARDO_MOPSOLVER_API int dmop_solve_extrapolate_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double *_responses, int _extrapolate, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double * _responses
  • int _extrapolate
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_solve_extrapolate_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_solve_extrapolate_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double **_responses, int _extrapolate, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double ** _responses
  • int _extrapolate
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_solve_hash

DYNARDO_MOPSOLVER_API int dmop_solve_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double *_responses, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double * _responses
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_gradients_per_response_extrapolate_hash

DYNARDO_MOPSOLVER_API int dmop_gradients_per_response_extrapolate_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_gradients, int _extrapolate, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _gradients
  • int _extrapolate
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_gradients_per_response_hash

DYNARDO_MOPSOLVER_API int dmop_gradients_per_response_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_gradients, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _gradients
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_errors_per_response_extrapolate_hash

DYNARDO_MOPSOLVER_API int dmop_errors_per_response_extrapolate_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_errors, int _extrapolate, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _errors
  • int _extrapolate
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_errors_per_response_hash

DYNARDO_MOPSOLVER_API int dmop_errors_per_response_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_errors, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _errors
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_density_per_response_extrapolate_hash

DYNARDO_MOPSOLVER_API int dmop_density_per_response_extrapolate_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_density, unsigned int _size_density, int _extrapolate, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _density
  • unsigned int _size_density
  • int _extrapolate
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_density_per_response_hash

DYNARDO_MOPSOLVER_API int dmop_density_per_response_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, const char *_response_name, double *_density, unsigned int _size_density, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • const char * _response_name
  • double * _density
  • unsigned int _size_density
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_solve_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_solve_hash(const char *_omdbfile, unsigned int _num_designs, const double *_inputs, double **_responses, const char *_hash)

Parameters:

  • const char * _omdbfile
  • unsigned int _num_designs
  • const double * _inputs
  • double ** _responses
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputNames_hash

DYNARDO_MOPSOLVER_API int dmop_getInputNames_hash(const char *_omdbfile, char **_input_names, const char *_hash)

Parameters:

  • const char * _omdbfile
  • char ** _input_names
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputNamesWithDelimiter_hash

DYNARDO_MOPSOLVER_API int dmop_getInputNamesWithDelimiter_hash(const char *_omdbfile, char **_input_names, const char *_delimiter, const char *_hash)

Parameters:

  • const char * _omdbfile
  • char ** _input_names
  • const char * _delimiter
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getOutputNames_hash

DYNARDO_MOPSOLVER_API int dmop_getOutputNames_hash(const char *_omdbfile, char **_response_names, const char *_hash)

Parameters:

  • const char * _omdbfile
  • char ** _response_names
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getOutputNamesWithDelimiter_hash

DYNARDO_MOPSOLVER_API int dmop_getOutputNamesWithDelimiter_hash(const char *_omdbfile, char **_response_names, const char *_delimiter, const char *_hash)

Parameters:

  • const char * _omdbfile
  • char ** _response_names
  • const char * _delimiter
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputBounds_hash

DYNARDO_MOPSOLVER_API int dmop_getInputBounds_hash(const char *_omdbfile, double *_limits, const char *_hash)

Parameters:

  • const char * _omdbfile
  • double * _limits
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getInputBounds_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getInputBounds_hash(const char *_omdbfile, double **_limits, const char *_hash)

Parameters:

  • const char * _omdbfile
  • double ** _limits
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getInputBoundsPerParameter_hash

DYNARDO_MOPSOLVER_API int dmop_getInputBoundsPerParameter_hash(const char *_omdbfile, const char *_param_name, double *_limits, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double * _limits
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getInputBoundsPerParameter_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getInputBoundsPerParameter_hash(const char *_omdbfile, const char *_param_name, double **_limits, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double ** _limits
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getReferenceValuePerParameter_hash

DYNARDO_MOPSOLVER_API int dmop_getReferenceValuePerParameter_hash(const char *_omdbfile, const char *_param_name, double *_ref_val, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _param_name
  • double * _ref_val
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getCoPValuesPerResponse_hash

DYNARDO_MOPSOLVER_API int dmop_getCoPValuesPerResponse_hash(const char *_omdbfile, const char *_response_name, double *_cop_vals, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • double * _cop_vals
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getCoPValuesPerResponse_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getCoPValuesPerResponse_hash(const char *_omdbfile, const char *_response_name, double **_cop_vals, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • double ** _cop_vals
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_getFilteredStatesPerResponse_hash

DYNARDO_MOPSOLVER_API int dmop_getFilteredStatesPerResponse_hash(const char *_omdbfile, const char *_response_name, int *_filtered_states, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • int * _filtered_states
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_allocate_and_getFilteredStatesPerResponse_hash

DYNARDO_MOPSOLVER_API int dmop_allocate_and_getFilteredStatesPerResponse_hash(const char *_omdbfile, const char *_response_name, int **_filtered_states, const char *_hash)

Parameters:

  • const char * _omdbfile
  • const char * _response_name
  • int ** _filtered_states
  • const char * _hash

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_get_version_str

DYNARDO_MOPSOLVER_API const char * dmop_get_version_str()

get current api version info Returns:

version info as string

Return type: DYNARDO_MOPSOLVER_API const char *

Function dmop_cleanup

DYNARDO_MOPSOLVER_API int dmop_cleanup()

cleans-up all the memory allocated by the API, use this after you've finished using the API. Objects pointing to memory provided by this API are going to be invalidated. Returns:

zero

Return type: DYNARDO_MOPSOLVER_API int

Function dmop_set_paths_for_custom_interface

DYNARDO_MOPSOLVER_API int dmop_set_paths_for_custom_interface(const char *_program_path, const char *_python_home, const char *const *_python_paths, unsigned int _num_python_paths, const char *const *_script_paths, unsigned int _num_script_paths, const char *_oop_path)

set up custom interface application-wide

Parameters:

  • const char * _program_path
  • const char * _python_home
  • const char *const * _python_paths
  • unsigned int _num_python_paths
  • const char *const * _script_paths
  • unsigned int _num_script_paths
  • const char * _oop_path

Return type: DYNARDO_MOPSOLVER_API int

Source


#ifndef DYNARDO_MOPSOLVERAPI_H
#define DYNARDO_MOPSOLVERAPI_H

#include "mopsolver_api_shared.h"
DYNARDO_MOPSOLVER_API
int dmop_hasSurrogate(const char* _omdbfile);

DYNARDO_MOPSOLVER_API
int dmop_getDimensions(const char* _omdbfile,
    int *_num_inputs,
    int *_num_responses);

DYNARDO_MOPSOLVER_API
int dmop_solve_extrapolate(const char*  _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double *_responses,
    int _extrapolate);

DYNARDO_MOPSOLVER_API
int dmop_solve(const char*  _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double *_responses);

DYNARDO_MOPSOLVER_API
int dmop_gradients_per_response_extrapolate(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _gradients,
    int _extrapolate);

DYNARDO_MOPSOLVER_API
int dmop_gradients_per_response(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _gradients);

DYNARDO_MOPSOLVER_API
int dmop_errors_per_response_extrapolate(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _errors,
    int _extrapolate);

DYNARDO_MOPSOLVER_API
int dmop_errors_per_response(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _errors);

DYNARDO_MOPSOLVER_API
int dmop_density_per_response_extrapolate(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _density,
    unsigned int _size_density,
    int _extrapolate);

DYNARDO_MOPSOLVER_API
int dmop_density_per_response(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _density,
    unsigned int _size_density);

DYNARDO_MOPSOLVER_API
int dmop_getInputNames(const char* _omdbfile,
    char **_input_names);

DYNARDO_MOPSOLVER_API
int dmop_getInputNamesWithDelimiter(const char* _omdbfile,
    char **_input_names,
    const char * _delimiter);

DYNARDO_MOPSOLVER_API
int dmop_getOutputNames(const char* _omdbfile,
    char **_response_names);

DYNARDO_MOPSOLVER_API
int dmop_getOutputNamesWithDelimiter(const char* _omdbfile,
    char **_response_names,
    const char * _delimiter);

DYNARDO_MOPSOLVER_API
int dmop_getInputBounds(const char* _omdbfile,
    double *_limits);

DYNARDO_MOPSOLVER_API
int dmop_getInputBoundsPerParameter(const char* _omdbfile,
    const char* _param_name,
    double *_limits);

DYNARDO_MOPSOLVER_API
int dmop_getReferenceValuePerParameter(const char* _omdbfile,
    const char* _param_name,
    double * _ref_val);

DYNARDO_MOPSOLVER_API
int dmop_getCoPValuesPerResponse(const char* _omdbfile,
    const char* _response_name,
    double *_cop_vals);

DYNARDO_MOPSOLVER_API
int dmop_getFilteredStatesPerResponse(const char* _omdbfile,
    const char* _response_name,
    int *_filtered_states);

DYNARDO_MOPSOLVER_API
const char* dmop_getLastError();

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getInputBounds(const char* _omdbfile, double **_limits);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getInputBoundsPerParameter(const char* _omdbfile, const char* _param_name, double **_limits);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getCoPValuesPerResponse( const char* _omdbfile, const char* _response_name, double **_cop_vals);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getFilteredStatesPerResponse( const char* _omdbfile, const char* _response_name, int **_filtered_states);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_solve_extrapolate(const char*  _omdbfile,
                                         unsigned int _num_designs,
                                         const double *_inputs,
                                         double **_responses,
                                         int _extrapolate);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_solve(const char*  _omdbfile,
                             unsigned int _num_designs,
                             const double *_inputs,
                             double **_responses);

DYNARDO_MOPSOLVER_API
int dmop_hasSurrogate_hash(const char* _omdbfile, const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getDimensions_hash(const char* _omdbfile,
    int *_num_inputs,
    int *_num_responses,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_solve_extrapolate_hash(const char* _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double *_responses,
    int _extrapolate,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_solve_extrapolate_hash(const char* _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double **_responses,
    int _extrapolate,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_solve_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double *_responses,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_gradients_per_response_extrapolate_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _gradients,
    int _extrapolate,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_gradients_per_response_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _gradients,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_errors_per_response_extrapolate_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _errors,
    int _extrapolate,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_errors_per_response_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _errors,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_density_per_response_extrapolate_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _density,
    unsigned int _size_density,
    int _extrapolate,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_density_per_response_hash(
    const char* _omdbfile,
    unsigned int _num_designs,
    const double* _inputs,
    const char* _response_name,
    double* _density,
    unsigned int _size_density,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_solve_hash(const char* _omdbfile,
    unsigned int _num_designs,
    const double *_inputs,
    double **_responses,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getInputNames_hash(const char* _omdbfile,
    char **_input_names,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getInputNamesWithDelimiter_hash(const char* _omdbfile,
    char **_input_names,
    const char * _delimiter,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getOutputNames_hash(const char* _omdbfile,
    char **_response_names,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getOutputNamesWithDelimiter_hash(const char* _omdbfile,
    char **_response_names,
    const char * _delimiter,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getInputBounds_hash(const char* _omdbfile,
    double *_limits,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getInputBounds_hash(const char* _omdbfile,
    double **_limits,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getInputBoundsPerParameter_hash(const char* _omdbfile,
    const char* _param_name,
    double *_limits,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getInputBoundsPerParameter_hash(const char* _omdbfile,
    const char* _param_name,
    double **_limits,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getReferenceValuePerParameter_hash(const char* _omdbfile,
    const char* _param_name,
    double * _ref_val,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getCoPValuesPerResponse_hash(const char* _omdbfile,
    const char* _response_name,
    double *_cop_vals,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getCoPValuesPerResponse_hash(const char* _omdbfile,
    const char* _response_name,
    double **_cop_vals,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_getFilteredStatesPerResponse_hash(const char* _omdbfile,
    const char* _response_name,
    int *_filtered_states,
    const char* _hash);

DYNARDO_MOPSOLVER_API
int dmop_allocate_and_getFilteredStatesPerResponse_hash(const char* _omdbfile,
    const char* _response_name,
    int **_filtered_states,
    const char* _hash);

DYNARDO_MOPSOLVER_API
const char* dmop_get_version_str();

DYNARDO_MOPSOLVER_API
int dmop_cleanup();

DYNARDO_MOPSOLVER_API
int dmop_set_paths_for_custom_interface(const char* _program_path,
    const char* _python_home,
    const char* const* _python_paths,
    unsigned int _num_python_paths,
    const char* const* _script_paths,
    unsigned int _num_script_paths,
    const char* _oop_path);

#endif // DYNARDO_MOPSOLVERAPI_H

Connect with Ansys