How can I write division on A matrix (ga)
1 view (last 30 days)
Show older comments
Hello I m using ga for integer linear problem. And I want to use division when I created A matrix.
General constrain structure is A*x ≤ b. However I want to use x1/X2<=b constraint.
For general structure , we write A on A matrix and b on b matrix for X variables
My question is how can I write X1/x2 on A matrix (x1 and x2 are variable)
0 Comments
Answers (1)
Walter Roberson
on 22 Sep 2017
That would be an A matrix row with 1 at x1 position and -b in x2 position, with a corresponding 0 in the b matrix
2 Comments
Walter Roberson
on 23 Sep 2017
If X1, X2, and X3 are all entries in the x vector, then that would be a non-linear constraint.
ga() with integer constraints does not permit nonlinear equality constraints, but it does permit nonlinear inequality constraints, so it is permitted to use that kind of formula. You could code it in the nonlinear constraints as
x(1) - x(2)*x(3)
See Also
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!