When designing a product, you may come across a system of equations to be solved. Whatever these equations (linear or not), CATIA provides you with resolution methods. These methods are the Simulated Annealing algorithm and the "SetOfEquations" capability.
Can you use either method ?
If your set of equations is purely mathematical, the answer is yes. Otherwise,
no. The SetOfEquations capability cannot solve systems using CATIA functions
such as measures.
To solve a system of equations using measures, you must use the Simulated
Annealing algorithm or the Constraints
satisfaction functionality of PEO.
The Simulated Annealing algorithm is provided with the Product Engineering
Optimizer product. The set of equations is to be specified as constraints
and the variables are to be specified as free parameters. This resolution
method is quite good although sometimes a bit long and you can use it to solve
a broad range of cases. The trick about this algorithm is to adjust the
precision and the other algorithm parameters. The example developed below works
well with both methods. Just to illustrate a system that cannot be solved by
both methods, you can draw a cube and create two user parameters: CubeSurface
(of Area type) and CubeVolume (of Volume type). To calculate CubeSurface and
CubeVolume, you can write either:
CubeSurface = smartWetarea ( PartBody\Pad.1
)
CubeVolume = smartVolume ( PartBody\Pad.1
)
or
CubeVolume = smartVolume ( PartBody\Pad.1
)
Open a new part document.
Create six real type parameters by using the f(x) capabilities. Name these parameters x1, y1, z1 and x2, y2, z2.
Access the Product Engineering Optimizer product and click
the
icon.
In the Constraints tab, specify the three constraints (enter
the constraints one-by-one)
x1 + y1 - z1 == 0
Specify a precision of 0.01 for all three constraints.
x1*y1 - z1 == 0
sin(x1*1rad)**2 - y1 - 1 == 0
If need be, see the Product Engineering Optimizer User's Guide.
In the Problem tab, specify x1, y1, z1 as free parameters and 1 as Step value for all three parameters.
Run the optimization process in Simulated Annealing mode. You can use the default termination criteria. After the process has finished running, the x1, y1 and z1 values are close to the one below:
x1 = 0.454
y1 = -0.807
z1 = -0.363
Keep your document open and proceed to the next task.
Access the Knowledge Advisor workbench, then click the
icon.
In the "Set of Equations" editor, enter the set of equations
below:
x2 + y2 == z2 ;
Specify x2, y2 and z2 as
Unknown parameters by using the
Parse arrow button (
x2*y2 == z2;
sin(x2*1rad)**2 == y2 +1
).
Click OK. The system of equations is solved. The
values below are displayed in the specification tree
x2 = 0.448043478
y2 = -0.812335288
z2 = -0.364229828