Iop - Problema 3.pdf

  • Uploaded by: Greg Javier Saavedra
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Iop - Problema 3.pdf as PDF for free.

More details

  • Words: 1,699
  • Pages: 29
Problema 3: sets: taller/1..3/:capacidad,costo; producto/1..4/:demanda; TxP(taller,producto):tiempo,x; endsets

data: capacidad=

160

160

160;

costo= 89

81

84;

demanda=

80

50

40

40;

tiempo=

32

151

72

118

39

147

61

126

46

155

57

121;

enddata

min=@sum(TxP(i,j): costo(i) * (tiempo(i,j)/60) * x(i,j));

@for(taller(i): @sum(producto(j): tiempo(i,j) * x(i,j)) <= capacidad(i)*60);

@for(producto(j): @sum(taller(i): x(i,j)) >= demanda(j));

Solución 3:

Global optimal solution found. Objective value:

23687.83

Infeasibilities:

0.000000

Total solver iterations:

4

Elapsed runtime seconds:

0.15

Model Class:

LP

Total variables:

12

Nonlinear variables:

0

Integer variables:

0

Total constraints:

8

Nonlinear constraints:

Total nonzeros:

0

36

Nonlinear nonzeros:

Variable

0

Value

Reduced Cost

CAPACIDAD( 1)

160.0000

0.000000

CAPACIDAD( 2)

160.0000

0.000000

CAPACIDAD( 3)

160.0000

0.000000

COSTO( 1)

89.00000

0.000000

COSTO( 2)

81.00000

0.000000

COSTO( 3)

84.00000

0.000000

DEMANDA( 1)

80.00000

0.000000

DEMANDA( 2)

50.00000

0.000000

DEMANDA( 3)

40.00000

0.000000

DEMANDA( 4)

40.00000

0.000000

TIEMPO( 1, 1)

32.00000

0.000000

TIEMPO( 1, 2)

151.0000

0.000000

TIEMPO( 1, 3)

72.00000

0.000000

TIEMPO( 1, 4)

118.0000

0.000000

TIEMPO( 2, 1)

39.00000

0.000000

TIEMPO( 2, 2)

147.0000

0.000000

TIEMPO( 2, 3)

61.00000

0.000000

TIEMPO( 2, 4)

126.0000

0.000000

TIEMPO( 3, 1)

46.00000

0.000000

TIEMPO( 3, 2)

155.0000

0.000000

TIEMPO( 3, 3)

57.00000

0.000000

TIEMPO( 3, 4)

121.0000

0.000000

X( 1, 1)

80.00000

0.000000

X( 1, 2)

0.000000

25.53333

X( 1, 3)

0.000000

27.00000

X( 1, 4)

0.000000

5.633333

X( 2, 1)

0.000000

5.183333

X( 2, 2)

50.00000

0.000000

X( 2, 3)

0.000000

2.550000

X( 2, 4)

0.000000

0.7000000

X( 3, 1)

0.000000

16.93333

X( 3, 2)

0.000000

18.55000

X( 3, 3)

40.00000

0.000000

X( 3, 4)

40.00000

0.000000

Row Slack or Surplus

Dual Price

1

23687.83

-1.000000

2

7040.000

0.000000

3

2250.000

0.000000

4

2480.000

0.000000

5

0.000000

-47.46667

6

0.000000

-198.4500

7

0.000000

-79.80000

8

0.000000

-169.4000

Problema 4: sets: bloque/1..3/:demanda,utilidad,x; material/1..5/:disponibilidad; BxM(bloque,material):consumo; endsets

data: demanda=

100

100

100;

utilidad=

6

8

9;

disponibilidad= 12000 8000

600

400

300;

consumo=

1.50

0.80

0.40

0.30

0.004

1.20

0.60

0.60

0.40

0.002

0.80

1.00

0.80

0.50

0.010;

enddata

max=@sum(bloque(i):utilidad(i)*x(i));

@for(material(j): @sum(bloque(i):consumo(i,j)*x(i)) <= disponibilidad(j));

@for(bloque(i): x(i) >= demanda(i));

Solución 4: Global optimal solution found. Objective value:

7900.000

Infeasibilities:

0.000000

Total solver iterations:

2

Elapsed runtime seconds:

0.05

Model Class:

LP

Total variables:

3

Nonlinear variables:

0

Integer variables:

0

Total constraints:

9

Nonlinear constraints:

