Page 1 of 1

MIP - CPLEX solver does not give optimal solution in a facility location problem

Posted: Sat May 12, 2018 8:18 pm
by ldessbes
I'm somewhat new to GAMS, and totally new to this forum,
I was hoping that someone could help me to understand why my model "All13" gives a solution that differs from my model "max7" (attached). I hoped that the model All13 (obj= 26,608,552) would give the minimum cost over all combinations. However, when running some scenarios, I observed that does not happen. As exemplified in by model max7 (obj= 25,415,487), where I find a lower cost than in All13.
The model aims to minimize total cost considering transportation cost and capital investment. It decides the supply configuration, plant locations and the capacity of each plant. Could someone please help me to improve "all13"? or help me to understand why it does not minimize the total cost?

Thank you so much,
Luana

Re: MIP - CPLEX solver does not give optimal solution in a facility location problem

Posted: Sun May 13, 2018 6:23 pm
by bussieck
Before digging deeper, have you set optCR to 0 as described here https://www.gams.com/latest/docs/UG_Lan ... ntProblems?

-Michael

Re: MIP - CPLEX solver does not give optimal solution in a facility location problem

Posted: Mon May 14, 2018 4:08 pm
by ldessbes
Hi Michael,
Thank you for your suggestion. Yes, I have tried it before, and the result is the same as without "scaleopt = 0".
It seems that my model is first minimizing the transportation cost, and when that is set, it calculates the capital investment. Which is not what it should do, and I can't figure out why it is not minimizing both.

Thank you again, and if you have more suggestions please share. Highly appreciated.
Luana

Re: MIP - CPLEX solver does not give optimal solution in a facility location problem

Posted: Mon May 14, 2018 5:08 pm
by bussieck
I said optCR (not scaleOpt)! If I set optCR to 0 both models return the same objective:

max7:

Code: Select all

Proven optimal solution.

MIP Solution:     25415486.875000    (55 iterations, 0 nodes)
Final Solve:      25415486.875000    (20 iterations)

Best possible:    25415486.875000
Absolute gap:            0.000000
Relative gap:            0.000000
all13:

Code: Select all

Proven optimal solution.

MIP Solution:     25415486.875000    (55 iterations, 0 nodes)
Final Solve:      25415486.875000    (20 iterations)

Best possible:    25415486.875000
Absolute gap:            0.000000
Relative gap:            0.000000
Just add "option optcr=0;" in front of the solve statement!

-Michael

Re: MIP - CPLEX solver does not give optimal solution in a facility location problem

Posted: Mon May 14, 2018 5:47 pm
by ldessbes
Michael,
First, I'm sorry for not reading your message with the proper attention; second, thank you for being so nice and patient,
It was the default tolerance that was returning a suboptimal value.
Thank you so much, you saved my day!