Dear professor Lofberg,
First of all, thank You for your effort in
developing and sharing such useful software.
After reading about YALMIP in one of the papers I have decided to try and test it myself.
The problems I am analysing are related to power system optimization. They are based on sequential (nonlinear, second order) load flow calculations (Newton-Raphson method), and incorporate both equality and non-equality constraints (linear and nonlinear). I have already written a substantial amount of Matlab code and successfully applied it in solving such problems. For this purpose, I have used both interior point (fmincon) and genetic algorithm (ga) optimization.
My initial idea was to try and merge my existing code with YALMIP solver in order to later possibly exploit some of YALMIP features. However, my initial efforts have, so far, proven to be unsuccessful.
fitnessfcn=@(x)fitnessNC(x,IN,VAR); // Complex objective function where x is a decision variable vector, and IN and VAR contain all the information needed for the calculation
constraintfcn=@(x)icsetcontraintSA(x,IN,VAR); // Set of constraint functions
sdpvar x;
assign(x,1.0);
ops
= sdpsettings('solver','fmincon', 'usex0',1);
objective=fitnessNC(x,IN,VAR);
F = [0.8 <= x <= 1.2];
sol = optimize(F, objective, ops);
First-order Norm of
Iter F-count f(x) Feasibility
optimality step
0
1 0.000000e+00 0.000e+00
0.000e+00
Initial
point is a local minimum that satisfies the constraints.
Optimization
completed because at the initial point, the objective function is
non-decreasing
in
feasible directions to within the selected value of the optimality tolerance,
and
constraints
are satisfied to within the selected value of the constraint tolerance.
<stopping
criteria details>
Optimization
completed: The final point is the initial point.
The
first-order optimality measure, 0.000000e+00, is less than
options.OptimalityTolerance =
1.000000e-06,
and the maximum constraint violation, 0.000000e+00, is less than
options.ConstraintTolerance
= 1.000000e-06.
Optimization
Metric
Options
first-order
optimality = 0.00e+00 OptimalityTolerance = 1e-06 (selected)
max(constraint violation) = 0.00e+00
ConstraintTolerance = 1e-06
(selected)
I was hoping if You could give me some advice on this subject on how to implement YALMIP to the existing code initially used with default Matlab optimization solvers.
Sorry for the long post, and for (possibly) stupid question. Thank You for
every advice You could give me.
Best regards