licememo.gms : License Memorandum
This model generates a license memorandum with all licensed components
and available subsystems.
When you purchase GAMS you buy components like the BASE component,
solver components like CONOPT, and GAMS language extension components
like MPSGE. Each licensed component enables you to run the associated
subsystems (mostly solvers). Each licensed component comes with an
expiration and a maintenance date. Subsystems corresponding to a
licensed component will stop working after the expiration date. GAMS
distributions that are not newer then the maintenance date will allow
you to run the subsystems associated with the component in full mode.
Reference:
- GAMS Development Corporation, Formulation and Language Example.
Small Model of Type: GAMS
$Title License Memorandum (LICEMEMO,SEQ=307)
$ontext
This model generates a license memorandum with all licensed components
and available subsystems.
When you purchase GAMS you buy components like the BASE component,
solver components like CONOPT, and GAMS language extension components
like MPSGE. Each licensed component enables you to run the associated
subsystems (mostly solvers). Each licensed component comes with an
expiration and a maintenance date. Subsystems corresponding to a
licensed component will stop working after the expiration date. GAMS
distributions that are not newer then the maintenance date will allow
you to run the subsystems associated with the component in full mode.
$offtext
Sets ModelTypes / system.ModelTypes /
Components / system.Components /
SolverNames / system.SolverNames /
LicenseOptions / system.LicenseOptions /
ComponentSolverMap(Components,SolverNames) / system.ComponentSolverMap /
SolverPlatformMap(SolverNames,*) / system.SolverPlatformMap /
Set s(SolverNames) Solvers available for this platform
c(Components) Components available for this platform;
s(SolverNames) = sum(SolverPlatformMap(SolverNames,'%system.platform%'),1);
c(Components) = sum(ComponentSolverMap(Components,s),1);
alias (*,u,v);
file fm /licememo.txt/; fm.pw = 72;
put fm 'L I C E N S E M E M O R A N D U M':<>fm.pw /
'GAMS Development Corporation':<>fm.pw //;
$set filename %gams.license%
$if '%filename' == '' $set filename %gams.sysdir%gamslice.txt
if(%system.licensestatus%,
put '**** Error Message: %system.licensestatustext%'
/ '**** License file : %filename%'
/ '**** System downgraded to demo mode'// );
$onputS
Serial : %system.LicenseDC% : %system.LicenseID% : %system.LicenseDateS%
Licensee : %system.LicenseLicensee%
: %system.LicenseInstitution%
Platform : %system.LicensePlatformText%
%system.LicenseType%
%system.LicenseLevelText%
%system.LicenseMUDText%
Vendor : %system.LicenseVendor%
$offput
$set LExpDate %system.LicenseDateEvalS% (%system.LicenseDaysEval% days left)
$ifi %system.LicenseDaysEval% == INF $set LExpDate Indefinite
scalar TodayDate; TodayDate=jnow;
put "Today's date : " TodayDate.date
/ "License Expiration : %LExpDate%"
$ifi %system.LicenseDaysEval% == INF
/ 'M&S Expiration : %system.LicenseDateMaintS% (%system.LicenseDaysMaint% days left)'
put // 'Licensed Components:'
if(card(ComponentEDate),
put /;
loop(SortedUels(u,c)$ComponentEDate(c),
put / ' ' Components.te(c):48 ' ';
if(ComponentEdate(c)=Inf,
put 'M&S due ' ComponentMDate.date(c)
else
put 'expires ' ComponentEDate.date(c))
loop(LicenseOptions$ComponentLicenseOptions(c,LicenseOptions),
put / @5 ComponentLicenseOptions(c,LicenseOptions):0:0 ' ' LicenseOptions.te(LicenseOptions)))
else put ' none' );
Put //;
$if set short $exit
put / 'Licensed Subsystems:';
scalar cnt;
if(card(ComponentMDate),
put /;
loop(SortedUels(u,c)$ComponentMDate(c),
put / Components.te(c):0 @17; cnt=0;
loop((v,s)$(SortedUels(v,s)*ComponentSolverMap(c,s)), put$(mod(cnt,4)=0) / ' ':18; cnt=cnt+1; put ' ' s.tl ));
else
put ' none' / );
put /// 'Solver/Modeltype Matrix:';
Set licSolvers(SolverNames); licSolvers(s) = sum(ComponentSolverMap(c,s),ComponentMDate(c));
file.pw=120;
if(card(licSolvers),
put // @13; loop(ModelTypes, put ModelTypes.tl:7);
loop(SortedUels(u,licSolvers)$sum(ModelTypes,SolverCapabilities(licSolvers,ModelTypes)),
put / licSolvers.tl;
loop(ModelTypes, put ' ':7; put$SolverCapabilities(licSolvers,ModelTypes) @(fm.cc-7) 'yes ' ))
else put ' none' );