Table Of ContentCOMPUTER-AIDED
DESIGN
Computer-AidedDesign31(1999)867–879
www.elsevier.com/locate/cad
Geometric constraint satisfaction using optimization methods
Jian-Xin Ge1, Shang-Ching Chou*, Xiao-Shan Gao2
ComputerScienceDepartment,WichitaStateUniversity,Wichita,KS67260-0083,USA
Received9July1999;receivedinrevisedform21August1999;accepted17September1999
Abstract
The numerical approach to solving geometric constraint problems is indispensable for building a practical CAD system. The most
commonly-used numerical method is the Newton–Raphson method. It is fast, but has the instability problem: the method requires good
initialvalues.Toovercomethisproblem,recentlythehomotopymethodhasbeenproposedandexperimentedwith.Accordingtothereport,
thehomotopymethodgenerallyworksmuchbetterintermsofstability.Inthispaperweusethenumericaloptimizationmethodtodealwith
thegeometricconstraintsolvingproblem.Theexperimentalresultsbasedonourimplementationofthemethodshowthatthismethodisalso
muchlesssensitivetotheinitialvalue.Further,adistinctiveadvantageofthemethodisthatunder-andover-constrainedproblemscanbe
handled naturally and efficiently. We also give many instructive examples to illustrate the above advantages. qPublished by Elsevier
ScienceLtd.
Keywords:Parametricdesign;Optimizationmethod;Variationalgeometry
1. Introduction geometric constraint problem. Like the symbolic method,
the numerical method first translates the constraints into a
There are several approaches to solving the geometric systemofnonlinearequations.Thenthisequationsystemis
constraintproblem.Thesymbolicapproach[7,14,21]trans- solved by iterative methods instead of exact symbolic
lates geometric constraints into a system of polynomial computation.
equationsand solves the system by computeralgebra tech- The most commonly used method in the numerical
niques such as the Wu–Ritt method or the Grobner basis approach is the Newton–Raphson method. It is fast, but
method [8]. It isreliable and complete, but istoo slow and has the instability problem: the method is sensitive to the
space-consuming to solvepractical problems. initialvalues.Asmalldeviationintheinitialvaluecanlead
The propagation approach [1,6,9,15,22,23,26,28,39,41] to an unexpected or unwanted solution, or to the iteration
solvestheconstraintsystembyderivingunknownvariables divergence. To overcome this problem, recently the homo-
orgeometricobjectsfromalreadyknownonesusingasetof topymethodhasbeenproposedandexperimentedwith[24].
predefined rules. Usually the propagation methods are AccordingtothereportinRef.[24],generallythehomotopy
implemented with expert systems or logic programming method worksmuch better in terms of stability. These two
languages suchas Prolog. methodsgenerallyrequirethenumberofvariablestobethe
The graph analysis approach [5,12,13,25,35,37,40] sameasthe number ofequations.Ifthese twonumbersare
translates a geometric constraint problem into a graph and different, i.e. the constraint system is generally over- or
findsthegeometricconstructionsequencebyanalyzingthe under-constrained, some special techniques, such as linear
graph.Boththepropagation approachandthegraphanaly- least square and singular value decomposition of a matrix,
sisapproach have their limitation in scope. are required.
On the other hand, the numerical approach Inthispaper,basedontheoptimizationmethodweusea
[2,4,19,24,27,29,31,36] is ageneral method for solving the numerical method for solving geometric constraint
problems. Our experiments with this method show that it
is also quite stable. Further, the method can naturally deal
*Correspondingauthor.
E-mail addresses: [email protected] (J.-X. Ge); [email protected] (S.- with under- and over-constrained problems. We also give
C.Chou);[email protected](X.-S.Gao) many instructive examples to illustrate the above advan-
1On leave from Zhejiang University, Hangzhou, 310027, People’s tages. Numerical approaches similar to the optimization
RepublicofChina.
method have been introduced and discussed in Refs.
2OnleavefromInstituteofSystemsSciences,AcademiaSinica,Beijing
[2,4,19]. We will discuss the related workin Section 2.11.
100080,People’sRepublicofChina.
0010-4485/00/$-seefrontmatterqPublishedbyElsevierScienceLtd.
PII: S0010-4485(99)00074-3
868 J.-X.Geetal./Computer-AidedDesign31(1999)867–879
2. The optimization methodfor solving geometric zero. Using the chain rule ofderivation we have
constraint problems
g(cid:133)X(cid:134)(cid:136)2J(cid:133)X(cid:134)TF(cid:133)X(cid:134) (cid:133)3(cid:134)
2.1.Using optimization method forsolving a system of where J(cid:133)X(cid:134) is the Jacobi matrix of the function vector
equations F(cid:133)X(cid:134)(cid:136)(cid:133)f ;f ;…;f (cid:134):ApplyingtheNewton–Raphsonitera-
1 2 m
tion formula to Eq. (3) we have the following iteration
Generally, a geometric constraint problem can be first
formula
translated into asystem ofequations:
(cid:133)JTJ 1S (cid:134)DX (cid:136)2JTF (cid:133)4(cid:134)
f (cid:133)x ;…;x (cid:134)(cid:136)0 k k k k k k
1 1 n
f2(cid:133)x1;…;xn(cid:134)(cid:136)0 (cid:133)1(cid:134) Xk11 (cid:136)Xk1DPXk
… where S(cid:133)X(cid:134)(cid:136) mi(cid:136)1fi(cid:133)X(cid:134)72fi(cid:133)X(cid:134) is a function of second-
orderderivatives.Ifweignorethesecond-orderderivatives
f (cid:133)x ;…;x (cid:134)(cid:136)0
m 1 n we have the Gauss–Newton iteration formula
Then the problem is how to solve this system of equations DX (cid:136)2(cid:133)JTJ (cid:134)21JTF (cid:133)5(cid:134)
k k k k k
F(cid:133)X(cid:134)(cid:136)0; where F (cid:136)(cid:133)f ;f ;…;f (cid:134)T :Rn !Rm is the
1 2 m
equation vector and X (cid:136)(cid:133)x1;x2;…;xn(cid:134)T is the vector of Xk11 (cid:136)Xk1DXk
unknownvariables.Thissystemofequationscanbesolved
iterativelybytheNewton–Raphsonmethod[29].Theitera- Toensurethats(cid:133)X(cid:134)decreaseswitheachiterationandalso
tion formula is Xk11 (cid:136)Xk2J(cid:133)Xk(cid:134)21F(cid:133)Xk(cid:134); where J(cid:133)Xk(cid:134) is todealwiththesingularityofmatrixJkTJk;theLevenberg–
the Jacobi matrixof F(cid:133)X(cid:134)at point X. Marquardt method is usually used with the modified
k
The Newton–Raphson method usually requires that the iteration formula
number of constraints and the number of variables are the DX (cid:136)2(cid:133)JTJ 1lI(cid:134)21JTF (cid:133)6(cid:134)
k k k k k k
same sothat the inverse of the Jacobi matrix can be calcu-
luantedde.r-Thainsdreqouvierre-mcoennsttrmaiankeedstphreombleetmhosdwdihffiicchultfrteoqhuaenndtllye Xk11 (cid:136)Xk1DXk
occur in real applications. where I isthe unit matrix and l isa small real number.
k
Unlike the other numerical methods, the optimization Theselectionofl shouldensurethatthematrix(cid:133)JTJ 1
k k k
approachsolvesthesystemofequationsF(cid:133)X(cid:134)byconverting lI(cid:134)ispositivedefinite.Inpracticetheselectionofl hasa
k k
it into finding X at which the sum ofsquares greatimpactontheconvergencedomainandspeed.Usually
l isinitiallysetto0.01andlaterisdoubledif(cid:133)JTJ 1lI(cid:134)
Xm k k k k
s(cid:133)X(cid:134)(cid:136) f(cid:133)X(cid:134)2 (cid:133)2(cid:134) isnotpositivedefinite.Thismethodisalocallyconvergence
i optimizationmethodanditsbehavior inourexperimentsis
i(cid:136)1
not satisfactory either in convergence speed and domain.
isminimal.ItisobviousthatF(cid:133)X(cid:134)(cid:136)0hasarealsolutionXp The main problem is that the initial guess of the solution
ifandonlyifmins(cid:133)X(cid:134)is0.Theproblemofsolvingasystem shouldbeverynearthesolutiontoensurethatmatrixJTJ is
k k
ofequationsisthusconvertedintotheproblemoffindingthe positivedefinite.Thisproblembecomesmoreseriouswhen
minimum of a real multi-variate function. The problem processing under-constrained problems, since matrix JTJ
k k
now can be solved by various well-developed numerical always singular in this case. This makes us resort to the
optimization methods [10,32,33]. second optimization method to solve the problem.
One obviousfact for this approach isthat the number of
equations m is not necessarily the same as the number of 2.3. TheBFGS method
variablesn.Thusforthisapproachitisnaturaltodealwith
The second method we have tried is the BFGS method
under- and over-constrained problems.
which is also called the secant or quasi-Newton method
In this paper, we focus on the numerical aspects of the
[3,10,33]. It is a globally convergent method and thus is a
algorithmtosolvethegeometricconstraintsolvingproblem
more robust numerical optimization method. This method
by the optimization method. We have tested twooptimiza-
tries to construct a secant approximation H of the Hessian
tion methods: the modified Levenberg–Marquardt method
matrix of function s(cid:133)X(cid:134): The main algorithm of BFGS is
andtheBFGSmethod.Nextwewillbrieflyintroducethese
described as follows:
twomethods.
1. Initialization
2.2.The modified Levenberg–Marquardtmethod H (cid:136)aunitmatrix; X (cid:136)theinitialvalue; k (cid:136)0;
0 0
By the optimality condition we have the fact that the
derivatives g(cid:133)X(cid:134) of s(cid:133)X(cid:134) at the minimum points equal 2. Computethederivativesg(cid:133)X(cid:134)andtheirdifferencey atX
k k
J.-X.Geetal./Computer-AidedDesign31(1999)867–879 869
lk (cid:136)minls(cid:133)Xk1lpk(cid:134)
DX (cid:136)lp
k k k
Xk11 (cid:136)Xk1DXk
4. Adjust matrix H
!
yTH y DX DXT
Hk11 (cid:136)Hk1 11 DkXTkyk DXkTyk
k k k k
H y DXT1DX yTH
2 k k k k k k
DXTy
k k
5. k11 goto (2)
More details of this algorithm can be found in Refs.
[3,10,33].Thereareseveralwaystoimprovethisalgorithm.
Oneimprovementistousethetrustregiontechniqueinthis
algorithmtopromoteconvergencefrompoorstartingpoint
guesses [16]. Another improvement is to use a different
updating formula to avoid storing the secant matrix H to
save memory [34].
Compared with the Newton–Raphson method for
geometric constraint solving, the optimization method has
the following desirable features:
† This method is quite stable as demonstrated by our
experimental results. The success of finding a desired
solutionbythismethodisratherinsensitivetotheinitial
guessofthe solution to the geometricconstraint solving
problem.Alsothesolutionfoundbythismethodismore
predictable in contrast to the drastic solution jumping
caused by even small changes of the initial value in the
Newton–Raphson method.
† Under- and over-constrained problems are naturally
handled by this method. In particular, for under-
constrained problems, this method will find a “visually
lesschanged”solutionwhichisreasonablyneartheiniti-
ally sketched diagram. For over-constrained but consis-
tent problems, this method will generally still find a
solution. Thisfeature will be shown in Section 2.5.
The concept of “visually less changed” is not rigorously
defined. However, we can give a formal definition to a
Fig.1.Somesimpleexamples. related concept. A solution X is visually least changed if
Xisasolution to ageometricconstraint problem and iX2
gk (cid:136)7s(cid:133)Xk(cid:134); if igki,1thenXp X i isminimal,whereX istheinitialguessofthesolution.
0 2 0
Fromourexperiments,wehavefoundthattheoptimization
(cid:136)X andstoptheiteration
k methodoftenfindsasolutionnearthevisuallyleastchanged
solution for under-constrained problems.
yk (cid:136)gk2gk21; In the next section we will show some experimental
resultsof this method.
3. Compute search direction p and the step to reach a
k
2.4. Experimental results with the BFGS method
minimum along the direction p
k
p (cid:136)2H g We have developed a system AGP (Associative
k k k
870 J.-X.Geetal./Computer-AidedDesign31(1999)867–879
Fig.2.Theexampletodemonstratetheinsensitivitytotheinexactinitialguessesofthesolutions:(a)and(c)aretheinitialdiagramsconstructedbytheuser;(b)
and(d)arethediagramsaftercomputation.
Geometric Pad) using the BFGS method.3 It is an experi- lines) corresponding the four initially roughly sketched
mental sketching system implemented in C11 under the circles.
Linux and X/Motif environment. Fig. 1b is the diagram of the Thebault–Taylor theorem
In AGP, four types of geometric objects are supported: proposed as a conjecture in 1938 and proved in 1983. The
points, lines, circles and arcs. However, only points are theorem states that givena triangle P P P and apoint P
1 2 3 4
internally maintained on which constraints are specified. onP P ;circleC isthecircumscribedcircleofthetriangle;
2 3 1
Thisismadepossiblebyintroducingsomeauxiliary points circleC istheinscribedcircleofthetriangle;circlesC and
2 3
under some circumstances. For example when specifying C are tangent to line P P , line P P , and circle C , then
4 2 3 1 4 1
that two circles with centers C and C are tangent, a new thecenters C ,C andC arecollinear.Theconstructionof
1 2 2 3 4
auxiliary tangent point T is introduced and the tangent this diagram iswell constrained, but it has256solutions.
constraint is internally converted into three constraints: InFig.1ctheregularpentagonisspecifiedsuchthatallits
(collinear; C TC ), (onCircle TC ) and (onCircle TC ). fivesidesareequalandthreeofitsdiagonalsindashedlines
1 2 1 2
Finally constraints in the form of (onCircle P C) i(cid:136) are equal; the circumscribed circle is specified to pass
i
1;… are converted into (equalDistance PiCPi11C(cid:134) i(cid:136) through five vertices of the pentagon; and the inscribed
1;…;k21: circle is specified to be tangent to the five sides of the
InthissectionweshowsomeexamplessolvedbyAGPto pentagon. Note that this problem is over-constrained.
demonstrate some featuresof the optimization method. Table 1 shows the running statistics of these three exam-
Fig. 1 shows some simple examples made by AGP. Fig. ples.4
1a is one of the Apollonius construction problems. The SincetheBFGSmethodisagloballyconvergencenumer-
problemistoconstructacircletangenttothreegivencircles icaloptimizationmethod,thesuccessoffindingasolutionis
whicharespecifiedtohavefixedcentersC (cid:133)i(cid:136)1;2;3(cid:134)and notverysensitivetotheinitialvalue.Thispreferablefeature
i
to pass through fixed points P (cid:133)i(cid:136)1;2;3(cid:134); respectively. is demonstrated in Fig. 2 where the three circles are speci-
i
Actually the problem has eight solutions. In the figure fiedtobe mutually tangentand tobetangenttotwoneigh-
AGP generated four essentially different circles (in dashed boringsidesofatrianglewhosethreeverticesarespecified
4Alltherunningtimeinthispaperiscollectedbyaveragingtenconse-
3This software can be accessed at ftp://henry.cs.twsu.edu/pub/agp/ cutiveexecutiontimeonaPentiumPro200machinewiththeLinuxoper-
agp.tgz. atingsystem.
J.-X.Geetal./Computer-AidedDesign31(1999)867–879 871
Table1
RunningstatisticsforFig.1
#Equations #Variables Time(s)
Fig.1a 44 44 0.623
Fig.1b 34 34 0.172
Fig.1c 28 24 0.142
tobefixed.Fig.2aandcaretheinitialdiagramssketchedby
the user. It is easy to see that the differences between the
initial guesses and the exact solutions of this problem,
respectively, in Fig. 2b and d are rather large. Also this
figure demonstrates how different initial values lead to
different branchesof the solutions.
Fig. 3 is the simplest case for the problem we call the
tangentpackingproblem.Theproblemistopackn(cid:133)n11(cid:134)=2
circles(nrowsofcircles)tangenttoadjacentcirclesand/or
the adjacent neighboring sidesofagiven triangle. Fig.3is
the case of n(cid:136)6; i.e. we need to pack 21 circles in the
triangle. This difficult problem contains 174 variables
(since we introduce auxiliary tangent points) and 6 linear
equations and 168 quadratic equations which could not be
block triangularized. Table 2 shows the running results for
different n of this problem.5
Fig.3.Adifficultproblem.(a)Theinitialdiagramdrawnbytheuser.(b)
Diagramgeneratedafteralltangentconstraintsareadded.
2.5. Under- orover-constrained problems
user needs only to specify 8 of the 11 diagonals to be
equal. Of course, this over-constrained problem is consis-
Under-andover-constrained problemsareverycommon
tent,meaningthatintroducingredundantconstraintswillnot
inrealapplications.Forexample,engineeringdrawingsare
conflict with the existing constraints. Effectively handling
usually under constrained, especially in their early design
under-andover-constrainedproblemsisapreferablefeature
stages.Itisquiteinconvenienttorequiretheusertodrawthe
ofageometricconstraintsolvingsystem.Inthisproblem,it
diagram withall thedimensionsspecifiedatthebeginning.
isratherdifficulttodecidewhicheightdiagonalsshouldbe
Even for some finished engineering drawings under-
selected to be equal. It is more convenient for the user to
constrained cases can still occur, since some unimportant
specify all the diagonalsto be equal.
dimensions are ignored by the users. Over-constrained
Sometimesover-constrainingcanbeusedtoselectasolu-
problems are not common in engineering drawings.
tion and exclude others from a finite set of solutions to a
However, the over-constraining technique can be used as
geometric constraint problem. The next example demon-
a tool to aid the user to draw some complicated figures
strates such usage in drawing a regular pentagon. Fig. 5a
conveniently or to exclude some unwantedsolutions.
istheinitialconfigurationofthediagramwithtwopointsP
The optimization method is capable of handling under- 1
andP fixed.Afterspecifyingthatfivesidesofthepentagon
and over-constrained problems in a very natural way. The 2
areequalandthreediagonalsP P ,P P andP P areequal,
following examples demonstrate this capability. Fig. 4 1 3 2 5 3 5
thediagrambecomes theoneinFig.5bwhichisasolution
shows the process to draw a regular 11-polygon. First the
we do not want. Actually the problem is well constrained
usersketchesthe diagram asin Fig.4a. Then he/she speci-
and there are eight solutions to this problem. Next we
fiesthat the bottom side to be fixed and all the sides ofthe
specify in Fig. 5c that points P and P are fixed; five
polygon are equal. At this moment, this problem is under- 1 2
constrainedsincethepolygonisnottotallyfixed.However,
the diagram can still be computed satisfying all the Table2
constraints in the system as shown in Fig. 4b. Finally, the RunningstatisticsforFig.3withdifferentnumberofcircles
userspecifiesthatallthediagonalsconnectingthetwonext
#Circles(#rows) #Equations #Variables Time(s)
adjacent verticesinthe figureare equal. After computation
we get the regular 11-polygon as shown in Fig. 4c. This 3(2) 30 30 0.228
actually becomes an over-constrained problem, since the 6(3) 54 54 0.965
10(4) 86 86 3.379
15(5) 126 126 11.587
5The case when n(cid:136)4 was given in Ref. [24] which inspires us to 21(6) 174 174 23.751
considerothercases.
872 J.-X.Geetal./Computer-AidedDesign31(1999)867–879
Fig.5.Theexampletouseredundantconstraintstoselectdifferentbranches
ofsolutions.(a)Initialdiagramdrawnbytheuser.(b)Diagramgenerated
afterspecifyingthatfivesidesofthepentagonareequalandthreediagonals
Fig. 4. Under- and over-constrained examples. (a) The initial diagram
areequal.(c)Initialdiagramdrawnbytheuser.(d)Diagramgeneratedafter
drawnbytheuser.(b)Diagramgeneratedafterspecifyingthatthebottom
specifyingthatfivesidesofthepentagonareequalandfourdiagonalsare
sideisfixedandthelengthsofelevensidesareequal.(c)Diagramgener-
equal.
atedafterspecifyingthatallthediagonalsinthefigureareequal.
sides of the pentagon are equal; four diagonals P P , P P , These constraints are independent in the sense that each
1 3 2 5
P P and P P are equal. Obviously it becomes an over- polynomial corresponding to one constraint is not in the
3 5 1 4
constrained problem.After computation we get the desired radical ideal of the polynomials corresponding to the other
regular pentagon in Fig. 5d. constraints.Sincetheproblemhasfivepointsandthusneeds
In the general case under-, well-, and over-constrained seven independent constraints, it seems to be well
problems could be very complicated. It could happen that constrained. But the problem actually hasinfinite solutions
a seemingly well-constrained diagram actually has infinite since the length of each side of the pentagon is not fixed.
solutions. For example, to specify a regular pentagon we Thisphenomenonoccursforproblemswithmanybranches
give seven constraints: all the five sides of the pentagon of solutions. Some of the constraints are used to eliminate
are equal and the four diagonals in Fig. 5c are equal. branches, but not to reduce the degree of freedom of the
J.-X.Geetal./Computer-AidedDesign31(1999)867–879 873
One is called equation oriented decomposition technique
which turns a system of equations into block triangular
form.Asystemofequationsissaidtobeinblocktriangular
form if it can be divided intosubsetsofequations:
S1(cid:133)x1;…;xn1(cid:134);S2(cid:133)x1;…;xn11n2(cid:134);…;St(cid:133)x1;…;xn11…1nt(cid:134):
wheren isthenumberofequationsinS.Suchasystemof
i i
equationscanbesolvedsequentially.EachtimeS issolved
i
by the optimization method and the solution is substituted
into subsequent sub-systems S (cid:133)k .i(cid:134): The block triangu-
k
larization process can be implemented by the algorithms
proposed in Refs.[25,37].
Another technique is called cluster oriented decomposi-
tion which solves the constraint problems by first dividing
thediagramintoasetofsmallsub-diagramscalledclusters
Fig.6.AsequenceofApollonius’constructionproblems.
andthenassemblingtheseclustersagain.Aclusterisessen-
tially assumed to be a rigid body only having translational
diagram. Generally, this kind of problem cannot be solved and rotational degrees of freedom. This implies that the
withthe propagationmethod orthe graphanalysismethod. inner-cluster constraints which only concern geometric
Obviouslytheabilityoftheoptimizationapproachtohandle objects in the same cluster are invariant with respect to
such problems isan advantage over other methods. the rigid body transformation, e.g. if an inner-constraint in
a cluster is originally satisfied it will still be satisfied after
2.6. Practical considerations theclusteristransformedbyanytranslationalandrotational
transformation.
Ourexperimentswiththeoptimizationmethodshowthat FirstsupposeclustersC ;…;C inthediagramarerecog-
1 p
this method is quite efficient for medium sized geometric nized and solved with some methods [1,5,13,35,41]. For
constraint solving problems with less than one hundred each cluster C we introduce atransformation matrix T
i i
equations. However, for larger problems the performance 0 1
a 2b c
is not satisfactory. For example, the problem in Fig. 6 is B i i C
topack19tangentcirclesintheareaseparatedbytwogiven T (cid:136)B@b a d CA
i i i i
tangent circles C and C . It contains more than 170 equa-
1 2 0 0 1
tions, and we solve the problem as awhole in nearly 39s.
One solution is to use various storage saving techniques wherea,b,c andd areunknownvariablessatisfyinga21
i i i i i
toimprovetheperformance[20].Amongthesemethodswe b2 (cid:136)1:
i
tested the method in Ref. [30]. The result is quite satisfac- Like the 3D cases [27,36], we first translate the inter-
tory.Forthesixtangentcirclepackingproblem,themethod cluster constraints, which constrain geometric objects in
takesonly0.84sinsteadof23.75s(seeTable2).However, different clusters, into a system of equations with a, b, c
i i i
this method is less unstable that our original method and d (cid:133)i(cid:136)1;…;p(cid:134)as unknown variables. Forexample, an
i
equipped with the trust region technique. In any case this inter-clusterconstraintrequiringthattwoclustersC andC
i j
is a good starting point. On one side we could try improve sharea common point Pcan be written as
thestabilityofthoseveryefficientbutlessstablenumerical 0 1 0 1
x x
methodsbyusingsometechniques,suchasthetrustregion B piC B pjC
method and stable line search methods. On the other side, TB@y CA(cid:136)TB@y CA
i pi j pj
we could provide the system with two numerical solvers.
1 1
These solver are selected so that one is efficient but less
stableandtheotherisstablebutlessefficient.Whensolving which essentially represents two linear equations with
aspecificproblem,thesystemfirsttriestheefficientsolver. elements in T and T as unknown variables, where
i j
Iftheefficientsolvercouldnotsolvetheproblem,thestable (cid:133)x ;y (cid:134) and (cid:133)x ;y (cid:134) are the numerical coordinate values
pi pi pj pj
solver isinvoked. forpointPinclustersC andC,respectively.Theequations
i j
Theothersolutionistousethedecompositiontechniques obtained in this way, called assembly equations, are then
discussed below. Actually the diagram in Fig. 6 could be solved by the optimization method. The solution to the
constructedsequentiallyinanorderofthesizeofthecircle system of assembly equations, if it exists, ensures that the
tobeconstructed.Theconstructionofeachcircleisaspecial inter-clusters will be satisfied after the transformations
case of the Apolloniusconstruction problems. are performed on the clusters. Since the inner-cluster
Forthose kindsofproblemswe can usetwodecomposi- constraintsareinvariantwithrespect tothetransformation,
tion techniques to improve the computation performance. all the constraints in the system are nowsatisfied.
874 J.-X.Geetal./Computer-AidedDesign31(1999)867–879
Generally, these two decomposition techniques will success rate of our numerical solver for this problem is
improve the performance of numerical calculation greatly. only 33.3% for the initial values of x;y[(cid:137)25;5(cid:134) (see
Itwillmaketheoptimizationmethodattractiveinsomereal Fig.7d).Aplt(cid:129)h(cid:129)oughwecanchooseM $2sothatthecritical
applications,suchasengineeringdrawingsystemsinwhich points (cid:133)^ 2=2:0(cid:134) are eliminated, the critical point (0,0)
nearly all problems can be solved sequentially. However, cannot be removed.
thisdecompositiontechniquewillnotbehelpfulifthestruc-
tureofthe problem isvery “bad”. The diagram inFig.3 is 2.8. Constraint hierarchy
suchanexample.Itisobviousthat thesystemofequations
The constraint hierarchy can be introduced to geo-
for the problem cannot be structurally block-triangularized
metric constraint problems. In mechanical designs, some
and the diagram itself also cannot be clustered.
constraints, especially those related to structural configura-
tion or performance of the part, are of the highest priority
2.7.Problem of inequalities
and should be satisfied unconditionally. Others, such as
One of the problems of the optimization method is that those for esthetical purposes, are of lower priority and are
thegeneralnumericaloptimizationmethodsonlyfindlocal notnecessarilytobesatisfied.Freeman-Benson[11]solves
minima of a multi-variate function. It is possible for the constrainthierarchyproblemswithanefficientlocalpropa-
functions(cid:133)X(cid:134)inEq.(2)tohave anonzerolocalminimum, gation method. However, his method cannot handle
although there exists asolution Xpto Eq.(1). Furthermore, geometric constraint problems.
the general optimization method usually cannot properly Wesolvethisproblemwithmulti-objectiveoptimization
handle the critical point (the point at which the gradient methods. As in Ref. [11] we partition all the constraints in
vectorofthegoalfunctioniszero)whichisnotanminimal thesystemintoaconstrainthierarchywithdifferentpriority
point.Fromourexperience,thisproblemrarelyhappensfor levels. We assume that constraints in lower constraint
under- or well-constrained problems (actually, we have hierarchy levels have higher priority, and level zero has
encountered no such cases so far). However, for over- the highest priority. Following the way in Section 2.1, for
constrainedproblemswedidencountersuchcases.Inparti- each constraint hierarchy level i we could construct an
cular it becomes serious when the constraint problem objective function G(cid:133)X(cid:134)
i
involvesinequalities. Xmi
Forexample,thediagraminFig.5disgeneratedfromthe G(cid:133)X(cid:134)(cid:136) mf2(cid:133)X(cid:134)
i ij ij
sketchinFig.5cbyspecifyingthatP1P3 (cid:136)P1P4 (cid:136)P2P5 (cid:136) j(cid:136)0
P P :Thisisanover-constrainedproblem.However,ifthe
3 5 wherem can beusedtospecifythe relative importanceof
initial sketch is Fig. 5b with the same constraints, then the ij
each constraint in the same hierarchy level.
optimization iteration will finally reach a critical point
Nowthe constraint problem has been transformed into a
which isnot asolution.
classic nonlinear multi-objective unconstrained optimiza-
Anaturalremedyforthisproblemseemstouseinequality
tion problem
constraints. For this example we tried to add an inequality
constraintwhichspecifiesthatpointP isabovelineP P in min{G (cid:133)X(cid:134);G (cid:133)X(cid:134);…;G (cid:133)X(cid:134)}:
4 3 5 0 1 k
Fig. 5b. In theory it should get the desired result. Each
inequality f(cid:133)X(cid:134)$0 can be transformed into an equality Severalnumericalmethodscanbeusedtosolvetheabove
f(cid:133)X(cid:134)2My2 (cid:136)0; where y is a newly introduced variable problem[33,38].Weconvertthisproblemintoaconstrained
optimization problem. For simplicity, we only consider
and M is a positive number. It is obvious that we have
;X(cid:133)f(cid:133)X(cid:134)$0,’yf(cid:133)X(cid:134)2My2 (cid:136)0(cid:134):However,thisattempt two levels of constraints. Constraints in level zero are
compulsory and constraints in level one are preferable.
failedinourexperiments.Thereasonisthattheintroduction
First,wesolvetheprobleminlevelzerobysolvingfollow-
of inequalities may lead to some critical points near the
ing minimization problem
solution we want.
Here isavery simple exampleto demonstratethissitua- Gp (cid:136)minG (cid:133)X(cid:134):
tion. Suppose we have an equation x221(cid:136)0 and an 0 x[xn 0
inequality x$0; following the above discussion we
Since the constraints in this level are mandatory, we must
construct afunction f(cid:133)x;y(cid:134) to be minimized check that Gp is less than a prescribed small number 1. If
0 0
f(cid:133)x;y(cid:134)(cid:136)(cid:133)x221(cid:134)21M(cid:133)x2y2(cid:134)2 this condition issatisfiedthen we proceed to the next level
ofconstraints. Onenatural condition tosatisfythis level of
For M (cid:136)1 there pa(cid:129)(cid:129)re five critical points for this constraint is that no constraints in the previous level (level
function:(cid:133)1;^1(cid:134); (cid:133)^ 2=2;0(cid:134) and (0,0) (see Fig. 7a–c). But zero) are violated. So we turn this problem into a
onlythefirsttwocriticalpointsaretheminimumpointswe constrained optimization problem with the following goal
want. Theothercritical points are essentially saddle points function
which are not local minima. The introduction of these
Gp (cid:136)minG (cid:133)X(cid:134)
saddle points make the problem especially difficult. The 1 x[D 1
J.-X.Geetal./Computer-AidedDesign31(1999)867–879 875
5
4
3
2
1
0
-1 -0.8
-0.6
-0.4
-0.5
-0.2
0
0 0.2
y x
0.4
0.5 0.6
0.8
(a) 1 1
1.2
1.6
1.4
1.2
1
(b)
0.8
-1 -0.5 0 0.5 1
x
Fig.7.Problemofunwantedcriticalpoint.(a)Thegraphoffunctionf(cid:133)x;y(cid:134)ininterval(cid:133)20:2;1:2(cid:134)£(cid:133)21:2;1:2(cid:134):(b)Thegraphofthefunctionfory(cid:136)0withxin
interval(21.2,1.2).(c)Thegraphofthefunctionforx(cid:136)1withyininterval(21.2,1.2).(d)Theconvergencediagramforx;y[(cid:137)25;5(cid:134):Theblackarea
consistsofthesetoftheinitialpointswhichwillleadthenumericalsolvertothesolutions(1,^1).
876 J.-X.Geetal./Computer-AidedDesign31(1999)867–879
1
0.8
0.6
0.4
(c)
0.2
-1 -0.5 00 0.5 1
y
(d)
Fig.7.(continued)
Description:Keywords: Parametric design; Optimization method; Variational geometry. 1. Introduction .. 1a is one of the Apollonius construction problems. The.