class_docstr: Simulator for a backend deployment with concurrent dispatch and a queue.
class_docstr_tok: ["Simulator","for","a","backend","deployment","with","concurrent","dispatch","and","a","queue","."]
docstr: A simulator for a concurrent dispatch with a queue.
  
  Args:
      options: A ``BackendSimulatorOptions`` object with various settings
          of the backend simulator.
      queued: A list of SimTrial objects representing the queued trials
          (only used for testing particular initialization cases)
      running: A list of SimTrial objects representing the running trials
          (only used for testing particular initialization cases)
      failed: A list of SimTrial objects representing the failed trials
          (only used for testing particular initialization cases)
      completed: A list of SimTrial objects representing the completed trials
          (only used for testing particular initialization cases)
      verbose_logging: If False, sets the logging level to WARNING.
docstr_tok: ["A","simulator","for","a","concurrent","dispatch","with","a","queue",".","Args",":","options",":","A","``","BackendSimulatorOptions","``","object","with","various","settings","of","the","backend","simulator",".","queued",":","A","list","of","SimTrial","objects","representing","the","queued","trials","(","only","used","for","testing","particular","initialization","cases",")","running",":","A","list","of","SimTrial","objects","representing","the","running","trials","(","only","used","for","testing","particular","initialization","cases",")","failed",":","A","list","of","SimTrial","objects","representing","the","failed","trials","(","only","used","for","testing","particular","initialization","cases",")","completed",":","A","list","of","SimTrial","objects","representing","the","completed","trials","(","only","used","for","testing","particular","initialization","cases",")","verbose_logging",":","If","False",",","sets","the","logging","level","to","WARNING","."]
code: def __init__(
      self,
      options: Optional[BackendSimulatorOptions] = None,
      queued: Optional[List[SimTrial]] = None,
      running: Optional[List[SimTrial]] = None,
      failed: Optional[List[SimTrial]] = None,
      completed: Optional[List[SimTrial]] = None,
      verbose_logging: bool = True,
  ) -> None:
      """A simulator for a concurrent dispatch with a queue.
  
      Args:
          options: A ``BackendSimulatorOptions`` object with various settings
              of the backend simulator.
          queued: A list of SimTrial objects representing the queued trials
              (only used for testing particular initialization cases)
          running: A list of SimTrial objects representing the running trials
              (only used for testing particular initialization cases)
          failed: A list of SimTrial objects representing the failed trials
              (only used for testing particular initialization cases)
          completed: A list of SimTrial objects representing the completed trials
              (only used for testing particular initialization cases)
          verbose_logging: If False, sets the logging level to WARNING.
      """
      if not verbose_logging:
          logger.setLevel(logging.WARNING)
  
      if options is None:
          options = BackendSimulatorOptions()
  
      # pyre-fixme[4]: Attribute must be annotated.
      self.max_concurrency = options.max_concurrency
      # pyre-fixme[4]: Attribute must be annotated.
      self.time_scaling = options.time_scaling
      # pyre-fixme[4]: Attribute must be annotated.
      self.failure_rate = options.failure_rate
      # pyre-fixme[4]: Attribute must be annotated.
      self.use_update_as_start_time = options.use_update_as_start_time
      self._queued: List[SimTrial] = queued or []
      self._running: List[SimTrial] = running or []
      self._failed: List[SimTrial] = failed or []
      self._completed: List[SimTrial] = completed or []
      # pyre-fixme[4]: Attribute must be annotated.
      self._internal_clock = options.internal_clock
      self._verbose_logging = verbose_logging
      # pyre-fixme[4]: Attribute must be annotated.
      self._init_state = self.state()
      self._create_index_to_trial_map()
  
imports: import logging
  import random
  import time
  from dataclasses import dataclass
  from logging import Logger
  from typing import Dict, List, Optional
  from ax.core.base_trial import TrialStatus
  from ax.utils.common.logger import get_logger
label_desc: Use image node_id 1 to create a new BackendSimulator object  with example: obj = BackendSimulator(options, queued, running, failed, completed, verbose_logging)