From d50684134c5b72366f74fcba2bcfff000a7ca5bf Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 27 Mar 2006 00:50:45 +0000 Subject: [PATCH 1/1] =?utf8?q?Modelos=20y=20Optimizaci=C3=B3n=20I.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile | 22 ++++++++++++++++++++++ clase1.mod | 13 +++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Makefile create mode 100644 clase1.mod 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; -- 2.43.0