In the previous chapter, the terminological concept of HTN planning was defined. In order to generate a valid HTN planning problem for SHOP2, a terminological concept that models the environment needs to be defined. In addition, the HTN planning operators, actors and objects must be instantiated and inserted into the corresponding
. In this chapter, a generic method for modelling the environment in HDL and filling the HDL system is introduced. Two implementations from the robotics domain are also presented, namely the robot navigation domain and the pick-and-place domain.