Login
Login

Reply To: Constrained Optimization

Home 21090308 Forums Numerical Method Optimization Constrained Optimization Reply To: Constrained Optimization

#2824
ogreyesp
Member

Hello,

I’ have defined an objetive function (it has some complexity) and 4 linear constraints (they are very simple). So, I have put the following code, as same as the example that comes with the SuanShu library:

///
double gamma = 1e30;
double epsilon = 1e-8;
int maxIterations = 200;

PenaltyMethodMinimizer optim = new PenaltyMethodMinimizer(
PenaltyMethodMinimizer.DEFAULT_PENALTY_FUNCTION_FACTORY,
gamma,
new BFGSMinimizer(false, epsilon, maxIterations));

IterativeMinimizer minimizer = optim.solve(problem);

Vector xmin = minimizer.search(new DenseVector(q));

//////////

The problem that i have is the following: The BFGSMinimizer never outs from the 1 iteration, i.e it still executing in the 1st iteration of the BFGS algorithm and does’nt stop. I printed the value of the defined objetive function each time that it is evaluated for BFGS and for example this is the continiusly stream that appears in the screen:

16079.194741736539
16079.194729964249
16079.194738279763
16079.194733421027
16079.194726798403
16079.194744902386
16079.194737157148
16079.19473454364
….
…..
….
…. an go on.

Anyone have an idea of why the BFGS algorithm does not stop.

Best regards,

Oscar