Question: 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 Axes={"x","y"};
# Parameters
param rack_location{Racks, Axes} symbolic;
param rack_status{Racks} symbolic;
param agv_location{AGVs, Axes} symbolic;
param agv_status{AGVs} symbolic;
param workstation_location{Workstations} symbolic;
param sku_inventory{Racks,1..10}>=0;
param demands{Workstations,1..40}>=0;
param berths{Workstations}>=0;
# Decision variables
var AssignRackToAGV{Racks, AGVs} binary;
var AssignRackToWorkstation{Racks, Workstations} binary;
# 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])+
alpha3* sum{w in Workstations, sku in 1..40} max(0, demands[w, sku]- sum{r in Racks} AssignRackToWorkstation[r, w]* sku_inventory[r, sku]);
# Constraints
subject to RackAssignmentConstraint:
forall{r in Racks} sum{a in AGVs} AssignRackToAGV[r, a]=1;
subject to WorkstationAssignmentConstraint:
forall{r in Racks} sum{w in Workstations} AssignRackToWorkstation[r, w]=1;
subject to BerthConstraint{w in Workstations}:
sum{r in Racks} AssignRackToWorkstation[r, w]<= berths[w];
````````````````````````````
.dat;
set Racks := R1.. R80;
param rack_location: "x""y":=
R1103
R2105
Up to ...
R804041;
param rack_status:=
R1 "stationary"
R2 "stationary"
R3 "stationary"
R4 "stationary"
R5 "stationary"
R6 "stationary"
R7 "stationary"
R8 "stationary"
R9 "stationary"
R10 "stationary"
R11 "stationary"
R12 "stationary"
R13 "AGV7"
R14 "stationary"
R15 "stationar"
Up to ...
R80 "stationary"
;
set AGVs := A1.. A20;
param agv_location:"x""y":=
A11522
A291
Up to ...
A20421
;
param agv_status:=
AGV1 "active"
AGV2 "idle"
Up to ...
AGV20 "idle"
;
set Workstations:= W1 W2 W3 W4;
param workstation_location:=
W1"00"
W2"050"
W3"500"
W4"5050"
;
param sku_inventory: S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 S21 S22 S23 S24 S25 S26 S27 S28 S29 S30 S31 S32 S33 S34 S35 S36 S37 S38 S39 S40:=
R17519201392101014000000000000000000000000000000
R22015111183961514000000000000000000000000000000
R328114111463114000000000000000000000000000000
Up to ...
R80000000000000000000000000019261870000016186412;
param demands: S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 S21 S22 S23 S24 S25 S26 S27 S28 S29 S30 S31 S32 S33 S34 S35 S36 S37 S38 S39 S40:=
W11613110119171326211424221943506203046402642827316217360060213223
W2293249148111461422420104593514423161112638514322212173019191
W3231281101580036180222313224027648913244201093645234662027224117
W433

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 Databases Questions!