ActivateModel method: OptInterface class

Syntax

ActivateModel(ModelID, SolverSettingID)

Description

The ActivateModel method designates the specified model and solver setting as active. The model and the solver are initialized and populated with data from the current analytic instance.

Note:

This method fails if the specified model (and by extension, one of its solver settings) is already active. If you want to activate a different solver setting for the same model, you must first deactivate the model.

See DeactivateModel method: OptInterface class.

Parameters

Parameter Description

ModelID

Specify the name of the optimization model you want to activate. This must be the name of one of the models associated with the analytic type definition.

SolverSettingID

Specify the name of the solver setting you want to activate. This is the name you specified for the solver setting in the analytic type definition.

Returns

This method returns a constant value. Valid values are:

Value Description

%OptInter_Success

Returned if method succeeds.

%OptInter_Fail

Returned if the solver fails to solve the problem.

Example

Local integer &result;
Local OptInterface &oi = CreateOptInterface();

&result = &oi.ActivateModel("QE_PSA_MODEL", "abc");