Optimization Problem but don't have closed form expression

18 次查看(过去 30 天)
Hi all
I have this optimization problem that I want to get a numarical solution to which is the following:-
μ_k is a vector which has a cost function ϕ_k. so I want to find the vector μ_k which minimizes the summation but under a constraint. The problem is that I dont have a closed form expression for B_k in terms of μ_k. if I have a set of values for μ_k to get the corresponding B_k values I'll have to solve a system of 25 non-linear equations which can be done using MATLAB. I tried to solve the system and get symbolic solution (closed form exprssion) for B_k but I couldnt using MATLAB or Mathmatica. So I wanted to know is it possioble to solve this optimization problem using MATLAB?
Thank you...

采纳的回答

Alan Weiss
Alan Weiss 2021-11-18
This seems like a straightforward problem using either the Problem-Based Optimization Workflow or the solver-based approach. As long as you have a function that takes the values and returns values numerically, you can get an optimum.
In summary, for the problem-based approach you define optimization variables, define the objective function in terms of the variables (you might have to use fcn2optimexpr to do so), and then call solve. For the solver-based approach, you write the objective function in terms of the variable x, which represents the variables you can alter to search for an optimum, and then call the appropriate solver, perhaps fmincon.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

更多回答(1 个)

Matt J
Matt J 2021-11-24
编辑:Matt J 2021-11-24
The problem is that I dont have a closed form expression for B_k in terms of μ_k. if I have a set of values for μ_k to get the corresponding B_k values I'll have to solve a system of 25 non-linear equations which can be done using MATLAB
Neither are required. Instead of solving the 25 equations, you just add Bk to the list of unknown variables in your problem. The 25 equations become equality constraints in B and mu and and the inequality constraint in your post becomes a linear inequality constraint on B only.

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by