LinearProgramming does not work when MathKernel is called directly

Hi,
I am experiencing a problem with LinearProgramming (Mathematica 8.04 or 9). If I launch the *.m file under Wolfram Mathematica OR Wolfram WorkBench - everything is OK and optimization is completed within ~10 seconds.

Command line for optimization is: Result=N[LinearProgramming[Objective,Aeq,beq,Limits,Method->RevisedSimplex]];

But when I call MathKernel.exe directy using system command**: MathKernel.exe -nopromt -initfile “file.m”** - IT DOES NOT solve the optimization, that is the calculation time is infinite (or very long)… it takes CPU but never finishes (haven’t tried more than half an hour though)

What could be the problem - wrong settings??

Best regards,

Indrek

Well, after ~2h it gives me: LinearProgramming::lpsnf: No solution can be found that satisfies the constraints.

So it solves with Mathematica or WorkBench within seconds, but is unable to solve with MathKernel lauched directly.

Any ideas?

Try changing just one thing at a time. What happens if you open full Mathematica and evaluate

<<file.m 

?

Are all the Aeq capitalized and all the beq not capitalized?

Did you check that none of the Capitalized User Variables you have conflict with built-in names?

Hi,

It DOES run under mathematica whether I press the “Run package” button ot use direct path as you suggested.

I am not sure what you mean with Aeq capitalized and beq not capitalized… there is no conflict with built in names - I am quite sure of it…(99,99999%).

I could send the problematic part of my scirpt on e-mail for analysis if it would help - cannot paste it here, too big. (724 kB)

Best regards,

Aeq and aeq are different variable names in Mathematica.

Send enough of the file.m file so it can be run here. Reading hundreds of lines of code is not practical.
address: support@wolfram.com
In the text section of the email, include

  • your Mathematica’s License Number or Activation Key,
  • the Mathematica version,
  • the operating system level,
  • a description of the problem,
  • what you tried, and
  • the link to this discussion thread.