forked from mabrauer/hyperloop_sl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startHere.m
44 lines (40 loc) · 1.77 KB
/
startHere.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
%% Initial set-up of project paths and such
[projectRoot, hadToOpen] = set_up_HyperloopProject;
%% Initiate user specified workflow
if not(hadToOpen) % only initiate workflows if project was already open
setupRtStr = 'Set up a route';
runSimStr = 'Run a simulation from existing route';
runVisStr = 'Run visualization from existing simultion';
workflow = questdlg( 'What would you like to do?','Desired workflow',...
setupRtStr,runSimStr,runVisStr,setupRtStr);
switch workflow
case setupRtStr
clear setupRtStr runSimStr runVisStr workflow hadToOpen
newRtStr = 'Import a new route';
modifyRtStr = 'Modify an existing route';
routeWorkflow = ...
questdlg('What would you like to do with the route?',...
'Route',newRtStr,modifyRtStr,newRtStr);
switch routeWorkflow
case newRtStr
clear routeWorkflow newRtStr modifyRtStr
set_up_newRoute
case modifyRtStr
clear routeWorkflow newRtStr modifyRtStr
modifyRoute
case ''
clear routeWorkflow newRtStr modifyRtStr
disp('User did not select a workflow')
end
case runSimStr
clear setupRtStr runSimStr runVisStr workflow hadToOpen
set_up_runSim
case runVisStr
clear setupRtStr runSimStr runVisStr workflow hadToOpen
main_sl2ge
case ''
clear newRtStr runSimStr runVisStr workflow hadToOpen
disp('User did not select a workflow')
end
% projectRoot should be the only variable retained at end
end