[OptaPlanner] Multiple planning entities and dynamic planning variables.
by Sandeep Bandela
Hi,
I need some help on modeling a planning problem. (using planner 6.0.0.Beta3)
My problem closely resembles curriculum-course example but with some more
planning variables as follows.
1. course can be taught by multiple teachers
2. lecture needs 1 teacher, 1 projector, 1 teaching assistant.
3. course can have lab component. which needs 'n' teachers & 'm' lab
assistants of that course.
4. every resource (teacher/projector/room/lab/assistants) have their own
availability periods in a day.
1, 2, 4 were easier, I made teacher, projector, TA as planning variables
and have list from which they can be chosen. and separate rule to check if
the any of these are present in different lectures at the same time or if
they are unavailable.
now to incorporate the 3rd, I am stuck. should I create different planning
entity and its own variables of teacher, lab assistants? this will also
complicate rules to check if the same resource/variable is not in different
places in the same period (lecture-lecture, lab-lecture, lab-lab etc.). any
suggestions or references regarding this is much appreciated.
Another issue is how can I dynamically control number plan
variables/resources needed for a planning entity? like 2 teachers & 4 lab
assistants for a lab session of course (is it related to
https://issues.jboss.org/browse/PLANNER-167 if so any workaround).
--
Regards,
Sandeep Bandela.
12 years, 8 months
security guards london
by EvansWilson
Knightguard is security guarding company based in the Wimbledon Area of
London and operates nationally. We offer a wide range of Security Services,
we specialises in manned guarding we supply security guards and door
supervisors, bouncers, door staff to retail stores, construction sites,
industrial sites, clubs, hospitals, hotels, events etc throughout the UK.
These are tailor made to our Clients requirements with personal supervision
at all times.
--
View this message in context: http://drools.46999.n3.nabble.com/security-guards-london-tp4024752.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Restoring and continuing a ksession.
by Michiel Vermandel
Hi,
After a few years of using JBPM4, we are evaluating JBPM5.
In our project we have lots of long-running processes, so we need to persist them.
We want a tight integration with our application and therefore we decided not to use Guvnor (maybe we should non the less?).
Anyway, at the moment we use one ksession per process instance.
Now I am wondering how to "revive" the kbase which is needed to load the ksession:
ksessionStatefull = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
As process instances can last days or weeks, it is quit possible that process definitions have been altered,
so to continue a ksession we need to restore the same kbase as used to
start the session (we need to know version of the process definition
which was used when creating the process instance), right?
(How) should we store the kbase which is needed to reload the ksession?
Thanks!
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
12 years, 8 months
drools migration
by Radhika Inugala
Hi All,
In my current project we are using drools and the maven dependencies show as
<dependency>
<groupId>org.drools</groupId>
<artifactId>com.springsource.org.drools.compiler</artifactId>
<version>4.0.7</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>com.springsource.org.drools</artifactId>
<version>4.0.7</version>
</dependency>
I would like to migrate this to 5.2.0 version. As I want to have Guvnor and
a UI integration for a new rules setup.
When I see for the springsource dependencies, I do not find the same.
When I changed these to
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.2.0.CR1</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.2.0.CR1</version>
</dependency>
</dependencies>
I am getting compilation failures.
Any inputs on how to migrate the drools is appreciated.
Thanks,
RR
12 years, 8 months
Drools Guvnor got hang
by krishna prasad As
Hi,
I'm using Drools Guvnor 5.4.0.Final for my production application. It was
running fine But today the guvnor got hung and when I tried to restart it,
got the following error in tomcat's(6.0.24) localhost log,
Jul 1, 2013 7:14:31 AM org.apache.catalina.session.StandardSession
writeObject
WARNING: Cannot serialize session attribute
org.jboss.weld.context.http.HttpSessionContext#org.jboss.weld.bean-flat-ManagedBean-org.jboss.seam.security.IdentityImpl[@javax.enterprise.context.SessionScoped()@javax.inject.Named(value=identity)@org.jboss.solder.config.xml.core.XmlConfiguredBean()@org.jboss.solder.config.xml.core.XmlId(value=1)]{org.jboss.seam.security.IdentityImpl.authenticators[@javax.enterprise.inject.Any()@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.beanManager[@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.credentials[@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.permissionMapper[@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.requestSecurityState[@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.session[@javax.inject.Inject()];org.jboss.seam.security.IdentityImpl.deferredAuthenticationObserver(org.jboss.seam.security.events.DeferredAuthenticationEvent[(a)javax.enterprise.event.Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)]);}
for session 82B9B573DFBB2E9E7470649A1A5441E3
java.io.NotSerializableException: org.drools.repository.RulesRepository
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
at
java.util.Collections$SynchronizedCollection.writeObject(Collections.java:1602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1546)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:989)
at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:517)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:463)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:667)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4611)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:584)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:643)
at org.apache.catalina.startup.Catalina.start(Catalina.java:618)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
------------------------------------------------------------------------------------------------------------------------
Can anyone help me for finding the root cause.?
Thanks & Regards
Krishnaprasad.
12 years, 8 months
Event and Facts Problem
by Andynator
hey,
I have a problem with events and facts: when i have two existing facts
(resources) und i am inserting an event (request), then following rule is
fired twice (for each resource)
/declare ReservationRequest
@role ( event )
@timestamp ( timestamp )
@expires(0s)
end
rule "Allocate"
no-loop true
when
$resource : Resource(state == 0)
$request : ReservationRequest() from entry-point "EventStream"
then
modify($resource) { setState(1) };
insert(new Allocation($resource, $request.getDuration()));
log.warn("Rule 'Allocate' fired: '" + $resource.getName() + "' on
Request '" + $request.getName());
end/
Any ideas why?
--
View this message in context: http://drools.46999.n3.nabble.com/Event-and-Facts-Problem-tp4024622.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Fwd: Drools and Dynamic rules per client
by Radhika Inugala
Hi All,
I am new to drools rule engine.
And I am looking at the drools for the following requirement:
My application has many customers, and we want to give them an ability to
set some sort of rules.
We need to store these rules and then when we get requests from these
clients we need to apply these client specific rules to the requests.
So the rules and the rule data is customer specific.
Please let me know, if we can do that using drools.
12 years, 8 months