-
Procedure
GMP::Solver::
FreeEnvironment
(solver)¶
GMP::Solver::FreeEnvironment¶
The procedure
GMP::Solver::FreeEnvironment
can be used to free a
solver environment. By using the procedure
GMP::Solver::InitializeEnvironment
you can initialize a solver
environment; by using this procedure you can free it again.Normally AIMMS initializes solver environments at startup and frees
them when it is closed. The procodures
GMP::Solver::InitializeEnvironment
and
GMP::Solver::FreeEnvironment
can be used to initialize and free a
solver environment multiple times inside one AIMMS sesstion. Both
procedures are typically used for solvers running on a remote server
or a cloud system.GMP::Solver::FreeEnvironment(
solver ! (input) a solver
)
Arguments¶
- solver
An element in the set
AllSolvers
.
Return Value¶
The procedure returns 1 on success, or 0 otherwise.
Note
This procedure can be used in combination with a normal solve statement.
This procedure is only supported by GUROBI.
This procedure cannot be called inside a solver callback procedure.
This procedure cannot be called if one of the solver sessions is asynchronous executing.
Example¶
GMP::Solver::InitializeEnvironment( 'Gurobi 9.0' ); solve MP1; GMP::Solver::FreeEnvironment( 'Gurobi 9.0' ); GMP::Solver::InitializeEnvironment( 'Gurobi 9.0' ); mgGMP := GMP::Instance::Generate( MP2 ); GMP::Instance::Solve( myGMP ); GMP::Solver::FreeEnvironment( 'Gurobi 9.0' );
See also
The procedure GMP::Solver::InitializeEnvironment
.