Coverage for moptipyapps / binpacking2d / __init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-11 04:40 +0000

1""" 

2Codes for the two-dimensional bin packing problem. 

3 

4- :mod:`~moptipyapps.binpacking2d.instance` provides the instance data of 

5 two-dimensional bin packing problems. 

6 The instance data comprises the object sizes and multiplicities as well as 

7 the bin sizes. 

8 Several default instances from 2DPackLib 

9 (https://site.unibo.it/operations-research/en/research/2dpacklib) 

10 can be loaded from resources. 

11- :mod:`~moptipyapps.binpacking2d.packing` can store a packing, i.e., an 

12 assignment of objects to coordinates and bins. 

13 Such packings are solutions to the bin packing problem. 

14- :mod:`~moptipyapps.binpacking2d.packing_space` provides an implementation of 

15 the :mod:`~moptipy.api.space` interface for the 

16 :mod:`~moptipyapps.binpacking2d.packing` objects. 

17 This class allows, for example, to instantiate the packings, to verify 

18 whether they are correct, and to convert them to and from strings. 

19- :mod:`~moptipyapps.binpacking2d.plot_packing` allows you to plot a packing. 

20- :mod:`~moptipyapps.binpacking2d.encodings.ibl_encoding_1` is an 

21 implementation of the improved bottom-left encoding which closes bins 

22 immediately once an object does not fit. 

23- :mod:`~moptipyapps.binpacking2d.encodings.ibl_encoding_2` is another 

24 implementation of the improved bottom-left encoding which tests each bin for 

25 each object. 

26- :mod:`~moptipyapps.binpacking2d.objectives.bin_count_and_last_empty` 

27 provides an objective function that tries to minimize the number of bins and 

28 pushes towards decreasing the number of objects in the very last bin used. 

29- :mod:`~moptipyapps.binpacking2d.make_instances` offers a method to download 

30 the two-dimensional bin packing instances from the original sources in the \ 

31[2DPackLib](https://site.unibo.it/operations-research/en/research/2dpacklib) 

32 format. 

33 

34Important initial work on this code has been contributed by Mr. Rui ZHAO 

35(赵睿), <zr1329142665@163.com> a Master's student at the Institute of Applied 

36Optimization (应用优化研究所) of the School of 

37Artificial Intelligence and Big Data (人工智能与大数据学院) at Hefei University 

38(合肥大学) in Hefei, Anhui, China (中国安徽省合肥市) under the supervision of 

39Prof. Dr. Thomas Weise (汤卫思教授). 

40"""