<div dir="ltr"><div><div>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.<br><br></div>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.<br>
<br><br></div><div>My paper is about service, I don't really know how to define it, but i'll try to explain.<br><br></div><div>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.<br>
<br></div><div>An issue can pop at any minute, it have a starting time and an estimated time to be acomplished.<br><br></div><div>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.<br>
<br></div><div>I've created the class Technician<br><br></div><div>Technician<br><br></div><div>----------------------------<br><br>import java.util.Date;<br><br>import com.thoughtworks.xstream.annotations.XStreamAlias;<br>
<br>@XStreamAlias("Technician")<br>public class Technician extends AbstractPersistable {<br><br> private int engId;<br> private int workTime;<br> private Date startWorkTime;<br> private Date endWorkTime;<br>
<br> private Technician technician;<br><br> public Technician(int engId, int workTime, Date startWorkTime,<br> Date endWorkTime) {<br> super();<br> this.engId = engId;<br> this.workTime = workTime;<br>
this.startWorkTime = startWorkTime;<br> this.endWorkTime = endWorkTime;<br> }<br><br> public int getEngId() {<br> return engId;<br> }<br><br> public void setEngId(int engId) {<br> this.engId = engId;<br>
}<br><br> public Date getStartWorkTime() {<br> return startWorkTime;<br> }<br><br> public int getWorkTime() {<br> return workTime;<br> }<br><br> public void setWorkTime(int workTime) {<br>
this.workTime = workTime;<br> }<br><br> public void setStartWorkTime(Date startWorkTime) {<br> this.startWorkTime = startWorkTime;<br> }<br><br> public Date getEndWorkTime() {<br> return endWorkTime;<br>
}<br><br> public void setEndWorkTime(Date endWorkTime) {<br> this.endWorkTime = endWorkTime;<br> }<br><br> public Technician getTechnician() {<br> return technician;<br> }<br><br> public void setTechnician(Technician technician) {<br>
this.technician = technician;<br> }<br><br>}<br><br>------------------------------------<br><br></div><div>Issue class<br></div><div><br>------------------------------------<br><br>import java.util.Date;<br><br>
import com.thoughtworks.xstream.annotations.XStreamAlias;<br><br>@XStreamAlias("CloudComputer")<br>public class Issue extends AbstractPersistable {<br><br> private Date startTime;<br> private Date estimatedTime;<br>
<br> public Issue(Date startTime, Date estimatedTime) {<br> super();<br> this.startTime = startTime;<br> this.estimatedTime = estimatedTime;<br> }<br><br> public Date getStartTime() {<br> return startTime;<br>
}<br><br> public void setStartTime(Date startTime) {<br> this.startTime = startTime;<br> }<br><br> public Date getEstimatedTime() {<br> return estimatedTime;<br> }<br><br> public void setEstimatedTime(Date estimatedTime) {<br>
this.estimatedTime = estimatedTime;<br> }<br><br>}<br>--------------------------------<br><br><br></div><div>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.<br>
<br></div><div>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.<br><br>Thanks for your time<br><br>Aijin Nakanishi<br></div></div>