AMPL
AMPL (A Mathematical Programming Language) ist eine mathematische Modellierungssprache, die von Robert Fourer, David Gay und Brian W. Kernighan an den Bell Laboratories entwickelt wurde. Sie erlaubt die Formulierung mathematischer Modelle in abstrakter, der algebraischen Notation naher Form. Mit AMPL können viele Optimierungsprobleme formuliert werden.
Da AMPL diese Probleme nicht direkt löst, sondern in eine Form übersetzt, die ein Optimierungsalgorithmus versteht, benötigt AMPL passende Solver, um funktionieren zu können.
Genügend schwierige Probleme wie globale Optima, nichtlineare Mixed-Integer-Probleme usw. brauchen daher spezielle Solver.
Beispiel
Es ist das folgende mathematische Modell gegeben:
- Variablen:
- : Anzahl von Produkt 1
- : Anzahl von Produkt 2
- Zielfunktion:
- Maximiere
- Nebenbedingungen:
- (Bereich von )
- (Bereich von )
- (Beschränkung für Ressource 1)
- (Beschränkung für Ressource 2)
Eine äquivalente Formulierung in AMPL könnte so aussehen:
# Variablen:
var x1 integer;
var x2 integer;
# Zielfunktion:
maximize z: 400*x1 + 50*x2;
# Nebenbedingungen:
subject to Bereich_x1: 0 <= x1 <= 70;
subject to Bereich_x2: 0 <= x2 <= 500;
subject to Ressource1: 25*x1 + 10*x2 <= 5000;
subject to Ressource2: 100*x1 + 20*x2 <= 8000;
# wenn man dieses Problem loesen will
# braucht man nur noch
solve;
# der Maximierer wird mit
display x1, x2;
# angezeigt
Siehe auch
- AIMMS
- GAMS
- GLPK – Open-Source-Alternative zum proprietären AMPL
- MPL
- OPL Studio
Literatur
- Robert Fourer, David Gay, Brian Kernighan: AMPL: a modeling language for mathematical programming. Duxbury Resource Center, ISBN 0-534-38809-4
Weblinks
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.