1
0
This commit is contained in:
2025-10-10 02:12:44 +02:00
commit dac3abf431
212 changed files with 475579 additions and 0 deletions

21
PI4/modelos/ej2.lsi Normal file
View File

@@ -0,0 +1,21 @@
head section
Integer getN()
Integer getM()
Integer getPrecio(Integer i)
Integer getValoracion(Integer i)
Integer getPresupuesto()
Integer tieneCategoria(Integer i, Integer j)
Integer n = getN()
Integer m = getM()
goal section
min sum(getPrecio(i) x[i], i in 0 .. n)
constraints section
sum(tieneCategoria(i,j) x[i], i in 0 .. n) >= 1, j in 0 .. m
sum(getValoracion(i) x[i], i in 0 .. n) - sum(3 x[i], i in 0 .. n) > 0
sum(getPrecio(i) x[i], i in 0 .. n | tieneCategoria(i,j) > 0) <= getPresupuesto(), j in 0 .. m
bin
x[i], i in 0 .. n