A function for finding constrained minimum

A function for finding constrained minimum - mb10@live.it - Сообщения

#1 Опубликовано: 12.09.2013 15:53:02
mb10

mb10

9 сообщений из 20 понравились пользователям.

Группа: User

Attached is a snippet function for calculating the constrained minimum of a scalar function J(x) of several variables.

More specifically it solves the problem:

minimize J(x) in the domain xm <= x <= xM

subject to:
g(x)>=0; (a vector function of m potentially nonlinear inequality constraints)
A*x = b; (r linear equality constraints, A being an rxn matrix)

The algorithm has been adapted from this article (in particular from eqn. (7) on page 4):
http://www.ajbasweb.com/ajbas/2011/894-909.pdf.
minimizerExamples_v01.sm (39 КиБ) скачан 139 раз(а).
2 пользователям понравился этот пост
Radovan Omorjan 12.09.2013 16:12:00, Martin Kraska 12.09.2013 16:15:00
#2 Опубликовано: 12.09.2013 16:14:21
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

I attached a version with function arguments. In the definition, the formal parameter is a function name with the numbers of arguments given, in the call the actual parameter is the function with an UNDEFINED variable as dummy argument, Thus, minimize(J(x), g(x), x ... won't work because x is bound to the initial values vector.
minimizerExamples_Kr.sm (38 КиБ) скачан 150 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Radovan Omorjan 12.09.2013 16:16:00
#3 Опубликовано: 12.09.2013 17:07:22
mb10

mb10

9 сообщений из 20 понравились пользователям.

Группа: User

@ Martin Kraska:

With your changes (and changing the names in the body of the algorithm as well), it seems to work fine now, and I will soon update both files accordingly.

Thank you very much for your explanations!

mb



#4 Опубликовано: 12.09.2013 18:26:21
mb10

mb10

9 сообщений из 20 понравились пользователям.

Группа: User

The attachments in the first post have been updated according to the suggestions of M. Kraska.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений