Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For the following AMPL ( . mod, . dat, . run, ) I receive the error messages copied at the end. Modify the codes to
For the following AMPL mod, dat, run, I receive the error messages copied at the end. Modify the codes to get a model in a way such that for each AGV a Rack should be assigned and each Rack should be assigned to a workstation, respectively.
mod;
# The sets
set Racks; # Set of racks
set AGVs; # Set of AGVs
set Workstations; # Set of workstations
set Axesxy;
# Parameters
param racklocationRacks Axes symbolic;
param rackstatusRacks symbolic;
param agvlocationAGVs Axes symbolic;
param agvstatusAGVs symbolic;
param workstationlocationWorkstations symbolic;
param skuinventoryRacks;
param demandsWorkstations;
param berthsWorkstations;
# Decision variables
var AssignRackToAGVRacks AGVs binary;
var AssignRackToWorkstationRacks Workstations binary;
# 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
alpha sumw in Workstations, sku in max demandsw sku sumr in Racks AssignRackToWorkstationr w skuinventoryr sku;
# Constraints
subject to RackAssignmentConstraint:
forallr in Racks suma in AGVs AssignRackToAGVr a;
subject to WorkstationAssignmentConstraint:
forallr in Racks sumw in Workstations AssignRackToWorkstationr w;
subject to BerthConstraintw in Workstations:
sumr in Racks AssignRackToWorkstationr w berthsw;
dat;
set Racks : R R;
param racklocation: xy:
R
R
Up to
R;
param rackstatus:
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "stationary"
R "AGV
R "stationary"
R "stationar"
Up to
R "stationary"
;
set AGVs : A A;
param agvlocation:"xy:
A
A
Up to
A
;
param agvstatus:
AGV "active"
AGV "idle"
Up to
AGV "idle"
;
set Workstations: W W W W;
param workstationlocation:
W
W
W
W
;
param skuinventory: S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S:
R
R
R
Up to
R;
param demands: S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S:
W
W
W
W
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started