simulate Method

Performs a simulation on the model.

This method has two uses:
  • Verify that the model being submitted to the optimizer works.
  • When the simulation is complex, pass the simulation method to the Optimizer, using its simMethod property. See section 3.6 for an example of this.

When simulations are complex, they can be described in the simulate method. The simulate method can then be provided to the optimizer. The optimizer executes this method to evaluate the cost and constraints.

Example

This is the simulate method for the FourBar class. A kinematic analysis for 2 seconds with output every one-hundredth of a second, is specified.
def simulate (self):
  m = self.mbsModel
  m.simulate(type="KINEMATICS", dsa="AUTO", end=2, dtout=0.01)
  m.generateOutput()
  return