class UnsupervisedCriterion[source]

UnsupervisedCriterion(name:str, differentiable:bool=True, lower_is_better:bool=True, compute_only_on_design_space:bool=True) :: Criterion

A parent class that inherits all unsupervised criteria for both classical and learned methods.

Type Default Details
name str The name of this criterion which will be monitored in logging.
differentiable bool True Whether the criterion is differentiable or not. Only differentiable criteria can be used as loss/objective functions.
lower_is_better bool True Whether lower values of the criterion correspond to better scores.
compute_only_on_design_space bool True Whether the criterion should be evaluated on voxels that have a design space information of -1, i.e., the voxels can be freely optimized. This parameter does not effect all criteria.

UnsupervisedCriterion.__call__[source]

UnsupervisedCriterion.__call__(solutions:list, gt_solutions:list=None, binary:bool=False)

Calculates the output of the criterion for all solutions.

Type Default Details
solutions list The solutions that should be evaluated with the criterion.
gt_solutions list None Ground truth solutions that are compared element-wise with the solutions. Since the criterion is unsupervised this does not have an effect.
binary bool False Whether the criterion should be evaluated on binarized densities. Does not have an effect on some criteria.

class Compliance[source]

Compliance(α:float=1e-09) :: UnsupervisedCriterion

The compliance criterion which is used to determine the structural integrity of mechanical structures. The criterionis computes as $F^T u$, where $F$ are the external forces and $u$ are the displacements, which are derived from the PDE for linear elasticity. Lower values are desired and higher values indicate worse scores.

Type Default Details
α float 1e-09 The weight that is used to rescale the forces F.

class Volume[source]

Volume(compute_only_on_design_space:bool=False) :: UnsupervisedCriterion

Calculates the sum over all density values for each solution.

Type Default Details
compute_only_on_design_space bool False Whether the criterion should be evaluated on voxels that have a design space information of -1, i.e., the voxels can be freely optimized. This parameter does not effect all criteria.

class VolumeFraction[source]

VolumeFraction(compute_only_on_design_space:bool=False) :: UnsupervisedCriterion

Calculates the average density values for each solution. Therefore this criterion always returns values between 0 and 1.

Type Default Details
compute_only_on_design_space bool False Whether the criterion should be evaluated on voxels that have a design space information of -1, i.e., the voxels can be freely optimized. This parameter does not effect all criteria.

class VolumeConstraint[source]

VolumeConstraint(max_volume_fraction:float=0.2, threshold_fct:str='softplus', compute_only_on_design_space:bool=False) :: UnsupervisedCriterion

This criterion checks if the volume fraction is below a pre-defined maximum volume fraction and punishes higher volumes.

Type Default Details
max_volume_fraction float 0.2 The maximum volume fraction threshold given as a float between 0 and 1.
threshold_fct str softplus The function that determines how volume values above max_volume_fraction are punished. Can be either "relu" or "softplus", which is a smoothed version of ReLU.
compute_only_on_design_space bool False Whether the criterion should be evaluated on voxels that have a design space information of -1, i.e., the voxels can be freely optimized. This parameter does not effect all criteria.

class ForcesUnderpinned[source]

ForcesUnderpinned() :: UnsupervisedCriterion

This criterion uses an infection algorithm to check if all voxels that have external forces applied to them are connected to the rest of the structure. Returns 1 if the structure is connected, else it returns 0.

class MaxStress[source]

MaxStress(compute_only_for_not_underpinned:bool=True, normalize:bool=True) :: UnsupervisedCriterion

This criterion solves the PDE for linear elasticity and returns the maximum absolute von Mises stress value for each passed solution. If normalize=True then the value is normalized with the yield stress of the problem.

Type Default Details
compute_only_for_not_underpinned bool True Whether not connected voxels should be included in the calculation. If True, then the maximum stress is only computed for voxels that are connected to the structure.
normalize bool True Whether the maximal absolute von Mises stress should be normalized with the yield stress.

class StressConstraint[source]

StressConstraint(threshold_fct:str='softplus') :: UnsupervisedCriterion

This criterion solves the PDE for linear elasticity and checks if the absolute maximum von Mises stress is below the yield stress and punishes higher stress values.

Type Default Details
threshold_fct str softplus The function that determines how von Mises stress values above the yield stress are punished. Can be either "relu" or "softplus", which is a smoothed version of ReLU.

class Fail[source]

Fail(ε:float=0.1) :: UnsupervisedCriterion

Checks for each solution if the structure fails to either underpinned force (i.e., the forces are not connected to the rest of the structure) or too high von Mises stresses. If the structure fails for any of these reasons, then the criterion returns a value of 1, otherwise it returns 0. Averaging over the output of this criterion results in the fail percentage criterion [1].

Type Default Details
ε float 0.1 A tolerance that defines how much the absolute maximal von Mises stresses are tolerated to be slightly higher than the yield stresses. By default, this value is 0.1, i.e., a structure does still count as valid if the von Mises stresses are below 110% of the yield stress.

class StressEfficiency[source]

StressEfficiency(compute_only_for_not_underpinned:bool=True) :: UnsupervisedCriterion

Returns the stress efficiency, which is calculated by dividing the mean von Mises stress through the maximum absolute von Mises stress.

Type Default Details
compute_only_for_not_underpinned bool True Whether not connected voxels should be included in the calculation. If True, then the stress efficiency is only computed for voxels that are connected to the structure.

class Binariness[source]

Binariness(low:bool=0.1, high:bool=0.9, compute_only_on_design_space:bool=True) :: UnsupervisedCriterion

This criterion is a measure for how binary a density distribution is. A value of 1 indicates that all density values are below low or above high. A value of 0 indicates that all values are between low and high.

Type Default Details
low bool 0.1 The lower threshold below which densities are considered binary.
high bool 0.9 The upper threshold above which densities are considered binary.
compute_only_on_design_space bool True Whether the criterion should be evaluated on voxels that have a design space information of -1, i.e., the voxels can be freely optimized. This parameter does not effect all criteria.

References

[1] Dittmer, Sören, et al. "SELTO: Sample-Efficient Learned Topology Optimization." arXiv preprint arXiv:2209.05098 (2022).