Page 1 of 1

solve using MINLP but results come non integer

Posted: Thu Oct 21, 2021 1:43 am
by Foodi14
Hi
I do the solution by MINLP , but the solutions come with Non-integers.
Image

Re: solve using MINLP but results come non integer

Posted: Thu Oct 21, 2021 3:39 am
by abhosekar
Hi,
Are the variables shown in this screen shot defined as integer variables? I would check this to start with. It is also important to know how the run termianted, solver status, if a feasible solution was found etc..

Even if they are integers/binary, it is possible that you see a non-integer value and the reason is mentioned in the documentation in the following link under sections binary variables and integer variables:
https://www.gams.com/37/docs/UG_Languag ... eVariables

On a side note, if the variables you show are integers, then I notice that you don't have any upper bound on these variables. This can significantly affect the difficulty of your problem. It is always a good idea to provide a realistic upper bound to help the solver.
- Atharv

Re: solve using MINLP but results come non integer

Posted: Thu Oct 21, 2021 5:53 am
by Foodi14
No, they are positive variables. The reason for not making them integer is a change in the solution and it does not become logical. according to the previous information, If you choose the MINLP solver, there is no need to define the variables as integer . Please correct the information if it is wrong.
Thanx..

Re: solve using MINLP but results come non integer

Posted: Thu Oct 21, 2021 12:42 pm
by abhosekar
Hi, It is absolutely wrong. Simply defining model as MINLP does not make all variables integers. If that was true you wouldn’t be able to include continuous variables in an MINLP model, which is certainly not the case.
- Atharv