Dear All,
My name is Mohamad Khaled and for my university research project I am using AIMMS to model a 3-echelon Pharmaceutical Supply Chain model. The current model I’m trying to define and solve is a simple one compared to some of the models I have seen here. I have two issues with my current model:
The first issue is that the pharmaceutical products (AKA medication) has an uncertain demand which I am not able to properly define in the project despite indicating the index domain, using the uncertain option in the property setting and defining the box function with an upper and a lower value in the region area. (I attached a screenshot of the demand parameter with the descriptions and region and another screenshot of the current “nominal” data of the demand)
The second issue is the wastage/expiration of the medication. I have defined a shelf-life variable and respective constraint, however, I couldn’t get the shelf-life variable to be used in the wastage constraint as the following warning message kept appearing: “Warning: Comparing elements of different sets is ambiguous. AIMMS will compare the elements based on the super set of the two sets. If this is not your intention, you can re-write the expression using the Ord function specifying the set explicitly. (see also the option warning_comparing_elements_different_sets).” What I am aiming to achieve is to incorporate and define the attached if-then formulas, which do work as they have been tested in a previous research study.
Note that for the wastage issue, I assigned a set called Medication_period, which refers to the time the medication was produced, to be a subset of the original time_period set.
I know that several users ask for your help, and that much more complex projects has been optimized by AIMMS, however I couldn’t find anything similar that would work for my model, which is why I’m asking for your help in this matter.
(Note: my supervisor suggested that a certain Add-on might be needed to be installed.)
Hope to hear from you soon,
Regards,
Mohamad Khaled
Best answer by Marcel Hunting
You cannot use a while-loop inside a constraint definition. You should use the definition without the while part.
I would advise you to print the constraint listing and inspect it. The constraint listing will be printed in the listing file, inside the log folder, if you set the following options:
- - Solvers General option 'Constraint Listing' to 'At every solve' (or 'At first solve');
- - Solvers General option 'Constraint Listing Variable Values' to 'Print variable values';
Maybe AIMMS generates
Shelf_Life(p,m,t) = - Medication_Decap(p)
for some (p,m,t) and that makes the model infeasible if Shelf_Life(p,m,t) is nonnegative and Medication_Decap(p) is positive. You can check this in the constraint listing.