-
Notifications
You must be signed in to change notification settings - Fork 5
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
d626bdb
commit b7aaa3e
Showing
4 changed files
with
46 additions
and
15 deletions.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .agent_parallel import MultiProcessAgentParallelRuner | ||
from .agent_parallel import MultiThreadAgentParallelRuner | ||
from .base import Runner | ||
from .sequential import SequentialRunner |
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,15 @@ | ||
import time | ||
from typing import List | ||
|
||
from pams.agents.fcn_agent import FCNAgent | ||
from pams.market import Market | ||
from pams.order import Cancel | ||
from pams.order import Order | ||
|
||
wait_time = 0.2 # seconds | ||
|
||
|
||
class FCNDelayAgent(FCNAgent): | ||
def submit_orders(self, markets: List[Market]) -> List[Order | Cancel]: | ||
time.sleep(wait_time) # Simulate a delay | ||
return super().submit_orders(markets) |
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