Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

squared norm in Mathematica

12 views
Skip to first unread message

syed qasim Ali

unread,
Feb 21, 2008, 5:55:32 PM2/21/08
to
Dear Sir,
My problem was actually

||SX||^2
i was trying it as multiobjective optimiztaion in Mathematica but i got to know that it can be programmed as single objective ....


||SX||^2=(a11*x1 + a12*x2 + a13*x3)^2 + (a21*x1 + a22*x2 +
a23*x3)^2 + (a31*x1 + a32*x2 + a33*x3)^2.


therefore my problem becomes

x1 >= 0.52, <= 1.47;
x2 >= 0.52, <= 1.47;
x3 >= 0.52, <= 1.47;
x4 >= 0.52, <= 1.47;



minimize : ( ((-0.22*x1)+(0.13*x2)+(-0.09*x3)+(0.07*x4))^2 +
((-0.13*x1)+(0.09*x2)+(-0.07*x3)+(0.058*x4))^2 +((-0.09*x1)+(0.07*x2)+
(-0.058*x3)+(0.049*x4))^2);


subject to:
-4+x1^2+x2^2+x3^2+x4^2=0;


IN Mathematica it becomes

FindMinimum[{(-0.22 g1+0.13 g2-0.09 g3+0.07 g4)2+(-0.13 x1+0.09 x2-0.07 x3+0.058 x4)2+(-0.09 x1+0.07 x2-0.058 x3+0.049 x4)2,-4+x12+x22+x32+x42=0&&0.52£x1£1.47,0.52£x2£1.47,0.52£x3£1.47,0.52£x4£1.47},{x1,x2,x3,x4}]


i have this result when i tried this problem in Mathematica ....i guess Mathematica can handle this problem

Set::write : Tag Plus in
-4+x12+x22+x32+x42 is Protected
FindMinimum::eqineq : Constraints in {0,0.52£x1,0.52£x2,0.52£x3,0.52£x4,x1£1.47,x2£1.47,x3£1.47,x4£1.47} are not all equality or inequality constraints. With the exception of integer domain constraints for linear programming, domain constraints or constraints with Unequal (!=) are not supported.

i donot understand where the fault lies ...when i have only one objective function


thanx

Curtis Osterhoudt

unread,
Feb 22, 2008, 5:00:32 AM2/22/08
to
Hi, Syed,

Though I can't necessarily read your FindMinimum command (it seems to
contain some non-standard characters), I think I see what the problem is.
That error message almost always crops up when you've tried to assign a value
to something which isn't allowed to be assigned to.
In other words, I suspect you have to replace the single equals sign ( = )
in "-4+x12+x22+x32+x42=0" with a double one ( == ).

I hope that helps!
C.O.


On Thursday 21 February 2008 16:02:29 syed qasim Ali wrote:
> Dear Sir,
> My problem was actually
>
> ||SX||^2
>
> i was trying it as multiobjective optimiztaion in Mathematica but i got
> to know that it can be programmed as single objective ....
>
> ||SX||^2=(a11*x1 + a12*x2 + a13*x3)^2 + (a21*x1 + a22*x2 +
>
> a23*x3)^2 + (a31*x1 + a32*x2 + a33*x3)^2.
>
>
> therefore my problem becomes
>
> x1 >= 0.52, <= 1.47;
> x2 >= 0.52, <= 1.47;
> x3 >= 0.52, <= 1.47;
> x4 >= 0.52, <= 1.47;
>
>
>
> minimize : ( ((-0.22*x1)+(0.13*x2)+(-0.09*x3)+(0.07*x4))^2 +
> ((-0.13*x1)+(0.09*x2)+(-0.07*x3)+(0.058*x4))^2 +((-0.09*x1)+(0.07*x2)+
> (-0.058*x3)+(0.049*x4))^2);
>
>
> subject to:
> -4+x1^2+x2^2+x3^2+x4^2=0;
>
>
> IN Mathematica it becomes
>
> FindMinimum[{(-0.22 g1+0.13 g2-0.09 g3+0.07 g4)2+(-0.13 x1+0.09 x2-0.07
> x3+0.058 x4)2+(-0.09 x1+0.07 x2-0.058 x3+0.049

> x4)2,-4+x12+x22+x32+x42=0&&0.52=A3x1=A31.47,0.52=A3x2=A31.47,0.52=A3x3=A31.47,0.5
>2=A3x4=A31.47},{x1,x2,x3,x4}]


