Skip to main content

optiSLang MOPSolver API 2024 R1

/home/lgraenin/develop/optiSLang/protos/mopsolver/mopsolver_api2_shared.h File Reference

Last update: 10.07.2023
#include "mopsolver_api_shared.h"

Go to the source code of this file.

Enumerations

enum  DMOP2_SOLVE_FLAG {
  SOLVE_EXTRAPOLATE = 1 , SOLVE_RESPONSES = 2 , SOLVE_CRITERIA = 4 , SOLVE_DENSITIES = 8 ,
  SOLVE_ERRORS = 16
}
 
enum  DMOP2_DIMENSION_FLAG { DIM_INPUTS = 1 , DIM_RESPONSES = 2 , DIM_CRITERIA = 4 }
 
enum  DMOP2_NAME_FLAG { NAME_INPUTS = 1 , NAME_RESPONSES = 2 , NAME_CRITERIA = 4 }
 
enum  DMOP2_PER_RESPONSE_FLAG { RESP_EXTRAPOLATE = 1 , RESP_GRADIENTS = 2 , RESP_DENSITIES = 4 , RESP_ERRORS = 8 }
 
enum  DMOP2_RETURN_CODES {
  dmop2_success = 0 , dmop2_error = 1 , dmop2_exception_occured = 2 , dmop2_custom_interface_not_enabled = 4 ,
  dmop2_wrong_input_argument = 41
}
 

Functions

DYNARDO_MOPSOLVER_API const char * dmop2_getLastError ()
 
DYNARDO_MOPSOLVER_API int dmop2_free (void *_pointer)
 
DYNARDO_MOPSOLVER_API const char * dmop2_get_version_str ()
 
DYNARDO_MOPSOLVER_API int dmop2_cleanup ()
 
DYNARDO_MOPSOLVER_API int dmop2_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)
 

Detailed Description

Version
$Rev$

Enumeration Type Documentation

◆ DMOP2_DIMENSION_FLAG

Enum containing the flags to control the behaviour of the getDimensions method

Enumerator
DIM_INPUTS 

if set, the number of inputs is written to the output array

DIM_RESPONSES 

if set, the number of responses is written to the output array

DIM_CRITERIA 

if set, the number of criteria is written to the output array

◆ DMOP2_NAME_FLAG

Enum containing the flags to control the behaviour of the getNames method

Enumerator
NAME_INPUTS 

if set, the names of the inputs are returned

NAME_RESPONSES 

if set, the names of the outputs are returned

NAME_CRITERIA 

if set, the names of the criteria are returned

◆ DMOP2_PER_RESPONSE_FLAG

Enum containing the flags to control the behaviour of the get_per_response method

Enumerator
RESP_EXTRAPOLATE 

if set, extrapolation is activated

RESP_GRADIENTS 

if set, the gradient values of the response are written to the output array

RESP_DENSITIES 

if set, the density value of the response is written to the output array

RESP_ERRORS 

if set, the errors of the response are written to the output array

◆ DMOP2_RETURN_CODES

Enum containing the return codes used by the dmop2 methods, similar to the mop_api.h codes

◆ DMOP2_SOLVE_FLAG

Enum containing the flags to control the behaviour of the solve method

Enumerator
SOLVE_EXTRAPOLATE 

if set, extrapolation is activated

SOLVE_RESPONSES 

if set, the response values are written to the output array

SOLVE_CRITERIA 

if set, the criteria values are written to the output array

SOLVE_DENSITIES 

if set, the density values are written to the output array

SOLVE_ERRORS 

if set, the error values (CoP, RMSE, error, absolute error) are written to the output array

Function Documentation

◆ dmop2_cleanup()

DYNARDO_MOPSOLVER_API int dmop2_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

◆ dmop2_free()

DYNARDO_MOPSOLVER_API int dmop2_free ( void *  _pointer)

Frees the memory allocated at the specified pointer

Parameters
[in]_pointerPointer to the memory that should be freed
Returns
zero if the memory was successfully freed

◆ dmop2_get_version_str()

DYNARDO_MOPSOLVER_API const char * dmop2_get_version_str ( )

Retrieves the current OptiSLang version and returns it as a string

Returns
String containing the current OptiSLang version

◆ dmop2_getLastError()

DYNARDO_MOPSOLVER_API const char * dmop2_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.

◆ dmop2_set_paths_for_custom_interface()

DYNARDO_MOPSOLVER_API int dmop2_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