Using the Constraint Satisfaction Function

You can solve a set of constraints using operators, functions and measures. The syntax of this feature is the same as the one of the set of equations.

See Also
Constraint Satisfaction Editor
  1. Create a Representation containing a pad with a rectangular base.
  2. Click Formula to create a Volume parameter.
  3. From the Compass, click 3D Modeling Apps and select Design Optimization.
  4. Click Constraint Satisfaction .
    1. In the first dialog box which appears, type the name of the relation, and a comment (optional).
    2. Click OK.
  5. Enter the set of equations below into the editor:
    Volume==smartVolume(PartBody\Pad.1 ); 
    PartBody\Pad.1\FirstLimit\Length >= 1mm; 
    PartBody\Pad.1\FirstLimit\Length <= 1000mm
  6. Click Parse .
    At this step the editor identifies the variables of the set of constraints and puts them as Unknown parameters.


    Important:
    • Before solving, select the parameters to use as input (constant) and the parameters to use as variables in the solver.
    • The value of the input parameters must be set to the desired values.
  7. Select the Volume parameter and use the arrow to move it to the Constant parameters column.
  8. Change the value of the Volume parameter. To do so, click twice (slowly ) inside the Value cell and set the value to 0.003 M3. Click Solve. A message appears indicating that the solving operation was successful.
    Important: The pad height is modified by the constraints satisfaction solver to match the given volume (0.003 M3).
  9. This process can be reversed: The input parameters can be transferred to outputs and vice-versa using the Switch input/output arrow . It is possible to change the value of the Pad height and obtain the volume as a result.


    Important: If a set of constraints cannot be satisfied, you can relax the equality constraints by using a double inequality.
    Volume+epsilon<=smartVolume(PartBody\Pad.1 );
    Volume-epsilon>=smartVolume (PartBody\Pad.1 );
    PartBody\Pad.1\FirstLimit\Length >= 1mm;
    PartBody\Pad.1\FirstLimit\Length <= 1000mm;