# 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

Umiejętności: Algorytmy, Matlab i Mathematica

O pracodawcy:
( 0 ocen ) Austria

Numer ID Projektu: #12696207

## 8 freelancerów złożyło ofertę na kwotę €142 do tego projektu

€155 EUR w ciągu 3 dni
(57 Oceny)
6.8
€147 EUR w ciągu 3 dni
(78 Oceny)
6.6
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 Więcej

€250 EUR w ciągu 3 dni
(94 Oceny)
6.6
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 [login to view URL] Więcej

€222 EUR w ciągu 3 dni
(28 Oceny)
5.4
€100 EUR w ciągu 3 dni
(47 Oceny)
5.2
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 w ciągu 0 dni
(31 Oceny)
4.9
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 Więcej

€30 EUR w ciągu 3 dni
(12 Oceny)
4.3
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 w ciągu 5 dni
(2 Oceny)
1.9