PCB Environment 2
Loading...
Searching...
No Matches
UserAgent Class Reference
Inheritance diagram for UserAgent:
Agent

Public Member Functions

void setPCB (const std::shared_ptr< PCBoard > &) override
void setManagedConnections (const std::set< Connection * > &) override
void setStateRepresentationParams (PyObject *) override
void setParameter (const std::string &name, int index, PyObject *) override
PyObject * step (PyObject *) override
PyObject * get_state (PyObject *) override
PyObject * reset () override
Public Member Functions inherited from Agent
 Agent (const std::string &name)
const std::string & name () const
void setParameters (PyObject *)
const std::map< std::string, Parameter * > & getParameters () const
void setPythonInterface (PyObject *)
void setTrainingMode (bool on)
void setManagedConnectionsToUnrouted ()
void setActionSpace (const ActionSpace &)
void setPolicy (Policy *)
 Ownership of Policy, RewardFunction, and StateRepresentation are transferred to the agent.
void setRewardFn (RewardFunction *)
void setStateRepresentation (StateRepresentation *)
virtual bool _run ()
bool run ()
void setRunArgs (PyObject *)
void setTimeout (uint64_t usec)
void setTimeoutExpired ()
void setActionLimit (int64_t count)
void setClearBoardBeforeRun (bool)
float getProgress () const
void eraseManagedConnections ()
PCBoardgetPCB () const
 These are only valid as long as you have got a hold of the agent.
RewardFunctiongetRewardFn () const
PolicygetPolicy () const
StateRepresentationgetSR () const
uint32_t getIteration () const
uint64_t numActions () const
uint64_t usecsSinceStart () const
const std::vector< Connection * > & getConnections () const
const std::set< Connection * > & getConnectionSet () const
ConnectionsetConnectionLRU (PyObject *)
ConnectiongetConnectionLRU () const
Action::Result evaluateCurrentState () const
void startTimer ()
bool hasTimerExpired () const
void resetActionCount ()
void resetActionLimit ()
void countActions (int)
bool actionLimitExceeded () const
std::vector< float > py_V (PyObject *states)
std::vector< float > py_Q (PyObject *states)
std::vector< float > py_P (PyObject *states)
std::vector< float > py_P_V (PyObject *states)
void py_event (PyObject *event)
 Tell anything else to your Python interface.
StepLockgetStepLock ()

Additional Inherited Members

Static Public Member Functions inherited from Agent
static Agentcreate (const std::string &type)
Protected Member Functions inherited from Agent
void initParameters ()
Protected Attributes inherited from Agent
std::shared_ptr< PCBoardmPCB
std::vector< Connection * > mConnections
std::set< Connection * > mConnectionSet
ConnectionmConnectionLRU {0}
const ActionSpacemActionSpace {0}
std::unique_ptr< PolicymPolicy
std::unique_ptr< StateRepresentationmStateRep
std::unique_ptr< RewardFunctionmRewardFn
ResultCollection mStats
uint32_t mIteration {0}
float mProgress {-1.0f}
bool mClearBoardBeforeRun {false}
SignalContext mSignals
std::map< std::string, Parameter * > mParameters
PyObject * mPython {0}
PyObject * mMethodNamesPy [5] {0,0,0,0,0}

Member Function Documentation

◆ get_state()

PyObject * UserAgent::get_state ( PyObject * )
overridevirtual

Reimplemented from Agent.

◆ reset()

PyObject * UserAgent::reset ( )
overridevirtual

Reimplemented from Agent.

◆ setManagedConnections()

void UserAgent::setManagedConnections ( const std::set< Connection * > & )
overridevirtual

Reimplemented from Agent.

◆ setParameter()

void UserAgent::setParameter ( const std::string & name,
int index,
PyObject *  )
overridevirtual

Reimplemented from Agent.

◆ setPCB()

void UserAgent::setPCB ( const std::shared_ptr< PCBoard > & )
overridevirtual

Reimplemented from Agent.

◆ setStateRepresentationParams()

void UserAgent::setStateRepresentationParams ( PyObject * )
overridevirtual

Reimplemented from Agent.

◆ step()

PyObject * UserAgent::step ( PyObject * )
overridevirtual

Reimplemented from Agent.


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