FixedTradePredictionStrategy

class scml.scml2020.FixedTradePredictionStrategy(*args, add_trade=True, **kwargs)[source]

Bases: TradePredictionStrategy

Predicts a fixed amount of trade both for the input and output products.

Hooks Into:
Remarks:
  • Attributes section describes the attributes that can be used to construct the component (passed to its __init__ method).

  • Provides section describes the attributes (methods, properties, data-members) made available by this component directly. Note that everything provided by the bases of this components are also available to the agent (Check the Bases section above for all the bases of this component).

  • Requires section describes any requirements from the agent using this component. It defines a set of methods or properties/data-members that must exist in the agent that uses this component. These requirement are usually implemented as abstract methods in the component

  • Abstract section describes abstract methods that MUST be implemented by any descendant of this component.

  • Hooks Into section describes the methods this component overrides calling super () which allows other components to hook into the same method (by overriding it). Usually callbacks starting with on_ are hooked into this way.

  • Overrides section describes the methods this component overrides without calling super effectively disallowing any other components after it in the MRO to call this method. Usually methods that do some action (i.e. not starting with on_) are overridden this way.

Attributes Summary

internal_state

Methods Summary

before_step()

init()

on_contracts_finalized(signed, cancelled, ...)

rtype:

None

step()

trade_prediction_before_step()

Will be called at the beginning of every step to update the prediction

trade_prediction_init()

Will be called to update expected_outputs, expected_inputs, input_cost, output_cost during init()

trade_prediction_step()

Will be called at the end of every step to update the prediction

Attributes Documentation

internal_state

Methods Documentation

before_step()
init()
on_contracts_finalized(signed, cancelled, rejectors)[source]
Return type:

None

step()
trade_prediction_before_step()

Will be called at the beginning of every step to update the prediction

Return type:

None

trade_prediction_init()[source]

Will be called to update expected_outputs, expected_inputs, input_cost, output_cost during init()

trade_prediction_step()

Will be called at the end of every step to update the prediction

Return type:

None