- Procedure GMP::Solver::FreeEnvironment(solver)¶
GMP::Solver::FreeEnvironmentcan be used to free a solver environment. By using the procedure
GMP::Solver::InitializeEnvironmentyou can initialize a solver environment; by using this procedure you can free it again.
GMP::Solver::FreeEnvironmentcan 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 )
An element in the set
The procedure returns 1 on success, or 0 otherwise.
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.
MIPSolver := 'Gurobi 10.0'; ! First solve using normal solve statement. GMP::Solver::InitializeEnvironment( MIPSolver ); solve MP1; GMP::Solver::FreeEnvironment( MIPSolver ); ! Second solve using GMP solve. GMP::Solver::InitializeEnvironment( MIPSolver ); mgGMP := GMP::Instance::Generate( MP2 ); GMP::Instance::Solve( myGMP ); GMP::Solver::FreeEnvironment( MIPSolver );