Пример #1
0
    def Load(pinfo):
        profilename = pinfo['Name']
        salary = pinfo['Salary']
        flexible = pinfo['FlexibleHours']
        schedule = WeeklySchedule(pinfo['Schedule'])

        return JobDescription(profilename, salary, flexible, schedule)
Пример #2
0
def AddSchoolProfile(name, joblist, students):
    global world

    jobs = ExpandJobList(joblist)
    profile = world.AddBusinessProfile(name, BusinessType.School, jobs)
    SocialNodes.BusinessProfile.AddServiceProfile(
        profile, WeeklySchedule.WorkWeekSchedule(8.0, 15.0), students, 7.0)
    profile.BusinessProfile.AddAnnotation(name)

    return profile
Пример #3
0
def AddRestaurantProfile(name, joblist, bizhours, customers, stime=1.5):
    global world

    jobs = ExpandJobList(joblist)
    profile = world.AddBusinessProfile(name, BusinessType.Food, jobs)
    SocialNodes.BusinessProfile.AddServiceProfile(
        profile, WeeklySchedule.WorkWeekSchedule(bizhours[0], bizhours[1]),
        customers, stime)
    profile.BusinessProfile.AddAnnotation(name)

    return profile
Пример #4
0
 def Copy(self, offset=0.0):
     return JobDescription(self.Name, self.Salary, self.FlexibleHours,
                           WeeklySchedule(self.Schedule.Dump(), offset))
Пример #5
0
    def Load(graph, pinfo):
        bizhours = WeeklySchedule(pinfo['Schedule'])
        capacity = pinfo['CustomerCapacity']
        servicetime = pinfo['ServiceTime']

        return ServiceProfileDecoration(bizhours, capacity, servicetime)
Пример #6
0
def AddSchoolProfile(name, joblist, students):
    global world

    jobs = ExpandJobList(joblist)
    profile = world.AddBusinessProfile(name, BusinessType.School, jobs)
    SocialNodes.BusinessProfile.AddServiceProfile(
        profile, WeeklySchedule.WorkWeekSchedule(8.0, 15.0), students, 7.0)
    profile.BusinessProfile.AddAnnotation(name)

    return profile


# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AddJobDescription('shift1', 30000, False,
                  WeeklySchedule.WorkWeekSchedule(4.0, 12.0))
AddJobDescription('shift2', 30000, False,
                  WeeklySchedule.WorkWeekSchedule(10.0, 18.00))
AddJobDescription('shift3', 30000, False,
                  WeeklySchedule.WorkWeekSchedule(16.0, 23.5))

AddJobDescription('parttime1', 15000, False,
                  WeeklySchedule.WorkWeekSchedule(8.0, 12.0))
AddJobDescription('parttime2', 15000, False,
                  WeeklySchedule.WorkWeekSchedule(12.0, 16.0))
AddJobDescription('parttime3', 15000, False,
                  WeeklySchedule.WorkWeekSchedule(16.0, 20.0))
AddJobDescription('parttime4', 15000, False,
                  WeeklySchedule.WorkWeekSchedule(20.0, 23.5))

AddJobDescription('worker', 30000, True,