Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: binpack docs #250

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions jumanji/environments/packing/bin_pack/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,18 @@ class BinPack(Environment[State, specs.MultiDiscreteArray, Observation]):
already packed.

- state: `State`
- coordinates: jax array (float) of shape (num_nodes + 1, 2)
the coordinates of each node and the depot.
- demands: jax array (int32) of shape (num_nodes + 1,)
the associated cost of each node and the depot (0.0 for the depot).
- position: jax array (int32)
the index of the last visited node.
- capacity: jax array (int32)
the current capacity of the vehicle.
- visited_mask: jax array (bool) of shape (num_nodes + 1,)
binary mask (False/True <--> not visited/visited).
- trajectory: jax array (int32) of shape (2 * num_nodes,)
identifiers of the nodes that have been visited (set to DEPOT_IDX if not filled yet).
- num_visits: int32
number of actions that have been taken (i.e., unique visits).
- container: space defined by 2 points, i.e. 6 coordinates.
- ems: empty maximal spaces (EMSs) in the container, each defined by 2 points
(6 coordinates).
- ems_mask: array of booleans that indicate the EMSs that are valid.
- items: defined by 3 attributes (x, y, z).
- items_mask: array of booleans that indicate the items that can be packed.
- items_placed: array of booleans that indicate the items that have been placed so far.
- items_location: locations of items in the container, defined by 3 coordinates (x, y, x).
- action_mask: array of booleans that indicate the valid actions,
i.e. EMSs and items that can be chosen.
- sorted_ems_indexes: EMS indexes that are sorted by decreasing volume order.
- key: random key used for auto-reset.

```python
from jumanji.environments import BinPack
Expand Down
Loading