Question: For the following AMPL model ( data is not provided here due to lack of space ) an output is generated by AMPL. However, it

For the following AMPL model (data is not provided here due to lack of space) an output is generated by AMPL. However, it is mostly zero and in an ideal situation it shouldnt be like this. Many Racks should be assigned to AGVs and workstations, respectively to meet the demand and lower cost. Modify the model where necessary and write the correct codes.
AMPL Model:
# The sets
set Racks; # Set of racks
set AGVs; # Set of AGVs
set Workstations; # Set of workstations
set SKUs; # Set of SKUs
set Axes={"x","y"}; # Set of axes
# Parameters
param rack_location{Racks, Axes}; # Rack location
param rack_status{Racks} binary; # Rack status, 0 for stationary and 1 otherwise
param agv_location{AGVs, Axes}; # AGV location
param agv_status{AGVs} binary; # AGV status, 0 for idle and 1 for active
param workstation_location{Workstations, Axes}; # Workstation location
param sku_inventory{Racks, SKUs}>=0; # SKU inventory
param demands{Workstations, SKUs}>=0; #Demands
param berths{Workstations}>=0; # Berths
# Decision variables
var AssignRackToAGV{Racks, AGVs} binary; # Rack to AGV assignment
var AssignRackToWorkstation{Racks, Workstations} binary; # Rack to workstation assignment
var AssignWorkstationToRack{Workstations, Racks} binary; # Workstation to rack assignment
# Objective function
param alpha1 :=1; # Weight for rack-AGV distance
param alpha2 :=1.3; # Weight for rack-workstation distance
param alpha3 :=1; # Weight for unfulfilled orders
minimize TotalDistance:
alpha1* sum{r in Racks, a in AGVs, ax in Axes} AssignRackToAGV[r, a]* abs(rack_location[r, ax]- agv_location[a, ax])+
alpha2* sum{r in Racks, w in Workstations, ax in Axes} AssignRackToWorkstation[r, w]* abs(rack_location[r, ax]- workstation_location[w, ax])+
alpha3* sum{w in Workstations, s in SKUs} max(0, demands[w, s]- sum{r in Racks} AssignWorkstationToRack[w, r]* sku_inventory[r, s]);
# Constraints
subject to RackAssignmentConstraint{r in Racks}:
sum{a in AGVs} AssignRackToAGV[r, a]=1;
subject to WorkstationAssignmentConstraint{w in Workstations}:
sum{r in Racks} AssignRackToWorkstation[r, w]=1;
subject to WorkstationToRackAssignmentConstraint{w in Workstations, r in Racks}:
AssignWorkstationToRack[w, r]= AssignRackToWorkstation[r, w];
subject to BerthConstraint{w in Workstations}:
sum{r in Racks} AssignRackToWorkstation[r, w]<= berths[w];
``````````````````````````````````````````````````````````````````
AMPL output (Gurobi)
ampl: include assignment_run.run;
Gurobi 10.0.3: Gurobi 10.0.3: optimal solution; objective 3130.6
31 simplex iterations
1 branching nodes
AssignRackToAGV [*,the *]
: a1 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a2 a20 a3 a4 a5 a6 a7 a8 :=
r10000000000000010000
r101000000000000000000
r110000010000000000000
upto r80
AssignRackToWorkstation [*,*]
: w1 w2 w3 w4 :=
r10000
r100000
r110000
upto r80
AssignWorkstationToRack [*,*](tr)
: w1 w2 w3 w4 :=
r10000
r100000
r110000
upto r80
Total distance traveled by AGVs: 3130.600000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!