text: __author__ = 'mason'
  
  from domain_orderFulfillment import *
  from timer import DURATION
  from state import state
  import numpy as np
  
  '''
  This is a randomly generated problem
  '''
  
  def GetCostOfMove(id, r, loc1, loc2, dist):
      return 1 + dist
  
  def GetCostOfLookup(id, item):
      return max(1, np.random.beta(2, 2))
  
  def GetCostOfWrap(id, orderName, m, item):
      return max(1, np.random.normal(5, .5))
  
  def GetCostOfPickup(id, r, item):
      return max(1, np.random.normal(4, 1))
  
  def GetCostOfPutdown(id, r, item):
      return max(1, np.random.normal(4, 1))
  
  def GetCostOfLoad(id, orderName, r, m, item):
      return max(1, np.random.normal(3, .5))
  
  DURATION.TIME = {
      'lookupDB': GetCostOfLookup,
      'wrap': GetCostOfWrap,
      'pickup': GetCostOfPickup,
      'putdown': GetCostOfPutdown,
      'loadMachine': GetCostOfLoad,
      'moveRobot': GetCostOfMove,
      'acquireRobot': 1,
      'freeRobot': 1,
      'wait': 5
  }
  
  DURATION.COUNTER = {
      'lookupDB': GetCostOfLookup,
      'wrap': GetCostOfWrap,
      'pickup': GetCostOfPickup,
      'putdown': GetCostOfPutdown,
      'loadMachine': GetCostOfLoad,
      'moveRobot': GetCostOfMove,
      'acquireRobot': 1,
      'freeRobot': 1,
      'wait': 5
  }
  
  rv.LOCATIONS = [0, 1, 2, 200]
  rv.FACTORY1 = frozenset({0, 1, 2, 200})
  rv.FACTORY_UNION = rv.FACTORY1
  rv.SHIPPING_DOC = {rv.FACTORY1: 0}
  
  rv.GROUND_EDGES = {0: [2, 200, 1], 1: [0, 2], 2: [0, 1, 200], 200: [2, 0]}
  rv.GROUND_WEIGHTS = {(0, 2): 9.076116588031013, (0, 200): 1, (0, 1): 1.627827551578629, (1, 2): 11.651707196927918, (2, 200): 8.48430503585077}
  
  rv.ROBOTS = { 'r0': rv.FACTORY1,  'r1': rv.FACTORY1,  'r2': rv.FACTORY1,  'r3': rv.FACTORY1, }
  rv.ROBOT_CAPACITY = {'r0': 10.554546068439295, 'r1': 6.854723448045056, 'r2': 7.942077214800426, 'r3': 7.564379915857583}
  rv.MACHINES = { 'm0': rv.FACTORY1, }
  rv.PALLETS = { 'p0', }
  
  
  def ResetState():
      state.OBJECTS = { 'o0': True,  'o1': True, }
      state.OBJ_WEIGHT = {'o0': 10.554546068439295, 'o1': 6.037357394901381}
      state.OBJ_CLASS = {'type0': ['o0'], 'type1': ['o1']}
  
      state.loc = { 'r0': 0, 'r1': 2, 'r2': 1, 'r3': 2, 'm0': 0, 'p0': 2, 'o0': 200, 'o1': 2,}
      state.load = { 'r0': NIL, 'r1': NIL, 'r2': NIL, 'r3': NIL,}
      state.busy = {'r0': False, 'r1': False, 'r2': False, 'r3': False, 'm0': False}
      state.numUses = {'m0': 11}
      state.var1 = {'temp': 'r0', 'temp1': 'r0', 'temp2': 1, 'redoId': 0}
      state.shouldRedo = {}
  
  tasks = {
      2: [['orderStart', ['type0']]],
      1: [['orderStart', ['type1']]],
  }
  eventsEnv = {
  }