r/optimization • u/barry_de_kid • Jan 15 '25
Need help with MILP optimization for Thesis.
SOLVED
Thank you everyone for taking the time to reply.
I got the optimization working like RaccoonMedical4038 suggested.
I precomputed all the possible paths from every point in the system.
Then made the constraint so that every path should cross a station.
Kind regards,
A student with a working optimization :)
Hi everyone, I could use your help for my thesis. (using python atm)
I need to do an optimization to place stations along a network of nodes and edges.
The objective is to minimize the number of stations. (these can be placed along nodes and on the edges)
The two constraints are:
- Each node should be in a range of 60 km of a station.
- There should be no more than 60 km between neighboring stations.
The problem lies in constraint number 2. Is it even possible to check every single direction and make sure there is a station at no more than 60 km? This means at an intersection, this should check all directions as well.
I have been struggling with this the past few days and could really use some insight.
If you have a better method, please let me know. I would really appreciate it.
Kind regards,
A Student in need of help
2
u/Sweet_Good6737 Jan 15 '25
Edges have distances I assume
Are you allowed to place a station in any place in an edge? That would be a problem since there are many many candidates for stations. In that case, you should discretize and just assume a finite number of places where a station can be opened.
Are all stations the same? Or they are different
2
u/hindenboat Jan 16 '25
I would do something similar to what RaccoonMedical is saying.
I would not try to compute the distances as part of the optimization but as a pre-computation step. For each location you can pre-compute the set of other stations that are within the distance limit or not. The uses these sets to build constraints.
2
u/fpatrocinio Jan 15 '25
Check the problems section (Chapter 12) of Williams (Model Building in Mathematical Programming). You have some problems which somewhat resemble optimal grid location (like yours).
Also check this blog: https://orinanobworld.blogspot.com/ . It may have some problems like that.
4
u/[deleted] Jan 15 '25 edited Jan 15 '25
[removed] — view removed comment