Note that this is for advanced users, for normal users the simple configuration should suffice.
8.6. Advanced Greedy Fit
8.6.1. Algorithm description
Advanced Greedy Fit is versatile, generic form of First Fit, First Fit Decreasing, Best Fit and Best Fit Decreasing.
8.6.2. Configuration
A Best Fit Decreasing configuration for a single entity class with a single variable (which is the verbose version of the simple constructionHeuristicType BEST_FIT_DECREASING configuration):
<constructionHeuristic>
<queuedEntityPlacer>
<entitySelector id="placerEntitySelector">
<cacheType>PHASE</cacheType>
<selectionOrder>SORTED</selectionOrder>
<sorterManner>DECREASING_DIFFICULTY</sorterManner>
</entitySelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
<valueSelector>
<cacheType>PHASE</cacheType>
<selectionOrder>SORTED</selectionOrder>
<sorterManner>INCREASING_STRENGTH</sorterManner>
</valueSelector>
</changeMoveSelector>
</queuedEntityPlacer>
<!--<forager>-->
<!--<pickEarlyType>FIRST_NON_DETERIORATING_SCORE</pickEarlyType>-->
<!--</forager>-->
</constructionHeuristic>
Per step, the QueuedEntityPlacer selects 1 uninitialized entity from the EntitySelector and applies the winning Move (out of all the moves for that entity generated by the MoveSelector). The mimic selection ensures that the winning Move changes (only) the selected entity.
To customize the entity or value sorting, see sorted selection. Other Selector customization (such as filtering) is supported too.
8.6.3. Multiple variables
There are 2 ways to deal with multiple variables, depending on how their ChangeMoves are combined:
- Cartesian product of the ChangeMoves (default): All variables of the selected entity are assigned together. Has far better results (especially for timetabling use cases).
- Sequential ChangeMoves: One variable is assigned at a time. Scales much better, especially for 3 or more variables.
For example, presume a course scheduling example with 200 rooms and 40 periods.
This First Fit configuration for a single entity class with 2 variables, using a cartesian product of their ChangeMoves, will select 8000 moves per entity:
<constructionHeuristic>
<queuedEntityPlacer>
<entitySelector id="placerEntitySelector">
<cacheType>PHASE</cacheType>
</entitySelector>
<cartesianProductMoveSelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
<valueSelector>
<variableName>room</variableName>
</valueSelector>
</changeMoveSelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
<valueSelector>
<variableName>period</variableName>
</valueSelector>
</changeMoveSelector>
</cartesianProductMoveSelector>
</queuedEntityPlacer>
...
</constructionHeuristic>
Warning: With 3 variables of 1000 values each, a cartesian product selects 1000000000 values per entity, which will take far too long.
This First Fit configuration for a single entity class with 2 variables, using sequential ChangeMoves, will select 240 moves per entity:
<constructionHeuristic>
<queuedEntityPlacer>
<entitySelector id="placerEntitySelector">
<cacheType>PHASE</cacheType>
</entitySelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
<valueSelector>
<variableName>period</variableName>
</valueSelector>
</changeMoveSelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
<valueSelector>
<variableName>room</variableName>
</valueSelector>
</changeMoveSelector>
</queuedEntityPlacer>
...
</constructionHeuristic>
Important: Especially for sequential ChangeMoves, the order of the variables is important. In the example above, it's better to select the period first (instead of the other way around), because there are more hard constraints that do not involve the room (for example: no teacher should teach 2 lectures at the same time). Let the Benchmarker guide you.
With 3 or more variables, it's possible to combine the cartesian product and sequential techniques:
<constructionHeuristic>
<queuedEntityPlacer>
...
<cartesianProductMoveSelector>
<changeMoveSelector>...</changeMoveSelector>
<changeMoveSelector>...</changeMoveSelector>
</cartesianProductMoveSelector>
<changeMoveSelector>...</changeMoveSelector>
</queuedEntityPlacer>
...
</constructionHeuristic>
8.6.4. Multiple entity classes
The easiest way to deal with multiple entity classes is to run a separate construction heuristic for each entity class:
<constructionHeuristic>
<queuedEntityPlacer>
<entitySelector id="placerEntitySelector">
<cacheType>PHASE</cacheType>
<entityClass>...DogEntity</entityClass>
</entitySelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
</changeMoveSelector>
</queuedEntityPlacer>
...
</constructionHeuristic>
<constructionHeuristic>
<queuedEntityPlacer>
<entitySelector id="placerEntitySelector">
<cacheType>PHASE</cacheType>
<entityClass>...CatEntity</entityClass>
</entitySelector>
<changeMoveSelector>
<entitySelector mimicSelectorRef="placerEntitySelector"/>
</changeMoveSelector>
</queuedEntityPlacer>
...
</constructionHeuristic>

