Added prototype of build graphical model (not finished).