Hi there,
just wanted to share some feedback. When building a solver, I got confused when it reported:
Exception in thread "main" java.lang.IllegalArgumentException: The entityClass (class com.Foo) has an @InverseRelationShadowVariable annotated property (nap) with a sourceClass (class com.Bar) which is not a valid planning entity.
I reviewed my implementation for quite a while without spotting any contract violation. The root cause turned out to be solver config builder, which I had translated too literally from an xml config as
SolverConfig()
.withSolutionClass(Something::class.java)
.withEntityClasses(Foo::class.java)
.withEntityClasses(Bar::class.java)
There are 2 ways to potentially improve this.
a) the builder could at least warn that withEntityClasses is not additative
b) the message (which is unfortunately implemented several times in different ShadowVariableDescriptor classes) could be slightly extended to guide the user better. ie. "...which is not a valid planning entity or the planning entity is not correctly registered in the solver configuration".
What do you think?
Best
Holger