Skip to main content

I need to impose a time limit for AOA and  after the time limit  is reached,  the value of  the incumbent is returned.

MPOuterApprox::TimeLimit :=500;
GMPOuterApprox::IsConvex := 1;

GMPOuterApprox::DoOuterApproximation( GMPRO );

BestAOA     := GMP::Instance::GetObjective( GMPRO ) ;
ProgAOA := GMP::Solution::GetProgramStatus( GMPRO, 1 );

display BestAOA , ProgAOA; 

GMP::Instance::Delete( GMPRO );

 

in the progress window I can see a  value to the “best solution” is assigned and  the gap is around 30% but when the time limit is reached, the values assigned to BestAOA , and   ProgAOA are as follows: 

    bestAOA := na ;
    progAOA := 'IntermediateInfeasible' ;

I appreciate any help in advance. 

 

Hi @sara62 , The AOA algorithm solves several subproblems by alternating between solving an NLP problem and an MIP problem. The information shown in the Progress Window regarding the gap corresponds to solving the MIP problem. A feasible solution for the MIP problem does not automatically define a feasible solution for the original MINLP problem. (To obtain a feasible MINLP solution the NLP problem has to be solved in which the integer variables are fixed.)

Very likely AOA did not find a feasible solution when it hit the time limit. Note that if you specify

GMPOuterApprox::CreateStatusFile := 1;

then AOA will write a status file in the log sub-folder. That status file will tell you whether AOA has found a solution.

Note: If your problem is convex then you might want to try to call

GMPOuterApprox::DoConvexOuterApproximation( GMPRO );

because the algorithm used by that procedure is usually faster.


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator