Change of solution without changing code

Problems with modeling
Post Reply
Posts: 7
Joined: 5 months ago

Change of solution without changing code

Post by suprafluid » 4 months ago

Hi everyone,

The attached model determines a maximum power demand depending on velocities of cars. The quicker they drive, the longer must the distance be between them. The cars cannot exceed speed that would make the needed distance between cars larger than the overall track length.

I calculate the overall distance covered, dTot.

Code: Select all

dTot =e= sum(c, dCar(c));
Letting the code run, dTot equals 69.136m and is therefore below the overall track length of 2000m.

Code: Select all

dTot =l= lTrack;
However, if I change the track length to e.g. 200m, which still allows the previous solution, no solution at all is given. The optimum is suddenly zero, although I don't change anything else! Any thoughts on that?

(1.91 KiB) Downloaded 14 times

User avatar
Posts: 342
Joined: 3 years ago

Re: Change of solution without changing code

Post by bussieck » 4 months ago

This is an NLP and perhaps a non-convex NLP with many local solution. You can try to run a global solver (Antigone, Baron, Couenne, Lindo, Scip) to find the global optimum. Don't forget to set the optimality tolerance to 0: transport.optCR=0; If this doesn't do it there must some logical issue and to help with this we would need to see more.


Post Reply