Hello,
I need help with implementing my model in Aimms. I want to implement a work staff optimizing model with on-call services. I want to show that on call-services can help with temporary bottlenecks and variable demand.
Sets:
t – Periods
j - Layers
Parameters:
a (t,j) – Period of use
b (t) – Staff requirements
Variables:
x (j) – regular employees
k (j) – on-call-services employees
This ist the optimizing model:
minj=1Jxj+kj
These are my constraints:
Demand fulfilment:
J=1Jatj×xj+kj≥ bt ∀t
Deployment of employees:
(x(j)+k(j))>= 1
xj∈N ∀j
kj∈N ∀j
I wanted to implement it like this:
Set Periods {
Index: t;
}
Variable x {
IndexDomain: j;
Range: {
{0..7}
}
}
Parameter a {
IndexDomain: (t,j);
Range: binary;
}
Variable TotalMitabeiter {
Range: free;
Definition: sum(j, x(j) + k(j));
}
Variable k {
IndexDomain: j;
Range: (0, 3);
}
Set Layers {
Index: j;
}
Constraint DemandFulfilment {
IndexDomain: t;
Definition: sum(j, a(t, j) * (x(j)+k(j)))>= b(t);
}
Constraint Deploymentofemployees {
IndexDomain: j;
Definition: {
(x(j)+k(j))>= 1;
}
}
MathematicalProgram Solution {
Objective: TotalMitabeiter;
Direction: minimize;
Constraints: AllConstraints;
Variables: AllVariables;
Type: Automatic;
}
Parameter b {
IndexDomain: t;
Range: nonnegative;
}
Procedure MainInitialization {
Comment: "Add initialization statements here that do NOT require any library being initialized already.";
}
Procedure PostMainInitialization {
Comment: {
"Add initialization statements here that require that the libraries are already initialized properly,
or add statements that require the Data Management module to be initialized."
}
}
Procedure MainExecution {
Body: {
solve Solution;
}
}
Procedure PreMainTermination {
Body: {
return DataManagementExit();
}
Comment: {
"Add termination statements here that require all libraries to be still alive.
Return 1 if you allow the termination sequence to continue.
Return 0 if you want to cancel the termination sequence."
}
}
Procedure MainTermination {
Body: {
return 1;
}
Comment: {
"Add termination statements here that do not require all libraries to be still alive.
Return 1 to allow the termination sequence to continue.
Return 0 if you want to cancel the termination sequence.
It is recommended to only use the procedure PreMainTermination to cancel the termination sequence and let this procedure always return 1."
}
The Problem now ist hat Aimms says, the model is infeasible. What can I do better, that the model can be solved?