Re: [Help-glpk] [Fwd: GLPK enhancement]
On Fri, 20 Mar 2015, Erik Quaeghebeur wrote: Heinrich Schuchardt: On Linux you can create a FIFO with mkfifo and pass the path to the GLPK. On Windows you can create a named pipe and use its path (CreateNamedPipe). Thanks for the idea. Sadly enough for my needs, Python does not provide a unified interface for named pipes it seems, so a temporary files is still better from the portability perspective. If you are dead set against a temporary file and have the documentation for your C, you could create your own pseudo-FILE that simply read from the string. It's probably not worth the effort. -- Michael henne...@web.cs.ndsu.nodak.edu SCSI is NOT magic. There are *fundamental technical reasons* why it is necessary to sacrifice a young goat to your SCSI chain now and then. -- John Woods ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: GLPK enhancement]
Heinrich Schuchardt: On Linux you can create a FIFO with mkfifo and pass the path to the GLPK. On Windows you can create a named pipe and use its path (CreateNamedPipe). Thanks for the idea. Sadly enough for my needs, Python does not provide a unified interface for named pipes it seems, so a temporary files is still better from the portability perspective. Erik ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: GLPK enhancement]
I am presently working with GLPK, and would find it very useful to have a function which reads data from a string. Probably such a feature would be useful, however, it seems quite exotic. Actually, such functionality would be very useful for anyone using GLPK in an interactive shell, so especially for interpreted-language wrappers of GLPK. Creating a temporary file feels like a hack in such contexts. I missed this in the API when working on ecyglpki: https://github.com/equaeghe/ecyglpki/issues/3 For me this is not about interacting with the model (using the API for that seems the right approach), but for visualization and pre- and post-processing purposes. Best, Erik ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: GLPK enhancement]
I am presently working with GLPK, and would find it very useful to have a function which reads data from a string. Similar to the glp_mpl_read_data(glp_tran *tran, const char *fname),however rather than having to write the data to a file, I could directly interact with the model through a string describing the data requirements. Probably such a feature would be useful, however, it seems quite exotic. I think you might consider two alternatives: i) writing a wrapper that copies the data from the string to a temporary file and then calls glp_mpl_read_data; or ii) using glpk api. Best regards, Andrew Makhorin ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: GLPK enhancement]
I am presently working with GLPK, and would find it very useful to have a function which reads data from a string. Probably such a feature would be useful, however, it seems quite exotic. Actually, such functionality would be very useful for anyone using GLPK in an interactive shell, so especially for interpreted-language wrappers of GLPK. Creating a temporary file feels like a hack in such contexts. In any case the model is read from a file, so passing the data via a string would not reduce overheads. I missed this in the API when working on ecyglpki: https://github.com/equaeghe/ecyglpki/issues/3 For me this is not about interacting with the model (using the API for that seems the right approach), but for visualization and pre- and post-processing purposes. Best, Erik ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: GLPK enhancement]
On Linux you can create a FIFO with mkfifo and pass the path to the GLPK. On Windows you can create a named pipe and use its path (CreateNamedPipe). Best regards Heinrich Schuchardt http://www.xypron.de Am 18.03.15 um 13:13 schrieb Andrew Makhorin I am presently working with GLPK, and would find it very useful to have a function which reads data from a string. Probably such a feature would be useful, however, it seems quite exotic. Actually, such functionality would be very useful for anyone using GLPK in an interactive shell, so especially for interpreted-language wrappers of GLPK. Creating a temporary file feels like a hack in such contexts. In any case the model is read from a file, so passing the data via a string would not reduce overheads. I missed this in the API when working on ecyglpki: https://github.com/equaeghe/ecyglpki/issues/3 For me this is not about interacting with the model (using the API for that seems the right approach), but for visualization and pre- and post-processing purposes. Best, Erik ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: GLPK enhancement]
Forwarded Message From: Robert Rand robertdavidr...@yahoo.ca Reply-to: Robert Rand robertdavidr...@yahoo.ca To: help-glpk@gnu.org help-glpk@gnu.org Subject: GLPK enhancement Date: Mon, 16 Mar 2015 17:34:49 + (UTC) Hello, I am presently working with GLPK, and would find it very useful to have a function which reads data from a string. Similar to the glp_mpl_read_data(glp_tran *tran, const char *fname),however rather than having to write the data to a file, I could directly interact with the model through a string describing the data requirements. Thanks, Robert ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk