Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Use MATLAB Optimization Commands (linprog, quadprog, or fmincon).) The regular

ID: 3677300 • Letter: #

Question

(Use MATLAB Optimization Commands (linprog, quadprog, or fmincon).) The regular air fare between Boston and San Francisco is $500. An airline using planes with a capacity of 300 passengers on this route observes that they fly with an average of 180 passengers. Market research tells the airline managers that each $5 fare reduction would attract, on average, 3 more passengers for each flight. Calculate the fare that maximizes airline’s revenue. P.S: Put commands at the beginning of your Matlab code that explains what are the design variables and how you found the cost function and constraints. Also explain how you decide the category of the optimization problem.

Question 2 (Use MATLAB Optimization Commands (linprog, quadprog, or fmincon).) The regular air fare between Boston and San Francisco is $500. An airline using planes with a capacity of 300 passengers on this route observes that they fly with an average of 180 passengers. Market research tells the airlineâÄŽs managers that each $5 fare reduction would attract, on average, 3 more passengers for each flight. Calculate the fare that maximizes airline's revenue. P.S: Put commands at the beginning of your Matlab code that explains what are the design variables and how you found the cost function and constraints. Also explain how you decide the category of the optimization problem

Explanation / Answer

function rateflight(nRlz,sz)
Simulation of AAA patients.
Assume 2% San Francisco
n = nRlz * sz; %no of passenger
index = randperm(n); % Boston
for i=1:nRlz
   a = sz*(nRlz - 1) + 1;
   b = sz*(nRlz);
   sample = index(a:b);
  rate = 0;
   for j=1:sz
       pt = sample(j);
       if(pt <=(0.1*n));
           prob = 0.6;
       elseif(pt > (0.1*n) && pt <=(0.35*n));
           prob = 0.3;
       else(pt > (0.35*n));
           prob = 0.1;
       end
       prob;
       ptdoa = binornd(1,prob);
    end
   fprintf('Iteration number %d completed. ',i);