Main Program

The main program performs all the tasks required to do the optimization.

The steps required include:
  1. Create the parametric model.
  2. Create the simulation model.
  3. Add the necessary responses.
  4. Perform the optimization.
  5. Print the obtained results.

Example

if __name__ == "__main__":

  # Instantiate the Fourbar parametric model with default design parameters
  fbar = Fourbar    ()

  # Create the simulation model with the defined design parameters
  fbar.createModel  ()  

  # Add the responses used by the optimizer
  fbar.addResponses ()

  # This is provided for model debugging purposes
  #fbar.simulate    ()

  # Perform the optimization
  fbar.optimize     ()

  # Print the final results to the screen
  fbar.printResults ()