[rules-users] Help to implement my 1st planner

André Rezende Fróes de Moraes azeitona.azapa at gmail.com
Thu Jan 24 07:49:47 EST 2013


Hello everyone, i'm trying to implement drools planner for my paper and it
is proving very hard taking in consideration that i never user it before.

I was able to reproduce the examples, even though i got very confused, but
i  undestood some things, but i'm really lost of how to implement my own
project/rule.


My paper is about service, I don't really know how to define it, but i'll
try to explain.

A given company receive several requests of maintence, repair, etc, all the
time, and it have a number of people to solve that, these technicians. It's
something like the nurse roaster but waaaay to simpler.

An issue can pop at any minute, it have a starting time and an estimated
time to be acomplished.

The technician have work for a fixed amount of time, but he have the start
time and the end time of work, that I want to use to assign the issue.

I've created the class Technician

Technician

----------------------------

import java.util.Date;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("Technician")
public class Technician extends AbstractPersistable {

    private int engId;
    private int workTime;
    private Date startWorkTime;
    private Date endWorkTime;

    private Technician technician;

    public Technician(int engId, int workTime, Date startWorkTime,
            Date endWorkTime) {
        super();
        this.engId = engId;
        this.workTime = workTime;
        this.startWorkTime = startWorkTime;
        this.endWorkTime = endWorkTime;
    }

    public int getEngId() {
        return engId;
    }

    public void setEngId(int engId) {
        this.engId = engId;
    }

    public Date getStartWorkTime() {
        return startWorkTime;
    }

    public int getWorkTime() {
        return workTime;
    }

    public void setWorkTime(int workTime) {
        this.workTime = workTime;
    }

    public void setStartWorkTime(Date startWorkTime) {
        this.startWorkTime = startWorkTime;
    }

    public Date getEndWorkTime() {
        return endWorkTime;
    }

    public void setEndWorkTime(Date endWorkTime) {
        this.endWorkTime = endWorkTime;
    }

    public Technician getTechnician() {
        return technician;
    }

    public void setTechnician(Technician technician) {
        this.technician = technician;
    }

}

------------------------------------

Issue class

------------------------------------

import java.util.Date;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("CloudComputer")
public class Issue extends AbstractPersistable {

    private Date startTime;
    private Date estimatedTime;

    public Issue(Date startTime, Date estimatedTime) {
        super();
        this.startTime = startTime;
        this.estimatedTime = estimatedTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEstimatedTime() {
        return estimatedTime;
    }

    public void setEstimatedTime(Date estimatedTime) {
        this.estimatedTime = estimatedTime;
    }

}
--------------------------------


and here i got lost. I'm trying to schedule the technician to these issues
based on the estimated time and in the time left of technician.

I accept any kind of help or comment, I need it for next monday, i'll be
tunned everytime on this trying to make it happen.

Thanks for your time

Aijin Nakanishi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130124/e22e4075/attachment-0001.html 


More information about the rules-users mailing list