Total nonzeros:

0

21

Nonlinear nonzeros:

Variable

0

Value

Reduced Cost

DEMANDA( 1)

100.0000

0.000000

DEMANDA( 2)

100.0000

0.000000

DEMANDA( 3)

100.0000

0.000000

UTILIDAD( 1)

6.000000

0.000000

UTILIDAD( 2)

8.000000

0.000000

UTILIDAD( 3)

9.000000

0.000000

X( 1)

100.0000

0.000000

X( 2)

800.0000

0.000000

X( 3)

100.0000

0.000000

DISPONIBILIDAD( 1)

12000.00

0.000000

DISPONIBILIDAD( 2)

8000.000

0.000000

DISPONIBILIDAD( 3)

600.0000

0.000000

DISPONIBILIDAD( 4)

400.0000

0.000000

DISPONIBILIDAD( 5)

300.0000

0.000000

CONSUMO( 1, 1)

1.500000

0.000000

CONSUMO( 1, 2)

0.8000000

0.000000

CONSUMO( 1, 3)

0.4000000

0.000000

CONSUMO( 1, 4)

0.3000000

0.000000

CONSUMO( 1, 5)

0.4000000E-02

CONSUMO( 2, 1)

1.200000

0.000000

CONSUMO( 2, 2)

0.6000000

0.000000

CONSUMO( 2, 3)

0.6000000

0.000000

CONSUMO( 2, 4)

0.4000000

0.000000

CONSUMO( 2, 5)

0.2000000E-02

CONSUMO( 3, 1)

0.8000000

0.000000

CONSUMO( 3, 2)

1.000000

0.000000

CONSUMO( 3, 3)

0.8000000

0.000000

CONSUMO( 3, 4)

0.5000000

0.000000

CONSUMO( 3, 5)

0.1000000E-01

Row Slack or Surplus

0.000000

0.000000

0.000000

Dual Price

1

7900.000

1.000000

2

10810.00

0.000000

3

7340.000

0.000000

4

0.000000

0.000000

5

0.000000

20.00000

6

297.0000

0.000000

7

0.000000

0.000000

8

700.0000

0.000000

9

0.000000

-1.000000

Problema 5: sets: fuente/1..5/:capacidad,costo,x; contaminante/1..4/:maximo; FxC(fuente,contaminante):conta; endsets

data: capacidad=

45000 15000 45000 24000 48000;

costo= 6.0

5.5

maximo=

75000 60000 30000 25000;

conta= 1.5

1.2

0.7

0.4

0.2

0.5

0

0

0

0.1

0.2

0.7

0

0

0

0

0.4

0.8

0.5

0.1;

4.5

enddata

min=@sum(fuente(i):costo(i)*x(i));

@sum(fuente(i):x(i)) >= 60000;

@for(fuente(i): x(i) <= capacidad(i));

x(3) = 0.2 * @sum(fuente(i):x(i));

x(1) >= 0.8 * capacidad(1);

5.0

7.0;

x(2) >= 0.3 * x(5);

@for(contaminante(j): @sum(fuente(i): conta(i,j) * x(i))<= maximo(j));

Solución 5: Global optimal solution found. Objective value:

330000.0

Infeasibilities:

0.000000

Total solver iterations:

3

Elapsed runtime seconds:

0.06

Model Class:

LP

Total variables:

5

Nonlinear variables:

0

Integer variables:

0

Total constraints:

14

Nonlinear constraints:

Total nonzeros:

0

36

Nonlinear nonzeros:

Variable

0

Value

Reduced Cost

CAPACIDAD( 1)

45000.00

0.000000

CAPACIDAD( 2)

15000.00

0.000000

CAPACIDAD( 3)

45000.00

0.000000

CAPACIDAD( 4)

24000.00

0.000000

CAPACIDAD( 5)

48000.00

0.000000

COSTO( 1)

6.000000

0.000000

COSTO( 2)

5.500000

0.000000

COSTO( 3)

4.500000

0.000000

COSTO( 4)

5.000000

0.000000

COSTO( 5)

7.000000

0.000000

X( 1)

36000.00

0.000000

X( 2)

0.000000

0.5000000

X( 3)

12000.00

0.000000

X( 4)

12000.00

0.000000

X( 5)

0.000000

2.000000

MAXIMO( 1)

75000.00

0.000000

MAXIMO( 2)

60000.00

0.000000

MAXIMO( 3)

30000.00

