| X = [x1, x2, x3, x4]R = {[R11, R12, R13, R14, R15, R16],
 [R21, R22, R23, R24, R25, R26],
 [R31, R32, R33, R34, R35, R36],
 [R41, R42, R43, R44, R45, R46]}
 L = [L1, L2, L3, L4, L5, L6]
 T = [T1, T2, T3, T4, T5, T6]
 
 Constraint = (X * R - L)*T = 0
 
 X is what I am trying to solve with the given constraint. R, L and T are fixed.
 Below is a snap of my code. Please give me an example code how I can include the constraint.
 
 public double[] Optimize()
 {
 double[] x = new double[] { 0, 0, 0, 0 };
 double[] s = new double[] { 1, 1, 1, 1 };
 double[] lb = new double[] { 0, 0, 0, 0};
 double[] ub = new double[] { double.PositiveInfinity, double.PositiveInfinity, double.PositiveInfinity, double.PositiveInfinity };
 double epsx = 0.0000000001;
 int maxits = 0;
 
 alglib.minlmstate state;
 alglib.minlmreport rep;
 
 alglib.minlmcreatev(4, x, 0.0001, out state);
 alglib.minlmsetbc(state, lb, ub);
 alglib.minlmsetcond(state, epsx, maxits);
 alglib.minlmsetscale(state, s);
 
 alglib.minlmoptimize(state, Objective, null, null);
 
 alglib.minlmresults(state, out x, out rep);
 
 return x;
 }
 
 
 |