Professional Documents
Culture Documents
Previous
Index
Next
1 Contents
This tutorial will allow the construction of a complete process flow on a simple case. The problem is related to the optimization of a welded beam, with references to: minimum cost minimum deflection at beam end satisfying constraints related to admissible stress Source code is provided to allow compilation on any platform (a C compiler is required) 1.1 Problem definition 1.2 Starting the system 1.3 Design Logic Creation 1.4 Handling Input Data 1.5 Handling Output Data 1.6 Actions Creation 1.7 Creating Constraints 1.8 Creating Objectives 1.9 Design of Experiment 1.10 Scheduler (Optimizer) 1.11 Run 1.12 Assessment
Previous
Top
Next
Previous
Index
Next
Input Data 5 geometrical parameters (L, S, H, T, B) Load Value (F) Young Module (Young) Material Cost per Volume unit (Mc) Wel Cost per Volume unit (Wc) Output Data Displacement at the end of the Beam (Disp) Max Shear Stress (MaxS) Max Normal Stress (MaxT) Material Volume (Mvol) Weld Volume (Wvol) Fig. T1.1.1: a case of study. It is a rectangular section beam welded at one end and loaded at the other end. There are 5 parameters defining the geometry, one load value, the young modulus of the material, the weld and material costs (per unit volume).
3
The simulation program will provide the displacement of the beam, the maximum shear and normal stresses, the volume of the weld and of the beam. From the data flow point of view there will be 9 input values and 5 output values in total. The program, a sample of input file, and a sample of output file are available in the directory:
/.../FRONTIER25x/doc/html/tutorial/project
Previous
Top
Next
Previous
Index
Next
for Microsoft Windows users, click on modeFRONTIER icon. Now the system can be activated by typing frontier with the following options:
Usage: frontier [options] [project file] Options: batch name.prj verbose nConcDes n clearDesDir evalDuplDes delErrorDes rsmPercentage r priority p nobuffer unixshell classic version fullversion help
Specify the project file to run in batch. The verbose output. Number n of Concurrent Design Evaluations [1,128] (Default=1). Clear the design directory after evaluation. Evaluate the already present designs. Delete the error designs from data base. RSM r Percentage [1,100] (Default=0). Priority of the running processes (0=High,19=Low) (Default=0). The Display double buffering is disabled. Uses an external Unixlike shell (Windows only). Uses The Classic Frontier Look and Feel. Prints out the Frontier version number. Prints out the Frontier full version data. This help screen.
The modeFRONTIER welcome screen will pop up and a noname.prj project is loaded.
Previous
Top
Next
Previous
Index
Next
Fig. T1.3.1: the Process Flow window. This can be activated by clicking on the corresponding tab identified by the icon or selecting Project|Process Flow from the menu. The window is divided into three parts: the top part ("Graphic Flow", marked in a aqua box): it is the desktop where the logic is created. the bottom part ("Logic Log/Summary", marked in a yellow box): click on one of the tabs to toggle between their respective panels.
6
The "Logic Log" panel shows a text commenting the logic created so far and warnings or errors detected by the justintime logic compiler. The "Summary" panel shows a brief summary of the project, about its components and their relevant properties; thus it's possible to keep the entire process logic under control with just a glance. The left part (a "tool bar" marked in a fuchsia box): it includes all the components needed to create a working design logic. Since a successful logic starts from input data and ends with output data, it is better to define these entities first. These input/output variables can however be completed, modified, created or removed at any time during the logic creation process. To place a component on the Graphic Flow desktop, select it by clicking on the left tool bar, then click on the desktop as many times as the number of objects needed. Once a component is created, you can select it with a click, access its properties by a double click. With a RMB click a menu will popup menu, where you can select some actions to perform on the component: Toggle to toggle the object selected/unselected. Remove Node to remove the selected object from the logic flow. Remove Links to remove all links from the selected object to any other node previously linked to. To leave the "component insertion mode" click on the neutral icon on top of the Graphic Flow tool bar. Let's start creating 9 input variables and 5 output variables selecting the icons from the palette on the left and placing the items on the Process Flow area (Fig. T1.3.2). Note: from now on, an "RMB click" will indicate a click with the right mouse button, while an "LMB click" or simply "click" will indicate a click with the left mouse button.
Fig. T1.3.2: the Process Flow desktop with all variables placed.
Now set the input and output variables the correct names: to do this, enter the variable properties dialog, by double clicking on each variable object (Fig. T1.3.3).
Fig. T1.3.3: Input variable properties window. Variables names and properties can also be modified using the Summary Panel, RMB clicking on a free area of the Graphic Flow Desktop. In this example the Young module, S, F, Mc and Wc are kept constant. The base parameter gives the number of values that each variable can accept. In this case the beam thickness B can vary from 1 to 15 mm but on finite steps of 1 mm so the variable B will have:
B lower bound = 1 B upper bound = 15 B base = 15
Note: if the Lower Bound and Upper Bound properties are equal, the variable is kept constant and is not considered by the optimisation algorithms. After all input variables are renamed and set and all output variables are renamed, you can check the Summary panel and the result for input and output variable should look like (Fig. T1.3.4).
Fig. T1.3.4: the Summary Table for input and output variables. After the variables have been set up, the Process Flow Window should appear like in Fig. T1.3.5.
Previous
Top
Next
Previous
Index
Next
10
Fig. T1.4.1: input File properties. Now the template file must be created. This can be done editing an existing input file using the Open button and looking for a suitable file. For this tutorial a correct input file can be found in:
/.../FRONTIER25x/doc/html/tutorial/project/beam_input.dat
11
Fig. T1.4.2: open file dialog. The selected file will be opened in an editor, with below a list of all input variables selected previously. To include a variable into the file follow this procedure: 1. click on the grid to select the variable to be included 2. highlight with the mouse pointer the corresponding value on the file editor 3. click with the RMB to show a popup menu and select Insert Variable (Fig. T1.4.3) 4. specify the correct format (Fig. T1.4.4)
12
Fig. T1.4.4: selecting a number format. Repeat until all input variables are properly linked to the input file, the result will be like in Fig. T1.4.5.
13
Fig. T1.4.5: all input variables are inserted. Note: pay attention to the check boxes close to the variable names. As the input variable insertion process progresses, the system marks checked every variable correctly inserted. Note: the system will not allow the insertion of variables if special characters are included into the selected string. The endofline is also a special character, the number must be precisely selected! Click on the Ok button to accept all changes. To define the output variables in the output file, follow similar procedure.
Previous
Top
Next
14
Previous
Index
Next
Fig. T1.5.1: output File properties. Now all output variables must be mined from the output file. First select a suitable file using the Browse button in the Output File properties window, then select a suitable file and click on the Select button, see (Fig. T1.5.2). For this tutorial a correct output file can be found in:
15
/.../FRONTIER25x/doc/html/tutorial/project/beam_output.dat
Fig. T1.5.2: open file dialog. At this point, a Template Output Editor window will show, where the selected file will be edited to mine all output variables previously selected (they are shown in the grid below the text) as seen in Fig. T1.5.3.
Fig. T1.5.3: setting relative position. To mine an output variable from the file follow this procedure: 1. click on the grid to select the variable to be mined 2. highlight with the mouse pointer a corresponding word inside the file. This mark will be the point where the parser will start to search the output value for that output variable. Note: a variable position can be either absolute (i.e. its value is in an absolute position in the file structure) or relative (i.e. its value is relative to a certain keyword inside the file). 3. click with the RMB to show a popup menu and select Relative Position
16
4. highlight with the mouse pointer the value corresponding to the variable just defined 5. click with the RMB to show a popup menu and select Select Relative (Fig. T1.5.4)
Fig. T1.5.4: setting relative value. Repeat until all output variables are properly mined from the output file, the result will be like in Fig. T1.5.5.
Fig. T1.5.5: all output variables are selected. Note: pay attention to the check boxes close to the variable names. As the output variable mining process progresses, the system marks checked every variable correctly mined, until all are done. Click on the Ok button to accept all changes, now the Graphic Flow Desktop should look like in Fig. T1.5.6.
17
Fig. T1.5.6: the Process Flow after the output variable mining.
Previous
Top
Next
18
Previous
Index
Next
Fig. T1.6.1: application properties. So far we setup a logic flow, in which an application named weldedbeam is executed first, it gathers all the input data it needs from a file named beam_input.dat. Upon successful exit of the application (exit condition =0), the output file, named beam_output.dat, is created, the output variables are extracted and a logic completed signal is sent to modeFRONTIER. Otherwise (exit condition 0) a logic failed signal is sent to modeFRONTIER. Click the Apply button to accept all changes, the project flow will result like in Fig. T1.6.2.
19
Fig. T1.6.2: New Application configured. Now the Logic Log reports an error: a script file for the weldedbeam node is missing. A script file is needed in order to launch the application, it can be very simple or more sophisticated according to the user needs. In this case we have to create one simple script file executing the program weldedbeam (see Fig. T1.6.3): Enter the weldedbeam properties window. Select the Edit button and a simple text editor will show. Write a simple batch of commands, of which the most essential is the call to the weldedbeam executable file. Select the Ok button to confirm all changes. Note: so far it was assumed that the file
/.../FRONTIER25x/doc/html/tutorial/project/weldedbeam
was a correct executable file. Anyhow remember to compile this file to make it executable on your own computer architecture and Operating System. A source file for the weldedbeam application is provided with this tutorial and can be found in
20
/.../FRONTIER25x/doc/html/tutorial/project/weldedbeam.c
Fig. T1.6.3: Application Script Editor. When all the modifications have been accepted, the Logic Log will show no further errors. Now the logic is laid dowm correctly and can be used.
Previous
Top
Next
21
Previous
Index
Next
Fig. T1.7.1: Constraint Properties window. We also need to connect this constraint to its corresponding Input Variables in the graphic flow (B and H), so enter the Input Variables Properties window for B and H and mark checked BH in the Possible output nodes list. Do the same for the other constraints. Introducing a constraint named Shear for the max shear output and a constraint named Normal for the normal shear output.
Previous
Top
Next
22
Previous
Index
Next
Fig. T1.8.1: Objective Cost Properties window. Do the same for the objective D (Fig. T1.8.2).
23
Finally the Logic is completed and the desktop should look like in Fig. T1.8.3. Note: no error or warning messages should appear in the logic log, no objects should have a yellow border!
Previous
Top
Next
24
Previous
Index
Next
User Sequence: based on a custom user sequence, the user must specify the number of designs and provide the values for each design. Random Sequence: random values will be generated for the number of designs required. Sobol: based on a pseudorandom Sobol sequence, it assures a uniform distribution of the starting values. Monte Carlo: based on a Gaussian distribution process. Full Factorial: this is a systematic series of experiments. In case of large numbers of variables, a lot of cases are generated: nlevel^ninputs. Reduced Factorial: based on a 2 level reduced factorial sequence. Cubic Face Centered: based on the Cubic Face Centered method, is equivalent to a full factorial with 2 levels plus the center of each hyper face. BoxBehnken: based on the BoxBenhken method. Latin Square: based on the GraecoLatin square method. Taguchi Matrix based on Taguchi orthogonal array. Plackett Burman based on PlackettBurman orthogonal array. Once created, the table can be manually modified by editing the values. Operations as cut are possible, as well the values can be imported from a file. Fig. T1.9.1 shows a case with 10 initial designs generated using the Sobol algorithm. , copy , paste
25
Fig. T1.9.1: a Sobol generated DOE. You can change the design execution order of the set of DOE values in this way: select and highlight with a click the row in the table you want to move RMB click to show the pop up menu select the action you want to perform When you want to import the values from a file (usually named *.des), be sure it is an ASCII file and that the data are arranged in a table as the one below:
<ID> 000000 000001 000002 H 8 4 12 L 2.652352352352e+001 1.476176176176e+001 3.828528528529e+001 S 10 10 10 T 3.002002002002e+001 2.001001001001e+001 4.003003003003e+001 B 8 4.5 11.5 F 150 150 150 Wc 1 1 1 Mc 0.001 0.001 0.001 Young 2.1e+005 2.1e+005 2.1e+005
Names and values can be separated by comma, blank, tab you must define a <ID> column, that identifies the ID of the imported designs.
26
The parser will import only columns with a name that corresponds to the name of input or output variables defined in the Process Flow window. Note: a table without an <ID> column will not be read!
Previous
Top
Next
27
Previous
Index
Next
28
Previous
Top
Next
29
Previous
Index
Next
1.11 Run
Now we want to run the optimization: enter the Run Analysis window clicking the Run tab identified by the icon or select from the menu Project|Run. To start the analysis cycle, press the Run button at the bottom of the window, you will have to save the project before the run is started (see Fig. T1.11.1). Save the project and press the Run button to start the optimization.
Fig. T1.11.1: ready to run. While the simulation is running, the Run Analysis window will display all the important log informations.
30
The top frame displays all the messages coming from the scheduler and the process flow (solver stdout, stderr, pwd, logic error messages etc.). You can navigate through all the generated designs following the proper links. The bottom frame shows the current Process Table (Pid, Id, Design ID, Design PWD, Elapsed Time). If you want to kill one of the tasks currently running, select the task from the Process Table and click the Stop Process button. Note: to stop the whole analysis, click the Stop All Processes button.
Previous
Top
Next
31
Previous
Index
Next
1.12 Assessment
You can monitor the optimization process while it is running or after it finished. Enter the design space clicking on the Design Space tab identified by the icon or selecting Assessment|Design Space from the main menu. The Design Space table shows the results obtained so far (Fig. T1.12.1) and below a summary of the current situation (number of designs, failed, broken, errors etc)
Fig. T1.12.1: design space. As those values are not really easy to understand at a glance, you can use a tool that let you create several types of charts, so the results will be more evident. Click on the Chart icon to access the chart desktop (Fig. T1.12.2) where you can place dynamic charts. Different types of graphs can be created using any of the values available in the table: scatter plot, history plot and parallel coordinate plot. The designs that are violating the constraints are plotted in blue, the feasible solutions are plotted in white. Clicking on a design point will mark it for further operations.
32
Fig. T1.12.2: Chart Desktop. As a post processing example, the parallel coordinate graph is here shown enlarged with the marked Pareto design in yellow. A design filter can be built moving the red lines with the mouse. You can zoom in the graph by pressing the SHIFT key and click on the chart. To restore press R key (see Fig. T1.12.3).
33
Fig. T1.12.3: Filtered Chart. In the Design Space window, we can apply a specific filter selecting from the main menu Assessment|Mark|Mark Pareto Designs|Only Real: this filter will select all the non dominated solutions in the database. When the system is not running you can change the specifications for objectives and constraints, and the changes are reflected in the visualisation and database of the Design Space table. Supposing you are satisfied by design 54 and you want to refine the solution, you can keep the displacement as a constraint and use the cost as a single objective, then use SIMPLEX scheduler to look for further improvements: 1. select design 54 from the Design Space table and copy it 2. go to the DOE window 3. select all designs and cut them to delete them 4. paste the design in the table 5. go to the design flow window, modify constraints and objectives 6. go to the scheduler window and select SIMPLEX 7. run again the optimization 8. go to the Design Space to see the data
Previous
Top
Next
34
35