feup-optimization-employment-plog

所属分类:其他
开发工具:Prolog
文件大小:0KB
下载次数:0
上传日期:2015-08-26 19:53:18
上 传 者sh-1993
说明:  在Prolog中使用CLP(约束逻辑编程)优化员工招聘问题的解决方案,
(Optimization solution to an employee hiring problem using CLP (Constraint Logic Programming) in Prolog,)

文件列表:
LICENSE (35142, 2015-08-26)
resources/ (0, 2015-08-26)
resources/report.pdf (350211, 2015-08-26)
resources/solution.png (10367, 2015-08-26)
src/ (0, 2015-08-26)
src/main.pl (27898, 2015-08-26)
src/probBig.pl (436, 2015-08-26)
src/probBig2.pl (439, 2015-08-26)
src/probEx.pl (425, 2015-08-26)
src/probMedium.pl (435, 2015-08-26)

# Employee hiring optimization solution This repository contains a solution to an employee hiring optimization problem using Constraint Logic Programming, developed on the "Logic Programming" course at FEUP. The development plataform used was Sicstus Prolog 4.3.0, along with the "clpfd" library for Constraint Logic Programming in Prolog. This project was developed by [JPMMaia](https://github.com/JPMMaia) and [msandim](https://github.com/msandim). For further information on the topics of this project, check the [report](https://github.com/msandim/optimization-employment-plog/raw/master/resources/report.pdf) (portuguese only). ## 1. Problem description The problem being addressed in this solution relates to employee hiring: an imaginary company needs several employees during a work day, which can be of two types: * Fulltime employees: work all day, with 1 free luch hour. May work on their lunch hour for a salary bonus; * Part-time employees: work a defined number of hours, with no lunch hour. May work an extra hour for a salary bonus. The number of employees working in their lunch hour or working extra hours are limited by the Workers Union. The number of part-time employees is also limited by number and ratio when compared to the number of fulltime employees. **An optimal solution to this problem is the employee configuration that costs less (in terms of salaries to pay) to the company, while insuring the number of workers needed on each hour.** ## 2. Problem definition in Prolog The files "probEx.pl", "probMedium.pl", "probBig.pl" and "probBig2.pl" contrain instances of the problem defined in Prolog. The predicates that define an instance of a problem are defined as follows: | Predicates | Meaning | |----------------------------|--------------------------------------------------------------------------------| | input_slots | Number of employees needed on each work hour | | input_startWork | First working hour | | input_endWork | Last working hour | | input_maxExtraWorkers | Maximum number of workers working in their lunch hour or doing an extra hour | | input_fullSalaryPerHour | Fulltime worker salary (per hour) | | input_fullBonus | Fulltime bonus for working in lunch hour | | input_lunchHourList | Lunch hours | | input_partialWorkHours | Number of work hours for a part-time worker | | input_partialMaxWorkers | Maximum number of part-time workers | | input_partialWorkersRatio | Maximum percentage ratio of part-time workers compared to the fulltime workers | | input_partialSalaryPerHour | Part-time worker salary (per hour) | | input_partialBonus | Part-time bonus for working an extra hour | In order to run an instance of a problem, change the following instrution in "main.pl" - line 4: ```prolog :- consult(probEx). ``` replacing "probEx" with the desired file. Then load main.pl and call predicate "schedule" (type `schedule.`). ## 3. Command line interface ![gui](https://github.com/msandim/optimization-employment-plog/raw/master/resources/solution.png) After launching the configuration, information regarding the schedule of each employee is showed (textually and graphically), along with the timetable.

近期下载者

相关文件


收藏者