Finding variables using a simple optimization (maybe linear programming)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
% Dear Users,
% I have three equatians as below:
A = x(1)s(11)+x(2)s(12)...+x(n)x(1n)
B = x(1)s(21)+x(2)s(22)...+x(n)x(2n)
C = x(1)s(31)+x(2)s(32)...+x(n)x(3n)
% I know the values of (A,B,C) and all 's' variables
% Additionally all 'x' variables have upper and lower bands (I know also those values) such as:
a1<=x1<=b1
a2<=x2<=b2
a3<=x3<=b3
...
an<=xn<=bn
Is there any way to find (x1, x2,...xn) values with the information above. Please don't send me the related page about "linprog". I tried to implement it but I failed to realize objective and all 'x' variables took the values of lower bands.
Thanks a lot!
0 comentarios
Respuestas (1)
Alan Weiss
el 31 de Mzo. de 2016
You have three equations and n unknowns x1, ..., xn. In general you will have an n - 3 dimensional set of variables that satisfy all the conditions, if there are any solutions at all.
If you want a unique solution, give a linear objective function such as minimizing sum(x(i)) and solve it using the linprog function from Optimization Toolbox. If you want to find the set of all solutions, I suppose that you could give a bunch of different objectives, then take the convex hull of the resulting set.
Alan Weiss
MATLAB mathematical toolbox documentation
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!