Download PDF

Transcript
CHAPTER 2. HIGH LEVEL DESIGN
2.4
12
High level structure
Once the external API is clearly defined, we can start looking at the next
level of internal structure. This will depend on the intended purpose of the
system, but we can identify some typical structures that can be found in
many applications. Here, we present two typical designs, one for solving
combinatorial problems, the other for transforming data.
2.4.1
Classical LSCO structure
This structure is typical for large scale combinatorial optimization (LSCO)
problems. The flow analysis part of RiskWise follows this structure. It
consists of five parts, where each performs one particular task.
prepare data
?
create variables
?
create constraints
?
find solution
?
output results
Figure 2.3: LCSO Application structure
prepare data In this module we read the data and prepare the data structures that are required for the problem solver. These data structures
should group information that belongs together in one record, and must
allow fast access to the data, so that the following application parts can
access it easily.
create variables This is followed by the variable generation, where we create all variables that will be used in the solver. These variables will
simply be placed in slots already provided in the data structures.