kqcircuits.simulations.export.simulation_validate

kqcircuits.simulations.export.simulation_validate.validate_simulation(simulation, solution)[source]

Analyses Simulation and Solution objects and raises an error if inconsistencies in configuration are found.

Parameters:
  • simulation – A Simulation object.

  • solution – A Solution object.

Raises:

Errors when validation criteria are not met.

kqcircuits.simulations.export.simulation_validate.simulation_and_solution_types_match(simulation, solution)[source]

Validation check: ensures that a simulation and solution types match. :param simulation: A Simulation object. :param solution: A Solution object.

Raises:

Errors when validation criteria are not met.

kqcircuits.simulations.export.simulation_validate.has_no_ports_when_required(simulation, solution)[source]

Validation check: ensures that a simulation object has ports when the solution type requires it. :param simulation: A Simulation object. :param solution: A Solution object.

Raises:

Errors when validation criteria are not met.

kqcircuits.simulations.export.simulation_validate.has_edgeport_when_forbidden(simulation, solution)[source]

Validation check: ensure that if at least one “EdgePort” is present, some solution types can’t be chosen. :param simulation: A Simulation object. :param solution: A Solution object.

Raises:

Errors when validation criteria are not met.

kqcircuits.simulations.export.simulation_validate.flux_integration_layer_exists_if_needed(simulation, solution)[source]

Validation check related to the presence of layers and magnetic flux integration. :param simulation: A Simulation object. :param solution: A Solution object.

Raises:

Errors when validation criteria are not met.

kqcircuits.simulations.export.simulation_validate.get_port_names(simulation)[source]

Helper function that returns a list of port names in a Simulation object. :param simulation: A Simulation object.

Returns:

A list of names related to the ports present in simulation.

Return type:

port_names

exception kqcircuits.simulations.export.simulation_validate.ValidateSimError(message, validation_type=None)[source]

Bases: Exception

Custom exception class for specific error handling.

../_images/kqcircuits.simulations.export.simulation_validate.png