I am trying to run batch of .sav files in CPLEX Interactive Optimizer. IBM provides some documentation here. However, I am facing a few issues:
- After launching the CPLEX Interactive Optimizer, when drag and drop my batch file (
batch_trial.bat) from its location (C:\Users\myname\folder name\) into theCPLEXcommand prompt (that is, when I hit enter afterCPLEX>C:\Users\myname\folder name\batch_trial.bat, I get the error thatCommand '"C:\Users\myname\folder' does not exist. Type 'help' for a list of commands.I understand from some forums that this is because of the 'space' infolder name, however, the answers in those forums said that using double quotation marks would solve this issue. But I use double quotation marks and I still see the error. I tried entering the batch file contents directly into the CPLEX prompt, like this (this is the contents of
batch_trial.bat, as suggested by IBM's documentation):CPLEX> @echo off for /L %%i in (1,1,2) do ( move mytest%i.sav mytest.sav cplex < mycplexcommands move cplex.log mytest%i.log )This doesn't work either: For each of
@echo,for,move,cplexI get similar errors saying that these commands do not exist. I have the twomytest1.sav,mytest2.sav, andmycplexcommands.txtinC:\Users\myname\folder name\. The contents ofmycplexcommands.txtis:read mytest.sav optimize display solution variables 1-10 quitWhat if I don't have similar names for the
.savfiles? For example, if the files names areapg.savandhfb.sav, how do I still get these to be executed by the for loop in the batch file?
Thank you!