1.

Solve : How to run another program several times with different input??

Answer»

Hello,

if someone could help me it would be great! I use LINGO, which is a tool for solving LINEAR systems and performing optimization. I have developed some such "programs" in LINGO (LINGO has a "language" of its own). These "programs" take some parameters as inputs and give a number as output. What I WANT is to run this programs I MADE several times, e.g. 1000 times, with different inputs each time. In other words I want to perform a loop, something that LINGO does not give me the means to do.

So, I want to make a batch file that calls the specific file I made in LINGO and runs it several times with different inputs that I will provide in the batch file. Does anyone know how to do this? I am a beginner in writing batch files.If you give examples of LINGO COMMAND line syntax (what a command line with parameters looks like) you will probably get an answer. If you EXPECT us to do the research, maybe not.
I would appreciate if you share the solution of this problem with me as I experience the same problem.
Thanks in advanceEDIT: Geeze, it was a graveyard post.

Quote from: minnie on March 23, 2012, 06:42:46 AM

So, I want to make a batch file that calls the specific file I made in LINGO and runs it several times with different inputs that I will provide in the batch file.

How will you provide the input? Are the numbers in a plain text file, one per line?
This sort of thing could work.

Code: [Select]@echo off
for /f "delims=" %%a in (input.txt) do (
for /f "delims=" %%b in ( ' lingo.exe /switches %%a ' ) do (
>>file.log echo input was %%a and output is %%b
)
)


Discussion

No Comment Found