FoPra Beluga Challenge - Reinforcement Learning v1.0
Deep Reinforcement Learning solution for the Beluga Challenge shipping container optimization problem using PPO and MCTS
rl.env.state.Beluga Class Reference

Container ship (Beluga) with current and outgoing jigs. More...

Public Member Functions

 __init__ (self, list[int] current_jigs, list[JigType] outgoing)
 Initialize a Beluga ship.
 
 __str__ (self)
 
 copy (self)
 Create a deep copy of this Beluga.
 

Public Attributes

 current_jigs = current_jigs
 
 outgoing = outgoing
 

Detailed Description

Container ship (Beluga) with current and outgoing jigs.

Represents a ship that can carry jigs. Has current jigs aboard and a list of outgoing jig types that need to be loaded.

Constructor & Destructor Documentation

◆ __init__()

rl.env.state.Beluga.__init__ ( self,
list[int] current_jigs,
list[JigType] outgoing )

Initialize a Beluga ship.

Parameters
current_jigsList of jig IDs currently on the ship
outgoingList of jig types that need to be loaded onto this ship
96 def __init__(self, current_jigs: list[int], outgoing: list[JigType]):
97 """!
98 @brief Initialize a Beluga ship
99 @param current_jigs List of jig IDs currently on the ship
100 @param outgoing List of jig types that need to be loaded onto this ship
101 """
102 self.current_jigs = current_jigs
103 self.outgoing = outgoing
104

Member Function Documentation

◆ __str__()

rl.env.state.Beluga.__str__ ( self)
105 def __str__(self):
106 return "current_jigs = " + str(self.current_jigs) + " | outgoing = " + str(self.outgoing)
107

◆ copy()

rl.env.state.Beluga.copy ( self)

Create a deep copy of this Beluga.

Returns
New Beluga instance with same properties
108 def copy(self):
109 """!
110 @brief Create a deep copy of this Beluga
111 @return New Beluga instance with same properties
112 """
113 # current_jigs and outgoing are lists of ints/objects → shallow copy suffices
114 return Beluga(self.current_jigs[:], self.outgoing[:])
115
116

Member Data Documentation

◆ current_jigs

rl.env.state.Beluga.current_jigs = current_jigs

◆ outgoing

rl.env.state.Beluga.outgoing = outgoing

The documentation for this class was generated from the following file: