### nonlinear problem

Posted:

**Mon Apr 26, 2021 6:08 pm**Hello friends, i have to make this problem, i have errors while doing the equations. can you halp me out?

An airline operates the San Francisco-Los Angeles route. The demand for each flight clearly has two distinct components. There is a demand for business, with a price that responds to the curve p = 600-4q and a demand for leisure: p = 450-q. The costs of the company are 5 + 3q, where q represents the total number of seats sold.

1) Analyze the model to be solved. Define (by hand) the parameters, variables and equations of the model. What kind of model is it, linear or non-linear? Non-linear

2) Program the model in GAMS. How many sets do we have? Solve it. How many seats will the company sell in each class and at what price? Calculate the elasticity of each of the demands at this point and export them to an excel file.

3) How will the solution change if the plane has a maximum capacity of 260 seats?

4) Program a routine that allows you to solve the model for business demands p = a * (600-4q), where a takes the values from 1 to 1.5 in increments of 0.05. Export the results of the quantities, prices and benefits in each case. 11 times res optimization /01*11/

$title AIRLINE COMPANY PROBLEM

SET

i 'flight' / business, leisure /

Parameter

a(i)

/ business 600

leisure 450 /

b(i)

/ business -4

leisure -1 /;

VARIABLE

cost

price(i) "p1,p2"

quantity(i) "q1,q2"

profit

income(i)

Scalar f "numbers of seats" / 260 /;

Positive Variable price,quantity;

Equation

eqcost

eqprofit

eqprice(i)

eqincome(i)

eqquantity(i)

eqcost.. =e= sum(i, quantity(i),*3+5));

eqprice(i).. a(i)-b(i)*quantity(i) =e=price(i);

eqquantity(i).. sum (5/3 ,cost(i)/3)), =e=;

eqincome(i).. price(i)*q(i), =e=income(i);

eqprofit sum (i,income(i)), -cost, =e=profit;

Model airline / all /;

solve airline using lp minimizing cost;

An airline operates the San Francisco-Los Angeles route. The demand for each flight clearly has two distinct components. There is a demand for business, with a price that responds to the curve p = 600-4q and a demand for leisure: p = 450-q. The costs of the company are 5 + 3q, where q represents the total number of seats sold.

1) Analyze the model to be solved. Define (by hand) the parameters, variables and equations of the model. What kind of model is it, linear or non-linear? Non-linear

2) Program the model in GAMS. How many sets do we have? Solve it. How many seats will the company sell in each class and at what price? Calculate the elasticity of each of the demands at this point and export them to an excel file.

3) How will the solution change if the plane has a maximum capacity of 260 seats?

4) Program a routine that allows you to solve the model for business demands p = a * (600-4q), where a takes the values from 1 to 1.5 in increments of 0.05. Export the results of the quantities, prices and benefits in each case. 11 times res optimization /01*11/

$title AIRLINE COMPANY PROBLEM

SET

i 'flight' / business, leisure /

Parameter

a(i)

/ business 600

leisure 450 /

b(i)

/ business -4

leisure -1 /;

VARIABLE

cost

price(i) "p1,p2"

quantity(i) "q1,q2"

profit

income(i)

Scalar f "numbers of seats" / 260 /;

Positive Variable price,quantity;

Equation

eqcost

eqprofit

eqprice(i)

eqincome(i)

eqquantity(i)

eqcost.. =e= sum(i, quantity(i),*3+5));

eqprice(i).. a(i)-b(i)*quantity(i) =e=price(i);

eqquantity(i).. sum (5/3 ,cost(i)/3)), =e=;

eqincome(i).. price(i)*q(i), =e=income(i);

eqprofit sum (i,income(i)), -cost, =e=profit;

Model airline / all /;

solve airline using lp minimizing cost;