def create_world(model, simulator, t_init): """ Factory for world entities. """ from cps.entity import Scheduler # create channel scheduler state_names = model.world_vars scheduler = Scheduler.worldSchedulerFromModel(t_init, model.world_channel_table) # create world return model.WorldType(state_names, scheduler, simulator)