0.000000

MAXIMO( 4)

25000.00

0.000000

CONTA( 1, 1)

1.500000

0.000000

CONTA( 1, 2)

1.200000

0.000000

CONTA( 1, 3)

0.7000000

0.000000

CONTA( 1, 4)

0.4000000

0.000000

CONTA( 2, 1)

0.2000000

0.000000

CONTA( 2, 2)

0.5000000

0.000000

CONTA( 2, 3)

0.000000

0.000000

CONTA( 2, 4)

0.000000

0.000000

CONTA( 3, 1)

0.000000

0.000000

CONTA( 3, 2)

0.1000000

0.000000

CONTA( 3, 3)

0.2000000

0.000000

CONTA( 3, 4)

0.7000000

0.000000

CONTA( 4, 1)

0.000000

0.000000

CONTA( 4, 2)

0.000000

0.000000

CONTA( 4, 3)

0.000000

0.000000

CONTA( 4, 4)

0.000000

0.000000

CONTA( 5, 1)

0.4000000

0.000000

CONTA( 5, 2)

0.8000000

0.000000

CONTA( 5, 3)

0.5000000

0.000000

CONTA( 5, 4)

0.1000000

0.000000

Row Slack or Surplus

Dual Price

1

330000.0

-1.000000

2

0.000000

-4.900000

3

9000.000

0.000000

4

15000.00

0.000000

5

33000.00

0.000000

6

12000.00

0.000000

7

48000.00

0.000000

8

0.000000

0.5000000

9

0.000000

-1.000000

10

0.000000

0.000000

11

21000.00

0.000000

12

15600.00

0.000000

13

2400.000

0.000000

14

2200.000

0.000000

Problema 10: sets: planta/1,2/:abastecimiento; almacen/1..3/: precio, ventas; PxA(planta,almacen):costo,x; endsets

data: abastecimiento=

100

200;

ventas=

150

200

350;

precio=

12

14

15;

costo=

8

10

12

7

9

11;

enddata

Max = @sum(almacen(j): precio(j) * @sum(planta(i):x(i,j))) - @sum(PxA(i,j): costo(i,j) * x(i,j));

@for(planta(i): @sum(almacen(j):x(i,j))<= abastecimiento(i)); @for(almacen(j): @sum(planta(i):x(i,j))<=ventas(j));

Solución 10: Global optimal solution found. Objective value:

1400.000

Infeasibilities:

0.000000

Total solver iterations:

3

Elapsed runtime seconds:

0.22

Model Class:

LP

Total variables:

6

Nonlinear variables:

0

Integer variables:

0

Total constraints:

6

Nonlinear constraints:

Total nonzeros:

0

18

Nonlinear nonzeros:

Variable

0

Value

Reduced Cost

ABASTECIMIENTO( 1)

100.0000

0.000000

ABASTECIMIENTO( 2)

200.0000

0.000000

PRECIO( 1)

12.00000

0.000000

PRECIO( 2)

14.00000

0.000000

PRECIO( 3)

15.00000

0.000000

VENTAS( 1)

150.0000

0.000000

VENTAS( 2)

200.0000

0.000000

VENTAS( 3)

350.0000

0.000000

COSTO( 1, 1)

8.000000

0.000000

COSTO( 1, 2)

10.00000

0.000000

COSTO( 1, 3)

12.00000

0.000000

COSTO( 2, 1)

7.000000

0.000000

COSTO( 2, 2)

9.000000

0.000000

COSTO( 2, 3)

11.00000

0.000000

X( 1, 1)

100.0000

0.000000

X( 1, 2)

0.000000

0.000000

X( 1, 3)

0.000000

1.000000

X( 2, 1)

0.000000

0.000000

X( 2, 2)

200.0000

0.000000

X( 2, 3)

0.000000

1.000000

Row Slack or Surplus

Dual Price

1

1400.000

1.000000

2

0.000000

4.000000

3

0.000000

5.000000

4

50.00000

0.000000

5

0.000000

0.000000

6

350.0000

0.000000

Problema 11: sets: mina/1,2/:capacidad; planta/1,2/:capacidad_P, costo_P; tienda/1..3/:demanda; MxP(mina,planta):x, costo_MP; PxT(planta,tienda):y, costo_T; endsets

data: capacidad=

320

capacidad_P= 500

500;

costo_P=

22

18;

demanda=

200

240

costo_MP=

6

8

7

