Hi,
Dealing with infeasibilities is difficult. Make a small example and find a solution by hand. Initialize your variables (.l attribute) to the known solution and look at the equation listing () if the equations are all feasible. If not you have logical errors in your algebra. Make your model in a way that is can always get a feasible solution (e.g. by leaving some demand unfilled, let go production over capacity and penalize this “violation”). Only true physical constraint, e.g. flow conservation, etc should stay hard. There is a nice blog post and newsletter entry by Bruce McCarl on dealing with infeasibilities: https://www.gams.com/blog/article/news/misbehaving-model-infeasible/?tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&cHash=a9fc91acacfdf60221c943e635ad1235
I looked at the model and there are a lot of rookie mistakes. Basically your model is a MIP. Don’t use non-linear algebra if you don’t have to. ifthen and ceil can be easily reformulated in a linear fashion. For example:
LKW.. LKWs =e= ceil(sum(i, AP(i))/20);
with LKWs, and AP positive variables. Just make LKWs an integer variable and write
LKW.. LKWs =g= sum(i, AP(i))/20;
The minimzation will make LKWs as small as possible automatically.
Another one:
SdK(k).. S(k) =e= ifthen(KA(k,"1")=1 AND KA(k,"2")=1,1,0);
with S and KA binary variables. What you try to do it S(K) =e= KA(k,“1”) AND KA(k,“2”); This can be easily linearized by
S(k) =l= KA(k,"1");
S(k) =l= KA(k,"2");
S(k) =g= KA(k,"1")+KA(k,"2")-1;
Often one part (either =l= or =g=) can be left out because of the optimization direction, but I can’t easily decide if that’s the case here. These things should be taught in class. You also find help in HP Williams book “Model Building in Mathematical Programming” https://books.google.de/books/about/Model_Building_in_Mathematical_Programmi.html?id=YJRh0tOes7UC&printsec=frontcover&source=kp_read_button&redir_esc=y#v=onepage&q&f=false
The MINLP/MIP is independent of the way to treat the infeasibility.
Hope this helps,
-Michael