This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
734ddfe
commit 0687c64
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
ignore = E501 | ||
exclude = .git,__pycache__,docs/conf.py,old,build,dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Plugins | ||
======= | ||
|
||
ABCE has one plugin so far. The ABCESL accounting framework. If | ||
you want to author your own plugin - its dead simple. All you | ||
have to do is write a class that inherits from Agent in agent.py. | ||
This class can overwrite:: | ||
|
||
def init(self, parameter, agent_parameter) | ||
def _begin_subround(self): | ||
def _end_subround(self): | ||
def _advance_round(self, time): | ||
|
||
For example like this:: | ||
|
||
class UselessAgent(abce.Agent): | ||
def init(self, parameter, agent_parameter): | ||
super().init() | ||
print("Here i begin") | ||
|
||
def _begin_subround(self): | ||
super()._begin_subround() | ||
print('subround begins') | ||
print("its %r o'clock" % self.time) | ||
|
||
def _end_subround(self): | ||
super()._end_subround() | ||
print('subround finishes') | ||
|
||
def _advance_round(self, time): | ||
super()._advance_round(time) | ||
print('Super I made it to the next round') | ||
|
||
def ability(self): | ||
print("the simulation called my ability") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters