フィルターのクリア

How to define parameters as unknown constants for an optimization problem?

1 回表示 (過去 30 日間)
Rui Santos
Rui Santos 2020 年 4 月 28 日
コメント済み: Rui Santos 2020 年 4 月 28 日
Hello,
I am a begginer in Matlab and I'm trying to solve the maximization problem below,
I looked up some simple code that I tried to adapt but I think the problem is in how I can't find a way to define parameters as constants and i get an error everytime I try to run the code I'm trying to use (below, with incorrect definition of parameters)
t = [];
h = [];
b = [];
e = [];
l = [];
m = [];
F = [];
f = [];
s = [];
p = optimvar('p');
q = optimvar('q');
a = optimvar('a');
prob = optimproblem;
prob.Objective = (p - (t*q^l/h))*q^{s-1}*a^{s-1}*(p^{-s}/(P^{1-s}))*Y - f * (a^(1-e)/(1+e)) - F * q^b;
prob.Constraints.cons1 = m*((p - (1-d)*(tq^(l)/h))*(q*a)^(s-1)*(p^(-s)/(P^(1-s)))*Y - (1-d)*f*(a^(1-e)/(1+e)) - F*q^b) >= d*(((tq^(l)/h))*(q*a)^(s-1)*(p^(-s)/(P^(1-s)))*Y - f*(a^(1-e)/(1+e)) - F*q^b);
sol = solve(prob);
My question is, how can I define the parameters as just constant parameters?
  2 件のコメント
Cesar García Echeverry
Cesar García Echeverry 2020 年 4 月 28 日
You should to define your parameters as constrains (equality, inequality or non-linear) and based on that, you should to define de O.F. You must to select the optimization solver.
Rui Santos
Rui Santos 2020 年 4 月 28 日
Did what you said, the constraints on parameters are just non-negativity constraints, now I'm getting the error below, any thoughts?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by