# Questions tagged [ampl]

For questions related to the algebraic modeling language AMPL.

18 questions
Filter by
Sorted by
Tagged with
103 views

### VRPTW implementation

Does anybody have an example of the vehicle routing problem with time windows (VRPTW), implemented on Python with CPLEX library, AMPL, or MiniZinc? So far I've looked into ...
104 views

### Add robustness of AMPL code through file name

I want to add robustness to my AMPL code, here is what I am actually doing: In my script I use a .txt file that contains all my parameters, lets call it "instance.txt". I want to print my ...
189 views

### Overwrite on a txt file from AMPL

I have a result I want to save in a .txt file. So I use this line to save a result k: ...
33 views

92 views

61 views

### How to formulate case distinctions in AMPLs objective function?

This is my first real optimisation problem I formulated and now trying to solve by using AMPL. The following objective function is from a linear 0-1 LP means all variables $x_i^b\in\{0,1\}$, with \$i\...
61 views

### Issue interpreting sets of constraints in AMPL

I'm new to AMPL and am trying to model the following constraints. \begin{align}y_{ij3}&\le\sum_\ell X_{j\ell2}\quad(m=2,k=3)\\y_{ijk}&\le\sum_\ell\sum_mx_{j\ell m},\quad\forall i\in I,\forall ...
277 views

### Matrix in ampl: constraint that the values ​are all different

I'm solving the magic square problem for my operational research exam. The constraints of my model are that the sum of the elements on the lines must be equal to a constant (var constant), that the ...
166 views

### Understanding the AMPL Solver LIbrary within Pyomo

For anyone familiar with the Pyomo book, it occasionally makes reference to the AMPL Solver Library, and to my understanding, if you can manage to hook up to the solver library then you are able to ...
124 views

### Obtaining the intermediate solutions in AMPL

I know that for some solvers, for example, the constraint programming solver in Google OR-Tools, it is possible to see all the intermediate solutions that the solver finds while it searches for an ...