function [DataFile,AddPath,ForwardModel,RangeParameters,ni,MaxGenerations,PopulationSize,n,str]=InputParametersInversion % Subroutine to impose the input parameters of the software: % % The name of the monitoring stations in str % % The path of the folder in AddPath in which to put the output results % % The observed deformation data using an external file DataFile % % PARAMETERS TO SET THE FORWARD MODEL % % The parameter "SourceType" to choose between the different geometric shapes: % sphere (1), rectangular prism (2), prolate or oblate ellipsoid (3), triaxial ellipsoid (4), cylinder (5) % % The parameter "SourceRotation" to choose (for the ellipsoids and the rectangular prism) % whether to fix the position of the source (SourceRotation=0) or or rotate the source in space (SourceRotation=1) % % The range of values of the parameters that define the source % % PARAMETERS TO SET THE OPTIMIZATION ALGORITHM % % PopulationSize and MaxGeneration to set the population size and the % maximum number of generations of the genetic algorithm % % The objective function in the subroutine objfuncGA.m % % The number n of simulations you want to run %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PARAMETERS TO SET THE FORWARD MODEL %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ni=0.25; % Poisson's ratio %% Load the folder path AddPath=''; %% Load the text file with the observed deformations data DataFile=load('data.txt'); % in column: x coordinate of the monitoring station (Xobs), y coordinate of the monitoring station (Yobs), Ux (x component of the observed deformations), Uy (y component of the observed deformations), Uz (z component of the observed deformations) % name of the stations str=["IVCR","IVGP","VCSP","IVLT","IVUG","VVLC"]; %% Choose the deformation source (forward model) % SourceType=1 --> sphere % SourceType=2 --> rectangular prism % SourceType=3 --> prolate or oblate ellipsoid % SourceType=4 --> triaxial ellipsoid % SourceType=5 --> cylinder SourceType=1; %% Choose the orientation of the source % SourceRotation=1 --> the source rotate % SourceRotation=0 --> the source does not rotate if SourceType==2||SourceType==3||SourceType==4 SourceRotation=0; ForwardModel=[SourceType, SourceRotation]; elseif SourceType==1||SourceType==5 ForwardModel=[SourceType]; end %% Choose the variability range of the source parameters % source coordinates (Xc,Yc) Xc=[494516 498516]'; % [m] Yc=[4248788 4252788]'; % [m] switch SourceType case 1 % sphere Zc=[-1500 -100]'; % [m] RangeParameters=[Xc,Yc,Zc]; case 2 % rectangular prism depth=[-1000 -10]'; % upper limit of the prism % [m] l_a=[100 1000]'; % prism width % [m] l_b=[100 1000]'; % prism depth % [m] l_c=[100 1000]'; % prism height % [m] RangeParameters=[Xc,Yc,depth,l_a,l_b,l_c]; if SourceRotation==1 % yes rotation alpha=[0 180]'; % rotation angle around the z axis delta=[0 90]'; % rotation angle around the y axis gamma=[0 90]'; % rotation angle around the x axis RangeParameters=[RangeParameters,alpha,delta,gamma]; end case 3 % prolate or oblate ellipsoid a=[100 500]'; % length of the semi-axis along the x direction % [m] b=[100 500]'; % length of the semi-axis along the y direction % [m] depth=[-1000 -10]'; % upper limit % [m] RangeParameters=[Xc,Yc,depth,a,b]; if SourceRotation==1 % yes rotation alpha=[0 180]'; % rotation angle around the z axis delta=[0 90]'; % rotation angle around the y axis gamma=[0 90]'; % rotation angle around the x axis RangeParameters=[RangeParameters,alpha,delta,gamma]; end case 4 % triaxial ellipsoid a=[100 500]'; % length of the semi-axis along the x direction % [m] b=[100 500]'; % length of the semi-axis along the y direction % [m] c=[100 500]'; % length of the semi-axis along the z direction % [m] depth=[-1000 -10]'; % upper limit % [m] RangeParameters=[Xc,Yc,depth,a,b,c]; if SourceRotation==1 % yes rotation alpha=[0 180]'; % rotation angle around the z axis delta=[0 90]'; % rotation angle around the y axis gamma=[0 90]'; % rotation angle around the x axis RangeParameters=[RangeParameters,alpha,delta,gamma]; end case 5 % cylinder depth=[-1000 -10]'; % upper limit % [m] R=[100 800]'; % radius % [m] h=[100 1000]'; % height % [m] RangeParameters=[Xc,Yc,depth,R,h]; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PARAMETERS TO SET THE GENETIC ALGORITHM %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Choose the maximum number of generations MaxGenerations=25; %% Choose the population size PopulationSize=100; %% Choose the number of simulations to run n=200;