Page 1 of 1

Number of variable and constraints

Posted: Fri Oct 26, 2018 5:10 pm
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

Re: Number of variable and constraints

Posted: Mon Oct 29, 2018 4:28 pm
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

Re: Number of variable and constraints

Posted: Mon Oct 29, 2018 6:32 pm
by richard
Yes! Thanks a lot!