Agent Selector
Agents can be selected under different criteria: The one which has lesser value, randomly or the one which is more avaliable.
Agent selector settings are defined in file env_agent_selector.py.
AgentSelector
Selects the same agent until it returns to the depot. Afterward, it selects the next active agent and repeats the process until all agents are done.
-
class maenvs4vrp.environments.gmtdvrp.env_agent_selector.AgentSelector[source]
GMTDVRP agent selector class.
-
__init__()[source]
Constructor
- Parameters:
n/a.
- Returns:
None.
-
set_env(env: AECEnv)[source]
Set environment.
- Parameters:
env (AECEnv) – Environment.
- Returns:
None.
RandomSelector
Selects randomly between active agents.
-
class maenvs4vrp.environments.gmtdvrp.env_agent_selector.RandomSelector[source]
GMTDVRP random agent selector class.
-
__init__()[source]
Constructor
- Parameters:
n/a.
- Returns:
None.
-
set_env(env: AECEnv)[source]
Set environment.
- Parameters:
env (AECEnv) – Environment.
- Returns:
None.
SmallestTimeAgentSelector
Selects the agent with the smallest cumulated time since departure from the depot.
-
class maenvs4vrp.environments.gmtdvrp.env_agent_selector.SmallestTimeAgentSelector[source]
MTVRP smallest time agent selector class.
-
__init__()[source]
Constructor
- Parameters:
n/a.
- Returns:
None.
-
set_env(env: AECEnv)[source]
Set environment.
- Parameters:
env (AECEnv) – Environment.
- Returns:
None.