pub struct Optimizer { /* private fields */ }
Expand description

Optimizer for optimizing rectangular cut pieces from rectangular stock pieces.

Implementations

Create a new optimizer.

Add a stock piece that the optimizer can use to optimize cut pieces. If the same stock piece is added multiple times, the quantities will be summed up. If any have a None quantity, the quantity on other equivalent pieces will be ignored.

Add a stock pieces that the optimizer can use to optimize cut pieces. If the same stock piece is added multiple times, the quantities will be summed up. If any have a None quantity, the quantity on other equivalent pieces will be ignored.

Add a desired cut piece that you need cut from a stock piece.

Add desired cut pieces that you need cut from a stock piece.

Set the width of the cut to use between cut pieces. This could represent blade or kerf thickness.

Set the random seed used by the genetic algorithms in the optimizer. Using the same random seed will give you the same result for the same input.

Set whether the optimizer should allow mixed sized stock pieces in the results. If set to false, and multiple stock sizes are given, only one stock size will be used in the results.

Optimize in a way where each cut piece can be cut out using only guillotine cuts, where each cut extends from one side to the other.

This method is suitable for cutting with a panel saw.

Optimize without the requirement of guillotine cuts. Cuts can start and stop in the middle of the stock piece.

This method is suitable for cutting on a CNC.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.