Search found 13 matches

by cnbrksnr
3 years ago
Forum: Syntax
Topic: Power of a matrix
Replies: 1
Views: 1946

Re: Power of a matrix

Hello,

Cayley-Hamilton theorem may be useful for calculating powers of a matrix without actually computing A^n

https://en.wikipedia.org/wiki/Cayley%E2 ... _of_matrix
by cnbrksnr
3 years ago
Forum: Syntax
Topic: Infeasibility as a variable
Replies: 2
Views: 2143

Re: Infeasibility as a variable

Renger wrote: 3 years ago Hi
You can save the solve status in a parameter.

Code: Select all

b = mymodel.solvestat;
Have a look at the solvestat possible values here.

Cheers
Renger
Awesome, thank you Renger!
by cnbrksnr
3 years ago
Forum: Syntax
Topic: Infeasibility as a variable
Replies: 2
Views: 2143

Infeasibility as a variable

Hello all!

I want to create a variable in GAMS that returns the feasibility of the solution. For example, say the variable is 'b', and once the solution is completed, I want b=1 if the solution is feasible, and b=0 if infeasible. Is there any way to do that?

Thanks in advance!