10;

13

17

20

19

22

21;

costo_T=

450;

330;

enddata

Min=

@sum(MxP(i,j):costo_MP(i,j)*x(i,j))+ @sum(planta(j):costo_P(j)* @sum(mina(i):x(i,j)))+ @sum(PxT(i,j):costo_T(j,k)*y(j,k));

@for(mina(i):@sum(planta(j):x(i,j))<=capacidad(i)); @for(planta(j):@sum(mina(i):x(i,j))<=capacidad_P(j)); @for(planta(j):@sum(mina(i):x(i,j))=@sum(tienda(k):y(j,k))); @for(tienda(k):@sum(planta(j):y(j,k))>= demanda(k));

Solución 11:

Problema 12: sets: mezcla/1..3/:costo,x; ingrediente/1..5/:req; IxM(ingrediente,mezcla):unidades; endsets

data: costo= 0.09

0.14

0.17;

req=

6

2

9

unidades=

2

3

1

0.5

1

0.5

3

5

6

1

1.5

2

0.5

0.5

1.5;

8

enddata

min= @sum(mezcla(j):costo(j)*x(j));

@for(ingrediente(i): @sum(mezcla(j):x(j)*unidades(i,j))>=req(i)); @sum(mezcla(j):x(j))<=6;

5;

Solución 12: Global optimal solution found. Objective value:

0.6866667

Infeasibilities:

0.000000

Total solver iterations:

2

Elapsed runtime seconds:

0.03

Model Class:

LP

Total variables:

3

Nonlinear variables:

0

Integer variables:

0

Total constraints:

7

Nonlinear constraints:

Total nonzeros:

0

21

Nonlinear nonzeros:

Variable

0

Value

Reduced Cost

COSTO( 1)

0.9000000E-01

0.000000

COSTO( 2)

0.1400000

0.000000

COSTO( 3)

0.1700000

0.000000

X( 1)

1.333333

0.000000

X( 2)

0.000000

0.5000000E-02

X( 3)

3.333333

0.000000

REQ( 1)

6.000000

0.000000

REQ( 2)

2.000000

0.000000

REQ( 3)

9.000000

0.000000

REQ( 4)

8.000000

0.000000

REQ( 5)

5.000000

0.000000

UNIDADES( 1, 1)

2.000000

0.000000

UNIDADES( 1, 2)

3.000000

0.000000

UNIDADES( 1, 3)

1.000000

0.000000

UNIDADES( 2, 1)

0.5000000

0.000000

UNIDADES( 2, 2)

1.000000

0.000000

UNIDADES( 2, 3)

0.5000000

0.000000

UNIDADES( 3, 1)

3.000000

0.000000

UNIDADES( 3, 2)

5.000000

0.000000

UNIDADES( 3, 3)

6.000000

0.000000

UNIDADES( 4, 1)

1.000000

0.000000

UNIDADES( 4, 2)

1.500000

0.000000

UNIDADES( 4, 3)

2.000000

0.000000

UNIDADES( 5, 1)

0.5000000

0.000000

UNIDADES( 5, 2)

0.5000000

0.000000

UNIDADES( 5, 3)

1.500000

0.000000

Row Slack or Surplus

Dual Price

1

0.6866667

-1.000000

2

0.000000

3

0.3333333

0.000000

4

15.00000

0.000000

5

0.000000

6

0.6666667

0.000000

7

1.333333

0.000000

-0.3333333E-02

-0.8333333E-01

Problema 15: sets: crudo/1..3/:disp, costo, octano, azufre; gasolina/1..3/: demanda, precio,octano_min, azufre_max; CxG(crudo,gasolina):x; endsets

data: disp=

5000

5000

5000;

costo= 45

35

25;

octano=

12

6

azufre= 0.5

2

3;

demanda=

3000

2000

precio= 70

60

50;

octano_min=

10

8

6;

azufre_max=

1

2

1;

8;

1000;

enddata

ventas=@sum(gasolina(j):precio(j)*@sum(crudo(i):X(i,j))); MP=@sum(crudo(i):costo(i)*@sum(gasolina(j):x(i,j))); procesamiento=4*@sum(CxG(i,j):X(i,j)); publicidad=@sum(gasolina(j):y(j)); utilidad=ventas-MP-procesamiento-publicidad;

max=utilidad;

