I am trying to implement a subtour constraint using Miller-tucker-Zemlin(MTZ) constraint but it seems this reference https://groups.google.com/forum/#!searchin/ampl/subtour%7Csort:date/ampl/FVQ-iZIhUHg/ZT2rPNP4BAAJ which I went to this https://groups.google.com/forum/#!msg/ampl/mVsFg4mAI1c/ZdfRHHRijfUJ . Is there a way to implement a constraint without the run file? Can it be implemented using just a constraint in model file? I am using MATLAB API for AMPL.Thanks
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
On Sun, Aug 5, 2018 at 1:05 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Thanks you very much for the insight.
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
On Sun, Aug 5, 2018 at 1:05 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Thanks Filipe Brandão. This is exactly what I needed. Even better, you had
the code. Hats off to you.
On Fri, Aug 3, 2018 at 10:05 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
The subtour elimination constraints in that link are stronger subtour elimination cuts that can only be generated iteratively for each subtour found. However, these are not Miller-tucker-Zemlin(MTZ) cuts, which can be introduced in your model as follows:
param n := card(NODES);
param start symbolic := first(NODES);
var u{i in NODES}, >= 0;
# Miller, Tucker and Zemlin (MTZ) (1960)
subject to MTZ{(i,j) in PAIRS: i != start}:
u[i]-u[j]+(n-1)*X[i,j] <= n-2;
You may also be interested in the stronger Desrochers and Laporte (1991) cuts, which are very similar but slightly stronger:
# Desrochers and Laporte (1991)
subject to DL{(i,j) in PAIRS: i != start}:
u[i]-u[j]+(n-1)*X[i,j]+(n-3)*X[j,i] <= n-2;
I have attached a model and a data file with these cuts. Please note that for large scale problems these cuts will not be enough and you will need to use stronger cuts such as the ones in that link.
Best regards,
Filipe
--
Filipe Brandão
am...@googlegroups.com
On Fri, Aug 3, 2018 at 3:51 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
I am trying to implement a subtour constraint using Miller-tucker-Zemlin(MTZ) constraint but it seems this reference https://groups.google.com/forum/#!searchin/ampl/subtour%7Csort:date/ampl/FVQ-iZIhUHg/ZT2rPNP4BAAJ which I went to this https://groups.google.com/forum/#!msg/ampl/mVsFg4mAI1c/ZdfRHHRijfUJ . Is there a way to implement a constraint without the run file? Can it be implemented using just a constraint in model file? I am using MATLAB API for AMPL.Thanks
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/sijPeX1_rE0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.