SimpleWorld

class negmas.situated.SimpleWorld(bulletin_board: Optional[negmas.situated.situated.BulletinBoard] = None, n_steps=10000, time_limit=3600, negotiation_speed=None, neg_n_steps=100, neg_time_limit=180, neg_step_time_limit=60, shuffle_negotiations=True, negotiation_quota_per_step=inf, negotiation_quota_per_simulation=inf, default_signing_delay=1, force_signing=False, batch_signing=True, breach_processing=<BreachProcessing.NONE: 0>, mechanisms: Optional[Dict[str, Dict[str, Any]]] = None, awi_type: str = 'negmas.situated.AgentWorldInterface', start_negotiations_immediately: bool = False, log_folder=None, log_to_file=True, log_ufuns=False, log_negotiations: bool = False, log_to_screen: bool = False, log_stats_every: int = 0, log_file_level=10, log_screen_level=40, no_logs=False, event_file_name='events.json', event_types=None, log_file_name='log.txt', save_signed_contracts: bool = True, save_cancelled_contracts: bool = True, save_negotiations: bool = True, save_resolved_breaches: bool = True, save_unresolved_breaches: bool = True, ignore_agent_exceptions: bool = False, ignore_negotiation_exceptions: bool = False, ignore_contract_execution_exceptions: bool = False, ignore_simulation_exceptions: bool = False, safe_stats_monitoring: bool = False, construct_graphs: bool = False, checkpoint_every: int = 1, checkpoint_folder: Optional[Union[str, pathlib.Path]] = None, checkpoint_filename: Optional[str] = None, extra_checkpoint_info: Optional[Dict[str, Any]] = None, single_checkpoint: bool = True, exist_ok: bool = True, operations: Collection[negmas.situated.situated.Operations] = (<Operations.StatsUpdate: 6>, <Operations.Negotiations: 1>, <Operations.ContractSigning: 2>, <Operations.AgentSteps: 3>, <Operations.ContractExecution: 4>, <Operations.SimulationStep: 5>, <Operations.ContractSigning: 2>, <Operations.StatsUpdate: 6>), info: Optional[Dict[str, Any]] = None, genius_port: int = 25337, disable_agent_printing: bool = False, name: Optional[str] = None, id: Optional[str] = None)[source]

Bases: negmas.situated.World, abc.ABC

Represents a simple world simulation with sane values for most callbacks and methods.

Methods Summary

breach_record(breach)

Converts a breach to a record suitable for storage during the simulation

contract_record(contract)

Converts a contract to a record suitable for permanent storage

contract_size(contract)

Returns an estimation of the activity level associated with this contract.

delete_executed_contracts()

Called after processing executable contracts at every simulation step to delete processed contracts

order_contracts_for_execution(contracts)

Orders the contracts in a specific time-step that are about to be executed

post_step_stats()

Called at the end of the simulation step to update all stats

pre_step_stats()

Called at the beginning of the simulation step to prepare stats or update them

Methods Documentation

breach_record(breach: negmas.situated.Breach)Dict[str, Any][source]

Converts a breach to a record suitable for storage during the simulation

contract_record(contract: negmas.situated.Contract)Dict[str, Any][source]

Converts a contract to a record suitable for permanent storage

contract_size(contract: negmas.situated.Contract)float[source]

Returns an estimation of the activity level associated with this contract. Higher is better :param contract:

Returns:

delete_executed_contracts()None[source]

Called after processing executable contracts at every simulation step to delete processed contracts

order_contracts_for_execution(contracts: Collection[negmas.situated.Contract])Collection[negmas.situated.Contract][source]

Orders the contracts in a specific time-step that are about to be executed

post_step_stats()[source]

Called at the end of the simulation step to update all stats

Kept for backward compatibility and will be dropped. Override update_stats ins

pre_step_stats()[source]

Called at the beginning of the simulation step to prepare stats or update them

Kept for backward compatibility and will be dropped. Override update_stats instead