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 Axesxy; # Set of axes
# Parameters
param racklocationRacks Axes; # Rack location
param rackstatusRacks binary; # Rack status, for stationary and otherwise
param agvlocationAGVs Axes; # AGV location
param agvstatusAGVs binary; # AGV status, for idle and for active
param workstationlocationWorkstations Axes; # Workstation location
param skuinventoryRacks SKUs; # SKU inventory
param demandsWorkstations SKUs; #Demands
param berthsWorkstations; # Berths
# Decision variables
var AssignRackToAGVRacks AGVs binary; # Rack to AGV assignment
var AssignRackToWorkstationRacks Workstations binary; # Rack to workstation assignment
var AssignWorkstationToRackWorkstations Racks binary; # Workstation to rack assignment
# Objective function
param alpha :; # Weight for rackAGV distance
param alpha :; # Weight for rackworkstation distance
param alpha :; # Weight for unfulfilled orders
minimize TotalDistance:
alpha sumr in Racks, a in AGVs, ax in Axes AssignRackToAGVr a absracklocationr ax agvlocationa ax
alpha sumr in Racks, w in Workstations, ax in Axes AssignRackToWorkstationr w absracklocationr ax workstationlocationw ax
alpha sumw in Workstations, s in SKUs max demandsw s sumr in Racks AssignWorkstationToRackw r skuinventoryr s;
# Constraints
subject to RackAssignmentConstraintr in Racks:
suma in AGVs AssignRackToAGVr a;
subject to WorkstationAssignmentConstraintw in Workstations:
sumr in Racks AssignRackToWorkstationr w;
subject to WorkstationToRackAssignmentConstraintw in Workstations, r in Racks:
AssignWorkstationToRackw r AssignRackToWorkstationr w;
subject to BerthConstraintw in Workstations:
sumr in Racks AssignRackToWorkstationr w berthsw;
AMPL output Gurobi
ampl: include assignmentrun.run;
Gurobi : Gurobi : optimal solution; objective
simplex iterations
branching nodes
AssignRackToAGV the
: a a a a a a a a a a a a a a a a a a a :
r
r
r
upto r
AssignRackToWorkstation
: w w w w :
r
r
r
upto r
AssignWorkstationToRack tr
: w w w w :
r
r
r
upto r
Total distance traveled by AGVs:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
