8.6.3. String parameters

String parameters are mainly used to set related parameters in Remote computing service. These string parameters do not need to be set if a local solver is used. When the remote computing service is used, these parameters do not have a default value. Note that if "Remote/File/Path" is used to specify a path for storing intermediate files, "Remote/File/Param", "Remote/File/Model", and "Remote/File/Soln" do not need to be specified.

C API Parameter

Parameter

Description

MDO_STR_PARAM_REMOTE_TOKEN

“Remote/Token”

The token in the remote computing service.

MDO_STR_PARAM_REMOTE_DESC

“Remote/Desc”

The description of the optimization problem in the remote computing service.

MDO_STR_PARAM_REMOTE_SERVER

“Remote/Server”

The server address in the remote computing service.

MDO_STR_PARAM_REMOTE_FILE_MODEL

“Remote/File/Model”

The name of the serialized model file in the remote computing service.

MDO_STR_PARAM_REMOTE_FILE_PARAM

“Remote/File/Param”

The name of the serialized parameter file in the remote computing service.

MDO_STR_PARAM_REMOTE_FILE_SOLN

“Remote/File/Soln”

The name of the serialized solution file in the remote computing service.

MDO_STR_PARAM_REMOTE_FILE_PATH

“Remote/File/Path”

The path for storing the model and parameter files in the remote computing service.

In addition, the parameters of C++、Java、Python API are in the namespace of MDO_STR_PARAM

8.6.3.1. “Remote/Token”

A string parameter that specifies the token in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/Token", token);

C++

model.setStrParam("Remote/Token", token);

Python

model.set_str_param("Remote/Token", token)

8.6.3.2. “Remote/Desc”

A string parameter that specifies the description of the optimization problem in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/Desc", desc);

C++

model.setStrParam("Remote/Desc", desc);

Python

model.set_str_param("Remote/Desc", desc)

8.6.3.3. “Remote/Server”

A string parameter that specifies the server address in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/Server", server);

C++

model.setStrParam("Remote/Server", server);

Python

model.set_str_param("Remote/Server", server)

8.6.3.4. “Remote/File/Model”

A string parameter that specifies the name of the serialized model file in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/File/Model", model_file);

C++

model.setStrParam("Remote/File/Model", model_file);

Python

model.set_str_param("Remote/File/Model", model_file)

8.6.3.5. “Remote/File/Param”

A string parameter that specifies the name of the serialized parameter file in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/File/Param", param_file);

C++

model.setStrParam("Remote/File/Param", param_file);

Python

model.set_str_param("Remote/File/Param", param_file)

8.6.3.6. “Remote/File/Soln”

A string parameter that specifies the name of the serialized solution file in the remote computing service.

Examples

C

Mdo_setStrParam(model, "Remote/File/Soln", soln_file);

C++

model.setStrParam("Remote/File/Soln", soln_file);

Python

model.set_str_param("Remote/File/Soln", soln_file)

8.6.3.7. “Remote/File/Path”

A string parameter that specifies the path for storing the model and parameter files in the remote computing service.

Note

If none of the "Remote/File/Param", "Remote/File/Model", "Remote/File/Soln", and "Remote/File/Path" parameters is specified when the remote computing service is called, "Remote/File/Path" is set to ./tmp/ by default, and a corresponding folder is created.

Examples

C

Mdo_setStrParam(model, "Remote/File/Path", path);

C++

model.setStrParam("Remote/File/Path", path);

Python

model.set_str_param("Remote/File/Path", path)