def optimize
      # Ensure pending variables and constraints are added
      parent_update

      # Run the solver and save the status for later
      Cbc.Cbc_solve @ptr
      fail if Cbc.Cbc_status(@ptr) != 0

      save_solution

      @ptr = new_model
      reset_model
    end
def optimize
      # Ensure pending variables and constraints are added
      parent_update

      # Run the solver and save the status for later
      Cbc.Cbc_solve @ptr
      fail if Cbc.Cbc_status(@ptr) != 0

      save_solution

      @ptr = new_model
      reset_model
    end
Optimize the model