From: Leandro Lucarella Date: Mon, 27 Mar 2006 00:50:45 +0000 (+0000) Subject: Modelos y Optimización I. X-Git-Tag: svn_import X-Git-Url: https://git.llucax.com/z.facultad/71.14/clases.git/commitdiff_plain?ds=sidebyside Modelos y Optimización I. --- d50684134c5b72366f74fcba2bcfff000a7ca5bf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9ae1001 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +mods = $(wildcard *.mod) + +results = $(patsubst %.mod,%.result,$(mods)) + +all: $(results) + +%.result: %.mod + @echo Resolviendo $^... + @glpsol --model $^ --bounds $^.bounds > $@ + @echo >> $@ + @echo ------------------------------------------------------------------------ >> $@ + @echo >> $@ + @cat $^.bounds >> $@ + @$(RM) $^.bounds + +clean: + @echo Limpiando... + @rm -fv *.result + +.PHONY: clean + diff --git a/clase1.mod b/clase1.mod new file mode 100644 index 0000000..7f7b3f2 --- /dev/null +++ b/clase1.mod @@ -0,0 +1,13 @@ + +var baguettes, >= 0; /* baguettes a producir por día */ +var panes, >= 0; /* panes a producir por día */ + +maximize + value: 0.3 * baguettes + 0.8 * panes; + +subject to + agua: 0.06 * baguettes + 0.2 * panes <= 80; + levadura: 0.01 * baguettes + 0.012 * panes <= 8; + bolsas: baguettes <= 450; + harina: 0.1 * baguettes + 0.25 * panes <= 100; +end;