-------- Forwarded Message -------- From: Mike Appleby <[email protected]> To: Heinrich Schuchardt <[email protected]> Cc: [email protected] Subject: Re: [Help-glpk] [Fwd: Re: [Fwd: graceful tree labeling example]] Date: Thu, 5 Oct 2017 18:56:20 -0500
Hi Heinrich, Thanks for the tip! Removing the integer constraints on the variables el and vl does seem to speed things up for some of my test inputs, at least when calling glpsol with default options. I did have to add some round() calls in the check statements at the end though. Apparently the solver sometimes produces floating point values very close but not quite equal to the desired integer. Perhaps a limitation in the precision of the underlying float values? If the maintainers prefer to include the version with fewer integer constraints, just let me know and I'll send it in another attachment. Mike On Thu, Oct 5, 2017 at 3:47 PM, Heinrich Schuchardt <[email protected]> wrote: > Hello Mike, > > your model uses more integers than needed. This typically makes problems > harder to solve. > > You just need the binaries gt, vx, and ex. All other variables can be > float. The constraints enforce that they will be integer. > > Best regards > > Heinrich Schuchardt > > On 10/05/2017 09:28 PM, Andrew Makhorin wrote: >> -------- Forwarded Message -------- >> To: Andrew Makhorin <[email protected]> >> Cc: [email protected] >> Subject: Re: [Help-glpk] [Fwd: graceful tree labeling example] >> Date: Thu, 5 Oct 2017 13:55:08 -0500 >> >> The merged model and data sections are attached, gzipped this time to >> hopefully avoid confusing the mime type detection. >> >> Thanks for including the model. >> >> cheers, >> >> Mike A. >> >> On Thu, Oct 5, 2017 at 1:05 PM, Andrew Makhorin <[email protected]> wrote: >>>> I recently implemented a MathProg model that attempts to generate a >>>> graceful labeling for a given input tree. I thought I'd post here to >>>> see if there was any interest in including it in the examples that >>>> come with the GLPK source distribution. >>>> >>>> The model and an example data file are attached. You can also find >>>> them on github, along with a README and a few more example inputs: >>>> >>>> https://github.com/appleby/graceful-tree >>>> >>>> This is my first attempt at a MathProg model, so I'm happy to hear >>>> corrections or suggestions for improving the model in any case. >>>> >>> >>> Thank you for your contribution. >>> >>> Please merge model and data sections into one file and then post it to >>> the list. I will include it into the next release of the package. >>> Thanks. >>> >>> Andrew Makhorin >> >> >> >> _______________________________________________ >> Help-glpk mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/help-glpk >> _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
