[AMPL 25045] Modelo Red Multieslabon, Multicliente y Multiproducto

#Modelo RED MULTIESLABON

set I; #Plantas
set J; #CEDIS
set K; #Clientes
set P; #Productos

#subconjuntos
set PM within P; #Productos
set PS within P;
set SS within K; #single sourcing
set MS within K; #multiple sourcing

#PARAMETROS

param CAP_PLANTA{i in I};
param CAP_CEDI{j in J};
param FLETE_1{i in I,j in J};
param FLETE_2{j in J,k in K};
param DEMANDA{k in K,p in P};
param CFIJO{j in J};

#VARIABLES

var X{i in I,j in J, p in P}>=0;
var Y{j in J, k in K, p in P}>=0;
var Z{j in J,k in SS} binary;
var W{j in J} binary;

#FUNCIÓN OBJETIVO

minimize costos:
sum{i in I, j in J, p in P}X[i,j,p] *FLETE_1[i,j] +
sum{j in J} W[j]*CFIJO[j]+
sum{j in J, k in MS, p in P}Y[j,k,p]*FLETE_2[j,k]+
sum{j in J, k in SS, p in P}Z[j,k]*FLETE_2[j,k]
;

#RESTRICCIONES

subject to R1_CAP_PLANT{i in I}:
sum{j in J, p in P} X[i,j,p] <= CAP_PLANTA[i];

subject to R2_CAP_CED{j in J}:
sum{i in I, p in P} X[i,j,p] <= CAP_CEDI[j] * W[j];

subject to R3_DEM{k in MS, p in P}:
sum{j in J}Y[j,k,p]>=DEMANDA[k,p];

subject to R4_DEM{k in SS}:
sum{j in J}Z[j,k]=1;

subject to R5_BALANCE{j in J, p in P}:
sum{i in I} X[i,j,p] = sum{k in K} Y[j,k,p];
#DATOS ABONOS
#Conjuntos

set I:= PP1 PP2; #Plantas
set J:= CEDIMA CEDIIB CEDIBOG CEDIG; #CEDIS
set K:= CLI CLV CLA CLT; #Clientes
set P:= PAO PCO PAQ; #Productos

#Subconjuntos
set PM:= PAO PCO; #productos clientes MS
set PS:= PAQ; #productos clientes SS
set SS:= CLI CLV; #clientes_internacionales
set MS:= CLA CLT; #clientes_nacionales

#Parametros

param CAP_PLANTA:=
PP1 13000
PP2 13000
;
param CAP_CEDI:=
CEDIMA 5000
CEDIIB 4000
CEDIBOG 6000
CEDIG 2800
;

param DEMANDA: #Demanda

PAO PCO PAQ:=
CLI 0 0 1600
CLV 0 0 1200
CLA 1000 125 0
CLT 300 25 0
;

param CFIJO:=

CEDIMA 8000000
CEDIIB 10000000
CEDIBOG 8500000
CEDIG 7000000
;

param FLETE_1: #Plantas a CEDIS

CEDIMA CEDIIB CEDIBOG CEDIG:=
PP1 500000 650000 1000000 400000
PP2 405000 600000 800000 480000
;

param FLETE_2: #CEDIS a clientes SS y MS

CLI CLV CLA CLT:=
CEDIMA 760000 800000 480000 600000
CEDIIB 200000 900000 400000 300000
CEDIBOG 800000 300000 50000 300000
CEDIG 300000 250000 200000 450000
;

I read your model and data into AMPL, and called a solver. The solver reported an optimal solution with objective value 959600000.

Do you have a question?

Your question has been moved to our new user forum at discuss.ampl.com, and a response has been posted there. To see the response, use this link:

https://discuss.ampl.com/t/ampl-25045-modelo-red-multieslabon-multicliente-y-multiproducto/1116/2

To reply, click the red “Reply” button that follows the response. (Do not send an email reply to this message.)