|
From: | Eric Winter |
Subject: | Re: [Help-glpk] mathprog assistance |
Date: | Tue, 29 Mar 2016 10:25:05 -0400 |
Jeff, thank you very much for all that feedback. It will be a great help for me, both for this specific scenario and to better understand mathprog and GLPK.Hopefully others can benefit from your help too, if they find themselves in a similar situation to me.regards,NickOn 29 March 2016 at 08:29, Jeffrey Kantor <address@hidden> wrote:Nick,I've attached a more refined model for your problem. There are a large number of changes designed to improve efficiency and readability.1. The data section format has revised to better consolidate parametric data, and to provide non redundant entry of linac capabilities. This makes use of the 'setof' glpk statement.2. Syntax has been simplified in various parameter and variable declarations.3. Your model will report an infeasible solution if not all patients can be assigned to machines. This has been changed so that it assigns as many as possible given time and capability constraints. You could create a report of those left assigned.4. The objective function has been simplified with regard to encroachments on excluded time periods.5. Redundant sequencing constraints and variables have been removed.6. Redundant scheduling variables have been removed.7. Additional solution reports have been added for patient and machine schedules.8. The Big M (here K) has been fixed to the number of minutes in a day.All in all, this should provide a smaller, faster, and more robust model. It could still use some additional parameter checks, but thought this might be a good.For what it's worth, it runs quite well inside the MathProg webpage at http://www3.nd.edu/~jeff/mathprog/mathprog.html.JeffOn Sun, Mar 27, 2016 at 11:33 PM Jeffrey Kantor <address@hidden> wrote:OK. Here are some quick thoughts ...1. You can simplify the data section by defining the sets L and P when defining parameters. No efficiency gain here, just cleaner.2. When I run as is, there are 456 binary variables, 1045 constraints. The sequence constraints only need to be defined for p < q sincethe case q > p is redundant.That change alone reduces the problem to 246 binary variables and 625 constraints.3. I haven't tested this, but defining start times as x[p,l] seems redundant. The same information is coded in x[p] and lp[p,l].Points 1 & 2 are illustrated in the attached file.JeffOn Sun, Mar 27, 2016 at 10:41 PM Nick Farrell <address@hidden> wrote:Hi Jeff, thanks for looking.
My contrived example may be setting only one capability, but usually some would have multiple capabilities. For example, an IMRT machine may also have VMAT capabilities.
My intention is that if a patient requires multiple capabilities, they all have to be simultaneously satisfied before a linac is a viable candidate.
Hope that helps.
Nick
On 28 Mar 2016 1:18 PM, "Jeffrey Kantor" <address@hidden> wrote:Hi Nick,In looking through the model, one question concerns the linac capabilities. These are coded as IMRT, VMAT, and MRI. Each machine has one and only one of the of these capabilities. And each patient requires one and only capability. Is that true in general, or is that just true for this example?JeffOn Sun, Mar 27, 2016 at 9:50 PM Nick Farrell <address@hidden> wrote:It appears the list server is scrubbing my text files:
_______________________________________________
schedule.mod:
https://drive.google.com/file/d/0B8FyZKjT_SdKQy1wN3FBRWt6a2c/view?usp=docslist_api
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk
[Prev in Thread] | Current Thread | [Next in Thread] |