MATLAB处理规划类问题
处理线性规划
https://ww2.mathworks.cn/help/optim/ug/linprog.html
处理非线性规划
https://ww2.mathworks.cn/help/optim/ug/fmincon.html
matlab中的匿名函数
https://ww2.mathworks.cn/help/matlab/matlab_prog/anonymous-functions.html
贝叶斯优化
prob = optimproblem('ObjectiveSense','max');
c=[72;64];
b=[50;480;100];
a=[1,1;12,8;3,0];
x=optimvar('x',2,'LowerBound',0);
prob.Objective=c'*x;
prob.Constraints.con1 = a*x<=b;
prob.Constraints.con2 = x>=0;
[sol,fval,flag,out]=solve(prob)
sol.x