>
>
> i have this result when i tried this problem in Mathematica ....i guess
> Mathematica can handle this problem
>
> Set::write : Tag Plus in
> -4+x12+x22+x32+x42 is Protected
> FindMinimum::eqineq : Constraints in

> {0,0.52=A3x1,0.52=A3x2,0.52=A3x3,0.52=A3x4,x1=A31.47,x2=A31.47,x3=A31.47,x4=A31.47}


> are not all equality or inequality constraints. With the exception of
> integer domain constraints for linear programming, domain constraints or
> constraints with Unequal (!=) are not supported.
>
> i donot understand where the fault lies ...when i have only one objective
> function
>
>
> thanx

-
==========================
==========================
========
Curtis Osterhoudt
cfo@remove_this.lanl.and_this.gov
PGP Key ID: 0x4DCA2A10
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================
==========================
========

Jens-Peer Kuska

unread,
Feb 22, 2008, 7:26:02 AM2/22/08
to
Hi,

Set[] written as "=" has nothing to do with Equal[]
written as "==" and FindMinimum[] need Equal[] and
*not* Set[]

Regards
Jens

syed qasim Ali wrote:
> Dear Sir,
> My problem was actually
>
> ||SX||^2

> i was trying it as multiobjective optimiztaion in Mathematica but i g=


ot to know that it can be programmed as single objective ....
>
>
> ||SX||^2=(a11*x1 + a12*x2 + a13*x3)^2 + (a21*x1 + a22*x2 +
> a23*x3)^2 + (a31*x1 + a32*x2 + a33*x3)^2.
>
>
> therefore my problem becomes
>
> x1 >= 0.52, <= 1.47;
> x2 >= 0.52, <= 1.47;
> x3 >= 0.52, <= 1.47;
> x4 >= 0.52, <= 1.47;
>
>
>
> minimize : ( ((-0.22*x1)+(0.13*x2)+(-0.09*x3)+(0.07*x4))^2 +
> ((-0.13*x1)+(0.09*x2)+(-0.07*x3)+(0.058*x4))^2 +((-0.09*x1)+(0.07*x2)+
> (-0.058*x3)+(0.049*x4))^2);
>
>
> subject to:
> -4+x1^2+x2^2+x3^2+x4^2=0;
>
>
> IN Mathematica it becomes
>

> FindMinimum[{(-0.22 g1+0.13 g2-0.09 g3+0.07 g4)2+(-0.13 x1+0.09 x2-0.=


07 x3+0.058 x4)2+(-0.09 x1+0.07 x2-0.058 x3+0.049 x4)2,-4+x12+x22+x32+x42=

=0&&0.52=A3x1=A31.47,0.52=A3x2=A31.47,0.52=A3x3=A31.47,0.52=A3x4=A31.47=
},{x1,x2,x3,x4}]
>
>
> i have this result when i tried this problem in Mathematica ....i gu=


ess Mathematica can handle this problem
>
> Set::write : Tag Plus in
> -4+x12+x22+x32+x42 is Protected

> FindMinimum::eqineq : Constraints in {0,0.52=A3x1,0.52=A3x2,0.52=A3x3=
,0.52=A3x4,x1=A31.47,x2=A31.47,x3=A31.47,x4=A31.47} are not all equality =
or inequality constraints. With the exception of integer domain constrain=
ts for linear programming, domain constraints or constraints with Unequal=
(!=) are not supported.
>
> i donot understand where the fault lies ...when i have only one objec=
tive function
>
>
> thanx
>
>

0 new messages