Optimization Problem but don't have closed form expression

18 views (last 30 days)
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...

Accepted Answer

Alan Weiss
Alan Weiss on 18 Nov 2021
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

More Answers (1)

Matt J
Matt J on 24 Nov 2021
Edited: Matt J on 24 Nov 2021
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.

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!