Number of variable and constraints

Archive of Gamsworld Google Group
Post Reply
richard
User
User
Posts: 27
Joined: 5 years ago

Number of variable and constraints

Post by richard »

Hi everyone !

I have a MIP model in GAMS. ( model name is : TSmodel)

How I can find the number of variable( binary and continues variable ) and number of constraints in Model?

Thanks!
Richard
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Number of variable and constraints

Post by bussieck »

The GAMS Log and listing have this informations:

Log:

Code: Select all

--- Generating LP model b1
--- blend.gms(55) 4 Mb
---   4 rows  10 columns  37 non-zeroes
Listing:

Code: Select all

MODEL STATISTICS

BLOCKS OF EQUATIONS           2     SINGLE EQUATIONS            4
BLOCKS OF VARIABLES           2     SINGLE VARIABLES           10
NON ZERO ELEMENTS            37
Inside GAMS you have access to the model suffixes e.g. b1.numVar after the solve. Find the different model suffixes here: https://www.gams.com/latest/docs/UG_Mod ... AfterSolve. Some of them give you some size information on the just generated and solved model.

-Michael
richard
User
User
Posts: 27
Joined: 5 years ago

Re: Number of variable and constraints

Post by richard »

Yes! Thanks a lot!
Post Reply