# Optimization Transformation from Yalmip to Gurobi

This is a small part of an optimization of Variable P. One of the conditions of this optimization is that two samples within the horizon of 4 samples have to be constant. A solution with Yalmip Code is already available (see below). The goal of the project is to transform this Yalmip Code into fully running Gurobi Model Code (see: [url removed, login to view] and [url removed, login to view]:solving).

The current Matlab Code for Yalmip looks like this:

%Variables

Horizon = 4; %number of total samples

samp_const =2; %number of samples which should be held constant

Pmin = [150,100,100,100]; %Min Constraint

Pmax = [150,200,200,200]; %Max Constraint

P = sdpvar(1,Horizon,'full');

%Constraints

Constraints = []; %Initialize

for k = 1:Horizon

Constraints = [Constraints, Pmin(:,k) <= P(:,k) <= Pmax(:,k)];

end

%Objective Function

Objective = 0; %Initialize

for k = 2:Horizon

range = k:min(Horizon, k+samp_const-1); % indices where no further rate changes is allowed

moves_1 = sum(ceil( abs(P(1,range)-P(1,range-1))./2000 )); % count rate changes in range

Objective = Objective + ...

Constweight*floor(0.81+moves_1/10); % constraint: maximal 1 rate change in 2 (samp_const) samples

end

options = sdpsettings('solver','gurobi');

result = optimize(Constraints,Objective,options);

Gurobi License needed in order to test the code
Experience with Yalmip

Compétences : Algorithme, Matlab and Mathematica

Concernant l'employeur :
( 0 commentaires ) Austria

N° du projet : #12696207

## 9 freelance ont fait une offre moyenne de 200 € pour ce travail

matlabxperts

Hello, I am Ammar. It is to inform you that we have worked on Matlab projects related to Electrical Engineering, Digital Communications, Artificial Intelligence, Video and Image Processing and Radar systems etc. Please Plus

250 € EUR en 3 jours
(73 Commentaires)
6.3
147 € EUR en 3 jours
(65 Commentaires)
6.4
RSRCH

Hello, I am a PhD student studying on Artifical Intelligence and Neural Networks, Statistical and Adaptive Signal Processing and quite strong in MATLAB. I did some similar projects recently. Thanks RSRCH

666 € EUR en 30 jours
(26 Commentaires)
5.3
100 € EUR en 3 jours
(37 Commentaires)
4.8
earthat

HI I am experienced developer in MATLAB and completed various projects in diverse domains. I can help you out in your work. You can check out my sample previous work here [url removed, login to view] Plus

222 € EUR en 3 jours
(14 Commentaires)
4.4
200 € EUR en 1 jour
(15 Commentaires)
4.2
155 € EUR en 3 jours
(7 Commentaires)
3.6
saied2017

Hello dear ,I'm mohamed saeed, aeronautical engineer and matlab expert. I see your project and I'm able to do it. Best regards . Mohamed saeed

100 € EUR en 0 jours
(7 Commentaires)
2.8
155 € EUR en 3 jours
(2 Commentaires)
2.4
feixiaolong

Hi.I am a control engineer. I might do your project buy i need some days.I used to work with yalmip for my assignment at my university. Cheers!

133 € EUR en 5 jours
(2 Commentaires)
1.9
tudormth2008

[url removed, login to view] abilities from [url removed, login to view] and experience with visual studio 2012 and 2015 ….androi Plus

200 € EUR en 0 jours
(3 Commentaires)
1.5
ExpertzWorld

I’m a writer, an idea guy, and a difference-maker. I write with passion, discernment, perception, credibility, and punctuality which make me come up with the best result ever. Also, I deliver great results with a p Plus

30 € EUR en 3 jours
(0 Commentaires)
0.0
astrasoft3

Dear Client, Greeting of the day ahead !!! Thanks for providing us opportunity to place bid over the project and communicate with you. I am a serious bidder here and i have already worked on a similar project befor Plus

200 € EUR en 6 jours
(0 Commentaires)
0.0