Your blog site is so superb. How fortunate to see everything you have created. Hope you proceed to do the job tough. I wish you possess a good health and wellbeing.
ReplyDeleteThis written piece gives fastidious understanding yet. It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge
ReplyDeleteFactors that pick which kind of evaluate your job may be given depend on use or occupancy in the extended distance, intricacy of proposed operate, and dollar valuation of your suggested production.Building Permit Expediter in San Francisco CA
ReplyDeleteIt's not my very first time to visit this blog; I’m visiting this daily and acquire superb info from here day by day.
ReplyDeleteengland phone number format
Hi I was searching for the blogs for many times, now I have reached at the right place.
ReplyDeletebest indian songs
Building construction is a process of adding small or big structures to land or real property. flat roof repair
ReplyDeleteQuickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDeleteUL listed security cameras
Just saying thanks wouldn’t just be enough, for the fantastic fluency in your writing.
ReplyDeleteself storage security
This text may be value everyone’s attention. How will I learn more?
ReplyDeletesecurity camera mounts
Superb way of explaining, and great blog to get wonderful information.
ReplyDeleteself storage security cameras
Your articles make whole sense of every topic.
ReplyDeletecar wash camera systems
When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. בניית בתים פרטיים
ReplyDeleteEvery week-end I used to pay a fast visit this site, because I’d like enjoyment, because this web site conations certainly fussy material.
ReplyDeletehttp://www.telephonecodes.org
Every week-end I used to pay a fast visit this site, because I’d like enjoyment, because this web site conations certainly fussy material.
ReplyDeletetelephone
Hello, this is fastidious post I actually loved reading this.
ReplyDeletelocksmith near me
I constantly emailed this site post page to all my friends, because if prefer to read it then my all friends will too.
ReplyDeletetelephonecodes
This is really an excellent blog as well as its content.
ReplyDeletetelephonecodes.org
Note: This article records the fundamental synthetic compounds required for pool maintenance. visit this hyperlink
ReplyDeleteQuickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDeletewww.mediaonlines.com
You have performed a great job on this article. It’s very precise and highly qualitative. You have even managed to make it readable and easy to read. You have some real writing talent. Thank you so much. Fencing
ReplyDeleteWow. I am definitely going share this with a few of my friends. Very cool information.
ReplyDeleteScott Lanzon Knoxville
I constantly emailed this site post page to all my friends, because if prefer to read it then my all friends will too.
ReplyDeleteScott Lanzon Knoxville
Quickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDeleterecycled plastic furniture
The quality of your articles and contents is great.
ReplyDeletecrp plastics
This is extremely fascinating substance! I have completely delighted in perusing your focuses and have reached the conclusion that you are right about a hefty portion of them. You are extraordinary. HVAC
ReplyDeleteI agree. You have made the nice blogs with the great info in the contents.
ReplyDeleterecycled plastic furniture
Waooow!!! Magnificent blogs, this is what I wanted to search. Thanks buddy
ReplyDeletetelephone codes
I love this blog because it is user friendly with appreciative information.
ReplyDeletehttp://www.telephonecodes.org
An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers. Gutter contractors
ReplyDeleteAll construction firms are extraordinary (planners, developers, M&E and so forth) however there are promoting choices that each can use.הזזת ספרינקלרים
ReplyDeleteQuickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDeleteScott Lanzon Knoxville
You guys present there are performing an excellent job.
ReplyDeleteHealthiest Lives
Whether somebody pursuit of his vital thing, hence he or she desires to be accessible that at length, hence that thing is maintained over here.
ReplyDeleteMuscle Strain
I actually have some fans on a facebook page related to this stuff. I'll share your post with them and see what they have to say. I'm sure they'll love it though.
ReplyDeleteBlackjack
Superb way of explaining, and great blog to get wonderful information.
ReplyDeleteTABLE GAMES
It is truly a well-researched content.. ICF walls
ReplyDeleteI think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Air Conditioning Repair
ReplyDeletenice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! Georgetown crane rental
ReplyDeleteYour post is very helpful to get some effective tips to reduce weight properly. You have shared various nice photos of the same. I would like to thank you for sharing these tips. Surely I will try this at home. Keep updating more simple tips like this. property for sale in gozo
ReplyDeleteEvery week-end I used to pay a fast visit this site, because I’d like enjoyment, because this web site conations certainly fussy material.
ReplyDelete10 yard dumpster company new york
Thankyou for sharing the data which is beneficial for me and others likewise to see. Washington DC Commercial Contractor
ReplyDeleteHi I was searching for the blogs for many times, now I have reached at the right place. have a peek at these guys
ReplyDeleteYour articles and contents are encouraging. Petey Cruiser
ReplyDeleteThis written piece gives fastidious understanding yet.
ReplyDeleteclick for more info
I was pinning away for such type of blogs, thanks for posting this for us.
ReplyDeletehome security
This article is actually remarkable one it helps many new users that desire to read always the best stuff.
ReplyDeleteSelect My Shaver
I'm impressed, I must say. Very rarely do I come across a blog thats both informative and entertaining, and let me tell you, you ve hit the nail on the head. Your blog is important.. barn conversion London
ReplyDeleteAwesome work! That is quite appreciated. I hope you’ll get more success.
ReplyDelete20yarddumpstercompanynewyork
I truly appreciate your working guys, thumbs up!!
ReplyDeleteconstruction dumpster new york
It's not my very first time to visit this blog; I’m visiting this daily and acquire superb info from here day by day.
ReplyDeletevisit
This is an incredible rousing article.I am basically satisfied with your great work.You put truly exceptionally accommodating data... home inspectors fayetteville nc
ReplyDeleteI'm also visiting this site regularly, this web site is really nice and the users are genuinely sharing good thoughts.mu online
ReplyDeleteThis post is very simple to read and appreciate without leaving any details out. Great work! creative garden edging ideas
ReplyDeleteQuickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDeleteconstructiondumpsterHoover
Nice post mate, keep up the great work, just shared this with my friendz vibro stone columns
ReplyDeleteQuickly this site will indisputably be famous among all blogging people, because of its fastidious articles or reviews.
ReplyDelete20 yard dumpster company atlanta
It’s really such nice information to get advantage from.
ReplyDeletecarpenter benistar
I real glad to uncover this web internet site on bing, just what I was searching for. Parc Clematis condo
ReplyDelete