|
From: | Jeff Hamann |
Subject: | [Help-glpk] writing status from mod files? |
Date: | Thu, 7 Oct 2010 11:27:13 -0700 |
I've been thinking that my --tmlim settings are too short for a project I've been working on, and I can't seem to be able to write the status of the solution from within a mod file. For example, I have a mathprog file that writes out the results; /* can you write out the optimizer status??? */ printf "per.return,ann.return,per.variance,ann.stdev\n" > "ell-one-a-soln.csv"; printf: "%f,%f,%f,%f\n", r_portfolio, 100.0*(((1+r_portfolio)^tdpy)-1.0), sum {i in S, j in S} w[i]*w[j]*cov[i,j], 100.0 * sqrt( ( sum {i in S, j in S} w[i]*w[j]*cov[i,j]) ) / sqrt(1/tdpy ) >> "ell-one-a-soln.csv"; and I would like to know if the solver obtained the optimal solution (and get kkt conditions) or if it hit the time limit. I can't find a keyword that allows me to access elements of the solver from within the mod file. I can obtain the solver status if I export the solution file (glpsol --write), but I'd like to be able to write out the results from directly within the mod file. Is that possible in the current version? Jeff. Jeff Hamann, PhD PO Box 1421 Corvallis, Oregon 97339-1421 541-754-2457 jeff.hamann[at]forestinformatics[dot]com jeff.d.hamann[at]gmail[dot]com |
[Prev in Thread] | Current Thread | [Next in Thread] |