# Mapping Conditions in Transformational Space

1. Oct 2, 2012

### CluelessEngg

Hello,
My problem is as follows:
I want to generate a series of 24 dimensional random numbers to act as the starting population for a genetic algorithm. These numbers need to fully span the space which is limited by a series of nonlinear boundary conditions.

The 24 dimensional vector is a scaling vector which scales currents flowing in 64 different coils. There is a linear transformation matrix (call it A) [64x24] which maps the scaling vector (call it x) to the current space (call this vector B). So the problem is Ax = B.

The problem is the boundary conditions for the space are in the 64 dimensional current space. The conditions are:
1) The current in a given coil cannot exceed abs(500mA) (each abs(B(< 500mA)
2) The total sum of positive currents cannot exceed 6000mA
3) The total sum of negative currents cannot exceed -6000mA
4) The difference between positive and absolute value of negative currents cannot exceed 2500mA.

How can I bound the problem space so that the random number generator doesn't continuously generate illegal values?

Any insight would be greatly appreciated.

2. Oct 3, 2012

### Stephen Tashi

Clarify whether all the the constraints are expressible as linear inequalities involving the members of $B$.

Suppose the problem is to generate random vectors $x$
subject to constraints defined by

$A_{[64 \times 24]} x_{[24 \times 1]} = B_{ [64 \times 1] }$

where $B$ can be any matrix satisfying linear constrains of the form

$C^i_{[1 \times 64]} B_{[64 \times 1]} \ge 0$ for $i = 1,2,..N$

Since the members of $B$ are linear combinations of the members of $x$, the constraints can be re-written as linear constraints on the members of $x$.

So the problem becomes to generate random vectors $x$ satisfying a system of linear constraints of the form
$D^i_{[1 \times 64]} x_{[64 \times 1]} \gt 0$, $i = 1,2,..N$.

I don't think this is an easy mathematical problem, but it seems to be essence of what must be done.