The circle geometric constraint model (CGCM) was put forward for resolving the open-pit mine ore-matching problems (OMOMP). By adopting the approaches of graph theory, block model of blasted piles was abstracted i...The circle geometric constraint model (CGCM) was put forward for resolving the open-pit mine ore-matching problems (OMOMP). By adopting the approaches of graph theory, block model of blasted piles was abstracted into a set of nodes and directed edges, which were connected together with other nodes in the range of circle constraints, to describe the mining sequence. Also, the constructing method of CGCM was introduced in detail. The algorithm of CGCM has been realized in the DIM1NE system, and applied to a short-term (5 d) program calculation for ore-matching of a cement limestone mine in Hebei Province, China. The applications show that CGCM can well describe the mining sequence of ore blocks and its mining geometric constraints in the process of mining blasted piles. This model, which is applicable for resolving OMOMP under complicated geometric constraints with accurate results, provides effective ways to solve the problems of open-pit ore-matching.展开更多
Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional s...Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.展开更多
基金Project(2011AA060407) supported by the National High Technology Research and Development Program of ChinaProject(51074073) supported by the National Natural Science Foundation of China
文摘The circle geometric constraint model (CGCM) was put forward for resolving the open-pit mine ore-matching problems (OMOMP). By adopting the approaches of graph theory, block model of blasted piles was abstracted into a set of nodes and directed edges, which were connected together with other nodes in the range of circle constraints, to describe the mining sequence. Also, the constructing method of CGCM was introduced in detail. The algorithm of CGCM has been realized in the DIM1NE system, and applied to a short-term (5 d) program calculation for ore-matching of a cement limestone mine in Hebei Province, China. The applications show that CGCM can well describe the mining sequence of ore blocks and its mining geometric constraints in the process of mining blasted piles. This model, which is applicable for resolving OMOMP under complicated geometric constraints with accurate results, provides effective ways to solve the problems of open-pit ore-matching.
文摘Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.