@for(crudo(i):

@sum(gasolina(j):x(i,j))<=disp(i)); @sum(gasolina(j):crudo(i):x(i,j)))<=14000; @for(gasolina(j): @sum(crudo(i):x(i,j))>=demanda(j)+10*y(j)); @for(gasolina(j): @sum(crudo(i):octano(i)*x(i,j))>=octano_min*@sum(crudo(j):x(i,j))); @for(gasolina(j): @sum(crudo(i):azufre(i)*x(i,j))>=azufre_max*@sum(crudo(j):x(i,j)));

Solución 15:

Problema 16: sets: trimestre/1..4/: demanda, SF; produccion/1..2/:costo; TxP(trimestre,produccion):x; endsets

data: demanda=

40

costo= 400

450;

60

75

25;

enddata

min=@sum(TxP(i,j):costo(j)*x(i,j)) + 20*@sum(trimestre(i):SF(i));

@for(trimestre(i):x(i,1)<=40);

SF(1)=10+@sum(TxP(i,j):x(1,j))-demanda(1);

@for(trimestre(i)|i#GE#2: SF(i)=SF(i-1) + @sum(TxP(i,j):x(i,j))-demanda(i));

Soluciòn 16: Objective value:

25075.00

Infeasibilities:

0.000000

Total solver iterations:

5

Elapsed runtime seconds:

0.46

Model Class:

LP

Total variables:

12

Nonlinear variables:

0

Integer variables:

0

Total constraints:

9

Nonlinear constraints:

Total nonzeros:

0

31

Nonlinear nonzeros:

0

Variable

Value

Reduced Cost

DEMANDA( 1)

40.00000

0.000000

DEMANDA( 2)

60.00000

0.000000

DEMANDA( 3)

75.00000

0.000000

DEMANDA( 4)

25.00000

0.000000

SF( 1)

160.0000

0.000000

SF( 2)

100.0000

0.000000

SF( 3)

25.00000

0.000000

SF( 4)

0.000000

192.5000

COSTO( 1)

400.0000

0.000000

COSTO( 2)

450.0000

0.000000

X( 1, 1)

40.00000

0.000000

X( 1, 2)

7.500000

0.000000

X( 2, 1)

0.000000

267.5000

X( 2, 2)

0.000000

317.5000

X( 3, 1)

0.000000

247.5000

X( 3, 2)

0.000000

297.5000

X( 4, 1)

0.000000

227.5000

X( 4, 2)

0.000000

277.5000

Row Slack or Surplus

Dual Price

1

25075.00

-1.000000

2

0.000000

50.00000

3

40.00000

0.000000

4

40.00000

0.000000

5

40.00000

0.000000

6

0.000000

112.5000

7

0.000000

132.5000

8

0.000000

152.5000

9

0.000000

172.5000

Problema 17: sets: prenda/1..2/: tela_req, inv_ini; mes/1..3/:costo_tela, inv_tela,compra_max,compra; turno/1..2/: costo_turno, capacidad_turno; PxMxT(prenda,mes,turno):x; PxM(prenda,mes):demanda,inventarioF; MxT(mes,turno):; endsets

data: tela_req= inv_ini=

2 1

3;

2;

costo_tela=

2

1.5

1.8;

compra_max=

10

12

14;

costo_turno=

4

8;

capacidad_turno=

25

999;

demanda=

10

12

14

15

14

13;

enddata

min=@sum(PxMxT(i,j,k):costo(k)*x(i,j,k)) + @sum(mes(j):costo_tela(j)*compra(j)) + @sum(PxM(i,j):inventarioF)*3;

@for(PxM(i,j): @sum(prenda(i):x(i,j,k))<=capacidad_turno(k)); @for(mes(j):compra(j)<= compra_max);

@for(PxM(i,j)|j#EQ#1:inventarioF(i,j)=inventarioF(i,j-1) + @sum(turno(k):x(i,j,k))-demanda(i,j)); @for(PxM(i,j)|j#GE#2:inventarioF(i,j)=inventarioF(i,j-1) + @sum(turno(k):x(i,j,k))-demanda(i,j)); SF(1)=0+compra(1)- @sum(PxMxT(i,j,k):3*x(2,j,k)+2*x(i,j,k));

Soluciòn 17:

Related Documents

Iop - Problema 3.pdf
April 2020 3
Iop
November 2019 12
Oh Iop
June 2020 3
Apuntes Iop
June 2020 4
Problema
November 2019 46
Problema
November 2019 54

More Documents from ""