[Coin-discuss] Re: [Coin-symphony] Variable names & Large problems & RTC error

Ted Ralphs tkralphs at lehigh.edu
Tue Dec 6 11:50:37 EST 2005


ZT wrote:
> Hello,
> 
> I have a few questions and would appreciate it if
> someone could help me:
> 1.)i was checking the Symphony documentation, but i
> havent found any function, that would let me get
> variable names out of a mps file. Is this actually
> possible? I would need that, so i could distinguish
> variables from one and other.

There is a function sym_get_col_names() that should give you the column 
names after reading in an MPS file.

> 2.)The other problem i stumbled across is:
> im working with a very large optimization problem,
> that has 100.000 variables and even more bounds. After
> solving, i would like to get the array of solutions
> with 
> "sym_get_col_solution(Problem, Vars)" 
> and 
> "sym_get_row_activity(Problem, Bounds)"
> but i cannot declare such a big arrays, due to stack
> problem. If i try to work with pointers:
> "double* Var = new double[100000]"
> it compiles OK, but when i run it, it throws me
> "access violation". Any ideas?

This is a pretty big chunk of memory. Perhaps the memory allocation is 
failing. Here's a short article you might want to take a look at that 
discusses checking for failures in memory allocation in C++:

http://www.informit.com/articles/article.asp?p=30642&seqNum=2&rl=1

You could also try running your code through a memory debugger such as 
valgrind or purify.

> 3.)When solving large problems, after a while(when it
> gets to a certain node) i get "Run time check failure
> #3 - The variable 'elapsed_time' is being used without
> being defined". In the console it writes the node
> number, upper & lower bound and tries to check elapsed
> time too, but i get the above mentioned error. What is
> wrong?

Hmmm, this appears to be a run-time error from VC++, but I'm not sure 
what it means. Goggling the phrase, I got a bunch of hits, but none are 
helpful. Is it possible to send me your MPS file?

> Im using Windows & Visual Studio 6.
> 
> thanks in advance, bye

-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2



More information about the Coin-discuss mailing list