BinPacker (bin_packer v0.1.0) View Source

Link to this section Summary

Link to this section Types

Specs

args() :: any()

Specs

ball_id() :: id()

Specs

ball_ids() :: [ball_id()]

Specs

bin_id() :: id()

Specs

bin_ids() :: [bin_id()]

Specs

constraint_opts() :: [ma()]

Specs

constraints() :: [{ma(), state()}]

Specs

cost() :: number()

Specs

id() :: any()

Specs

ma() :: {module(), args()}

Specs

neighbourhood_opts() :: %{required(module()) => args()}

Specs

neighbourhoods() :: %{required(ma()) => state()}

Specs

objective_opts() :: %{required(ma()) => weight()}

Specs

objectives() :: %{required({ma(), state()}) => weight()}

Specs

proposition() :: BinPacker.MoveProposition.t() | BinPacker.SwapProposition.t()

Specs

proposition_type() :: BinPacker.MoveProposition | BinPacker.SwapProposition

Specs

proposition_types() :: [proposition_types()]

Specs

propositions() :: [propositions()]

Specs

search_opts() :: [
  neighbourhoods: neighbourhood_opts(),
  constraints: constraint_opts()
]

Specs

state() :: any()

Specs

t() :: %BinPacker{
  assignments: BinPacker.Assignments.t(),
  constraints: constraints(),
  neighbourhoods: neighbourhoods(),
  objectives: Objectives.t()
}

Specs

weight() :: number()

Link to this section Functions

Link to this function

add_ball(bin_packer, ball)

View Source

Specs

add_ball(t(), BinPacker.Ball.t()) :: t()
Link to this function

add_balls(bin_packer, balls)

View Source

Specs

add_balls(t(), [BinPacker.Ball.t()]) :: t()
Link to this function

add_bin(bin_packer, bin)

View Source

Specs

add_bin(t(), BinPacker.Bin.t()) :: t()
Link to this function

add_bins(bin_packer, bins)

View Source

Specs

add_bins(t(), [BinPacker.Bin.t()]) :: t()

See BinPacker.Objective.cost/1.

Link to this function

diff(bin_packer, other_bin_packer)

View Source

See BinPacker.Diff.diff/2.

Link to this function

new(bins, balls, objectives, opts \\ [])

View Source

Specs

Link to this function

search(bin_packer, opts \\ [])

View Source

See BinPacker.Neighbourhood.search/2.

See BinPacker.Assignments.to_map/1.