How to use linprog to maximize
4 ビュー (過去 30 日間)
古いコメントを表示
I am trying to maximiza :
expected insurance profit: p - πX where p is premium, π is probability (0,1) and X (cover)amount of monet has been paid by insurance firm to consumer for loss
W1 = Wo - e - p (no loss) where e is effort of consumer to avoid from accident and Wo initial wealth of consumer
W2 = Wo - e - p - l + X (with loss) where l is loss of consumer and U(W)=ln(W)
subject to (expected utility of consumer) : (1-π)U(W1)+πU(W2)
(1-π)U(Wo - e - p) + (π)U( Wo - e - p - l + X) ≤ Uh where U means utility and Uh is the highest utility consumer can get.
How I can write this maximization problem in matlab?
Thank you
0 件のコメント
回答 (1 件)
Shaunak
2025 年 6 月 10 日
It is my understanding that you want to solve an insurance profit maximization problem with consumer utility constraints in MATLAB.
You cannot use 'linprog' for this problem because the constraint contains logarithmic utility functions, making it nonlinear. The function 'linprog' only handles linear programming problems where all constraints must be of the form Ax ≤ b.
However, you can use MATLAB's 'fmincon' function for constrained nonlinear optimization. Since 'fmincon' minimizes functions, you need to negate your profit function for maximization as shown below:
% Objective: maximize p - π*X (negative for minimization)
objective = @(x) -(x(1) - pi * x(2));
You can now minimize the function using 'fmincon'. For further reference on maximizing with 'fmincon' to find the maximum profit, refer to this MATLAB Answers thread: https://www.mathworks.com/matlabcentral/answers/866545-maximize-objective-function-using-fmincon-with-a-limit
For more information on the 'fmincon' function, please refer to the MathWorks documentation of 'fmincon' function linked below: https://www.mathworks.com/help/optim/ug/fmincon.html
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!