Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Linearprogramming conditions are unknown
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello there, I need help figuring out how to set the paremeters for this specific linear programming problem:
including the function for L, and the conditions A, b ,Aeq, beq.
(whichever conditions I might have))
My thoughtprocess so far is that there is only one ineqality condition:
lb < L < ub ( lb = 0, ub = random integer)
f = abs(sum( m - L ));
A = [];
b = [];
Aeq = [];
beq = [];
lb = 0;
ub = j;
Sets are empty because I dont know how to discribe the parameters.
All information I do have is in the Text below.
the "easy" way to calculate L is to take the mean(m), but I must not use anything different then an optiization tool.
L = distance from the "Main Station" to the start of the Line ( point 0), which needs to be optimized.
% A railway line has n stations, with n 2. Each of the stations is at points xj 2 R,
% where j = 1; 2; : : : ; n, and the two ends of the line correspond to x1 and xn,
% respectively. We will assume that the following sequence x1 < x2 < < xn holds.
% It is desired to locate the railway trac management center of that line at a point
% xc 2 [x1; xn] so that the total sum of the distances from the management center
% to each of the stations is minimal. Determine at which point/points xc 2 [x1; xn],
% along the railway line, should the trac management center be located and nd
% the minimum value of the distance in terms of the positions xj of the stations.
Thanks for your time, I hope this is not to much to ask for.
It would already help if you see any mayor mistake and point it out so I can specify my question more.
1 Kommentar
Matt J
am 6 Jan. 2020
the "easy" way to calculate L is to take the mean(m)
I think you mean median(m), since the objective is a sum of absolute values, not a sum of squares.
Antworten (1)
Matt J
am 6 Jan. 2020
Bearbeitet: Matt J
am 6 Jan. 2020
I don't think it should be a difficult exercise to write the A,b matrices required by linprog. However, you may also want to consider the problem-based approach to setting up a linear program.
1 Kommentar
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!