Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread colorful.world

Thank you very much for your replies.
I will definitely try and get it back here.



--
View this message in context: 
http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473p4030480.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread Geoffrey De Smet


On 24-07-14 11:19, colorful.world wrote:

Hi Geoffrey,

Thanks for reply.
What we use for declaring fact type is just to have class declaration in drl
file. Since this drl string is loaded at runtime, we are able to have
dynamic class structures and drools rules from DB.
So, I am wondering if we can have dynamic Planning Entity and Variables in
Optaplanner.

That might work. See docs "Solver configuration by Java API"
http://docs.jboss.org/drools/release/latest/optaplanner-docs/html_single/index.html#d0e2636

Please share, if you have another similar ideas to achieve this.



--
View this message in context: 
http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473p4030476.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread Davide Sottara
Declared types support annotations. You'll have to import it

package my.drl;
import my.SomeAnnotation;

declare Foo
@SomeAnnotation
bar : String
end

When the declare is processed, the class builder will try to resolve the
annotation
and, if found, will wire it to the class being generated.
If this does not work, it's a bug, so please report it as such.
Davide

On 07/24/2014 11:19 AM, colorful.world wrote:
> Hi Geoffrey,
>
> Thanks for reply.
> What we use for declaring fact type is just to have class declaration in drl
> file. Since this drl string is loaded at runtime, we are able to have
> dynamic class structures and drools rules from DB.
> So, I am wondering if we can have dynamic Planning Entity and Variables in
> Optaplanner. 
> Please share, if you have another similar ideas to achieve this.
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473p4030476.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread colorful.world
Hi Geoffrey,

Thanks for reply.
What we use for declaring fact type is just to have class declaration in drl
file. Since this drl string is loaded at runtime, we are able to have
dynamic class structures and drools rules from DB.
So, I am wondering if we can have dynamic Planning Entity and Variables in
Optaplanner. 
Please share, if you have another similar ideas to achieve this.



--
View this message in context: 
http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473p4030476.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread Geoffrey De Smet
(this is indeed a Drools question)
It's a matter of adding Java annotations on those declared fact types.
I don't know if Drools supports that.

It would be nice if we have an example to demonstrate that.
Feel free to open a jira on OptaPlanner that we should create such an 
example.

On 24-07-14 10:15, colorful.world wrote:
> Hi guys,
>
> Recently, I have successfully implemented drools project with dynamic domain
> attributes(using declare facts type in drl) and dynamic rules(using drl rule
> string) which allows the users to easily add and change the domain classes
> and rules from GUI.
>
> But, when we come to have auto allocation with this requirement (using
> OptaPlanner), we are having difficulties to achieve this dynamic classes
> feature.
>
> So, is there a way we can define like planning entities and variables in
> 'declare fact type' (or)
> has anyone achieved this kind of mechanism using Optaplanner??
>
> Thanks in advance for your time and suggestions.
>
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread colorful.world
Hi guys,

Recently, I have successfully implemented drools project with dynamic domain
attributes(using declare facts type in drl) and dynamic rules(using drl rule
string) which allows the users to easily add and change the domain classes
and rules from GUI.

But, when we come to have auto allocation with this requirement (using
OptaPlanner), we are having difficulties to achieve this dynamic classes
feature.

So, is there a way we can define like planning entities and variables in
'declare fact type' (or)
has anyone achieved this kind of mechanism using Optaplanner??

Thanks in advance for your time and suggestions.





--
View this message in context: 
http://drools.46999.n3.nabble.com/optaplanner-creating-dynamic-fact-classes-planning-entity-and-planning-variables-in-Optaplanner-tp4030473.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users