Solved

Employee training problem

  • 15 February 2022
  • 7 replies
  • 53 views

Userlevel 1
Badge +4

Hi, 

I have been following the Employee Training example. However, I cannot run the code (attached). It is said that the solution does not exist. I don’t know what causes it.

Furthermore, how do I check and know if the equations are not feasible ya? I’ve been looking into this Math Inspector, but somehow it’s difficult to understand for me. 

Thanks,

 

 

icon

Best answer by Marcel Hunting 16 February 2022, 12:31

View original

7 replies

Userlevel 5
Badge +4

Hi @zulfan.adiputra , the model is indeed infeasible, that is, no feasible solution exists. You can find out why by selecting the action Irreducible Infeasible Set (IIS) in the Math Program Inspector, if you use a newer AIMMS version (4.73 or newer) because older AIMMS versions have some limitations on determining the IIS.

After selecting this action, AIMMS will point to the constraints Attendants_definition(January) and Attendants_definition(February). For January the constraint becomes

Attendants(January) = 0

and for February

Attendants(February) - Attendants(January) = -2

(You can check this by selecting the action Create Constraint Listing in the Math Program Inspector.) Hence, Attendants(February) should be equal to -2 which is not possible because Attendants is nonnegative.

Userlevel 5
Badge +4

You can add two new parameters:

Parameter InitialAttendants {
IndexDomain: t;
Definition: data { December : 60 };
}

and

Parameter InitialTrainees {
IndexDomain: t;
Definition: data { November : 2 };
}

And then (probably) you want to add 

+ InitialAttendants(t) + InitialTrainees(t)

to the definition of Attendants.

Note that StartPeriod has the value ‘January’ in the case file that you are loading. This means that the planning interval of the horizon TimePeriod will start at January instead of November, and therefore, e.g., Attendants(November) does not exist. You might want to add

StartPeriod := 'November';

before the solve statement.

Userlevel 5
Badge +4

Hi @zulfan.adiputra , looking closer it seems related to the initial data for Attendants and TraineesHired. In the original project the data of these variables is read from a text file, that is, after reading the text file Attendants('December') equals 60 and TraineesHired('November') equals 2. Somehow the data of these two identfiers is not stored in the case file that you are loading in your newer version of the project. You can resolve this by adding

Attendants('December') := 60;
TraineesHired('November') := 2;

before the solve statement. With this change it is no longer needed to add the parameters InitialAttendants and InitialTrainees, or to change the StartPeriod.

Userlevel 1
Badge +4

I think the reason is i do not specify in Dec there are 60 flight attendants and in Nov there are 2 trainees joining. How do I specify this in the variable ya? In the example, I don’t see anything different in the attribute of the variables, but when looking at the data of the variable, the month of Dec is there while the other months are not there. In what I do (attached above), i don’t see this month of Dec while i see the entire months from Jan to June. Could you please help on this? 

Userlevel 1
Badge +4

Hi @Marcel Hunting . Thanks for this. Could you please help on showing how to add the initial number of attendants (60 in Dec) and trainees (2 in Nov) as I mentioned in my own reply?

Userlevel 1
Badge +4

Hi Marcel, 

Thanks a lot for this. 

I am curious about how the original example (attached) can add this Dec and Nov data without introducing these two additional parameters like you said. 

 

Userlevel 1
Badge +4

Hi Marcel, 

Thanks a lot for this workaround. I never thought that it would be this straightforward. Thanks, I’ll explore more examples to get myself familiar with AIMMS.

 

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator