-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathexcel_optim_main.dfm
1178 lines (1178 loc) · 26.6 KB
/
excel_optim_main.dfm
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
object Form1: TForm1
Left = 333
Top = 135
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'GA Optimization for EXCEL'
ClientHeight = 557
ClientWidth = 484
Color = clBtnFace
Constraints.MaxHeight = 999
Constraints.MaxWidth = 492
Constraints.MinHeight = 435
Constraints.MinWidth = 401
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
Menu = MainMenu1
OldCreateOrder = False
ScreenSnap = True
ShowHint = True
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
PixelsPerInch = 120
TextHeight = 16
object pcMainPage: TPageControl
Left = 0
Top = 0
Width = 484
Height = 557
ActivePage = TabSheet3
Align = alClient
TabOrder = 0
object TabSheet3: TTabSheet
Caption = 'Model Formulation'
ImageIndex = 2
object GroupBox1: TGroupBox
Left = 0
Top = 97
Width = 476
Height = 96
Align = alTop
Caption = 'Function'
TabOrder = 1
object Label1: TLabel
Left = 256
Top = 16
Width = 30
Height = 16
Caption = 'Row:'
end
object Label18: TLabel
Left = 297
Top = 16
Width = 23
Height = 16
Caption = 'Col:'
end
object Label23: TLabel
Left = 352
Top = 16
Width = 43
Height = 16
Caption = 'Target:'
Enabled = False
end
object Label30: TLabel
Left = 8
Top = 66
Width = 18
Height = 16
Caption = 'by:'
end
object edF_R: TEdit
Left = 256
Top = 32
Width = 41
Height = 24
TabOrder = 1
Text = '12'
end
object edF_C: TEdit
Left = 297
Top = 32
Width = 40
Height = 24
TabOrder = 2
Text = '4'
end
object cbFuncTyp: TComboBox
Left = 9
Top = 32
Width = 96
Height = 24
Hint = 'Type of optimization'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 0
Text = 'Minimize'
OnChange = cbFuncTypChange
Items.Strings = (
'Minimize'
'Maximize'
'Target')
end
object edFV: TEdit
Left = 352
Top = 32
Width = 57
Height = 24
Hint = 'Target value for optimization'
Enabled = False
TabOrder = 3
Text = '0'
end
object edFunc1: TEdit
Left = 112
Top = 32
Width = 129
Height = 24
Hint = 'Function name'
MaxLength = 20
TabOrder = 4
Text = 'MinWhat'
end
object rbGATypeAd: TRadioButton
Left = 40
Top = 66
Width = 209
Height = 17
Caption = 'adjusting values in cells'
Checked = True
TabOrder = 5
TabStop = True
OnClick = rbGATypeSwClick
end
object rbGATypeSw: TRadioButton
Left = 256
Top = 66
Width = 201
Height = 17
Caption = 'swapping cells'
TabOrder = 6
OnClick = rbGATypeSwClick
end
end
object GroupBox2: TGroupBox
Left = 0
Top = 193
Width = 476
Height = 168
Align = alTop
Caption = 'Design Variables'
TabOrder = 2
object Label16: TLabel
Left = 352
Top = 16
Width = 27
Height = 16
Caption = 'Low:'
end
object Label17: TLabel
Left = 409
Top = 16
Width = 31
Height = 16
Caption = 'High:'
end
object Label2: TLabel
Left = 256
Top = 16
Width = 30
Height = 16
Caption = 'Row:'
end
object Label19: TLabel
Left = 297
Top = 16
Width = 23
Height = 16
Caption = 'Col:'
end
object edV1_R: TEdit
Left = 256
Top = 32
Width = 41
Height = 24
TabOrder = 2
Text = '2'
end
object edV1_C: TEdit
Left = 297
Top = 32
Width = 40
Height = 24
TabOrder = 3
Text = '4'
end
object edVar1: TEdit
Left = 9
Top = 32
Width = 192
Height = 24
Hint = 'Variable1 name'
MaxLength = 20
TabOrder = 0
Text = 'Var1'
end
object edVar2: TEdit
Left = 9
Top = 56
Width = 192
Height = 24
Hint = 'Variable2 name'
MaxLength = 20
TabOrder = 6
Text = 'Var2'
end
object edV2_R: TEdit
Left = 256
Top = 56
Width = 41
Height = 24
TabOrder = 8
Text = '3'
end
object edV2_C: TEdit
Left = 297
Top = 56
Width = 40
Height = 24
TabOrder = 9
Text = '4'
end
object edVar3: TEdit
Left = 9
Top = 80
Width = 192
Height = 24
Hint = 'Variable3 name'
MaxLength = 20
TabOrder = 12
Text = 'Var3'
end
object edV3_R: TEdit
Left = 256
Top = 80
Width = 41
Height = 24
TabOrder = 14
Text = '4'
end
object edV3_C: TEdit
Left = 297
Top = 80
Width = 40
Height = 24
TabOrder = 15
Text = '4'
end
object edV1L: TEdit
Left = 352
Top = 32
Width = 57
Height = 24
TabOrder = 4
Text = '0.01'
end
object edV1H: TEdit
Left = 409
Top = 32
Width = 56
Height = 24
TabOrder = 5
Text = '1000'
end
object edV2L: TEdit
Left = 352
Top = 56
Width = 57
Height = 24
TabOrder = 10
Text = '0.01'
end
object edV2H: TEdit
Left = 409
Top = 56
Width = 56
Height = 24
TabOrder = 11
Text = '1000'
end
object edV3L: TEdit
Left = 352
Top = 80
Width = 57
Height = 24
TabOrder = 16
Text = '0.01'
end
object edV3H: TEdit
Left = 409
Top = 80
Width = 56
Height = 24
TabOrder = 17
Text = '1000'
end
object cbIntVar2: TCheckBox
Left = 208
Top = 60
Width = 41
Height = 17
Hint = 'Integer values only'
Caption = 'Int.'
TabOrder = 7
end
object cbIntVar3: TCheckBox
Left = 208
Top = 84
Width = 41
Height = 17
Hint = 'Integer values only'
Caption = 'Int.'
TabOrder = 13
end
object cbIntVar1: TCheckBox
Left = 208
Top = 36
Width = 41
Height = 17
Hint = 'Integer values only'
Caption = 'Int.'
TabOrder = 1
end
object edVar4: TEdit
Left = 9
Top = 104
Width = 192
Height = 24
Hint = 'Variable4 name'
MaxLength = 20
TabOrder = 18
Text = 'Var4'
end
object cbIntVar4: TCheckBox
Left = 208
Top = 108
Width = 41
Height = 17
Hint = 'Integer values only'
Caption = 'Int.'
TabOrder = 19
end
object edV4_R: TEdit
Left = 256
Top = 104
Width = 41
Height = 24
TabOrder = 20
Text = '4'
end
object edV4_C: TEdit
Left = 297
Top = 104
Width = 40
Height = 24
TabOrder = 21
Text = '4'
end
object edV4L: TEdit
Left = 352
Top = 104
Width = 57
Height = 24
TabOrder = 22
Text = '0.01'
end
object edV4H: TEdit
Left = 409
Top = 104
Width = 56
Height = 24
TabOrder = 23
Text = '1000'
end
object edVar5: TEdit
Left = 9
Top = 128
Width = 192
Height = 24
Hint = 'Variable5 name'
MaxLength = 20
TabOrder = 24
Text = 'Var5'
end
object cbIntVar5: TCheckBox
Left = 208
Top = 132
Width = 41
Height = 17
Hint = 'Integer values only'
Caption = 'Int.'
TabOrder = 25
end
object edV5_R: TEdit
Left = 256
Top = 128
Width = 41
Height = 24
TabOrder = 26
Text = '4'
end
object edV5_C: TEdit
Left = 297
Top = 128
Width = 40
Height = 24
TabOrder = 27
Text = '4'
end
object edV5L: TEdit
Left = 352
Top = 128
Width = 57
Height = 24
TabOrder = 28
Text = '0.01'
end
object edV5H: TEdit
Left = 409
Top = 128
Width = 56
Height = 24
TabOrder = 29
Text = '1000'
end
end
object GroupBox5: TGroupBox
Left = 0
Top = 361
Width = 476
Height = 165
Align = alClient
Caption = 'Constraints'
TabOrder = 3
object Label3: TLabel
Left = 256
Top = 16
Width = 30
Height = 16
Caption = 'Row:'
end
object Label20: TLabel
Left = 297
Top = 16
Width = 23
Height = 16
Caption = 'Col:'
end
object Label21: TLabel
Left = 409
Top = 16
Width = 38
Height = 16
Caption = 'Value:'
end
object edC1_R: TEdit
Left = 256
Top = 32
Width = 41
Height = 24
TabOrder = 1
Text = '6'
end
object edC1_C: TEdit
Left = 297
Top = 32
Width = 40
Height = 24
TabOrder = 2
Text = '4'
end
object cbConTyp1: TComboBox
Left = 352
Top = 32
Width = 57
Height = 24
Hint = 'Type of constraint'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 3
Text = '<='
Items.Strings = (
'<='
'>='
'=')
end
object edConV1: TEdit
Left = 409
Top = 32
Width = 56
Height = 24
TabOrder = 4
Text = '0'
end
object cbConTyp2: TComboBox
Left = 352
Top = 56
Width = 57
Height = 24
Hint = 'Type of constraint'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 8
Text = '<='
Items.Strings = (
'<='
'>='
'=')
end
object edConV2: TEdit
Left = 409
Top = 56
Width = 56
Height = 24
TabOrder = 9
Text = '0'
end
object edC2_R: TEdit
Left = 256
Top = 56
Width = 41
Height = 24
TabOrder = 6
Text = '7'
end
object edC2_C: TEdit
Left = 297
Top = 56
Width = 40
Height = 24
TabOrder = 7
Text = '4'
end
object cbConTyp3: TComboBox
Left = 352
Top = 80
Width = 57
Height = 24
Hint = 'Type of constraint'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 13
Text = '<='
Items.Strings = (
'<='
'>='
'=')
end
object edConV3: TEdit
Left = 409
Top = 80
Width = 56
Height = 24
TabOrder = 14
Text = '0'
end
object edC3_R: TEdit
Left = 256
Top = 80
Width = 41
Height = 24
TabOrder = 11
Text = '8'
end
object edC3_C: TEdit
Left = 297
Top = 80
Width = 40
Height = 24
TabOrder = 12
Text = '4'
end
object cbConTyp4: TComboBox
Left = 352
Top = 104
Width = 57
Height = 24
Hint = 'Type of constraint'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 18
Text = '<='
Items.Strings = (
'<='
'>='
'=')
end
object edConV4: TEdit
Left = 409
Top = 104
Width = 56
Height = 24
TabOrder = 19
Text = '0'
end
object edC4_R: TEdit
Left = 256
Top = 104
Width = 41
Height = 24
TabOrder = 16
Text = '9'
end
object edC4_C: TEdit
Left = 297
Top = 104
Width = 40
Height = 24
TabOrder = 17
Text = '4'
end
object edCon1: TEdit
Left = 9
Top = 32
Width = 232
Height = 24
Hint = 'Constraint1 name'
MaxLength = 20
TabOrder = 0
Text = 'Con1'
end
object edCon2: TEdit
Left = 9
Top = 56
Width = 232
Height = 24
Hint = 'Constraint2 name'
MaxLength = 20
TabOrder = 5
Text = 'Con2'
end
object edCon3: TEdit
Left = 9
Top = 80
Width = 232
Height = 24
Hint = 'Constraint3 name'
MaxLength = 20
TabOrder = 10
Text = 'Con3'
end
object edCon4: TEdit
Left = 9
Top = 104
Width = 232
Height = 24
Hint = 'Constraint4 name'
MaxLength = 20
TabOrder = 15
Text = 'Con4'
end
object edCon5: TEdit
Left = 9
Top = 128
Width = 232
Height = 24
Hint = 'Constraint5 name'
MaxLength = 20
TabOrder = 20
Text = 'Con5'
end
object edC5_R: TEdit
Left = 256
Top = 128
Width = 41
Height = 24
TabOrder = 21
Text = '10'
end
object edC5_C: TEdit
Left = 297
Top = 128
Width = 40
Height = 24
TabOrder = 22
Text = '4'
end
object cbConTyp5: TComboBox
Left = 352
Top = 128
Width = 57
Height = 24
Hint = 'Type of constraint'
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 23
Text = '<='
Items.Strings = (
'<='
'>='
'=')
end
object edConV5: TEdit
Left = 409
Top = 128
Width = 56
Height = 24
TabOrder = 24
Text = '0'
end
end
object GroupBox6: TGroupBox
Left = 0
Top = 0
Width = 476
Height = 97
Align = alTop
Caption = 'EXCEL File'
TabOrder = 0
object Label27: TLabel
Left = 8
Top = 60
Width = 38
Height = 16
Caption = 'Sheet:'
end
object edExcelFilename: TEdit
Left = 64
Top = 25
Width = 377
Height = 24
Hint = 'EXCEL file name'
TabStop = False
ReadOnly = True
TabOrder = 2
Text = 'Select file...'
end
object btFileSelect: TButton
Left = 441
Top = 25
Width = 24
Height = 24
Hint = 'Select EXCEL file...'
Caption = '...'
TabOrder = 0
OnClick = btFileSelectClick
end
object cbWorkSheets: TComboBox
Left = 64
Top = 56
Width = 377
Height = 24
Hint = 'Worksheet with calculation cells'
Style = csDropDownList
ItemHeight = 16
TabOrder = 1
OnChange = cbWorkSheetsChange
end
object Button1: TButton
Left = 8
Top = 24
Width = 49
Height = 25
Hint = 'Load Model...'
Caption = 'Model'
TabOrder = 3
OnClick = LoadDefinition1Click
end
end
end
object TabSheet2: TTabSheet
Caption = 'Run GA'
ImageIndex = 1
object GroupBox3: TGroupBox
Left = 0
Top = 0
Width = 476
Height = 526
Align = alClient
Caption = 'Optimize in EXCEL'
TabOrder = 0
object btnRun: TButton
Left = 9
Top = 25
Width = 80
Height = 32
Caption = 'Run'
TabOrder = 0
OnClick = btnRunClick
end
object StatusBar1: TStatusBar
Left = 2
Top = 505
Width = 472
Height = 19
Panels = <>
SimplePanel = True
end
object cbPlotAll: TCheckBox
Left = 112
Top = 32
Width = 289
Height = 17
Caption = 'Plot each chromosome in every generation'
TabOrder = 1
end
object Memo1: TMemo
Left = 2
Top = 67
Width = 472
Height = 438
Align = alBottom
Anchors = [akLeft, akTop, akRight, akBottom]
ScrollBars = ssVertical
TabOrder = 2
end
end
end
object TabSheet1: TTabSheet
Caption = 'GA Settings'
object gbPopulation: TGroupBox
Left = 0
Top = 0
Width = 476
Height = 185
Align = alTop
Caption = 'Population Parameters'
TabOrder = 0
object Label4: TLabel
Left = 25
Top = 22
Width = 230
Height = 16
Caption = 'Number of chromosomes in population'
end
object Label5: TLabel
Left = 25
Top = 52
Width = 132
Height = 16
Caption = 'Cross-over probability'
end
object Label6: TLabel
Left = 25
Top = 148
Width = 175
Height = 16
Caption = 'Random selection probability'
end
object Label8: TLabel
Left = 25
Top = 116
Width = 200
Height = 16
Caption = 'Chromosome mutation probability'
end
object Label9: TLabel
Left = 25
Top = 84
Width = 95
Height = 16
Caption = 'Cross-over type'
end
object Label10: TLabel
Left = 368
Top = 52
Width = 44
Height = 16
Caption = '0.6 - 0.8'
end
object Label11: TLabel
Left = 368
Top = 116
Width = 58
Height = 16
Caption = '0.01 - 0.02'
end
object Label12: TLabel
Left = 368
Top = 84
Width = 58
Height = 16
Caption = 'One Point'
end
object Label24: TLabel
Left = 368
Top = 20
Width = 80
Height = 16
Caption = '2N - 4N, even'
end
object Label26: TLabel
Left = 368
Top = 148
Width = 17
Height = 16
Caption = '0.1'
end
object edNumChrom: TSpinEdit
Left = 288
Top = 17
Width = 73
Height = 26
MaxValue = 999
MinValue = 0
TabOrder = 0
Value = 16
end
object edCrossProb: TEdit
Left = 288
Top = 49
Width = 73
Height = 24
TabOrder = 1
Text = '0.9'
end
object edRandSelProb: TEdit
Left = 288
Top = 145
Width = 73
Height = 24
TabOrder = 4
Text = '0.1'
end
object edChromMutProb: TEdit
Left = 288
Top = 113
Width = 73
Height = 24
TabOrder = 3
Text = '0.1'
end
object cbCrossType: TComboBox
Left = 240
Top = 81
Width = 121
Height = 24
Style = csDropDownList
ItemHeight = 16
ItemIndex = 0
TabOrder = 2
Text = 'One Point'
Items.Strings = (
'One Point'
'Two Points'
'Uniform'
'Random Method')
end
end
object GroupBox4: TGroupBox
Left = 0
Top = 276
Width = 476
Height = 133
Align = alTop
Caption = 'Main Run Parameters'
TabOrder = 2
object Label7: TLabel
Left = 25
Top = 22
Width = 164
Height = 16
Caption = 'Max. number of generations'
end
object Label15: TLabel
Left = 25
Top = 53
Width = 227
Height = 16
Caption = 'Convergence tolerance (on Avg. Dev.)'
end
object Label25: TLabel
Left = 25
Top = 83
Width = 151
Height = 16
Caption = 'Numeric precision (digits)'
end
object Label28: TLabel
Left = 40
Top = 104
Width = 296
Height = 16
Caption = '(rounds variables and constraints to this precision)'
end
object edMaxGen: TSpinEdit
Left = 288
Top = 17
Width = 73
Height = 26