Hi, I'm new to OptaPlanner, and reading through the planning examples in the
documentation left me with a question. One problem I'm trying to model
involves a variable number of planning entities, which I didn't really see
addressed by any of the examples; they all seemed to me more focused on
varying the states of planning variables for a fixed / known number of
entities.
To throw out some specifics...let's say I'm trying to optimize my attendance
schedule for some convention. I have a set of problem facts, the various
events going on at the convention, with each having a time (when the event
happens), and a worth (how much I'd like to be there for that event).
And I have a set of planning entities, the various times that I'm present at
the convention. So, I'm trying to model the case where my key constraint is
the total amount of time I spend at the convention...let's treat that as
fixed. I don't care how many separate times I go there, though I will have
to model constraints like a minimum length per visit (very inefficient to go
for 10 minutes at a time), and a minimum separation between visits (annoying
/ inefficient to leave, then turn right around and go back, unless I get an
hour break).
Again, I didn't see a good way to just say "have any number of planning
entities in the planning entity collection, so long as they meet the
constraints". So instead, I modeled the problem as a set of visits,
calculated as the max possible visits (total conference length / minimum
visit duration). Then I defined each visit to have three planning
variables: start time, duration, and whether that visit is "active". I'm
looking forward to 6.1, where it seems there's better support for numeric
ranges, but for now, just modeled start time as the set of integers
representing the time range of the convention in minutes. Finally, I
constructed a hard score based on the constraints above, and a soft score
that represents the sum of the worth of the events that occur during the
visit.
However, I'm not seeing it work out too well...the engine seems to spend a
lot of time messing around with one visit, and very little time trying out
multiple visits with different starts and durations to capture event-rich
times. I can certainly play around with parameters and engine
configuration, but I thought I should first ask if I was fundamentally going
about modeling the problem the wrong way, as I am very new to the
OptaPlanner engine.
Thanks in advance for any thoughts or suggestions!
--
View this message in context:
http://drools.46999.n3.nabble.com/OptaPlanner-best-strategy-for-variable-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.