Thank you Marc, Vijay and Joao for all your help. I might use a simple version of the code in the initial version and then iterate to a more efficient version if the prototype proves popular. I will send the github location as soon as I have a basic version done David
On 29 October 2013 16:37, Vijay Patil <[email protected]> wrote: > Hi David > > As Joao pointed, http://khep.dcc.fc.up.pt/~fdabrandao/vpsolver/ seems to > be good example of what you are trying to do with cspsol. My web > development skills are not very good, so I do not have direct answer for > you, but I tried to find out internal details of above URL using browser > tools. > > It looks like PHP ("solve.php") is used to execute the C/C++ program and > Javascript is used to manage input and output between webpage and the C++ > programs, following is the some code segment: > > $.post("solve.php", { "instance": inst }).done(function(data) { > //alert(data); > Pid = parseInt(data); > if(Pid == -1){ > msgpopup("Please try again later.", false); > $('#logcontent').val("The server is busy. Please try again > later."); > }else if(Pid == -2){ > Pid = -1; > msgpopup("Please try again later.", false); > $('#logcontent').val("You've reached your submission limit. > Please wait and try again later."); > } > }); > > > Standard way of executing a C++ program on webserver is CGI. All the best > for hackathon and do post about your GLPK project. > > > > On Sun, Oct 27, 2013 at 6:45 PM, David Curran <[email protected]>wrote: > >> I think it would be fun to turn cspsol into an easy to use web app. >> cspsol: Simple Cutting Stock Problem Solver Using GLPK API >> https://code.google.com/p/cspsol/<http://www.linkedin.com/redirect?url=https%3A%2F%2Fcode%2Egoogle%2Ecom%2Fp%2Fcspsol%2F&urlhash=XHaT&_t=tracking_anet> >> >> I plan to do this at the #hack4good hackday in Dublin on Tuesday >> >> http://blog.geekli.st/post/64940486207/geeklist-hack4good-goes-to-the-web-summit-in-dublin<http://www.linkedin.com/redirect?url=http%3A%2F%2Fblog%2Egeekli%2Est%2Fpost%2F64940486207%2Fgeeklist-hack4good-goes-to-the-web-summit-in-dublin&urlhash=3Tu4&_t=tracking_anet> >> >> Do you have any advise on how to do this? What do you think is the best >> way to integrate cspsol with a web server? I presume the advise will hold >> for other programs based on GLPK. >> >> One obvious way is to use the standard web programming languages to turn >> user input into the format cspsol wants. Then get php (or ruby or python) >> make a system call to run cspsol. And then to parse the results to a format >> that can be easily understood by the user. >> >> Is this how you would create a web app like this? >> Thanks for the help >> David >> >> _______________________________________________ >> Help-glpk mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/help-glpk >> >> > > > -- > -- > Vijay Patil >
_______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
