Skip to main content
Solved

Problem in retrieving the objective value in AOA after a time limit is reached

  • November 1, 2021
  • 1 reply
  • 55 views

Forum|alt.badge.img+1

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. 

 

Best answer by Marcel Hunting

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.

1 reply

Marcel Hunting
AIMMSian
Forum|alt.badge.img+4
  • AIMMSian
  • 258 replies
  • Answer
  • November 1, 2021

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.



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

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