Hi, I want to solve a problem with the Banch and Bound method with assistance of AMPL, however, when I want to declare just one variable as integer the program sends error.
I have been using this .mod file:
param n; #Nº de variables de decisión
param m; #Nº de restricciones
param c{i in 1..n}; #Vector de coeficientes función objetivo
param a{j in 1..m, i in 1..n}; # Matriz de coeficientes de las restricciones
param b{j in 1..m};# vector de lados derechos
var x{i in 1..n} >=0 ; #Variabes de decisión
maximize valor: sum{i in 1..n} c[i] * x[i]; #Función objetivo
subject to Restricciones{j in 1..m}:
sum{i in 1..n} a[j,i] * x[i] <= b[j]; #Restricciones
If someone could teach me how to declare, for example just X[4]
as an integer with value >=5
I would be extremely thankful.
That’s all. Good day.