Please suggest how to solve this optimization problem

Can you please suggest me how to solve this optimization problem ?
OBJECTIVE FUNCTION:
Minimize x(3)
Subject to:
1/factorial x(1) < x(3)
1/factorial x(2) < x(3)
x(1) + x(2) < 100
x(1) and x(2) are integers and > 0
please do reply,Thanking you in advance!!

2 件のコメント

Birdman
Birdman 2018 年 4 月 16 日
編集済み: Birdman 2018 年 4 月 16 日
What do these statements indicate?
1/factorial x(1) < x(3)
1/factorial x(2) < x(3)
Which variable's factorial is taken?
Parikshit  Sharma
Parikshit Sharma 2018 年 4 月 16 日
x(1), x(2) and x(3) are my variables,
here factorial of x(1) and x(2) are being calculated
so
[1/factorial(x(1))] < x(3)
[1/factorial(x(2))] < x(3)
In statement meaning
[1/factorial(x(1))] should be less than x(3)
[1/factorial(x(2))] should be less than x(3)

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

 採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 16 日

0 投票

x1 is 49, x2 is 50, x3 is 1/factorial(49) * (1+eps)

7 件のコメント

Parikshit  Sharma
Parikshit Sharma 2018 年 4 月 16 日
Thanks walter, i know the answer and analytically it can be seen that
x(1) = 50
x(2) = 50
X(3) = 1/factorial(50)
But i wanted to know that how to solve this problem using matlab so can you please tell me how have you done this?
Walter Roberson
Walter Roberson 2018 年 4 月 16 日
The 50/50 solution violates the constraint that the sum is less than 100
Parikshit  Sharma
Parikshit Sharma 2018 年 4 月 16 日
yes yes you are absolutely right, it will be 49 and 50
but can you please tell me how have you solved this problem using matlab?
Walter Roberson
Walter Roberson 2018 年 4 月 16 日
ga with NO integer constraints. Use ub and lb. Use an A, b pair that asserts the sum is less than 100. Use custom generation and crossover and mutation functions that only ever generate integer values in range. Use the optios structure to provide an initial population of at least one point that is in range. Use a nonlinear constraint function to test the factorial
Although this would seem at first to being a good match for using integer constraints, when you use those you cannot use nonlinear constrain function with integer constraints as the optimization needs to take over those to enforce the integer constraints.
Along the way you should think about how you are going to deal with the fact that you cannot express 100! accurately as an integer.
Parikshit  Sharma
Parikshit Sharma 2018 年 4 月 16 日
編集済み: Parikshit Sharma 2018 年 4 月 16 日
Thank you walter for your prompt replies,
I am using optimization toolbox to solve this problem
I am not able to understand that how to ensure integer variable by using custom generation, crossover and mutation functions
Walter Roberson
Walter Roberson 2018 年 4 月 16 日
Crossover function:
If you move x3 around then floor or round or ceiling to get an integer value and verify it is at least 1.
Walter Roberson
Walter Roberson 2018 年 4 月 16 日
Mutation function: use randi for generating for x1 or x2. Use a floating point generator for x3. You will need to decide on the range to generate over.

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

その他の回答 (1 件)

Parikshit  Sharma
Parikshit Sharma 2018 年 4 月 17 日

0 投票

Walter I have to say thank you for such a prompt reply. Simply a few more questions to elaborate a bit more.

i am very new to matlab and so if possible then can you please provide me any link or elaboration so that i can better understand how to incorporate integer constraint with the help of mutation and crossover,

lastly i am attaching my problem of optimization as a image file kindly look into it and provide me a way to solve it, i used genetic algorithm using integer constraints and results obtained are not correct and so that is the reason that i want to know how to incorporate integer constraints using custom mutation and crossover function.

Thanking you in advance!

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by