mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-06-24 04:11:36 +02:00
Resolved some warnings and style issues
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
from typing import Union
|
||||
|
||||
import marl_factory_grid.modules.batteries.constants
|
||||
from marl_factory_grid.environment.actions import Action
|
||||
from marl_factory_grid.utils.results import ActionResult
|
||||
|
||||
@ -24,5 +23,6 @@ class BtryCharge(Action):
|
||||
else:
|
||||
valid = c.NOT_VALID
|
||||
state.print(f'{entity.name} failed to charged batteries at {entity.pos}.')
|
||||
|
||||
return ActionResult(entity=entity, identifier=self._identifier, validity=valid,
|
||||
reward=marl_factory_grid.modules.batteries.constants.REWARD_CHARGE_VALID if valid else marl_factory_grid.modules.batteries.constants.Reward_CHARGE_FAIL)
|
||||
reward=b.REWARD_CHARGE_VALID if valid else b.Reward_CHARGE_FAIL)
|
||||
|
@ -1,11 +1,11 @@
|
||||
from marl_factory_grid.environment import constants as c
|
||||
from marl_factory_grid.environment.entity.entity import Entity
|
||||
from marl_factory_grid.environment.entity.object import _Object
|
||||
from marl_factory_grid.environment.entity.object import Object
|
||||
from marl_factory_grid.modules.batteries import constants as b
|
||||
from marl_factory_grid.utils.utility_classes import RenderEntity
|
||||
|
||||
|
||||
class Battery(_Object):
|
||||
class Battery(Object):
|
||||
|
||||
@property
|
||||
def var_can_be_bound(self):
|
||||
|
@ -1,11 +1,9 @@
|
||||
from typing import List, Union
|
||||
|
||||
import marl_factory_grid.modules.batteries.constants
|
||||
from marl_factory_grid.environment.rules import Rule
|
||||
from marl_factory_grid.utils.results import TickResult, DoneResult
|
||||
|
||||
from marl_factory_grid.environment import constants as c
|
||||
from marl_factory_grid.environment.rules import Rule
|
||||
from marl_factory_grid.modules.batteries import constants as b
|
||||
from marl_factory_grid.utils.results import TickResult, DoneResult
|
||||
|
||||
|
||||
class BatteryDecharge(Rule):
|
||||
|
Reference in New Issue
Block a user