Multivariate optimization subject to strange restraint
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have a multivariate optimization problem with, with what I think is a strange restraint. Essentially I have a function f(t1,t2,t3,t4,t5,t6) that I want to minimize subject to the constraint that t1+t2+t3+t4+t5+t6 = T. Essentially it's a function of several time points such that the total time must be a constant. Does anyone have any idea on how to do this? I looked into the function fmincon, however it seems like usually it constrains one variable, for example t1, to be some within some bound. I could rewrite t6 = T-t1-t2-t3-t4-t5, which essentially makes it so that t6 is constrained to be a function fo the other choices of t1,t2,t3,t4,t5 (T is a known constant). I guess I'm not sure how to (or if it's possible) to constrain the choice of one variable based on the other variables. Any insight or help would be greatly appreciated.
0 件のコメント
回答 (1 件)
Alan Weiss
2015 年 4 月 27 日
This type of constraint is called a linear equality constraint. Assuming that your function f is really a function of the single vector t = [t1,t2,t3,t4,t5,t6], then you use the Aeq and beq arguments in fmincon with
A = ones(1,6);
b = T; % I assume that T is already defined
Alan Weiss
MATLAB mathematical toolbox documentation
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!