mach_eval package

Subpackages

mach_eval module

class mach_eval.AnalysisStep(problem_definition, analyzer, post_analyzer)

Bases: EvaluationStep

Class representing a step which involves detailed analysis.

problem_definition

class or object defining the problem to be analyzed. This attribute acts as the interface between the machine design and the analyzer.

analyzer

class or object which evaluates any aspect of a machine design.

post_analyzer

class or object which processes the results obtained from the analyzer and packages in a form suitable for subsequent steps.

step(state_in: State) Any | State

Method to evaluate design using a analyzer

Parameters:

state_in – input state which is to be evaluated.

Returns:

Results obtained from the analyzer. state_out: Output state to be used by the next step involved in the machine design evaluation.

Return type:

results

class mach_eval.Analyzer(*args, **kwargs)

Bases: Protocol

Protocol for an analyzer

abstract analyze(problem: Problem) Any
class mach_eval.Architect(*args, **kwargs)

Bases: Protocol

Base class for all machine design creating architect classes.

Child classes of Architect establish the interface between a machine object and the design framework. All the math for calculating an initial machine design is done within child classes of this class, and a design dictionary is passed into the Machine object class on creation.

abstract create_new_design(input_arguments: Any) Machine

Creates a new Machine object and returns it

Parameters:

input_arguments – Any

Returns:

Machine

Return type:

machine

class mach_eval.Conditions

Bases: object

Class to hold state conditions during machine evaluation.

This is a dummy class whose purpose is hold attributes required by subsequent steps involved in evaluating a machine design.

class mach_eval.EvaluationStep(*args, **kwargs)

Bases: Protocol

Protocol for an evaluation step

abstract step(state_in: State) Any | State
class mach_eval.Machine

Bases: ABC

Abstract base class for Machine objects

class mach_eval.MachineDesign(machine: Machine, settings: Any)

Bases: Design

Class representing a complete machine design, includes machine physical description and operating conditions.

machine

Holds information on machine dimensions, materials, and nameplate specs

settings

Operating conditions of machine. Can include speed, current, expected power / torque etc.

class mach_eval.MachineDesigner(arch: Architect, settings_handler: SettingsHandler)

Bases: Designer

Class representing a machine designer.

arch

Class which converts optimization free variables to a complete set of machine dimensions required to fully define a machine.

settings_handler

Class which converts optimization free variable to machine operating conditions.

create_design(x: tuple) MachineDesign

Creates a machine design from free variables.

Parameters:

x – Tuple of design free variables. Should be defined in a particular sequence based on arch and settings_handler

Returns:

A complete machine design including machine physical description and operating conditions.

Return type:

design

class mach_eval.MachineEvaluator(steps: List[EvaluationStep])

Bases: Evaluator

Wrapper class for all steps involved in analyzing a MachineDesign

steps

Sequential list of steps involved in evaluating a MachineDesign

evaluate(design: Any)

Evaluates a MachineDesign

Evaluates a MachineDesign with the list of evaluation steps that the class object was initialized with

Parameters:

design – MachineDesign object to be evaluated

Returns:

List of results obtained from each evaluation step

Return type:

full_results

class mach_eval.PostAnalyzer(*args, **kwargs)

Bases: Protocol

Protocol for a post analyzer

abstract get_next_state(results: Any, state_in: State) State
class mach_eval.Problem(machine, op)

Bases: object

class mach_eval.ProblemDefinition(*args, **kwargs)

Bases: Protocol

Protocol for a problem definition

abstract get_problem(state: State) Problem
class mach_eval.SettingsHandler(*args, **kwargs)

Bases: Protocol

abstract get_settings(x: tuple)
class mach_eval.State(design: Design, conditions: Conditions)

Bases: object

Class to hold the state of machine evaluation over each evaluation step.

The purpose of this class is to hold the Machine object and conditions required for subsequent steps involved in evaluating a machine design.

design

machine design used by the next step

conditions

additional information required for subsequent evaluation steps