Multiple simultaneous discrete optimization problems

3 ビュー (過去 30 日間)
Konstantinos Belivanis
Konstantinos Belivanis 2015 年 8 月 16 日
回答済み: Konstantinos Belivanis 2015 年 8 月 19 日
Dear all,
my question is based off of this example:
but with the following change.
In the example we had to optimize the volume of one beam for the given P, L, σmax, δmax.
What I would like to do is to optimize the volume (same x(i)s - i=1:10) for three different beams having different P, L, σmax, δmax.
Then I would like a report showing the smallest volume if I have to use only one, two, three, etc. beams.
Do you think it's doable?
Thanks
  3 件のコメント
Konstantinos Belivanis
Konstantinos Belivanis 2015 年 8 月 18 日
A loop doesn't seem to work well with functions. The reason is that:
1. The number of variables is a function of the number of beams I want to use.
2. I can't have variables in a function (or at least I don't know how).
Again to explain what I would like to do:
What I would like to do is to optimize the volume (same x(i)s - i=1:10) for three different beams having different P, L, σmax, δmax.
And I would like to get the best result if I were to have one beam that was satisfying the three of them (waste of material but maybe fabrication costs would go down) or two beams or three beams.
James Wiken
James Wiken 2015 年 8 月 18 日
A loop should work fine with functions. I understand the number of variables changes based on the number of beams you are optimizing for. You can write functions that can take a varying number of inputs to handle this. To accomplish this, reference the documentation links for 'varargin' and 'nargin' below:

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

採用された回答

Konstantinos Belivanis
Konstantinos Belivanis 2015 年 8 月 19 日
Solved by just entering more parameters in the function. And doing the loop outside of it.
If anybody has the same issue, I can provide more info.

その他の回答 (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