Hi all, recently I have implemented some new functionality for the free software SpaceFuncs and would like to introduce a couple of optimization examples with Olympic rings, devoted to the Olympic games - 2012, that are going on now. They are valid for upcoming version of SpaceFuncs only (already available in subversion repository). In similar way you can solve systems of linear/nonlinear geometrical (in any space dimension) equations (see OpenOpt SLE and SNLE). -
Let's search 5 points (1 from each ring) that form polygon with maximum area. Code is here (or here). -
Well, (1) was quite easy problem that could be done by many ways with many different software. Let's consider more difficult example. Suppose we have several points with different positive or negative weights and would like to place them in the olympic circles so that their centroid (barycenter) would be as close to a target as possible; let's also demand distance between any 2 points has to be no less than 0.15. It is difficult combinatorial optimization problem - each point may belong to one of 5 circles, so number of possibilities is 5^m, where m is number of points; moreover, we have m * (m-1) / 2 difficult nonlinear nonconvex equality constraints (requirements on distances). Fortunately, OpenOpt has awesome solver interalg, that easily solves this problem (for quite small m, although), moreover, with specifiable accuracy fTol: abs(f-f*) <= fTol; we will consider 3 points of weights [15, -0.15, 3]. Code is here (or here)
Best wishes for you country in the Olympic games, Dmitrey.
asked
Dmitrey |