// Macro to Execute GAMS on Hidemaru, Written by Nobuhiro Hosoe. // // This macro should be used at your own risk. // // GAMS system folder// //e.g., $gamsdir= "c:\\Program Files\\GAMS23.3\\"; $gamsdir= "c:\\gams\\"; //-------------------// //GMS: input filename, LST: output filename// //eight: filename w/o suffix, suffix: suffix// $GMS=filename; #length=strlen($GMS); $eight=leftstr($GMS,#length -4); $LST=$eight+".lst"; $suffix=rightstr($GMS,3); //If no extention check is needed, drop the following:// if($suffix!="gms"){message "Extension Should be GMS."; endmacro;} //Before solving, save the file.// save; // Execute GAMS with the GMS file// runsync2 $gamsdir+"gams.exe "+"\""+$GMS+"\""; // Open the LST file// openfile $LST; endmacro; // End of macro. //