-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathProcessOptimization.m
46 lines (32 loc) · 1.67 KB
/
ProcessOptimization.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
clc
format long
parpool('local', 12);
addpath('CycleSteps')
addpath('GA_files')
load('Params')
N = 10 ;
type = 'ProcessEvaluation' ;
for i = 12:12
% load parameters
IsothermParams = IsothermPar(i, :) ;
material_propertry = SimParam(i, :) ;
material = {} ;
material{1} = material_propertry ;
material{2} = IsothermParams ;
Function = @(x) PSACycleSimulation( x, material, type, N ) ; % Function to simulate the PSA cycle
options = nsgaopt() ; % create default options structure
options.popsize = 40 ; % populaion size
options.maxGen = 60 ; % max generation
options.vartype = [1, 1, 1, 1] ;
options.outputfile = 'UTSA-16_Process.txt' ;
options.numObj = 2 ; % number of objectives
options.numVar = 4 ; % number of design variables
options.numCons = 3 ; % number of constraints
options.lb = [1e5, 10, 0.01, 0.1] ; % lower bound of x
options.ub = [10e5, 1000, 0.99, 2] ; % upper bound of x
options.nameObj = {'-purity','recovery'} ; % the objective names are showed in GUI window.
options.objfun = Function ; % objective function handle
options.useParallel = 'yes' ; % parallel computation is non-essential here
options.poolsize = 12 ; % number of worker processes
result = nsga2(options) ; % begin the optimization!
end